diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index ff8c8abcd..d1b43aa4f 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -170,8 +170,3 @@ dependencies: commit: 'sha1-d65d611f0ef67eaa94039351be5afce61102dbb0' owner_id: 76897702 repo_id: 1414429108 - 'swatinem/rust-cache@v2.9.3': - ref: 'v2.9.3' - commit: 'sha1-d1527c8f67ef9af357290475d4af4b0fab8f12e0' - owner_id: 580492 - repo_id: 298565987 diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index b117f470a..c75251ce4 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -103,12 +103,6 @@ jobs: fi cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings - # A push to main builds the gate's test binaries in their own leg and saves the cache right - # after, so a failing test no longer keeps the cache from being saved. The same two builds - # the gate's nextest runs do (all features; the two crates with default features). - warm-command: &warm | - cargo test --workspace --no-run --all-features --locked - cargo test -p craft-image-codecs -p craft-text --no-run --locked command: &command | # The tests run once, with every feature, in parallel across test binaries; nextest skips # doctests, so `cargo test --doc` runs them. Examples are not built, except the two whose @@ -138,20 +132,15 @@ jobs: # No debuginfo on Windows: writing PDBs for every test binary is a large part of its link # time. A panic still names its file and line; only backtrace frames lose theirs, and the # Linux and macOS legs keep line tables. - # rust-lld links the test binaries faster than link.exe; /OPT:NOICF skips identical-code - # folding and /DEBUG:NONE writes no PDB, both of which only cost link time here. windows-env: | CRAFT_PRINT_REQUIRE_QUEUE=1 CARGO_PROFILE_DEV_DEBUG=0 - CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER=rust-lld - CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS=-Clink-arg=/OPT:NOICF -Clink-arg=/DEBUG:NONE env: *env setup-command: *setup cache-paths: *cache-paths cache-key: *cache-key cache-key-files: *cache-key-files lint-command: *lint - warm-command: *warm command: *command windows-command: | powershell.exe -NoProfile -Command '$ErrorActionPreference = "Stop"; Start-Service Spooler; Add-PrinterDriver -Name "Generic / Text Only"' diff --git a/scripts/test-workspace-tests.py b/scripts/test-workspace-tests.py index f72571360..29367956b 100644 --- a/scripts/test-workspace-tests.py +++ b/scripts/test-workspace-tests.py @@ -183,8 +183,9 @@ class WorkspaceTests(unittest.TestCase): self.assertIn("uses: storytold/craft-common-actions/.github/workflows/gate.yml@main", source) self.assertIn('os: \'["ubuntu-latest"]\'', source) self.assertIn('os: \'["windows-latest","macos-latest"]\'', source) + self.assertIn("if: needs.platforms.outputs.platform == 'true'", source) # Pushes to next run Linux only. - self.assertIn("if: needs.platforms.outputs.platform == 'true' && github.ref != 'refs/heads/next'", source) + self.assertIn("&& github.ref != 'refs/heads/next'", source) # The macOS and Windows legs run the Linux leg's blocks, not copies of them. self.assertIn(" lint-command: &lint |\n", source) self.assertIn(" command: &command |\n", source)