Skip to content

Commit

Permalink
Add GitHub runner architecture to CI cache key (#1110)
Browse files Browse the repository at this point in the history
<!--
The title and description of pull requests will be used when creating a
squash commit to the base branch (usually `main`).
Please keep them both up-to-date as the code change evolves, to ensure
that the commit message is useful for future readers.
-->

## Description of change

This change adds the architecture of the runner to the cache key. In a
previous change where we upgraded macOS runners from macOS 12 to macOS
15, the architecture changed however the cache was not invalidated.

Likely we should find a way to key the cache on the actual operating
system version used however there doesn't seem to be an obvious way to
do that right now. This quick fix should at least protect us from
architecture changes (which macOS runners do have, but I understand its
only for larger runners at this time).

Relevant issues: #1097

## Does this change impact existing behavior?

No, only CI change.

## Does this change need a changelog entry in any of the crates?

No, only CI change.

---

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and I agree to the terms of
the [Developer Certificate of Origin
(DCO)](https://developercertificate.org/).

Signed-off-by: Daniel Carl Jones <[email protected]>
  • Loading branch information
dannycjones authored Nov 7, 2024
1 parent 011043e commit 0faeac4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-fuse${{ matrix.fuseVersion }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-fuse${{ matrix.fuseVersion }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build tests
run: cargo test --features $RUST_FEATURES --no-run
- name: Run tests
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build tests
run: cargo test --no-run
- name: Run tests
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check all targets
run: cargo check --locked --all-targets --all-features

Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run benchmarks
run: cargo bench

Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Shuttle tests
run: cargo test -p mountpoint-s3 --features shuttle -- shuttle

Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Clippy
run: make clippy

Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build CRT binding documentation
run: cargo doc --no-deps -p mountpoint-s3-crt

Expand Down

0 comments on commit 0faeac4

Please sign in to comment.