fix(ci): serialize windows nextest runs

This commit is contained in:
Kayshen-X 2026-07-08 00:01:02 +08:00
parent 83c30a149c
commit 4dcfe0d675
2 changed files with 10 additions and 7 deletions

View file

@ -80,9 +80,10 @@ jobs:
# intra-test race `--test-threads=1` can NOT serialize (it only
# serializes tests against each other, not threads inside one test).
# nextest runs every test in its OWN process, so such a crash is
# isolated + named instead of taking down the whole test binary, and
# cross-test DirectWrite state can't leak between them. Doctests run
# separately (nextest doesn't execute them).
# isolated + named instead of taking down the whole test binary.
# Keep those test processes serial on Windows: DirectWrite/Skia still
# aborts in CI when several native text-layout processes run at once.
# Doctests run separately (nextest doesn't execute them).
- name: Install cargo-nextest (Windows)
if: runner.os == 'Windows'
uses: taiki-e/install-action@v2
@ -90,7 +91,7 @@ jobs:
tool: nextest
- name: Test workspace (Windows, nextest per-process isolation)
if: runner.os == 'Windows'
run: cargo nextest run --workspace
run: cargo nextest run --workspace --test-threads=1
- name: Doctests (Windows)
if: runner.os == 'Windows'
run: cargo test --workspace --doc

View file

@ -121,8 +121,10 @@ jobs:
# worker thread doing font layout (SkiaMeasure) concurrently with the
# main thread — an intra-test race --test-threads=1 can't serialize.
# nextest runs each test in its own process so such a crash is isolated
# + named and cross-test DirectWrite state can't leak. Doctests run
# separately (nextest doesn't execute them). Matches rust-check.yml.
# + named. Keep those test processes serial on Windows: DirectWrite/Skia
# still aborts in CI when several native text-layout processes run at
# once. Doctests run separately (nextest doesn't execute them). Matches
# rust-check.yml.
- name: Install cargo-nextest (Windows)
if: matrix.cross == false && matrix.check_only != true && runner.os == 'Windows'
uses: taiki-e/install-action@v2
@ -130,7 +132,7 @@ jobs:
tool: nextest
- name: Test (host, Windows — nextest per-process isolation)
if: matrix.cross == false && matrix.check_only != true && runner.os == 'Windows'
run: cargo nextest run --workspace --target ${{ matrix.target }}
run: cargo nextest run --workspace --target ${{ matrix.target }} --test-threads=1
- name: Doctests (host, Windows)
if: matrix.cross == false && matrix.check_only != true && runner.os == 'Windows'
run: cargo test --workspace --target ${{ matrix.target }} --doc