Use proper action for Rust caching in CI

This commit is contained in:
Lukas Kalbertodt
2022-10-11 13:22:30 +02:00
parent 963e4745a3
commit 6f8ff66f29

View File

@@ -15,20 +15,8 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Prepare cache key
run: |
cargo generate-lockfile
cp Cargo.lock cache-fingerprint
echo $RUSTFLAGS >> cache-fingerprint
echo $(rustc -V) >> cache-fingerprint
- name: Restore cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('cache-fingerprint') }}
- name: Restore Cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build
- name: Run tests