diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2023-05-10 09:25:18 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-10 00:25:18 +0000 |
commit | c6887af98236de1343def4544282812b60b3a383 (patch) | |
tree | fca0381879d74d3976623a4f69addbacbe98a1c4 | |
parent | 9dfb1200948523046d6996f0cd81c7fec2060ab6 (diff) | |
download | cryptography-c6887af98236de1343def4544282812b60b3a383.tar.gz |
update cache key to reflect all rust files, not just cargo.lock (#8898)
rust uses mtime to determine if files are fresh or not. However, if the mtime of a file in main is newer than the mtime of a commit in a PR then it will load the cache and there will be weird errors since it thinks the cache is new enough but in reality the code has changed. This change ties our cache keys to all our rust files, not just our cargo.lock, and should resolve this issue.
-rw-r--r-- | .github/actions/cache/action.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 3e8c300d0..37b9cc81b 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -43,11 +43,11 @@ runs: ~/.cargo/registry/cache/ src/rust/target/ ${{ inputs.additional-paths }} - key: cargo-pip-${{ runner.os }}-${{ runner.arch }}-${{ inputs.key }}-3-${{ hashFiles('**/Cargo.lock') }}-${{ steps.rust-version.version }} + key: cargo-pip-${{ runner.os }}-${{ runner.arch }}-${{ inputs.key }}-3-${{ hashFiles('**/Cargo.lock', '**/*.rs') }}-${{ steps.rust-version.version }} - name: Size of cache items run: | du -sh ~/.cargo/registry/index/ du -sh ~/.cargo/registry/cache/ du -sh src/rust/target/ shell: bash - if: ${{ steps.cache.outputs.cache-hit }}
\ No newline at end of file + if: ${{ steps.cache.outputs.cache-hit }} |