Repository navigation
ci: fix Rust caching and cut nightly build time - #738
Merged
Merged
Conversation
- rust-cache pointed at src-tauri/target, but since the root workspace was added builds go to ./target, so nothing was ever cached. Point nightly, release and remote-e2e at ". -> target". - Delete the orphaned src-tauri/Cargo.lock. Cargo uses the root lockfile, and rust-cache was hashing the stale one, freezing the cache key. - Move [profile.*] to the root Cargo.toml. Cargo ignores profiles in non-root members, so release builds had silently lost opt-level "z", strip and panic = "abort". - Desktop release/nightly builds compile only the rlib crate type, avoiding extra whole-program LTO links for staticlib/cdylib. - Nightly desktop builds use thin LTO with 16 codegen units; tagged releases keep fat LTO. - Nightly mobile debug builds compile dependencies at opt-level 1. - Nightly Linux skips the AppImage bundle.
This branch was successfully deployed
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.
Nightly desktop builds were taking 17–27m per target and Android 21m. Every Rust job in the nightly compiled from scratch.
Root causes
./target.nightly.yml,release.ymlandremote-e2e.ymlstill cachedsrc-tauri/target. Logs showNo cache foundand a 178 MB upload that holds only the cargo registry.src-tauri/Cargo.lock. Cargo uses the rootCargo.lock.[profile.*]sections. Cargo only reads profiles from the workspace root, and since refactor: remove Mission Control and dead terminal code; key agent columns "agent-<id>" #629 they lived insrc-tauri/Cargo.toml. It printed a warning:profiles for the non root package will be ignored. Release builds silently lostopt-level = "z",stripandpanic = "abort", whichtelemetry.rsrelies on.staticlibandcdyliboutputs each take a full link: about 3.4m for the lib step plus about 3.8m for the bin on Linux.Changes
workspaces: ". -> target"in nightly (×3), release and remote-e2e.src-tauri/Cargo.lock; fix the READMEmake bumpline that mentions it.Cargo.tomlunchanged. This restores the pre-refactor: remove Mission Control and dead terminal code; key agent columns "agent-<id>" #629 behaviour.crate-typeto["rlib"]beforetauri build. Desktop only needs the bin; mobile and NAPI keep all three crate types.lto = "thin"andcodegen-units = 16via env. Release keeps fat LTO fromCargo.toml, and its redundant env overrides and stale comment are removed.opt-level = 1, set by a CI-written.cargo/config.tomlthat overrides the manifest's3.--bundles deb,rpmand skips the AppImage. Releases still build all bundles.Side effects to note
profile.dev.package."*" opt-level = 3for local dev andci.ymltest builds. Dependencies compile slower on a cold cache, and tests run faster.Verification
cargo metadata --lockedsucceeds against the root lockfile, and the profile warning is gone..cargo/config.tomloverridesprofile.dev.package."*"in the manifest.sed+grepcrate-type step was tested on a copy ofsrc-tauri/Cargo.toml.workflow_dispatchof Nightly on this branch is the real check.Not addressed here: the macOS x86_64 job failure in run 37449540162.
Generated by Claude Code