|
9 | 9 | runs-on: ubuntu-20.04
|
10 | 10 | strategy:
|
11 | 11 | 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' |
16 | 21 | 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 |
17 | 32 | - uses: actions/checkout@v4
|
18 | 33 | with:
|
19 | 34 | fetch-depth: 0
|
@@ -53,44 +68,58 @@ jobs:
|
53 | 68 | run: echo is_prerelease=1 >> "${GITHUB_ENV}"
|
54 | 69 | shell: bash
|
55 | 70 | # Install Qt
|
56 |
| - - if: contains(matrix.arch, 'amd64') |
57 |
| - name: Install Qt |
| 71 | + - name: Install Qt |
58 | 72 | uses: jurplel/install-qt-action@v4
|
59 | 73 | with:
|
60 | 74 | version: ${{ matrix.qt-version }}
|
61 |
| - host: 'linux' |
62 |
| - arch: 'linux_gcc_64' |
| 75 | + arch: linux_gcc_64 |
63 | 76 | target: ${{ matrix.qt-target }}
|
64 | 77 | 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 |
65 | 82 | - if: "!contains(matrix.arch, 'amd64')"
|
66 | 83 | 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 |
69 | 86 | with:
|
70 |
| - path: | |
71 |
| - ./qt-host/ |
72 |
| - ./qt-cross/ |
73 |
| - ./sysroot/ |
| 87 | + path: ./qt-cross/ |
74 | 88 | 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" |
79 | 92 | shell: bash
|
80 |
| - run: .ci/build_qt6.sh "${{ matrix.qt-version }}" "${{ matrix.qt-modules }}" "${{ matrix.arch }}" |
81 |
| - # Build |
82 | 93 | - if: "!contains(matrix.arch, 'amd64')"
|
83 | 94 | name: Prepare cross-compilation environment
|
84 | 95 | run: .ci/prepare_cross_build.sh "${{ matrix.arch }}"
|
85 | 96 | 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 |
86 | 115 | - name: Build AppImage
|
87 |
| - run: .ci/build_appimage.sh |
| 116 | + run: .ci/build_appimage.sh ${{ matrix.arch }} |
88 | 117 | shell: 'script -q -e -c "bash {0}"'
|
89 | 118 | # Upload artifacts
|
90 | 119 | - name: Upload artifacts
|
91 | 120 | uses: actions/upload-artifact@v4
|
92 | 121 | with:
|
93 |
| - name: build-linux-${{ matrix.arch }} |
| 122 | + name: build-Qt-${{ matrix.qt-version }}-${{ matrix.arch }} |
94 | 123 | path: |
|
95 | 124 | *.AppImage
|
96 | 125 | *.zsync
|
|
0 commit comments