Skip to content

Commit 9a53c3b

Browse files
Improve ci caching
1 parent f09fcb7 commit 9a53c3b

4 files changed

Lines changed: 176 additions & 50 deletions

File tree

.claude/settings.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"Bash(cargo run:*)",
2020
"Bash(RUST_LOG=debug cargo run:*)",
2121
"Bash(cat:*)",
22-
"Bash(cargo clippy:*)"
22+
"Bash(cargo clippy:*)",
23+
"Bash(test:*)"
2324
],
2425
"deny": [],
2526
"ask": []

.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)