Skip to content

Commit 38e5f88

Browse files
claudewan9chi
authored andcommitted
ci: run Windows archive tests in two jobs
Cross-compile the Windows test archive on Linux before starting Windows runners, then run the default suite across two nextest partitions. Run the smaller Node-backed ignored suite once to avoid duplicate setup while preserving coverage.
1 parent 6145cfe commit 38e5f88

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,12 @@ jobs:
133133

134134
# Windows tests are cross-compiled on a fast Linux runner with cargo-xwin
135135
# (clang-cl + lld-link against the xwin-downloaded MSVC CRT/Windows SDK)
136-
# and packed into a portable nextest archive. The test-windows shards then
137-
# only download the archive and run it — no Rust toolchain or compilation
138-
# on the slow Windows runners. Windows e2e fixtures dominate wall-clock
139-
# (60s per PTY step vs 20s on Unix), so the run is split across shards via
140-
# nextest's count partitioning, which spreads tests round-robin.
136+
# and packed into a portable nextest archive. The Windows runners then only
137+
# download the archive and run it: no Rust toolchain or compilation on the
138+
# slow runners. Two nextest partitions avoid most repeated setup while keeping
139+
# enough parallelism for the Windows-heavy default test workload. The much
140+
# smaller Node-backed ignored suite runs once in the second partition, avoiding
141+
# a duplicate Windows Node setup.
141142
build-windows-tests:
142143
needs: detect-changes
143144
if: needs.detect-changes.outputs.code-changed == 'true'
@@ -214,10 +215,10 @@ jobs:
214215
strategy:
215216
fail-fast: false
216217
matrix:
217-
partition: [1, 2, 3, 4, 5, 6]
218+
partition: [1, 2]
218219
runs-on: windows-latest
219220
env:
220-
PARTITION: count:${{ matrix.partition }}/6
221+
PARTITION: count:${{ matrix.partition }}/2
221222
steps:
222223
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
223224

@@ -243,11 +244,11 @@ jobs:
243244
run: cargo-nextest nextest run --archive-file windows-tests.tar.zst --workspace-remap . --partition "$PARTITION"
244245

245246
- uses: oxc-project/setup-node@ab97f03642370d79a7e96dd286bd02a1be40e0ba # v1.3.0
247+
if: matrix.partition == 2
246248

247-
# --no-tests=pass: a shard's partition of the (much smaller) ignored
248-
# test set may legitimately come up empty.
249249
- name: Run ignored tests
250-
run: cargo-nextest nextest run --archive-file windows-tests.tar.zst --workspace-remap . --partition "$PARTITION" --run-ignored ignored-only --no-tests pass
250+
if: matrix.partition == 2
251+
run: cargo-nextest nextest run --archive-file windows-tests.tar.zst --workspace-remap . --run-ignored ignored-only
251252

252253
test-musl:
253254
needs: detect-changes

0 commit comments

Comments
 (0)