Skip to content

Commit b249102

Browse files
zcgclaude
andcommitted
perf: use Swatinem/rust-cache for faster builds
Replace manual cache config with rust-cache action which: - Caches ~/.cargo registry, index, and git data - Caches target directory with incremental compilation - cache-all-crates: ensures all dependencies are cached - cache-on-failure: saves cache even if build fails 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ea949a8 commit b249102

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/88code-release.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,14 @@ jobs:
6767
with:
6868
targets: ${{ matrix.target }}
6969

70-
- uses: actions/cache@v4
70+
- name: Cache Rust dependencies
71+
uses: Swatinem/rust-cache@v2
7172
with:
72-
path: |
73-
~/.cargo/bin/
74-
~/.cargo/registry/index/
75-
~/.cargo/registry/cache/
76-
~/.cargo/git/db/
77-
${{ github.workspace }}/codex-rs/target/
78-
key: cargo-${{ matrix.runner }}-${{ matrix.target }}-release-${{ hashFiles('**/Cargo.lock') }}
73+
workspaces: codex-rs -> target
74+
shared-key: ${{ matrix.target }}
75+
save-if: ${{ github.ref == 'refs/heads/main' }}
76+
cache-on-failure: true
77+
cache-all-crates: true
7978

8079
- name: Install musl tools (Linux)
8180
if: contains(matrix.target, 'musl')

0 commit comments

Comments
 (0)