-
Notifications
You must be signed in to change notification settings - Fork 0
263 lines (218 loc) · 9.03 KB
/
integration.yaml
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
name: Continuous Integration
on: [push]
jobs:
build:
runs-on: ${{matrix.runner || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
version: ['5.15.2', '6.5.3', '6.8.0']
platform: ['android', 'linux', 'ios', 'macos', 'mingw-gcc', 'mingw-llvm', 'msvc']
include:
# ----------------------------------------------------------------------- select platform specific Github runner
- platform: android
runner: ubuntu-latest
- platform: linux
runner: ubuntu-latest
- platform: ios
runner: macos-latest
- platform: macos
runner: macos-latest
- platform: mingw-llvm
runner: windows-latest
- platform: mingw-gcc
runner: windows-latest
- platform: msvc
runner: windows-latest
# --------------------------------------------------------------------------- select platform specific Qt target
- platform: android
target: android
- platform: ios
target: ios
# --------------------------------------------------------------------- select platform specific Qt architecture
- platform: android
arch: android_arm64_v8a
- platform: android
version: '5.15.2'
arch: android
- platform: ios
arch: ios
- platform: mingw-gcc
arch: win64_mingw
- platform: mingw-gcc
version: '5.15.2'
arch: win64_mingw81
- platform: mingw-llvm
arch: win64_llvm_mingw
- platform: msvc
arch: win64_msvc2019_64
- platform: msvc
version: '6.8.0'
arch: win64_msvc2022_64
# ------------------------------------------------------------------------- select platform specific CMake flags
- platform: android
cmake-flags: [
'-DANDROID_ABI:STRING=arm64-v8a',
'-DANDROID_PLATFORM:STRING=android-23',
'-DANDROID_SDK_ROOT:PATH=$ANDROID_SDK_ROOT',
'-DANDROID_NDK:PATH=$ANDROID_NDK_ROOT',
'-DANDROID_STL:STRING=c++_shared',
'-DANDROID_USE_LEGACY_TOOLCHAIN_FILE:BOOL=OFF',
'-DQT_HOST_PATH:PATH=$QT_ROOT_DIR/../gcc_64',
'-DQT_NO_GLOBAL_APK_TARGET_PART_OF_ALL:BOOL=ON',
'-GNinja', '--toolchain', '$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake',
]
- platform: ios
cmake-flags: [
'-DCMAKE_SYSTEM_NAME:STRING=iOS',
'-DQT_HOST_PATH:PATH=$QT_ROOT_DIR/../macos',
'-GXcode',
]
- platform: linux
cmake-flags: [
'-GNinja'
]
- platform: mingw-gcc
cmake-flags: [
'-DCMAKE_C_COMPILER:FILEPATH=$env:IQTA_TOOLS/mingw1310_64/bin/gcc.exe',
'-DCMAKE_CXX_COMPILER:FILEPATH=$env:IQTA_TOOLS/mingw1310_64/bin/g++.exe',
'-DCMAKE_MAKE_PROGRAM:FILEPATH=$env:IQTA_TOOLS/Ninja/ninja.exe',
'-GNinja',
]
- platform: mingw-llvm
cmake-flags: [
'-DCMAKE_C_COMPILER:STRING=$env:IQTA_TOOLS/llvm_mingw1706_64/bin/clang.exe',
'-DCMAKE_CXX_COMPILER:STRING=$env:IQTA_TOOLS/llvm_mingw1706_64/bin/clang++.exe',
'-DCMAKE_MAKE_PROGRAM:FILEPATH=$env:IQTA_TOOLS/Ninja/ninja.exe',
'-GNinja',
]
# ------------------------------------------------------------------------- select platform specific CMake tools
- platform: mingw-gcc
tools: 'tools_mingw1310 tools_ninja'
- platform: mingw-llvm
tools: 'tools_llvm_mingw1706 tools_ninja'
# ------------------------------------------------------------------------ select platform specific package name
- package: Qt6
- version: '5.15.2'
package: Qt5
# --------------------------------------------------------------------------- exclude unsupported configurations
exclude:
- platform: mingw-llvm
version: '5.15.2'
- platform: mingw-llvm
version: '6.5.3'
# qt-version: ['5.15.2', '6.5.3', '6.8.0']
# configuration:
# - id: windows-msvc
# os: windows-2022
# arch-qt6_8: win64_msvc2022_64
# - id: windows-mingw
# os: windows-2022
# arch-qt5: win64_mingw81
# arch-qt6: win64_mingw
# arch-qt6_8: win64_llvm_mingw
# cmake-flags: [
# '-DCMAKE_C_COMPILER:FILEPATH=$env:IQTA_TOOLS/mingw1120_64/bin/gcc.exe',
# '-DCMAKE_CXX_COMPILER:FILEPATH=$env:IQTA_TOOLS/mingw1120_64/bin/g++.exe',
# '-DCMAKE_MAKE_PROGRAM:FILEPATH=$env:IQTA_TOOLS/Ninja/ninja.exe',
# '-GNinja',
# ]
# tools: 'tools_mingw90 tools_ninja'
# - id: linux
# os: ubuntu-22.04
# cmake-flags: [
# '-GNinja',
# ]
# - id: android
# os: ubuntu-22.04
# target: android
# arch-qt5: android
# arch-qt6: android_arm64_v8a
# cmake-flags-qt5: [
# '-DANDROID_ABI:STRING=armeabi-v7a',
# '-DANDROID_NDK:PATH=$ANDROID_NDK_ROOT',
# '-DANDROID_SDK:PATH=$ANDROID_SDK_ROOT',
# '-DANDROID_PLATFORM:STRING=android-21',
# '-DANDROID_STL:STRING=c++_shared',
# '-DANDROID_USE_LEGACY_TOOLCHAIN_FILE:BOOL=OFF',
# '-DCMAKE_FIND_ROOT_PATH:PATH=$QT_ROOT_DIR',
# '-DCMAKE_PREFIX_PATH:STRING=$QT_ROOT_DIR',
# '-GNinja', '--toolchain', '$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake',
# ]
# cmake-flags-qt6: [
# '-DANDROID_ABI:STRING=arm64-v8a',
# '-DANDROID_PLATFORM:STRING=android-23',
# '-DANDROID_SDK_ROOT:PATH=$ANDROID_SDK_ROOT',
# '-DANDROID_NDK:PATH=$ANDROID_NDK_ROOT',
# '-DANDROID_STL:STRING=c++_shared',
# '-DANDROID_USE_LEGACY_TOOLCHAIN_FILE:BOOL=OFF',
# '-DCMAKE_FIND_ROOT_PATH:PATH=$QT_ROOT_DIR',
# '-DCMAKE_PREFIX_PATH:STRING=$QT_ROOT_DIR',
# '-DQT_HOST_PATH=$QT_ROOT_DIR/../gcc_64',
# '-DQT_NO_GLOBAL_APK_TARGET_PART_OF_ALL:BOOL=ON',
# '-GNinja', '--toolchain', '$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake',
# ]
# - id: macos
# os: macos-12
# - id: ios
# os: macos-12
# target: ios
# cmake-flags: [
# '-DCMAKE_FIND_ROOT_PATH:PATH=$QT_ROOT_DIR',
# '-DCMAKE_PREFIX_PATH:STRING=$QT_ROOT_DIR',
# '-DCMAKE_SYSTEM_NAME:STRING=iOS',
# '-DQT_HOST_PATH=$QT_ROOT_DIR/../macos',
# '-GXcode',
# ]
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.version }}
target: ${{ matrix.target || 'desktop' }}
tools: ${{ matrix.tools || '' }}
arch: ${{ matrix.arch }}
cache: true
- name: Install Ninja
if: startsWith(matrix.runner, 'ubuntu-')
run: |
sudo apt-get install ninja-build
- name: Install Ninja
if: !startsWith(matrix.runner, 'windows-')
run: |
find "$QT_ROOT_DIR/lib/cmake/${{matrix.package}}"
- name: Install Ninja
if: startsWith(matrix.runner, 'windows-')
run: |
dir "$QT_ROOT_DIR/lib/cmake/${{matrix.package}}"
- name: Prepare
run: |
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
working-directory: ${{runner.workspace}}/build
run: cmake ${{github.workspace}}
-DCMAKE_BUILD_TYPE:STRING=Release
-DQT_DIR:PATH=$QT_ROOT_DIR/lib/cmake/${{matrix.package}}
--debug-find-pkg=QT
${{ join(matrix.cmake-flags, ' ') }}
- uses: actions/upload-artifact@v4
with:
name: cmake-qt${{matrix.version}}-${{matrix.platform}}
path: |
${{runner.workspace}}/build/CMakeCache.txt
${{runner.workspace}}/build/CMakeFiles/CMakeOutput.log
- name: Build
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Release
- name: Test
if: (matrix.target || 'desktop') == 'desktop'
working-directory: ${{runner.workspace}}/build
run: |
ctest -C Release --verbose
- uses: actions/upload-artifact@v4
if: (matrix.target || 'desktop') == 'desktop'
with:
name: ctest-qt${{matrix.version}}-${{matrix.platform}}
path: |
${{runner.workspace}}/build/Testing/Temporary/LastTest.log