@@ -2,18 +2,34 @@ name: Release
2
2
3
3
on :
4
4
push :
5
+ branches : ' *'
5
6
tags : ' *'
6
7
7
8
jobs :
8
9
build-linux-release :
9
10
runs-on : ubuntu-20.04
10
11
strategy :
11
12
matrix :
12
- qt-version : ['6.8']
13
- qt-target : ['desktop']
14
- qt-modules : ['']
15
- arch : ['amd64']
13
+ include :
14
+ - qt-version : ' 6.8'
15
+ qt-target : ' desktop'
16
+ qt-modules : ' '
17
+ arch : ' amd64'
18
+ - qt-version : ' 6.8'
19
+ qt-target : ' desktop'
20
+ qt-modules : ' qtshadertools'
21
+ arch : ' aarch64'
16
22
steps :
23
+ - name : Maximize build space
24
+ uses : easimon/maximize-build-space@master
25
+ with :
26
+ root-reserve-mb : 512
27
+ swap-size-mb : 1024
28
+ remove-dotnet : true
29
+ remove-android : true
30
+ remove-haskell : true
31
+ remove-codeql : true
32
+ remove-docker-images : true
17
33
- uses : actions/checkout@v4
18
34
with :
19
35
fetch-depth : 0
@@ -53,44 +69,58 @@ jobs:
53
69
run : echo is_prerelease=1 >> "${GITHUB_ENV}"
54
70
shell : bash
55
71
# Install Qt
56
- - if : contains(matrix.arch, 'amd64')
57
- name : Install Qt
72
+ - name : Install Qt
58
73
uses : jurplel/install-qt-action@v4
59
74
with :
60
75
version : ${{ matrix.qt-version }}
61
- host : ' linux'
62
- arch : ' linux_gcc_64'
76
+ arch : linux_gcc_64
63
77
target : ${{ matrix.qt-target }}
64
78
modules : ${{ matrix.qt-modules }}
79
+ dir : ${{ github.workspace }}/Qt_host
80
+ - name : Set host Qt path
81
+ run : echo "QT_HOST_PATH=${QT_ROOT_DIR}" >> "${GITHUB_ENV}"
82
+ shell : bash
65
83
- if : " !contains(matrix.arch, 'amd64')"
66
84
name : Restore cross-compiled Qt from cache
67
- id : cache -qt-cross
68
- uses : actions /cache@v3
85
+ id : restore -qt-cross
86
+ uses : jlanga /cache/restore@remove-files
69
87
with :
70
- path : |
71
- ./qt-host/
72
- ./qt-cross/
73
- ./sysroot/
88
+ path : ./qt-cross/
74
89
key : qt-cross-${{ runner.os }}-${{ matrix.qt-version }}-${{ matrix.qt-target }}-${{ matrix.qt-modules }}-${{ matrix.arch }}
75
- restore-keys :
76
- qt-cross-${{ runner.os }}-${{ matrix.qt-version }}-${{ matrix.qt-target }}-${{ matrix.qt-modules }}-${{ matrix.arch }}
77
- - if : " !contains(matrix.arch, 'amd64') && steps.cache-qt-cross.outputs.cache-hit != 'true'"
78
- name : Cross-compile Qt
90
+ - if : " !contains(matrix.arch, 'amd64')"
91
+ name : Set cross Qt path
92
+ run : echo "QT_CROSS_PATH=$(pwd)/qt-cross" >> "$GITHUB_ENV"
79
93
shell : bash
80
- run : .ci/build_qt6.sh "${{ matrix.qt-version }}" "${{ matrix.qt-modules }}" "${{ matrix.arch }}"
81
- # Build
82
94
- if : " !contains(matrix.arch, 'amd64')"
83
95
name : Prepare cross-compilation environment
84
96
run : .ci/prepare_cross_build.sh "${{ matrix.arch }}"
85
97
shell : bash
98
+ - if : " !contains(matrix.arch, 'amd64') && steps.restore-qt-cross.outputs.cache-hit != 'true'"
99
+ name : Cross-compile Qt
100
+ shell : bash
101
+ run : .ci/build_qt6.sh "${{ matrix.qt-version }}" "${{ matrix.qt-modules }}" "${{ matrix.arch }}"
102
+ - if : " !contains(matrix.arch, 'amd64') && steps.restore-qt-cross.outputs.cache-hit != 'true'"
103
+ name : Cache and remove cross-compiled Qt
104
+ id : cache-qt-cross
105
+ uses : jlanga/cache/save@remove-files
106
+ with :
107
+ path : ./qt-cross/
108
+ key : qt-cross-${{ runner.os }}-${{ matrix.qt-version }}-${{ matrix.qt-target }}-${{ matrix.qt-modules }}-${{ matrix.arch }}
109
+ - if : " !contains(matrix.arch, 'amd64') && steps.restore-qt-cross.outputs.cache-hit != 'true'"
110
+ name : Restore cross-compiled Qt from cache
111
+ uses : jlanga/cache/restore@remove-files
112
+ with :
113
+ path : ./qt-cross/
114
+ key : qt-cross-${{ runner.os }}-${{ matrix.qt-version }}-${{ matrix.qt-target }}-${{ matrix.qt-modules }}-${{ matrix.arch }}
115
+ # Build
86
116
- name : Build AppImage
87
- run : .ci/build_appimage.sh
117
+ run : .ci/build_appimage.sh ${{ matrix.arch }}
88
118
shell : ' script -q -e -c "bash {0}"'
89
119
# Upload artifacts
90
120
- name : Upload artifacts
91
121
uses : actions/upload-artifact@v4
92
122
with :
93
- name : build-linux -${{ matrix.arch }}
123
+ name : build-Qt-${{ matrix.qt-version }} -${{ matrix.arch }}
94
124
path : |
95
125
*.AppImage
96
126
*.zsync
@@ -226,6 +256,8 @@ jobs:
226
256
shell : bash
227
257
- name : Download artifacts
228
258
uses : actions/download-artifact@v3
259
+ - run : find
260
+ shell : bash
229
261
# - if: env.upload_online_app == 1
230
262
# name: Upload online app
231
263
# run: |
@@ -242,13 +274,13 @@ jobs:
242
274
# git branch -m master
243
275
# git push -f origin master
244
276
# shell: bash
245
- - if : env.create_release == 1
246
- name : Create release
247
- uses : ncipollo/release-action@v1
248
- with :
249
- # artifacts: "build-windows/*.exe,build-linux-*/*.AppImage,build-linux-*/*.zsync,build-macos/*.dmg"
250
- artifacts : " build-windows/*.exe,build-linux-*/*.AppImage,build-linux-*/*.zsync"
251
- name : " ${{ env.app_name }} ${{ env.version }}"
252
- owner : ${{ github.event.pusher.name }}
253
- draft : true
254
- token : ${{ secrets.GITHUB_TOKEN }}
277
+ # - if: env.create_release == 1
278
+ # name: Create release
279
+ # uses: ncipollo/release-action@v1
280
+ # with:
281
+ # #artifacts: "build-windows/*.exe,build-linux-*/*.AppImage,build-linux-*/*.zsync,build-macos/*.dmg"
282
+ # artifacts: "build-windows/*.exe,build-linux-*/*.AppImage,build-linux-*/*.zsync"
283
+ # name: "${{ env.app_name }} ${{ env.version }}"
284
+ # owner: ${{ github.event.pusher.name }}
285
+ # draft: true
286
+ # token: ${{ secrets.GITHUB_TOKEN }}
0 commit comments