Skip to content

Commit

Permalink
Fix caching in CI (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasAlaif authored Jan 13, 2025
1 parent b11fe86 commit 12abaa7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
permissions:
contents: write
steps:
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: wasm32-unknown-unknown

- uses: jetli/[email protected]
Expand All @@ -33,6 +32,8 @@ jobs:
run: git -c protocol.version=2 fetch --prune --no-recurse-submodules --depth 1 origin +${{ github.ref }}:${{ github.ref }}
- run: git describe --always

- name: Setup `Cargo.lock` for caching
run: cargo generate-lockfile
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Setup `Cargo.lock` for caching
run: cargo generate-lockfile
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
shared-key: "clippy"
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo clippy -- -D warnings

test:
Expand All @@ -40,10 +47,13 @@ jobs:
- uses: actions/checkout@v4
- id: configure-z3-id
run: echo "z3_v_clean=$(echo "${{ matrix.z3version }}" | sed 's/\./_/g')" >> $GITHUB_OUTPUT
- name: Setup `Cargo.lock` for caching
run: cargo generate-lockfile
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
shared-key: "shared"
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions/cache/restore@v4
with:
path: logs
Expand Down

0 comments on commit 12abaa7

Please sign in to comment.