Skip to content

Commit

Permalink
chore: Separate cache for different arch (#1873)
Browse files Browse the repository at this point in the history
* Separate cache for different arch

* Save in tests too

* typo
  • Loading branch information
nahsi committed Oct 30, 2023
1 parent b236f37 commit c7e5426
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
cache-directories: ~/.cache/sccache
shared-key: nox
shared-key: nox-${{ matrix.arch }}
# github allows only 10GB of cache
# so save cache only on merge to master
# to use less space and speed up CI
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
cache-directories: ~/.cache/sccache
shared-key: nox
save-if: false
shared-key: nox-tests
# github allows only 10GB of cache
# so save cache only on merge to master
# to use less space and speed up CI
save-if: ${{ github.event_name == 'push' }}

- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.3
Expand Down

0 comments on commit c7e5426

Please sign in to comment.