From 4dcfe0d675d4acb893324716a87e80392b2dd95b Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Wed, 8 Jul 2026 00:01:02 +0800 Subject: [PATCH] fix(ci): serialize windows nextest runs --- .github/workflows/rust-check.yml | 9 +++++---- .github/workflows/rust-multiplatform.yml | 8 +++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust-check.yml b/.github/workflows/rust-check.yml index a4345dff9..352fc9a29 100644 --- a/.github/workflows/rust-check.yml +++ b/.github/workflows/rust-check.yml @@ -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 diff --git a/.github/workflows/rust-multiplatform.yml b/.github/workflows/rust-multiplatform.yml index 2348aa0d1..ea23083d3 100644 --- a/.github/workflows/rust-multiplatform.yml +++ b/.github/workflows/rust-multiplatform.yml @@ -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