@@ -30,16 +30,30 @@ permissions:
3030#
3131jobs :
3232 make :
33- runs-on : windows-2022
33+ runs-on : windows-${{ matrix.os }}
3434
3535 name : ${{ github.workflow }} (${{ matrix.msystem }})
3636
3737 env :
3838 MSYSTEM : ${{ matrix.msystem }}
39- MSYS2_ARCH : x86_64
40- CHOST : ' x86_64-w64-mingw32'
41- CFLAGS : ' -march=x86-64 -mtune=generic -O3 -pipe'
42- CXXFLAGS : ' -march=x86-64 -mtune=generic -O3 -pipe'
39+ MSYS2_ARCH : >-
40+ ${{
41+ contains(matrix.msystem, 'arm64') && 'aarch64' ||
42+ contains(matrix.msystem, '64') && 'x86_64' || 'i686'
43+ }}
44+ MINGW_PACKAGE_PREFIX : >-
45+ mingw-w${{
46+ endsWith(matrix.msystem, '64') && '64' || '32'
47+ }}-${{
48+ startsWith(matrix.msystem, 'clang') && 'clang' ||
49+ startsWith(matrix.msystem, 'ucrt') && 'ucrt' ||
50+ 'mingw'
51+ }}-${{
52+ contains(matrix.msystem, 'arm64') && 'aarch64' ||
53+ endsWith(matrix.msystem, '64') && 'x86_64' || 'i686'
54+ }}
55+ CFLAGS : ' -mtune=generic -O3 -pipe'
56+ CXXFLAGS : ' -mtune=generic -O3 -pipe'
4357 CPPFLAGS : ' -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048'
4458 LDFLAGS : ' -pipe'
4559 GITPULLOPTIONS : --no-tags origin ${{ github.ref }}
5064 # To mitigate flakiness of MinGW CI, we test only one runtime that newer MSYS2 uses.
5165 # Ruby 3.2 is the first Windows Ruby to use OpenSSL 3.x
5266 - msystem : ' UCRT64'
67+ os : 2022
5368 test_task : ' check'
5469 test-all-opts : ' --name=!/TestObjSpace#test_reachable_objects_during_iteration/'
70+ - msystem : ' CLANGARM64'
71+ os : 11-arm
72+ test_task : ' test'
5573 fail-fast : false
5674
5775 if : >-
@@ -66,25 +84,26 @@ jobs:
6684 - uses : msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0
6785 id : msys2
6886 with :
69- msystem : UCRT64
87+ msystem : ${{ matrix.msystem }}
7088 update : true
7189 install : >-
7290 git
7391 make
7492 ruby
7593 autoconf
76- mingw-w64-ucrt-x86_64 -gcc
77- mingw-w64-ucrt-x86_64 -ragel
78- mingw-w64-ucrt-x86_64 -openssl
79- mingw-w64-ucrt-x86_64 -libyaml
80- mingw-w64-ucrt-x86_64 -libffi
94+ ${{ env.MINGW_PACKAGE_PREFIX }} -gcc
95+ ${{ env.MINGW_PACKAGE_PREFIX }} -ragel
96+ ${{ env.MINGW_PACKAGE_PREFIX }} -openssl
97+ ${{ env.MINGW_PACKAGE_PREFIX }} -libyaml
98+ ${{ env.MINGW_PACKAGE_PREFIX }} -libffi
8199
82100 - name : Set up env
83101 id : setup-env
84102 working-directory :
85103 run : |
86104 $msys2 = ${env:MSYS2_LOCATION}
87- echo $msys2\usr\bin $msys2\ucrt64\bin |
105+ $msystem = ${env:MSYSTEM}.ToLower()
106+ echo $msys2\usr\bin $msys2\$msystem\bin |
88107 Tee-Object ${env:GITHUB_PATH} -Append -Encoding utf-8
89108
90109 # Use the fast device for the temporary directory.
96115 shell : pwsh # cmd.exe does not strip spaces before `|`.
97116 env :
98117 MSYS2_LOCATION : ${{ steps.msys2.outputs.msys2-location }}
118+ MSYSTEM : ${{ matrix.msystem }}
99119
100120 - name : Remove Strawberry Perl pkg-config
101121 working-directory :
@@ -140,7 +160,7 @@ jobs:
140160 I libssl-3-x64.dll
141161
142162 group Packages
143- pacman -Qs mingw-w64-ucrt-x86_64- * | /bin/sed -n "s,local/mingw-w64-ucrt-x86_64 -,,p"
163+ pacman -Qs $MINGW_PACKAGE_PREFIX- * | /bin/sed -n "s,local/$MINGW_PACKAGE_PREFIX -,,p"
144164 endgroup
145165
146166 [ ${#failed[@]} -eq 0 ]
@@ -164,6 +184,8 @@ jobs:
164184 ../src/configure --disable-install-doc --prefix=/.
165185 --build=$CHOST --host=$CHOST --target=$CHOST
166186 shell : sh
187+ env :
188+ CHOST : ${{ env.MSYS2_ARCH }}-w64-mingw32
167189
168190 - name : make all
169191 timeout-minutes : 30
0 commit comments