@@ -2,18 +2,34 @@ name: Release
22
33on :
44 push :
5+ branches : ' *'
56 tags : ' *'
67
78jobs :
89 build-linux-release :
910 runs-on : ubuntu-20.04
1011 strategy :
1112 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'
1622 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
1733 - uses : actions/checkout@v4
1834 with :
1935 fetch-depth : 0
@@ -53,44 +69,58 @@ jobs:
5369 run : echo is_prerelease=1 >> "${GITHUB_ENV}"
5470 shell : bash
5571 # Install Qt
56- - if : contains(matrix.arch, 'amd64')
57- name : Install Qt
72+ - name : Install Qt
5873 uses : jurplel/install-qt-action@v4
5974 with :
6075 version : ${{ matrix.qt-version }}
61- host : ' linux'
62- arch : ' linux_gcc_64'
76+ arch : linux_gcc_64
6377 target : ${{ matrix.qt-target }}
6478 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
6583 - if : " !contains(matrix.arch, 'amd64')"
6684 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
6987 with :
70- path : |
71- ./qt-host/
72- ./qt-cross/
73- ./sysroot/
88+ path : ./qt-cross/
7489 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"
7993 shell : bash
80- run : .ci/build_qt6.sh "${{ matrix.qt-version }}" "${{ matrix.qt-modules }}" "${{ matrix.arch }}"
81- # Build
8294 - if : " !contains(matrix.arch, 'amd64')"
8395 name : Prepare cross-compilation environment
8496 run : .ci/prepare_cross_build.sh "${{ matrix.arch }}"
8597 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
86116 - name : Build AppImage
87- run : .ci/build_appimage.sh
117+ run : .ci/build_appimage.sh ${{ matrix.arch }}
88118 shell : ' script -q -e -c "bash {0}"'
89119 # Upload artifacts
90120 - name : Upload artifacts
91121 uses : actions/upload-artifact@v4
92122 with :
93- name : build-linux -${{ matrix.arch }}
123+ name : build-Qt-${{ matrix.qt-version }} -${{ matrix.arch }}
94124 path : |
95125 *.AppImage
96126 *.zsync
@@ -226,6 +256,8 @@ jobs:
226256 shell : bash
227257 - name : Download artifacts
228258 uses : actions/download-artifact@v3
259+ - run : find
260+ shell : bash
229261 # - if: env.upload_online_app == 1
230262 # name: Upload online app
231263 # run: |
@@ -242,13 +274,13 @@ jobs:
242274 # git branch -m master
243275 # git push -f origin master
244276 # 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