ci: cache Rust builds with Kache - #4322
Merged
Merged
Conversation
M4n5ter
force-pushed
the
ci/kache-rust-cache
branch
2 times, most recently
from
August 31, 2026 08:10
53068a3 to
78bad00
Compare
M4n5ter
force-pushed
the
ci/kache-rust-cache
branch
from
August 31, 2026 08:57
a78c2fa to
2575f08
Compare
jackwener
approved these changes
Aug 31, 2026
jackwener
left a comment
Member
There was a problem hiding this comment.
Approved at the explicit direction of M4n5ter. No technical review was performed as part of this action; M4n5ter requested the approval and accepts responsibility for subsequent handling.
Review notice: This approval was submitted by an automated review agent operated by jackwener and is published at the direction of M4n5ter, who is the human accountable for it.
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.
English
Use Kache to reuse Rust compiler artifacts from the default branch across pull requests without adding external cache infrastructure.
taiki-e/install-action.KACHE_CACHE_DIRwith GitHub-ownedactions/cache/restoreandactions/cache/save; keep runtime events job-local inKACHE_RUNTIME_DIR.Desktop packaging and release workflows remain outside this change: caching their incidental Cargo invocations would add cache-producing lifecycle modes to workflows owned by installer, signing, and release semantics.
The direct
kunobi-ninja/kache-actionintegration is rejected by the Apache organization action allowlist, so this uses existing approved building blocks while preserving restore-only PR trust boundaries.Validation:
go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12on the affected workflowsnode --test --test-concurrency=1 scripts/ci-test-plan.test.mjs scripts/verify-windows-harness.test.mjs(91 tests passed)npm exec -- biome check scripts/ci-test-plan.test.mjsgit diff --check中文
使用 Kache,让各个 PR 复用默认分支生成的 Rust 编译产物,同时不引入外部缓存基础设施。
taiki-e/install-action安装固定版本 Kache 0.16.0。actions/cache/restore和actions/cache/save持久化KACHE_CACHE_DIR;运行事件保留在 job 独立的KACHE_RUNTIME_DIR。Desktop packaging 和 release workflow 不属于本次改动:为了其中间接触发的 Cargo 编译而接入缓存,会给负责安装器、签名和发布语义的 workflow 增加额外的 cache producer 生命周期。
直接使用
kunobi-ninja/kache-action会被 Apache 组织的 Action allowlist 拒绝,因此改用仓库已有的受准组件,同时保留 PR 只读的信任边界。验证:
go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12node --test --test-concurrency=1 scripts/ci-test-plan.test.mjs scripts/verify-windows-harness.test.mjs(91 个测试通过)npm exec -- biome check scripts/ci-test-plan.test.mjsgit diff --check