CI: change cache key

This commit is contained in:
Boog900 2024-01-22 22:41:20 +00:00
parent 0662a125e1
commit 74e04056a9
No known key found for this signature in database
GPG key ID: 5401367FB7302004

View file

@ -14,6 +14,15 @@ env:
RUST_MIN_STACK: 8000000
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fmt
run: cargo fmt --all --check
build:
runs-on: ubuntu-latest
@ -24,7 +33,7 @@ jobs:
id: cache-restore
with:
path: target
key: ubuntu-latest
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
run: sudo apt install -y libboost-dev
@ -36,9 +45,9 @@ jobs:
id: cache-save
with:
path: target
key: ubuntu-latest
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
lint:
clippy:
runs-on: ubuntu-latest
needs: build
@ -49,14 +58,11 @@ jobs:
id: cache
with:
path: target
key: ubuntu-latest
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Fmt
run: cargo fmt --all --check
tests:
runs-on: ubuntu-latest
needs: build
@ -68,7 +74,7 @@ jobs:
id: cache
with:
path: target
key: ubuntu-latest
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Test
run: cargo test --all-features --workspace --all-targets && cargo test --all-features --workspace --doc