Repository navigation
ci: add build caching to release pipeline - #329
Merged
Merged
Conversation
…se-build
Add CircleCI save_cache/restore_cache for three caches:
1. Cargo registry (~/.cargo/registry) — keyed on Cargo.lock checksum,
saves downloaded crate sources between runs.
2. Cargo target + pnpm store (~/cb/release/cache) — keyed on Cargo.lock
+ both Cargo.toml checksums. circleci-release-build.ps1 now uses a
fixed WorkRoot (~/cb/release) instead of a random GUID, and the
finally block preserves cache/ (cargo-target, cargo-target-cli,
pnpm-store) while cleaning only source/ and assets/. This lets the
compiled artifacts and node_modules persist across runs.
The fallback key (release-cache-{Cargo.lock}-) provides a partial
cache hit when Cargo.toml versions change but dependencies are stable.
Finesssee
added a commit
to hellhole8/Win-CodexBar
that referenced
this pull request
Aug 16, 2026
The initial design avoided persistent compiled-output caches for OSS fork safety (random GUID WorkRoot, deleted per run). This is now superseded by the CircleCI save_cache/restore_cache added in PR nesszer#329. Document the decision change, what is cached (cargo registry, cargo target, pnpm store), and why it is safe (tag-only pipeline, protected tags, preflight validation, cache-key sensitivity, no poisoning surface).
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.
Summary
Add three CircleCI caches to the
release-buildjob to speed up builds:1. Cargo registry cache (
~/.cargo/registry)Cargo.lockchecksum2. Cargo target cache (
~/cb/release/cache/cargo-target+cargo-target-cli)Cargo.lock+ bothCargo.tomlchecksumsrelease-cache-{Cargo.lock}-for partial hits when versions changecircleci-release-build.ps1now uses a fixed WorkRoot (~/cb/release) instead of a random GUIDfinallyblock preservescache/while cleaning onlysource/andassets/3. pnpm store cache (
~/cb/release/cache/pnpm-store)~/cb/release/cache)node_modulesstore between runsFiles changed
.circleci/config.yml— addrestore_cache/save_cachestepsscripts/circleci-release-build.ps1— fixed WorkRoot, preserve cache in finallyValidation
circleci config validate→ validPARSE_OK