Skip to content

Commit 18f9372

Browse files
Improve ci caching (#353)
1 parent 727d0a9 commit 18f9372

File tree

4 files changed

+175
-49
lines changed

4 files changed

+175
-49
lines changed

.claude/settings.local.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"Bash(RUST_LOG=debug cargo run:*)",
2121
"Bash(cat:*)",
2222
"Bash(cargo clippy:*)",
23+
"Bash(test:*)"
2324
"WebFetch(domain:github.com)",
2425
"Bash(ls:*)",
2526
"Bash(grep:*)"

.github/actions/setup-rust/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ runs:
3434
rustup default stable
3535
rustup component add clippy
3636
rustup component add rustfmt
37+
- name: Cache Cargo tools
38+
uses: actions/cache@v4
39+
with:
40+
path: ~/.cargo/bin
41+
key: cargo-tools-${{ runner.os }}-taplo-just-machete-v1
3742
- name: Install Cargo tools
3843
shell: bash
3944
run: |

.github/workflows/checks.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,23 @@ jobs:
6262
- uses: actions/checkout@v2
6363
with:
6464
submodules: true
65-
- name: Cache Cargo
65+
- name: Cache Cargo registry and git
6666
uses: actions/cache@v4
6767
with:
68-
path: /home/runner/.cargo
69-
key: cargo-S3-cache-
68+
path: /github/home/.cargo
69+
key: cargo-clippy-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
70+
restore-keys: |
71+
cargo-clippy-${{ runner.os }}-
7072
- name: Setup Rust Toolchain
7173
uses: ./.github/actions/setup-rust
7274
- name: Cache Rust dependencies
7375
uses: actions/cache@v4
7476
with:
75-
path: /home/runner/target
76-
key: target-S3-cache-
77+
path: /github/home/target
78+
key: target-clippy-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/Cargo.toml') }}
79+
restore-keys: |
80+
target-clippy-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-
81+
target-clippy-${{ runner.os }}-
7782
- name: Run clippy
7883
run: |
7984
cargo clippy --all-features --workspace -- -D warnings

0 commit comments

Comments
 (0)