Skip to content

v2.4.0 · Share build-script outputs and free idle test slots

Latest

Choose a tag to compare

@pecorino-bot pecorino-bot released this 26 Nov 11:49
Immutable release. Only release title and notes can be modified.
v2.4.0
b64f9a4

Fresh CI workers can now restore eligible native build-script outputs from workers on the same pinned image. On busy Linux and macOS builders, an idle test can give back slots so other tests can start.

cargo install kache --locked

Share native build-script outputs in CI

Set KACHE_BUILD_SCRIPT_IMAGE to the same immutable sha256: image digest on the producer and consumer. Use it for both the build and sync commands. Run kache sync --push after a trusted build, then kache sync --pull on a fresh worker before it builds. Kache checks the declared inputs again before restoring the output. Builds without the image setting keep their build-script runs local. Setup guide · #2067

Give pull requests their own S3 bucket

PR jobs can read from the protected branch’s bucket and publish to a separate bucket. Set pull_request_bucket and pull_request_prefix under [cache.remote]. Give the job read access to the base bucket and set KACHE_PULL_REQUEST_S3_ACCESS_KEY and KACHE_PULL_REQUEST_S3_SECRET_KEY for the PR bucket. Protected pushes keep using the base bucket. CI setup · #2061

Tests and cache reuse

  • Test slots on busy builders. On Linux and macOS, kache test-runner returns unused slots from elastic reservations and names the binaries holding slots when a test has waited ten seconds. Tests with explicit thread counts and nextest keep fixed reservations. #2069
  • Fewer rebuilds on Windows. ReFS Dev Drives can reuse hashes for unchanged files. Eligible MSVC Rust libraries can hit when only archive-member timestamps change. Compiler probes can also run locally while another process starts the daemon. #2060 · #2068 · #2065
  • More reuse across target directories. Rust libraries that bundle eligible static archives can restore after a checkout or target directory moves. Kache also honors crate-scoped path_only_env_vars for paths declared by build scripts. #2059 · #2062

Build scripts and diagnostics

With hermetic build scripts enabled, crates that can run procedural macros keep a writable OUT_DIR. If an existing target still points to a read-only output tree, Kache names the package to clean with cargo clean -p <package>. #2066

When kache explain finds a different link key, it names the crate to trace. Compare those traces with kache key diff --link-trace to find the changed linker, SDK, search path, or library. The monitor now counts compiler passthroughs beside an empty lookup chart. #2063 · #2064

Contributors

Thanks to @jleni for implementing and integrating the release changes, and to James Lal (@lightsofapollo) for contributing the test-slot sampler and wait diagnostics. #2057 · #2069

jleni lightsofapollo

Thanks to @arthurfiorette and @legietha for the CI cache requests, @SetpointDesign for the Windows and cache-key reproductions, and @JMacLulich, @saschanaz, and @lightsofapollo for the linker, monitor, and hermetic build reports. #1719 · #1872 · #1985 · #2005 · #2007 · #1906 · #2048

Full changelog