|
66 | 66 |
|
67 | 67 | linux-stage1:
|
68 | 68 | needs: [prepare]
|
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}} |
| 69 | + runs-on: ubuntu-22.04-arm |
76 | 70 | steps:
|
77 | 71 | - uses: actions/checkout@v4
|
78 | 72 | - name: Build
|
|
97 | 91 | tar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 --sort=name --mtime="$BUILD_DATE" $NAME
|
98 | 92 | - uses: actions/upload-artifact@v4
|
99 | 93 | with:
|
100 |
| - name: linux-stage1-ucrt-${{matrix.arch}}-toolchain |
| 94 | + name: linux-stage1-ucrt-aarch64-toolchain |
101 | 95 | path: |
|
102 | 96 | llvm-mingw-*.tar.xz
|
103 | 97 | retention-days: 7
|
@@ -135,18 +129,12 @@ jobs:
|
135 | 129 | # Build a cross compiler for Linux, targeting Windows.
|
136 | 130 | linux:
|
137 | 131 | needs: [prepare, linux-stage1, linux-profile]
|
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}} |
| 132 | + runs-on: ubuntu-22.04-arm |
145 | 133 | steps:
|
146 | 134 | - uses: actions/checkout@v4
|
147 | 135 | - uses: actions/download-artifact@v4
|
148 | 136 | with:
|
149 |
| - name: linux-stage1-ucrt-${{matrix.arch}}-toolchain |
| 137 | + name: linux-stage1-ucrt-aarch64-toolchain |
150 | 138 | - name: Unpack stage1 Clang
|
151 | 139 | run: |
|
152 | 140 | tar -Jxf llvm-mingw-*.tar.xz
|
@@ -176,7 +164,59 @@ jobs:
|
176 | 164 | tar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 --sort=name --mtime="$BUILD_DATE" $NAME
|
177 | 165 | - uses: actions/upload-artifact@v4
|
178 | 166 | with:
|
179 |
| - name: linux-ucrt-${{matrix.arch}}-toolchain |
| 167 | + name: linux-ucrt-aarch64-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-x86_64: |
| 175 | + needs: [linux-stage1, linux-profile, prepare] |
| 176 | + runs-on: ubuntu-22.04-arm |
| 177 | + steps: |
| 178 | + - uses: actions/checkout@v4 |
| 179 | + - uses: actions/download-artifact@v4 |
| 180 | + with: |
| 181 | + name: linux-stage1-ucrt-aarch64-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++-x86-64-linux-gnu |
| 197 | + ./build-all.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw --no-runtimes --host=x86_64-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-amd64-cross libstdc++6-amd64-cross |
| 205 | + QEMU_LD_PREFIX=/usr/x86_64-linux-gnu ./test-libcxx-module.sh $(pwd)/install/llvm-mingw |
| 206 | + QEMU_LD_PREFIX=/usr/x86_64-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 =)-x86_64 |
| 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-x86_64-toolchain |
180 | 220 | path: |
|
181 | 221 | llvm-mingw-*.tar.xz
|
182 | 222 | retention-days: 7
|
@@ -748,7 +788,7 @@ jobs:
|
748 | 788 | if: github.event_name == 'schedule'
|
749 | 789 | permissions:
|
750 | 790 | contents: write
|
751 |
| - needs: [linux, macos, linux-cross-windows, test-toolchain, linux-test-cross-build-ffmpeg, test-ffmpeg] |
| 791 | + needs: [linux, linux-cross-x86_64, macos, linux-cross-windows, test-toolchain, linux-test-cross-build-ffmpeg, test-ffmpeg] |
752 | 792 | runs-on: ubuntu-latest
|
753 | 793 | steps:
|
754 | 794 | - name: Download all artifacts
|
|
0 commit comments