Skip to content

Commit b109a5a

Browse files
committed
Enable arm64 Linux builds in release workflow
1 parent 99f5648 commit b109a5a

File tree

1 file changed

+51
-22
lines changed

1 file changed

+51
-22
lines changed

.github/workflows/release.yml

+51-22
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,26 @@ jobs:
99
runs-on: ubuntu-20.04
1010
strategy:
1111
matrix:
12-
qt-version: ['6.8']
13-
qt-target: ['desktop']
14-
qt-modules: ['']
15-
arch: ['amd64']
12+
include:
13+
- qt-version: '6.8'
14+
qt-target: 'desktop'
15+
qt-modules: ''
16+
arch: 'amd64'
17+
- qt-version: '6.8'
18+
qt-target: 'desktop'
19+
qt-modules: 'qtshadertools'
20+
arch: 'aarch64'
1621
steps:
22+
- name: Maximize build space
23+
uses: easimon/maximize-build-space@master
24+
with:
25+
root-reserve-mb: 512
26+
swap-size-mb: 1024
27+
remove-dotnet: true
28+
remove-android: true
29+
remove-haskell: true
30+
remove-codeql: true
31+
remove-docker-images: true
1732
- uses: actions/checkout@v4
1833
with:
1934
fetch-depth: 0
@@ -53,44 +68,58 @@ jobs:
5368
run: echo is_prerelease=1 >> "${GITHUB_ENV}"
5469
shell: bash
5570
# Install Qt
56-
- if: contains(matrix.arch, 'amd64')
57-
name: Install Qt
71+
- name: Install Qt
5872
uses: jurplel/install-qt-action@v4
5973
with:
6074
version: ${{ matrix.qt-version }}
61-
host: 'linux'
62-
arch: 'linux_gcc_64'
75+
arch: linux_gcc_64
6376
target: ${{ matrix.qt-target }}
6477
modules: ${{ matrix.qt-modules }}
78+
dir: ${{ github.workspace }}/Qt_host
79+
- name: Set host Qt path
80+
run: echo "QT_HOST_PATH=${QT_ROOT_DIR}" >> "${GITHUB_ENV}"
81+
shell: bash
6582
- if: "!contains(matrix.arch, 'amd64')"
6683
name: Restore cross-compiled Qt from cache
67-
id: cache-qt-cross
68-
uses: actions/cache@v3
84+
id: restore-qt-cross
85+
uses: jlanga/cache/restore@remove-files
6986
with:
70-
path: |
71-
./qt-host/
72-
./qt-cross/
73-
./sysroot/
87+
path: ./qt-cross/
7488
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
89+
- if: "!contains(matrix.arch, 'amd64')"
90+
name: Set cross Qt path
91+
run: echo "QT_CROSS_PATH=$(pwd)/qt-cross" >> "$GITHUB_ENV"
7992
shell: bash
80-
run: .ci/build_qt6.sh "${{ matrix.qt-version }}" "${{ matrix.qt-modules }}" "${{ matrix.arch }}"
81-
# Build
8293
- if: "!contains(matrix.arch, 'amd64')"
8394
name: Prepare cross-compilation environment
8495
run: .ci/prepare_cross_build.sh "${{ matrix.arch }}"
8596
shell: bash
97+
- if: "!contains(matrix.arch, 'amd64') && steps.restore-qt-cross.outputs.cache-hit != 'true'"
98+
name: Cross-compile Qt
99+
shell: bash
100+
run: .ci/build_qt6.sh "${{ matrix.qt-version }}" "${{ matrix.qt-modules }}" "${{ matrix.arch }}"
101+
- if: "!contains(matrix.arch, 'amd64') && steps.restore-qt-cross.outputs.cache-hit != 'true'"
102+
name: Cache and remove cross-compiled Qt
103+
id: cache-qt-cross
104+
uses: jlanga/cache/save@remove-files
105+
with:
106+
path: ./qt-cross/
107+
key: qt-cross-${{ runner.os }}-${{ matrix.qt-version }}-${{ matrix.qt-target }}-${{ matrix.qt-modules }}-${{ matrix.arch }}
108+
- if: "!contains(matrix.arch, 'amd64') && steps.restore-qt-cross.outputs.cache-hit != 'true'"
109+
name: Restore cross-compiled Qt from cache
110+
uses: jlanga/cache/restore@remove-files
111+
with:
112+
path: ./qt-cross/
113+
key: qt-cross-${{ runner.os }}-${{ matrix.qt-version }}-${{ matrix.qt-target }}-${{ matrix.qt-modules }}-${{ matrix.arch }}
114+
# Build
86115
- name: Build AppImage
87-
run: .ci/build_appimage.sh
116+
run: .ci/build_appimage.sh ${{ matrix.arch }}
88117
shell: 'script -q -e -c "bash {0}"'
89118
# Upload artifacts
90119
- name: Upload artifacts
91120
uses: actions/upload-artifact@v4
92121
with:
93-
name: build-linux-${{ matrix.arch }}
122+
name: build-Qt-${{ matrix.qt-version }}-${{ matrix.arch }}
94123
path: |
95124
*.AppImage
96125
*.zsync

0 commit comments

Comments
 (0)