Skip to content

Commit

Permalink
chore: refine caching keys for rust compilation artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Toromyx committed Nov 28, 2023
1 parent 9925cba commit 9fb68b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/lint-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ jobs:
- run: npm run tauri icon
- uses: actions/cache@v3
with:
key: lint-backend-${{ hashFiles('src-tauri/Cargo.lock') }}-${{ hashFiles('src-tauri/**') }}
key: rust-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('src-tauri/**', 'app-icon.png') }}-lint
restore-keys: |
lint-backend-${{ hashFiles('src-tauri/Cargo.lock') }}-
lint-backend-
rust-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('src-tauri/**', 'app-icon.png') }}-
rust-${{ steps.toolchain.outputs.rustc_hash }}-
rust-
path: |
src-tauri/target
~/.cargo
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ jobs:
- run: npm run tauri icon
- uses: actions/cache@v3
with:
key: test-${{ hashFiles('src-tauri/Cargo.lock') }}-${{ hashFiles('src-tauri/**') }}
key: rust-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('src-tauri/**', 'app-icon.png') }}-test
restore-keys: |
test-${{ hashFiles('src-tauri/Cargo.lock') }}-
test-
rust-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('src-tauri/**', 'app-icon.png') }}-
rust-${{ steps.toolchain.outputs.rustc_hash }}-
rust-
path: |
src-tauri/target
~/.cargo
Expand Down

0 comments on commit 9fb68b7

Please sign in to comment.