Repository navigation
Conversation
PR desktop jobs always compiled cold. The Rust cache job on main set RUST_TARGET_TRIPLE as job env, which rust-cache hashes into the key, so PRs never matched its saves. Per-PR bun caches (~800MB per ref and OS) also filled the 10GB quota and evicted everything else, and main runs were cancelled by the next merge before their cache save. Build Desktop and a new parallel Build GPUI Desktop job now save their own caches from main, replacing the warmer job. Root cargo tests use --target so they share the tauri build's debug tree, CI builds the sidecars in debug (build-desktop-binaries.sh keeps release as default), and Clippy stubs the sidecars and reuses Build Desktop's cache. The bun cache is Linux-only and saved from main only, and Linux Build Desktop is left uncached to keep the set under the quota. On a fork, a warm run took about 20 minutes end to end versus 69 to 90 minutes for Build Desktop alone upstream.
Contributor
|
@ayagmar is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
@greptileai please review |
Member
|
Hey @ayagmar, thanks so much for your PR - looks like bad timing, I've also been working on my own CI optimisations. I've still sponsored you :) cheers! |
Author
|
Thanks a lot for the sponsor, I really appreciate it! I'm always happy to help out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2486. The CI wait there was crazy, so I looked into why and put together a fix.
Desktop CI on PRs compiled the Rust workspace from scratch every run (
No cache found.on every desktop job), so Build Desktop took 41 to 90 minutes. With this change a PR's CI finishes in about 20 minutes oncemainhas saved caches: the slowest job is 77 to 79% faster.Results
Upstream runs: 38454691299, 38446218534, 38433517508. This branch on a fork, using a temporary commit that saved caches from the branch: cold, warm.
Why the cache never hit
Rust cachejob setRUST_TARGET_TRIPLEas job env.rust-cachehashes env into the key, somainsaved under one key and PRs looked up another.setup-jssaved an ~800 MB bun cache per PR and OS, which filled the 10 GB quota and evicted everything else.cancel-in-progresscancelledmainruns before their cache save.Changes
main; theRust cachejob is gone.cargo testcalls use--target, so they share the debug tree withtauri build --debug --target.build-desktop-binaries.shtakes an optional profile and still defaults torelease.tauri-buildonly checks they exist) and reuses Build Desktop's cache.mainruns are no longer cancelled; the bun cache is Linux-only and saved frommainonly.Trade-offs
desktop-release.yml. The release sidecar build was 16 to 21% of Build Desktop (7 to 17 minutes), and dropping it makes that cache 36 to 40% smaller (measured on the fork).Cargo.lockchange, old entries linger until evicted, so expect an occasional cold run.
Confidence Score: 5/5
This PR appears safe to merge; no actionable issues were found.Summary
This PR moves Rust cache saves into the desktop build jobs and runs GPUI in a separate parallel job.
No actionable issues were found.
Acknowledged trade-offs:
ayagmarexplicitly accepts debug sidecars in CI, with release-only checks left todesktop-release.yml.ayagmarintentionally leaves Linux Build Desktop uncached and removes macOS/Windows Bun caches to stay within the cache quota.ayagmaracknowledges thin cache headroom and occasional cold runs after lockfile changes.Reviews (1) · Last reviewed commit: "perf(ci): make desktop Rust caches resto..." · Reviewed by Greptile