Skip to content

Commit 1fb8253

Browse files
committed
Include runner arch in cache & artifact keys
1 parent 5b3d31f commit 1fb8253

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ jobs:
5858
cache-name: cargo-home
5959
with:
6060
path: ~/cargo-home-dirs
61-
key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.cibw-build-prefix }}-v11.0
61+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cibw-build-prefix }}-v11.0
6262
restore-keys: |
63-
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.cibw-build-prefix }}-v11.
63+
${{ env.cache-name }}-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cibw-build-prefix }}-v11.
6464
- name: Rust build cache
6565
uses: actions/cache@v4
6666
env:
6767
cache-name: rust-build
6868
with:
6969
path: ~/cargo-target-dirs
70-
key: ${{ env.cache-name }}-${{ runner.os }}-v11.0-${{ matrix.cibw-build-prefix }}-${{ hashFiles('**/Cargo.toml') }}
70+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ runner.arch }}-v11.0-${{ matrix.cibw-build-prefix }}-${{ hashFiles('**/Cargo.toml') }}
7171
restore-keys: |
72-
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.cibw-build-prefix }}-v11.
72+
${{ env.cache-name }}-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cibw-build-prefix }}-v11.
7373
- name: Save env vars for cibuildwheel
7474
run: >
7575
echo "MAIN_DIR=$PWD" >> "$GITHUB_ENV";
@@ -145,7 +145,7 @@ jobs:
145145
CIBW_BUILD_VERBOSITY: 1
146146
- uses: actions/upload-artifact@v4
147147
with:
148-
name: artifact-${{ runner.os }}-${{ matrix.cibw-build-kind }}
148+
name: artifact-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cibw-build-kind }}
149149
path: ./wheelhouse/*.whl
150150

151151
build_sdist:

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ jobs:
5454
~/.cargo/registry/cache/
5555
~/.cargo/git/db/
5656
target/
57-
key: ${{ runner.os }}-rust-v4-${{ hashFiles('**/Cargo.lock') }}
57+
key: ${{ runner.os }}-${{ runner.arch }}-rust-v4-${{ hashFiles('**/Cargo.lock') }}
5858
- name: 'Debug: check rustc'
5959
run: |
6060
rustc -V
6161
- name: Restore Python/pip cache
6262
uses: actions/cache/restore@v4
6363
with:
6464
path: ${{ matrix.path }}
65-
key: ${{ runner.os }}-python-v3-${{ hashFiles('**/requirements.txt') }}
65+
key: ${{ runner.os }}-${{ runner.arch }}-python-v3-${{ hashFiles('**/requirements.txt') }}
6666
restore-keys: |
67-
${{ runner.os }}-python-v3-
67+
${{ runner.os }}-${{ runner.arch }}-python-v3-
6868
- name: Install dependencies
6969
run: |
7070
python -m pip install --upgrade pip
@@ -88,10 +88,10 @@ jobs:
8888
~/.cargo/registry/cache/
8989
~/.cargo/git/db/
9090
target/
91-
key: ${{ runner.os }}-rust-v4-${{ hashFiles('**/Cargo.lock') }}
91+
key: ${{ runner.os }}-${{ runner.arch }}-rust-v4-${{ hashFiles('**/Cargo.lock') }}
9292
- name: Save Python/pip cache
9393
uses: actions/cache/save@v4
9494
if: always()
9595
with:
9696
path: ${{ matrix.path }}
97-
key: ${{ runner.os }}-python-v3-${{ hashFiles('**/requirements.txt') }}
97+
key: ${{ runner.os }}-${{ runner.arch }}-python-v3-${{ hashFiles('**/requirements.txt') }}

0 commit comments

Comments
 (0)