-
Notifications
You must be signed in to change notification settings - Fork 60
156 lines (145 loc) · 5.04 KB
/
cpp-ci-serial-programs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: C++ CI Serial Programs
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, macos-12, ubuntu-22.04]
qt_version: ['5.12.12', '6.3.2', '6.5.2']
include:
# Windows / Qt 5.12.12
- os: windows-2022
qt_version: '5.12.12'
qt_version_major: '5'
host: 'windows'
cmake_args: '-G "Visual Studio 17 2022"'
qt_arch: 'win64_msvc2017_64'
qt_arch_path: 'msvc2017_64'
qt_modules: ''
# Windows / Qt 6.3.2
- os: windows-2022
qt_version: '6.3.2'
qt_version_major: '6'
host: 'windows'
cmake_args: '-G "Visual Studio 17 2022"'
qt_arch: 'win64_msvc2019_64'
qt_arch_path: 'msvc2019_64'
qt_modules: '-m qtmultimedia qtserialport'
# Windows / Qt 6.5.2
- os: windows-2022
qt_version: '6.5.2'
qt_version_major: '6'
host: 'windows'
cmake_args: '-G "Visual Studio 17 2022"'
qt_arch: 'win64_msvc2019_64'
qt_arch_path: 'msvc2019_64'
qt_modules: '-m qtmultimedia qtserialport'
# Mac / Qt 5.12.12
- os: macos-12
qt_version: '5.12.12'
qt_version_major: '5'
host: 'mac'
cmake_args: ''
qt_arch: 'clang_64'
qt_arch_path: 'clang_64'
qt_modules: ''
# Mac / Qt 6.3.2
- os: macos-12
qt_version: '6.3.2'
qt_version_major: '6'
host: 'mac'
cmake_args: ''
qt_arch: 'clang_64'
qt_arch_path: 'macos'
qt_modules: '-m qtmultimedia qtserialport'
# Mac / Qt 6.5.2
- os: macos-12
qt_version: '6.5.2'
qt_version_major: '6'
host: 'mac'
cmake_args: ''
qt_arch: 'clang_64'
qt_arch_path: 'macos'
qt_modules: '-m qtmultimedia qtserialport'
# Linux / Qt 5.12.12
- os: ubuntu-22.04
qt_version: '5.12.12'
qt_version_major: '5'
host: 'linux'
cmake_args: ''
qt_arch: gcc_64
qt_arch_path: gcc_64
qt_modules: ''
# Linux / Qt 6.3.2
- os: ubuntu-22.04
qt_version: '6.3.2'
qt_version_major: '6'
host: 'linux'
cmake_args: ''
qt_arch: gcc_64
qt_arch_path: gcc_64
qt_modules: '-m qtmultimedia qtserialport'
# Linux / Qt 6.5.2
- os: ubuntu-22.04
qt_version: '6.5.2'
qt_version_major: '6'
host: 'linux'
cmake_args: ''
qt_arch: gcc_64
qt_arch_path: gcc_64
qt_modules: '-m qtmultimedia qtserialport'
steps:
- uses: actions/checkout@v3
with:
path: Arduino-Source
- uses: actions/checkout@v3
with:
repository: 'PokemonAutomation/Packages'
path: Packages
- name: Add msbuild to PATH
if: startsWith(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
- name: Install dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install mesa-common-dev libglu1-mesa-dev libegl1 libpulse-dev libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libopencv-dev
- name: Install dependencies
if: startsWith(matrix.os, 'mac')
run: |
brew install opencv
- name: Install Qt
run: |
python3 -m pip install aqtinstall
python3 -m aqt install-qt ${{ matrix.host }} desktop ${{ matrix.qt_version }} ${{ matrix.qt_arch }} ${{ matrix.qt_modules }}
- name: Run cmake
run: |
cd Arduino-Source/SerialPrograms
mkdir bin
cd bin
cmake .. -DCMAKE_PREFIX_PATH=${{ github.workspace }}/${{ matrix.qt_version }}/${{ matrix.qt_arch_path }} -DQT_MAJOR:STRING=${{ matrix.qt_version_major }} ${{ matrix.cmake_args }}
- name: Generate binaries
if: startsWith(matrix.os, 'windows')
run: |
cd Arduino-Source/SerialPrograms/bin
MSBuild.exe ./SerialPrograms.vcxproj /p:Configuration=Release /p:Platform=x64
- name: Generate binaries
if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
cd Arduino-Source/SerialPrograms/bin
cmake --build . -j 10
- name: Copy resources
if: startsWith(matrix.os, 'windows')
run: |
robocopy Packages/SerialPrograms/Resources Output/Resources /s
robocopy Packages/PABotBase/PABotBase-Switch Output/PABotBase /s
robocopy Arduino-Source/SerialPrograms/bin Output/Binaries dpp.dll libcrypto-1_1-x64.dll libsodium.dll libssl-1_1-x64.dll opencv_world460.dll opus.dll Sleepy.dll tesseractPA.dll zlib1.dll
robocopy Arduino-Source/SerialPrograms/bin/Release Output/Binaries SerialPrograms.exe
exit 0
- uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'windows')
with:
name: Serial Programs for windows (${{ matrix.qt_version }})
path: Output