Skip to content

Commit

Permalink
append cargo hash to cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
ggera committed Aug 22, 2024
1 parent 0a35940 commit ceb28ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ github.job }}-${{ github.ref }}-${{ matrix.features }}
key: ${{ github.job }}-${{ github.ref }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.lock') }}

- name: Run `cargo clippy`
run: |
Expand All @@ -77,13 +77,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
# Latest 1.74 nightly release
toolchain: nightly-2023-10-01
components: rustfmt

- name: Run `cargo fmt`
run: cargo fmt -- --check

Expand Down Expand Up @@ -159,7 +152,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ github.job }}-${{ github.ref }}-${{ matrix.features }}
key: ${{ github.job }}-${{ github.ref }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.lock') }}

- name: Run `cargo test`
run: |
Expand Down Expand Up @@ -199,7 +192,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ github.job }}-${{ github.ref }}
key: ${{ github.job }}-${{ github.ref }}-${{ hashFiles('**/Cargo.lock') }}

- name: Run `cargo doc`
run: |
Expand Down Expand Up @@ -244,7 +237,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ github.job }}-${{ github.ref }}
key: ${{ github.job }}-${{ github.ref }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install try-runtime
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-rustdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ github.job }}-${{ github.ref }}
key: ${{ github.job }}-${{ github.ref }}-${{ hashFiles('**/Cargo.lock') }}

- name: Run `cargo doc`
run: |
Expand Down

0 comments on commit ceb28ee

Please sign in to comment.