Repository navigation
fix(ci): 为 Rust Core 与 Plugin SDK 工作流启用 rust-cache 与依赖缓存 - #204
Merged
Merged
Conversation
xiaoyumuxi
marked this pull request as ready for review
November 26, 2026 12:57
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.
Why
Observed on recent
Lithe-core-rustCI runs and repository cache usage:sdk-e2erust/targetcaches consumed 6.60 GiB (3.30 GiB each).rust-core.ymlonly cached~/.cargo/registry(~34 MiB) on Linux and had no cache at all on macOS / Windowshostsjobs, forcing every PR to recompile all third-party dependencies from scratch (~7m 21s on Linux alone).plugins-verify.ymlalso lacked caching forsdk-rust,sdk-java(Maven), andsdk-node(npm).Changes
.github/workflows/rust-core.yml:actions/cache@v6onlinuxwithSwatinem/rust-cache@v2(workspaces: rust -> target,shared-key: rust-core-linux,cache-on-failure: true), caching third-party dependency.rlibs while stripping workspace artifacts to stay well within the 10 GiB cache quota.Swatinem/rust-cache@v2(workspaces: rust -> target,shared-key: rust-core-host,cache-on-failure: true) to the macOS / Windowshostsjob..github/workflows/plugins-verify.yml:rust/target+shared/plugins/sdk/rust/targetactions/cache@v6insdk-e2ewithSwatinem/rust-cache@v2(shared-key: sdk-e2e) to reclaim the 6.6 GiB cache footprint.Swatinem/rust-cache@v2tosdk-rust,cache: maventosdk-java/sdk-e2eJava 21 setup, andcache: npmtosdk-node/sdk-e2eNode setup.Note on Release LTO
We benchmarked
lto = "thin"+codegen-units = 16vs currentlto = true+codegen-units = 1onlithe-corestaticlib (macOS arm64 release):lto = true, cgu = 1: 151s,liblithe_core.a= 42.1 MB (13.9 MB gzipped)lto = "thin", cgu = 16: 35s,liblithe_core.a= 102.7 MB (22.1 MB gzipped)To preserve minimal release artifact size while accelerating desktop releases via staged Core caching (in the companion
Lithe-IDEAPR),rust/Cargo.tomlkeepslto = trueandcodegen-units = 1unchanged.Verification
ruby -ryamlsyntax check on.github/workflows/rust-core.ymland.github/workflows/plugins-verify.yml: passed.node --test scripts/rust-core/*.test.mjs: 16/16 passed.node scripts/rust-core/verify-platform-tests.mjs: passed across all 53 crates.