Skip to content

Commit 56eafa8

Browse files
benthecarmanclaude
andcommitted
Modernize CI cache and toolchain actions
Replace deprecated actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable and the manual actions/cache@v3 setup with Swatinem/rust-cache@v2. The purpose-built Rust cache action keys correctly on Cargo.lock + rustc version (the old key only hashed Cargo.toml so cargo update wouldn't bust it), prunes the parts of target/ that don't help on restore, and keeps build-script outputs so the bitcoind/electrs binaries downloaded by corepc-node and electrsd remain cached. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ae99aeb commit 56eafa8

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

.github/workflows/tests.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,17 @@ jobs:
1414
timeout-minutes: 60
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: actions-rs/toolchain@v1
17+
- uses: dtolnay/rust-toolchain@stable
1818
with:
19-
toolchain: stable
2019
components: clippy, rustfmt
21-
override: true
22-
profile: minimal
2320

2421
- name: Install Protoc
2522
uses: arduino/setup-protoc@v3
2623
with:
2724
version: "30.2"
2825
repo-token: ${{ secrets.GITHUB_TOKEN }}
2926

30-
- uses: actions/cache@v3
31-
with:
32-
path: |
33-
~/.cargo/registry
34-
~/.cargo/git
35-
target
36-
key: cargo-${{ runner.os }}-rust-tests-${{ hashFiles('**/Cargo.toml') }}
37-
restore-keys: |
38-
cargo-${{ runner.os }}-rust-tests-
39-
cargo-${{ runner.os }}-
27+
- uses: Swatinem/rust-cache@v2.7.8
4028

4129
- name: Check formatting
4230
run: cargo fmt --check

0 commit comments

Comments
 (0)