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