cache-name gives each call of the gate in one job its own dependency-cache entry (gate-<name>); the default keeps today's key. dev-strip builds the test profile without debug info and strips symbols.
With test-shards N > 0, the gate leg of each runner becomes N test <k>/<N>
(<os>) legs. Each has the full setup, restores the gate's Rust cache entry and
runs shard-command (windows-shard-command on Windows) with GATE_SHARD,
GATE_SHARDS and NEXTEST_PARTITION (hash:<k>/<N>) set, building and running
its share of the tests. Shard 1 saves the cache by the gate leg's rules (the
warm leg saves instead when there is one); the others only restore. lint and
cache warm legs run once per runner. A gate (<os>) job passes only when every
shard of that runner passed, from per-shard pass markers.
test-shards defaults to 0, which leaves every existing call as it was.
StepSecurity's v2.9.1 cut every target/<profile>/build entry at its last '-',
so Cargo's new build-dir layout (build/<package>/<hash>/) lost most dependency
packages from each saved entry. v2.9.3 checks the exact name first (#371 there)
and keeps the Windows path fix (#355 there) that v2.9.1 was pinned for.
The cache-version default moves to v2 once: rust-cache never replaces an
exact-key entry, so the pruned v1 entries would otherwise be restored as they
are until the lockfile changes.
The rust-cache key hashes the root [profile] tables except wasm-only ones (web, wasm-*), so a
web-profile edit no longer starts every native cache cold. A new warm-command input adds a
default-branch leg that runs only the build and saves the gate entry as soon as it succeeds,
instead of after the tests.
A caller that keeps its pins in the fetch script names it in cache-key-files, so
the pin is written once and a new pin or fetch starts a new entry. The key is
computed once and used by both the restore and the save.
A select legs job (actions/select-platforms) runs the select-os legs on a pull
request only when a changed file is in a crate with platform cfg code or a crate
that depends on one (cargo metadata --no-deps and a scan of the sources), is part
of the build setup or select-paths, or lies outside every crate and is not
documentation. The select-label label (full-ci) and every other event run every
leg. Without select-os no select job runs and the matrix is os, as before.
On craft-libs today 37 of 177 crates have platform cfg code and 57 are affected
with their dependents; 39 of the last 80 merged pull requests would have run the
Linux leg only.
The cache-extra-paths item of #212. The paths are restored before setup-command
and saved after it under the dependency cache's save rule, one entry for every
OS, keyed on the caller's pins. craft-libs uses it for the PhotoCraft PSD corpus,
which otherwise builds PhotoCraft's xtask on every leg (1:51 on Windows).
With lint-command set, each runner in os gets a lint (<os>) leg that runs the
lint checks with the same setup, so clippy no longer runs before the test build
on the critical path. One job definition with a part matrix dimension; the test
part keeps the gate (<os>) check name, and the lint part has its own rust-cache
entry. Empty lint-command keeps today's behaviour.
step-security/rust-cache v2.9.2 ships an ES-module bundle. Its bundled
minimatch 3 calls require('path'), which throws in an ES module, so it
falls back to '/' as the separator. On Windows no cache path then
matches and every save fails with "Path Validation Error". Windows legs
never saved a cache and built every dependency from scratch.
v2.9.1 is a CommonJS (ncc) bundle with the same inputs. Pin it
everywhere rust-cache is used and add a test that keeps every pin on
the action's commit and off v2.9.2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCXtSjB6e5jmy9Uq7u8
Disable Rust cache saves after failed runs and resolve CARGO_TARGET_DIR relative to the checkout. Use dated FreeBSD cache entries and skip a matching same-day save. Keep inherited-target tests independent of the caller environment.
Contributor: @benandez.
Validated with the passing hosted test job, 95 focused passes plus one existing csh skip, and four inherited-target tests. Native Windows/FreeBSD VM and live cache-service execution were not claimed.
The 15 November scheduled dry-run wrote x86_64 archives in the aarch64
job because an unset PKG_CONFIG_PATH in the cross env heredoc left
CARGO_BUILD_TARGET unset, and FreeBSD sh did not abort. #242 already
stops the heredoc from expanding that unset variable. This checks that
the env file actually exported the target, and that the build and
package steps still have it, so a similar miss fails before packaging.