Skip to content

ci(release): cache Rust builds per platform - #333

Merged
oglassdev merged 3 commits into
mainfrom
ci/faster-release-builds
Oct 5, 2026
Merged

oglassdev merged 3 commits into
mainfrom
ci/faster-release-builds

Conversation

@oglassdev

@oglassdev oglassdev commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Release builds take about 30 minutes. Every run also rebuilt every Rust dependency from scratch on all five platforms, because release.yml had no cache.

The package matrix now uses the repo's rust-cache action, keyed per platform. The action gains a key input, so matrix jobs that share a runner OS and architecture get separate caches. Its V8 eviction fallback now cleans the profile it caches: before, cargo clean -p v8 only cleaned dev, so it never applied to release caches.

Results

cargo build --release minutes, measured on this PR:

Platform Before Cold Cached
linux-x64 10.6 10.6 6.3
linux-arm64 9.5 9.2 6.0
darwin-arm64 17.6 14.8 9.1

Windows (about 21–29 min) and Intel macOS (about 24 min) still bound the total time. With lto = "fat", the final link generates code for every dependency again, so cached dependencies save the least on the slowest machines.

Tried and dropped

  • Cross-compiling darwin-x64 on Apple Silicon. The binary segfaults on its first V8 call. crates/chunk-js/build.rs builds the V8 startup snapshot on the build machine, so an arm64 build machine produces a snapshot the x64 binary can't load.
  • A Windows Dev Drive. Two runs measured 21.1 and 28.6 min against a 29.4 min baseline. That's too inconsistent to justify the extra plumbing.

The remaining big lever is thinner LTO or more codegen units. That trades runtime performance and nightly/release parity, so it's left for a separate decision.

🤖 Generated with Claude Code

@oglassdev oglassdev changed the title ci(release): cut release build time by caching and dropping the Intel macOS runner ci(release): cache Rust builds per platform Oct 5, 2026
@oglassdev
oglassdev merged commit 140d8e7 into main Oct 5, 2026
23 checks passed
@oglassdev
oglassdev deleted the ci/faster-release-builds branch October 5, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant