5858
5959 - run : rustup target add x86_64-unknown-linux-musl
6060 - run : pipx install cargo-zigbuild
61+ # pipx isolates cargo-zigbuild in its own venv, so its ziglang dependency
62+ # (which bundles zig) isn't on PATH. Install zig separately.
6163 - uses : mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2
6264
6365 # --locked: verify Cargo.lock is up to date (replaces the removed `cargo check --locked`)
@@ -73,12 +75,20 @@ jobs:
7375 include :
7476 - os : namespace-profile-linux-x64-default
7577 target : x86_64-unknown-linux-gnu
78+ cargo_cmd : cargo-zigbuild
79+ build_target : x86_64-unknown-linux-gnu.2.17
7680 - os : windows-latest
7781 target : x86_64-pc-windows-msvc
82+ cargo_cmd : cargo
83+ build_target : x86_64-pc-windows-msvc
7884 - os : namespace-profile-mac-default
7985 target : aarch64-apple-darwin
86+ cargo_cmd : cargo
87+ build_target : aarch64-apple-darwin
8088 - os : namespace-profile-mac-default
8189 target : x86_64-apple-darwin
90+ cargo_cmd : cargo
91+ build_target : x86_64-apple-darwin
8292 runs-on : ${{ matrix.os }}
8393 steps :
8494 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -108,6 +118,8 @@ jobs:
108118 - run : pipx install cargo-zigbuild
109119 if : ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
110120
121+ # pipx isolates cargo-zigbuild in its own venv, so its ziglang dependency
122+ # (which bundles zig) isn't on PATH. Install zig separately.
111123 - uses : mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2
112124 if : ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
113125
@@ -132,20 +144,10 @@ jobs:
132144 - run : pnpm install
133145
134146 - name : Build tests
135- run : cargo test --no-run --target ${{ matrix.target }}
136- if : ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
137-
138- - name : Build tests
139- run : cargo-zigbuild test --no-run --target x86_64-unknown-linux-gnu.2.17
140- if : ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
147+ run : ${{ matrix.cargo_cmd }} test --no-run --target ${{ matrix.build_target }}
141148
142149 - name : Run tests
143- run : cargo test --target ${{ matrix.target }}
144- if : ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
145-
146- - name : Run tests
147- run : cargo-zigbuild test --target x86_64-unknown-linux-gnu.2.17
148- if : ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
150+ run : ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }}
149151
150152 test-musl :
151153 needs : detect-changes
0 commit comments