Skip to content

Commit

Permalink
Consider cargo config in granular cache key (#54700)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk authored Aug 29, 2023
1 parent 6e9a61e commit 952c536
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ jobs:
- name: Cache on ${{ github.ref_name }}
uses: ijjk/rust-cache@turbo-cache-v1.0.7
with:
shared-key: build-${{ matrix.settings.target }}
save-if: 'true'
cache-provider: 'turbo'
shared-key: build-${{ matrix.settings.target }}-${{ hashFiles('.cargo/config.toml') }}

# we only need custom caching for docker builds
# as they are on an older Node.js version and have
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ jobs:
uses: ijjk/rust-cache@turbo-cache-v1.0.7
if: ${{ inputs.rustCacheKey }}
with:
shared-key: ${{ inputs.rustCacheKey }}-x86_64-unknown-linux-gnu
save-if: ${{ github.ref_name == 'canary' }}
cache-provider: 'turbo'
save-if: ${{ github.ref_name == 'canary' }}
shared-key: ${{ inputs.rustCacheKey }}-x86_64-unknown-linux-gnu-build-${{ hashFiles('.cargo/config.toml') }}

# clean up any previous artifacts to avoid hitting disk space limits
- run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target
Expand Down

0 comments on commit 952c536

Please sign in to comment.