mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
modify cache keys to incorporate rust version (#8762)
* modify cache keys to incorporate rust version * Update .github/actions/cache/action.yml Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com> --------- Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
This commit is contained in:
parent
f26dcee04d
commit
7af92f2ffb
2 changed files with 6 additions and 4 deletions
6
.github/actions/cache/action.yml
vendored
6
.github/actions/cache/action.yml
vendored
|
|
@ -19,6 +19,10 @@ runs:
|
|||
using: "composite"
|
||||
|
||||
steps:
|
||||
- name: Get rust version
|
||||
id: rust-version
|
||||
run: echo "version=$(rustc --version | sha256sum | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache
|
||||
run: |
|
||||
|
|
@ -39,7 +43,7 @@ runs:
|
|||
~/.cargo/registry/cache/
|
||||
src/rust/target/
|
||||
${{ inputs.additional-paths }}
|
||||
key: cargo-pip-${{ runner.os }}-${{ runner.arch }}-${{ inputs.key }}-3-${{ hashFiles('**/Cargo.lock') }}
|
||||
key: cargo-pip-${{ runner.os }}-${{ runner.arch }}-${{ inputs.key }}-3-${{ hashFiles('**/Cargo.lock') }}-${{ steps.rust-version.version }}
|
||||
- name: Size of cache items
|
||||
run: |
|
||||
du -sh ~/.cargo/registry/index/
|
||||
|
|
|
|||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -219,8 +219,6 @@ jobs:
|
|||
- name: Cache rust and pip
|
||||
uses: ./.github/actions/cache
|
||||
timeout-minutes: 2
|
||||
with:
|
||||
key: ${{ matrix.RUST }}
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v4.6.0
|
||||
with:
|
||||
|
|
@ -275,7 +273,7 @@ jobs:
|
|||
uses: ./.github/actions/cache
|
||||
timeout-minutes: 2
|
||||
with:
|
||||
key: ${{ steps.rust-toolchain.outputs.cachekey }}-coverage
|
||||
key: coverage
|
||||
additional-paths: |
|
||||
~/.cargo/bin/cargo-cov
|
||||
~/.cargo/bin/cargo-nm
|
||||
|
|
|
|||
Loading…
Reference in a new issue