Skip to content

Commit f98f22e

Browse files
committed
use cargo-cache to prevent github action cache from growing without bound
1 parent c115761 commit f98f22e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,20 @@ jobs:
3838
profile: minimal
3939
components: rustfmt, clippy
4040

41+
- name: Install cargo-cache
42+
run: cargo install cargo-cache
43+
4144
- uses: actions/cache@v3
4245
with:
4346
path: |
4447
~/.cargo/registry
4548
~/.cargo/git
46-
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}-${{ env.RUST_STABLE }}
49+
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
50+
restore-keys: |
51+
${{ runner.os }}-cargo-build-
52+
53+
- name: Clean cargo cache
54+
run: cargo cache --autoclean
4755

4856
- name: cargo fmt
4957
uses: actions-rs/cargo@v1

0 commit comments

Comments
 (0)