Skip to content

Commit c227853

Browse files
committed
use split file
1 parent 42c5773 commit c227853

File tree

5 files changed

+171
-97
lines changed

5 files changed

+171
-97
lines changed

.github/workflows/android.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Android
2+
on:
3+
push:
4+
paths-ignore:
5+
- 'README.md'
6+
- 'LICENSE'
7+
pull_request:
8+
paths-ignore:
9+
- 'README.md'
10+
- 'LICENSE'
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest]
18+
# 5.9.8 版本低,需要额外设置工具链。这里暂不支持。
19+
qt_ver: [5.12.6]
20+
qt_target: [android]
21+
# android_arm64_v8a 暂时不支持. install-qt-action 依赖的aqtinstall版本为0.5*,需要升级
22+
# qt_arch: [android_x86,android_armv7,android_arm64_v8a]
23+
qt_arch: [android_x86,android_armv7]
24+
# exclude:
25+
# - qt_ver: 5.9.8
26+
# qt_arch: android_arm64_v8a
27+
steps:
28+
- name: Install Qt
29+
# if: steps.cacheqt.outputs.cache-hit != 'true'
30+
uses: jurplel/[email protected]
31+
with:
32+
# Version of Qt to install
33+
version: ${{ matrix.qt_ver }}
34+
# Target platform for build
35+
target: ${{ matrix.qt_target }}
36+
# Architecture for Windows/Android
37+
arch: ${{ matrix.qt_arch }}
38+
- uses: actions/checkout@v1
39+
with:
40+
fetch-depth: 1
41+
- name: build android
42+
run: |
43+
export ANDROID_SDK_ROOT=$ANDROID_HOME
44+
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle
45+
qmake
46+
make

.github/workflows/ios.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: IOS
2+
on:
3+
push:
4+
paths-ignore:
5+
- 'README.md'
6+
pull_request:
7+
paths-ignore:
8+
- 'README.md'
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [macos-latest]
16+
qt_ver: [5.12.6]
17+
qt_target: [ios]
18+
steps:
19+
- name: Install Qt
20+
# if: steps.cacheqt.outputs.cache-hit != 'true'
21+
uses: jurplel/[email protected]
22+
with:
23+
# Version of Qt to install
24+
version: ${{ matrix.qt_ver }}
25+
# Target platform for build
26+
target: ${{ matrix.qt_target }}
27+
- uses: actions/checkout@v1
28+
with:
29+
fetch-depth: 1
30+
- name: build ios
31+
run: |
32+
qmake -r -spec macx-ios-clang CONFIG+=release CONFIG+=iphoneos
33+
make

.github/workflows/macos.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: MacOS
2+
on:
3+
push:
4+
paths-ignore:
5+
- 'README.md'
6+
- 'LICENSE'
7+
pull_request:
8+
paths-ignore:
9+
- 'README.md'
10+
- 'LICENSE'
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [macos-latest]
18+
qt_ver: [5.9.8,5.12.6]
19+
steps:
20+
- name: Install Qt
21+
uses: jurplel/[email protected]
22+
with:
23+
version: ${{ matrix.qt_ver }}
24+
- uses: actions/checkout@v1
25+
with:
26+
fetch-depth: 1
27+
- name: build macos
28+
run: |
29+
qmake
30+
make

.github/workflows/ubuntu.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Ubuntu
2+
# Qt官方没有linux平台的x86包
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'README.md'
7+
- 'LICENSE'
8+
pull_request:
9+
paths-ignore:
10+
- 'README.md'
11+
- 'LICENSE'
12+
jobs:
13+
build:
14+
name: Build
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-16.04,ubuntu-18.04]
19+
qt_ver: [5.9.8,5.12.6]
20+
steps:
21+
- name: Install Qt
22+
uses: jurplel/[email protected]
23+
with:
24+
version: ${{ matrix.qt_ver }}
25+
- name: ubuntu install GL library
26+
run: sudo apt-get install -y libglew-dev libglfw3-dev
27+
- uses: actions/checkout@v1
28+
with:
29+
fetch-depth: 1
30+
- name: build ubuntu
31+
run: |
32+
qmake
33+
make

.github/workflows/QtCI.yml renamed to .github/workflows/windows.yml

+29-97
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,62 @@
1-
name: QtCI
1+
name: Windows
22
on:
3+
# push代码时触发workflow
34
push:
5+
# 忽略README.md
46
paths-ignore:
57
- 'README.md'
68
- 'LICENSE'
9+
# pull_request时触发workflow
710
pull_request:
11+
# 忽略README.md
812
paths-ignore:
913
- 'README.md'
1014
- 'LICENSE'
1115
jobs:
12-
windowsBuildJob:
13-
name: windows
16+
build:
17+
name: Build
18+
# 运行平台, windows-latest目前是windows server 2019
1419
runs-on: windows-latest
1520
strategy:
21+
# 矩阵配置
1622
matrix:
1723
qt_ver: [5.9.8,5.12.6]
1824
qt_target: [desktop]
25+
# mingw用不了
26+
# qt_arch: [win64_msvc2017_64, win32_msvc2017, win32_mingw53,win32_mingw73]
1927
qt_arch: [win64_msvc2017_64, win32_msvc2017]
28+
# 从矩阵中除外的配置
2029
exclude:
30+
# 不存在5.9.8-win32_msvc2017的版本
2131
- qt_ver: 5.9.8
2232
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
2339
include:
2440
- qt_arch: win64_msvc2017_64
2541
msvc_arch: x64
2642
- qt_arch: win32_msvc2017
2743
msvc_arch: x86
28-
env:
29-
targetName: HelloActions-Qt.exe
44+
env:
45+
targetName: HelloActions-Qt.exe
46+
# 步骤
3047
steps:
31-
#安装Qt
48+
# 安装Qt
3249
- name: Install Qt
50+
# 使用外部action。这个action专门用来安装Qt
3351
uses: jurplel/[email protected]
3452
with:
53+
# Version of Qt to install
3554
version: ${{ matrix.qt_ver }}
55+
# Target platform for build
3656
target: ${{ matrix.qt_target }}
57+
# Architecture for Windows/Android
3758
arch: ${{ matrix.qt_arch }}
38-
# 获取代码
59+
# 拉取代码
3960
- uses: actions/checkout@v1
4061
with:
4162
fetch-depth: 1
@@ -143,93 +164,4 @@ jobs:
143164
upload_url: ${{ env.uploadUrl }}
144165
asset_path: ./${{ env.packageName }}.zip
145166
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-
uses: jurplel/[email protected]
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-
uses: jurplel/[email protected]
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-
uses: jurplel/[email protected]
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-
uses: jurplel/[email protected]
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

Comments
 (0)