|
66 | 66 |
|
67 | 67 | linux-stage1: |
68 | 68 | needs: [prepare] |
69 | | - runs-on: ubuntu-22.04 |
| 69 | + strategy: |
| 70 | + fail-fast: false |
| 71 | + matrix: |
| 72 | + include: |
| 73 | + - { runner: ubuntu-22.04, arch: x86_64 } |
| 74 | + - { runner: ubuntu-22.04-arm, arch: aarch64 } |
| 75 | + runs-on: ${{matrix.runner}} |
70 | 76 | steps: |
71 | 77 | - uses: actions/checkout@v4 |
72 | 78 | - name: Build |
|
91 | 97 | tar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 --sort=name --mtime="$BUILD_DATE" $NAME |
92 | 98 | - uses: actions/upload-artifact@v4 |
93 | 99 | with: |
94 | | - name: linux-stage1-ucrt-x86_64-toolchain |
| 100 | + name: linux-stage1-ucrt-${{matrix.arch}}-toolchain |
95 | 101 | path: | |
96 | 102 | llvm-mingw-*.tar.xz |
97 | 103 | retention-days: 7 |
@@ -129,12 +135,18 @@ jobs: |
129 | 135 | # Build a cross compiler for Linux, targeting Windows. |
130 | 136 | linux: |
131 | 137 | needs: [prepare, linux-stage1, linux-profile] |
132 | | - runs-on: ubuntu-22.04 |
| 138 | + strategy: |
| 139 | + fail-fast: false |
| 140 | + matrix: |
| 141 | + include: |
| 142 | + - { runner: ubuntu-22.04, arch: x86_64 } |
| 143 | + - { runner: ubuntu-22.04-arm, arch: aarch64 } |
| 144 | + runs-on: ${{matrix.runner}} |
133 | 145 | steps: |
134 | 146 | - uses: actions/checkout@v4 |
135 | 147 | - uses: actions/download-artifact@v4 |
136 | 148 | with: |
137 | | - name: linux-stage1-ucrt-x86_64-toolchain |
| 149 | + name: linux-stage1-ucrt-${{matrix.arch}}-toolchain |
138 | 150 | - name: Unpack stage1 Clang |
139 | 151 | run: | |
140 | 152 | tar -Jxf llvm-mingw-*.tar.xz |
@@ -164,59 +176,7 @@ jobs: |
164 | 176 | tar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 --sort=name --mtime="$BUILD_DATE" $NAME |
165 | 177 | - uses: actions/upload-artifact@v4 |
166 | 178 | with: |
167 | | - name: linux-ucrt-x86_64-toolchain |
168 | | - path: | |
169 | | - llvm-mingw-*.tar.xz |
170 | | - retention-days: 7 |
171 | | - |
172 | | - # Crosscompile the toolchain for running on Linux on a different architecture, bundle the runtime |
173 | | - # libraries that were built in the 'linux-stage1' step above. |
174 | | - linux-cross-aarch64: |
175 | | - needs: [linux-stage1, linux-profile, prepare] |
176 | | - runs-on: ubuntu-22.04 |
177 | | - steps: |
178 | | - - uses: actions/checkout@v4 |
179 | | - - uses: actions/download-artifact@v4 |
180 | | - with: |
181 | | - name: linux-stage1-ucrt-x86_64-toolchain |
182 | | - - name: Unpack stage1 Clang |
183 | | - run: | |
184 | | - tar -Jxf llvm-mingw-*.tar.xz |
185 | | - rm llvm-mingw-*.tar.xz |
186 | | - sudo mv llvm-mingw* /opt/llvm-mingw |
187 | | - - uses: actions/download-artifact@v4 |
188 | | - with: |
189 | | - name: profile |
190 | | - - name: Build |
191 | | - env: |
192 | | - LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}} |
193 | | - MINGW_W64_VERSION: ${{needs.prepare.outputs.MINGW_W64_VERSION}} |
194 | | - SOURCE_DATE_EPOCH: ${{needs.prepare.outputs.COMMIT_DATE_UNIX}} |
195 | | - run: | |
196 | | - sudo apt-get update && sudo apt-get install g++-aarch64-linux-gnu |
197 | | - ./build-all.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw --no-runtimes --host=aarch64-linux-gnu --thinlto --pgo |
198 | | - .github/workflows/store-version.sh install/llvm-mingw/versions.txt |
199 | | - - name: Assemble the cross-built toolchain |
200 | | - run: | |
201 | | - ./prepare-cross-toolchain-unix.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw |
202 | | - - name: Test using the cross-built assembled toolchain |
203 | | - run: | |
204 | | - sudo apt-get update && sudo apt-get install qemu-user-static libc6-arm64-cross libstdc++6-arm64-cross |
205 | | - QEMU_LD_PREFIX=/usr/aarch64-linux-gnu ./test-libcxx-module.sh $(pwd)/install/llvm-mingw |
206 | | - QEMU_LD_PREFIX=/usr/aarch64-linux-gnu ./run-tests.sh $(pwd)/install/llvm-mingw |
207 | | - - name: Package the toolchain |
208 | | - env: |
209 | | - TAG: ${{needs.prepare.outputs.TAG}} |
210 | | - BUILD_DATE: ${{needs.prepare.outputs.BUILD_DATE}} |
211 | | - run: | |
212 | | - cd install |
213 | | - DISTRO=ubuntu-$(grep DISTRIB_RELEASE /etc/lsb-release | cut -f 2 -d =)-aarch64 |
214 | | - NAME=llvm-mingw-$TAG-ucrt-$DISTRO |
215 | | - mv llvm-mingw $NAME |
216 | | - tar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 --sort=name --mtime="$BUILD_DATE" $NAME |
217 | | - - uses: actions/upload-artifact@v4 |
218 | | - with: |
219 | | - name: linux-ucrt-aarch64-toolchain |
| 179 | + name: linux-ucrt-${{matrix.arch}}-toolchain |
220 | 180 | path: | |
221 | 181 | llvm-mingw-*.tar.xz |
222 | 182 | retention-days: 7 |
@@ -787,7 +747,7 @@ jobs: |
787 | 747 | if: github.event_name == 'schedule' |
788 | 748 | permissions: |
789 | 749 | contents: write |
790 | | - needs: [linux, linux-cross-aarch64, macos, linux-cross-windows, test-toolchain, linux-test-cross-build-ffmpeg, test-ffmpeg] |
| 750 | + needs: [linux, macos, linux-cross-windows, test-toolchain, linux-test-cross-build-ffmpeg, test-ffmpeg] |
791 | 751 | runs-on: ubuntu-latest |
792 | 752 | steps: |
793 | 753 | - name: Download all artifacts |
|
0 commit comments