From 06125b23baa0a70ecccd2761c6cc676742d08a33 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 18 Nov 2026 01:25:41 +0000 Subject: [PATCH] ci: next's gate matches main's text except its Linux-only pushes The workspace script tests pin main's gate. Clippy runs without --keep-going as on main, the facade-as-an-app clippy moves to the Docs workflow, and the unix gpu test group is back. --- .config/nextest.toml | 16 ++++++++++++---- .github/workflows/docs.yml | 5 +++++ .github/workflows/workspace.yml | 9 ++------- scripts/test-workspace-tests.py | 3 ++- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.config/nextest.toml b/.config/nextest.toml index 91b67c9dea..128a76cf9e 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -12,6 +12,9 @@ nextest-version = "0.9.150" # process per test those mutexes no longer serialize anything, so these groups do it instead, one # test at a time, as under `cargo test`. [test-groups] +# craft-ui: `gpu_test_lock()` / `gpu_lock()`. Each renderer creates its own wgpu instance and +# device, and creating or destroying one while another test uses its device can crash. +gpu = { max-threads = 1 } # craft-video h264_decode: `FIXTURE_GENERATION` keeps a second producer from replacing a fixture # file another test is reading. video-fixtures = { max-threads = 1 } @@ -38,10 +41,15 @@ fail-fast = false slow-timeout = { period = "60s" } failure-output = "immediate-final" -# Linux and macOS (the resource audit in craft-libs#2058): the craft-video integration binaries -# share their fixture directories. Conservative on purpose: the in-process mutexes these tests rely -# on do not reach across nextest's processes. Windows keeps the default groups above, which its leg -# has passed with since it moved to nextest. +# Linux and macOS (the resource audit in craft-libs#2058): every GPU consumer shares the one `gpu` +# slot, and the craft-video integration binaries share their fixture directories. Conservative on +# purpose: the in-process mutexes these tests rely on do not reach across nextest's processes. +# Windows keeps the default groups above, which its leg has passed with since it moved to nextest. +[[profile.ci.overrides]] +platform = 'cfg(unix)' +filter = 'package(craft-ui) | package(craft-keymap) | package(craft-update)' +test-group = 'gpu' + [[profile.ci.overrides]] platform = 'cfg(unix)' filter = 'package(craft-video) & kind(test)' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c349460f49..a37675342e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,7 +28,12 @@ jobs: - uses: step-security/dtolnay-rust-toolchain@v1.0.0 with: toolchain: stable + components: clippy - uses: step-security/rust-cache@v2.9.2 + # A lib build selects no dev-dependency, so craft-ui's `testing` stays off as in an app's + # build: warnings that show only without it fail here. + - name: Facade as an app builds it + run: cargo clippy -p craft --lib --locked --features ui,layers,color,draw,imaging -- -D warnings - name: Docs (links and missing docs) run: cargo doc --workspace --no-deps --locked --keep-going env: diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 962a7c5324..309506b2e9 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -66,13 +66,8 @@ jobs: python3 scripts/test-workspace-tests.py fi cargo fmt --check - cargo clippy --workspace --all-targets --locked --keep-going -- -D warnings - cargo clippy --workspace --all-targets --all-features --locked --keep-going -- -D warnings - # A lib build selects no dev-dependency, so craft-ui's `testing` stays off as in an app's - # build: warnings that show only without it fail here. - if [ "$RUNNER_OS" = Linux ]; then - cargo clippy -p craft --lib --locked --features ui,layers,color,draw,imaging -- -D warnings - fi + cargo clippy --workspace --all-targets --locked -- -D warnings + cargo clippy --workspace --all-targets --all-features --locked -- -D warnings command: | # The tests run once, with every feature, in parallel across test binaries; nextest skips # doctests, so `cargo test --doc` runs them. The default-feature compile is the lint leg's diff --git a/scripts/test-workspace-tests.py b/scripts/test-workspace-tests.py index fada6dc9b8..05bb3657ce 100644 --- a/scripts/test-workspace-tests.py +++ b/scripts/test-workspace-tests.py @@ -99,7 +99,8 @@ class WorkspaceTests(unittest.TestCase): def test_workflow_stays_shared_and_keeps_platform_gates(self): source = WORKFLOW.read_text() self.assertIn("uses: storytold/craft-common-actions/.github/workflows/gate.yml@main", source) - self.assertIn('os: \'["ubuntu-latest","windows-latest","macos-latest"]\'', source) + # Pushes to next run Linux only; every other run keeps all three. + self.assertIn('\'["ubuntu-latest","windows-latest","macos-latest"]\'', source) self.assertIn(" msrv:", source) self.assertIn(" wasm:", source) self.assertIn("python3 scripts/test-workspace-tests.py", block(source, "lint-command"))