1
- name : QtCI
1
+ name : Windows
2
2
on :
3
+ # push代码时触发workflow
3
4
push :
5
+ # 忽略README.md
4
6
paths-ignore :
5
7
- ' README.md'
6
8
- ' LICENSE'
9
+ # pull_request时触发workflow
7
10
pull_request :
11
+ # 忽略README.md
8
12
paths-ignore :
9
13
- ' README.md'
10
14
- ' LICENSE'
11
15
jobs :
12
- windowsBuildJob :
13
- name : windows
16
+ build :
17
+ name : Build
18
+ # 运行平台, windows-latest目前是windows server 2019
14
19
runs-on : windows-latest
15
20
strategy :
21
+ # 矩阵配置
16
22
matrix :
17
23
qt_ver : [5.9.8,5.12.6]
18
24
qt_target : [desktop]
25
+ # mingw用不了
26
+ # qt_arch: [win64_msvc2017_64, win32_msvc2017, win32_mingw53,win32_mingw73]
19
27
qt_arch : [win64_msvc2017_64, win32_msvc2017]
28
+ # 从矩阵中除外的配置
20
29
exclude :
30
+ # 不存在5.9.8-win32_msvc2017的版本
21
31
- qt_ver : 5.9.8
22
32
qt_arch : win32_msvc2017
33
+ # mingw用不了
34
+ # - qt_ver: 5.9.8
35
+ # qt_arch: win32_mingw73
36
+ # - qt_ver: 5.12.6
37
+ # qt_arch: win32_mingw53
38
+ # 额外设置msvc_arch
23
39
include :
24
40
- qt_arch : win64_msvc2017_64
25
41
msvc_arch : x64
26
42
- qt_arch : win32_msvc2017
27
43
msvc_arch : x86
28
- env :
29
- targetName : HelloActions-Qt.exe
44
+ env :
45
+ targetName : HelloActions-Qt.exe
46
+ # 步骤
30
47
steps :
31
- # 安装Qt
48
+ # 安装Qt
32
49
- name : Install Qt
50
+ # 使用外部action。这个action专门用来安装Qt
33
51
34
52
with :
53
+ # Version of Qt to install
35
54
version : ${{ matrix.qt_ver }}
55
+ # Target platform for build
36
56
target : ${{ matrix.qt_target }}
57
+ # Architecture for Windows/Android
37
58
arch : ${{ matrix.qt_arch }}
38
- # 获取代码
59
+ # 拉取代码
39
60
- uses : actions/checkout@v1
40
61
with :
41
62
fetch-depth : 1
@@ -143,93 +164,4 @@ jobs:
143
164
upload_url : ${{ env.uploadUrl }}
144
165
asset_path : ./${{ env.packageName }}.zip
145
166
asset_name : ${{ env.packageName }}.zip
146
- asset_content_type : application/zip
147
- ubuntuBuildJob :
148
- name : ubuntu
149
- runs-on : ${{ matrix.os }}
150
- strategy :
151
- matrix :
152
- os : [ubuntu-16.04,ubuntu-18.04]
153
- qt_ver : [5.9.8,5.12.6]
154
- steps :
155
- - name : Install Qt
156
-
157
- with :
158
- version : ${{ matrix.qt_ver }}
159
- # Ubuntu 安装 OpenGL相关库
160
- - name : ubuntu install GL library
161
- run : sudo apt-get install -y libglew-dev libglfw3-dev
162
- - uses : actions/checkout@v1
163
- with :
164
- fetch-depth : 1
165
- - name : build ubuntu
166
- run : |
167
- qmake
168
- make
169
- macosBuildJob :
170
- name : macos
171
- runs-on : ${{ matrix.os }}
172
- strategy :
173
- matrix :
174
- os : [macos-latest]
175
- qt_ver : [5.9.8,5.12.6]
176
- steps :
177
- - name : Install Qt
178
-
179
- with :
180
- version : ${{ matrix.qt_ver }}
181
- - uses : actions/checkout@v1
182
- with :
183
- fetch-depth : 1
184
- - name : build macos
185
- run : |
186
- qmake
187
- make
188
- iosBuildJob :
189
- name : ios
190
- runs-on : ${{ matrix.os }}
191
- strategy :
192
- matrix :
193
- os : [macos-latest]
194
- qt_ver : [5.12.6]
195
- qt_target : [ios]
196
- steps :
197
- - uses : actions/checkout@v1
198
- with :
199
- fetch-depth : 1
200
- - name : Install Qt
201
-
202
- with :
203
- version : ${{ matrix.qt_ver }}
204
- target : ${{ matrix.qt_target }}
205
- - name : build ios
206
- run : |
207
- qmake -r -spec macx-ios-clang CONFIG+=release CONFIG+=iphoneos
208
- make
209
- androidBuildJob :
210
- name : android
211
- runs-on : ${{ matrix.os }}
212
- strategy :
213
- matrix :
214
- os : [ubuntu-latest]
215
- qt_ver : [5.12.6]
216
- qt_target : [android]
217
- # android_arm64_v8a 暂时不支持. install-qt-action 依赖的aqtinstall版本为0.5*,需要升级
218
- # qt_arch: [android_x86,android_armv7,android_arm64_v8a]
219
- qt_arch : [android_x86,android_armv7]
220
- steps :
221
- - uses : actions/checkout@v1
222
- with :
223
- fetch-depth : 1
224
- - name : Install Qt
225
-
226
- with :
227
- version : ${{ matrix.qt_ver }}
228
- target : ${{ matrix.qt_target }}
229
- arch : ${{ matrix.qt_arch }}
230
- - name : build android
231
- run : |
232
- export ANDROID_SDK_ROOT=$ANDROID_HOME
233
- export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle
234
- qmake
235
- make
167
+ asset_content_type : application/zip
0 commit comments