github: use new public preview windows-11-arm runner
For the "Run extra tests with crt-test" bit (the last bit of the
patch); we could run the built x86 binaries on the arm runners,
but specifically the msvcrt.dll version of crt-test.exe fails
one test when running emulated. (This is because the x86 emulation
doesn't emulate the full 80 bit precision for x87 math.)
For simplicity, just execute the arm binaries there; we still
have full test coverage as the other ones are executed on x86.
Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b9d85b7..98e8995 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -68,8 +68,11 @@
mkdir cross
cd cross
- for arch in i686 x86_64; do
+ for arch in i686 x86_64 armv7 aarch64; do
src_crt=${{matrix.crt}}
+ if [[ "$arch" = a* && "$src_crt" == "msvcrt" ]]; then
+ continue
+ fi
if [ "$src_crt" = "ucrtbase" ]; then
src_crt=ucrt
fi
@@ -97,10 +100,23 @@
path: |
llvm-mingw-*-x86_64.zip
retention-days: 7
+ - uses: actions/upload-artifact@v4
+ if: matrix.crt != 'msvcrt'
+ with:
+ name: windows-${{matrix.crt}}-armv7-toolchain
+ path: |
+ llvm-mingw-*-armv7.zip
+ retention-days: 7
+ - uses: actions/upload-artifact@v4
+ if: matrix.crt != 'msvcrt'
+ with:
+ name: windows-${{matrix.crt}}-aarch64-toolchain
+ path: |
+ llvm-mingw-*-aarch64.zip
+ retention-days: 7
test-llvm-mingw:
needs: [llvm-mingw]
- runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
@@ -110,10 +126,18 @@
arch:
- x86_64
- i686
+ - aarch64
+ - armv7
crt:
- ucrt
- ucrtbase
- msvcrt
+ exclude:
+ - arch: aarch64
+ crt: msvcrt
+ - arch: armv7
+ crt: msvcrt
+ runs-on: ${{startsWith(matrix.arch, 'a') && 'windows-11-arm' || 'windows-latest'}}
steps:
- uses: msys2/setup-msys2@v2
with:
@@ -156,7 +180,7 @@
$arch-w64-mingw32-clang $defs -fno-builtin test/crt-test.c -o $name-crt-first.exe -l$lib -O2
echo $name
case $arch in
- *86*) ./$name-regular.exe ; ./$name-crt-first.exe ;;
+ ${{ runner.arch == 'ARM64' && 'a*' || '*86*' }}) ./$name-regular.exe ; ./$name-crt-first.exe ;;
esac
done
done