88 description : ' Skip incremental perf tests (phases 2-7)'
99 type : boolean
1010 default : true
11+ broad_platforms :
12+ description : ' Test the broad platform matrix (older glibc + extra OS versions) instead of the core set'
13+ type : boolean
14+ default : false
1115
1216permissions :
1317 contents : read
1418
1519jobs :
20+ # Emit the platform matrices as JSON. The CORE set is the default (fast,
21+ # unchanged); the BROAD set adds extra free runners (older glibc /
22+ # additional OS versions) for a wider "does it build everywhere" picture.
23+ setup-matrix :
24+ runs-on : ubuntu-latest
25+ timeout-minutes : 5
26+ outputs :
27+ unix : ${{ steps.set.outputs.unix }}
28+ windows : ${{ steps.set.outputs.windows }}
29+ steps :
30+ - name : Compute matrices
31+ id : set
32+ env :
33+ BROAD : ${{ inputs.broad_platforms }}
34+ run : |
35+ CORE_UNIX='[
36+ {"os":"ubuntu-latest","cc":"gcc","cxx":"g++"},
37+ {"os":"ubuntu-24.04-arm","cc":"gcc","cxx":"g++"},
38+ {"os":"macos-14","cc":"cc","cxx":"c++"},
39+ {"os":"macos-15-intel","cc":"cc","cxx":"c++"}
40+ ]'
41+ BROAD_UNIX='[
42+ {"os":"ubuntu-22.04","cc":"gcc","cxx":"g++","optional":true},
43+ {"os":"ubuntu-22.04-arm","cc":"gcc","cxx":"g++","optional":true},
44+ {"os":"macos-15","cc":"cc","cxx":"c++","optional":true}
45+ ]'
46+ # Each Windows leg pins the msys2 environment + package arch to the
47+ # RUNNER architecture so the build is native, never emulated:
48+ # x86-64 runners -> CLANG64 (mingw-w64-clang-x86_64-*)
49+ # ARM64 runner -> CLANGARM64 (mingw-w64-clang-aarch64-*)
50+ # windows-11-arm previously used the x86-64 CLANG64 toolchain, so its
51+ # binary ran under Windows-on-ARM x86-64 emulation and ASan's function
52+ # interception crashed (interception_win: unhandled instruction). With
53+ # the native ARM64 toolchain ASan instruments native ARM64 code, so it
54+ # is a real (non-optional) gate, not a tolerated emulated-flake.
55+ CORE_WIN='[{"os":"windows-latest","msystem":"CLANG64","pkg":"x86_64"}]'
56+ BROAD_WIN='[{"os":"windows-2025","optional":true,"msystem":"CLANG64","pkg":"x86_64"},{"os":"windows-11-arm","msystem":"CLANGARM64","pkg":"aarch64"}]'
57+ if [ "$BROAD" = "true" ]; then
58+ UNIX=$(jq -cn --argjson a "$CORE_UNIX" --argjson b "$BROAD_UNIX" '$a + $b')
59+ WIN=$(jq -cn --argjson a "$CORE_WIN" --argjson b "$BROAD_WIN" '$a + $b')
60+ else
61+ UNIX=$(jq -cn --argjson a "$CORE_UNIX" '$a')
62+ WIN=$(jq -cn --argjson a "$CORE_WIN" '$a')
63+ fi
64+ echo "unix={\"include\":$UNIX}" >> "$GITHUB_OUTPUT"
65+ echo "windows={\"include\":$WIN}" >> "$GITHUB_OUTPUT"
66+
1667 test-unix :
68+ needs : setup-matrix
1769 strategy :
1870 fail-fast : false
19- matrix :
20- include :
21- - os : ubuntu-latest
22- cc : gcc
23- cxx : g++
24- - os : ubuntu-24.04-arm
25- cc : gcc
26- cxx : g++
27- - os : macos-14
28- cc : cc
29- cxx : c++
30- - os : macos-15-intel
31- cc : cc
32- cxx : c++
71+ matrix : ${{ fromJSON(needs.setup-matrix.outputs.unix) }}
3372 runs-on : ${{ matrix.os }}
34- timeout-minutes : 60
73+ # Broad-only legs (extra OS versions) are informational: visible but
74+ # non-blocking, so a flaky/less-common runner can't block a release.
75+ continue-on-error : ${{ matrix.optional == true }}
76+ timeout-minutes : 240
3577 steps :
3678 - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3779
@@ -45,24 +87,35 @@ jobs:
4587 CBM_SKIP_PERF : ${{ inputs.skip_perf && '1' || '' }}
4688
4789 test-windows :
48- runs-on : windows-latest
49- timeout-minutes : 60
90+ needs : setup-matrix
91+ strategy :
92+ fail-fast : false
93+ matrix : ${{ fromJSON(needs.setup-matrix.outputs.windows) }}
94+ runs-on : ${{ matrix.os }}
95+ continue-on-error : ${{ matrix.optional == true }}
96+ timeout-minutes : 240
5097 steps :
5198 - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5299
53100 - uses : msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
54101 with :
55- msystem : CLANG64
102+ msystem : ${{ matrix.msystem }}
56103 path-type : inherit
57104 install : >-
58- mingw-w64-clang-x86_64 -clang
59- mingw-w64-clang-x86_64 -compiler-rt
60- mingw-w64-clang-x86_64 -zlib
105+ mingw-w64-clang-${{ matrix.pkg }} -clang
106+ mingw-w64-clang-${{ matrix.pkg }} -compiler-rt
107+ mingw-w64-clang-${{ matrix.pkg }} -zlib
61108 make
62109 git
63110
64111 - name : Test
65112 shell : msys2 {0}
66- run : scripts/test.sh CC=clang CXX=clang++
113+ # AddressSanitizer is unavailable on native ARM64 Windows (LLVM ships no
114+ # libclang_rt.asan for aarch64-w64-windows-gnu) and cannot intercept the
115+ # system DLLs under x86-64 emulation either, so windows-11-arm runs the
116+ # native ARM64 build with SANITIZE= (no sanitizer) — still a real
117+ # functional gate. ASan/UBSan coverage comes from the other 9 legs,
118+ # including native-ARM Linux/macOS. x86-64 Windows keeps full sanitizers.
119+ run : scripts/test.sh CC=clang CXX=clang++ ${{ matrix.os == 'windows-11-arm' && 'SANITIZE=' || '' }}
67120 env :
68121 CBM_SKIP_PERF : ${{ inputs.skip_perf && '1' || '' }}
0 commit comments