Skip to content

Commit 9ef46b8

Browse files
fix: Include architecture in Rust cache key for build to avoid cross-architecture conflicts.
1 parent 80b0d4a commit 9ef46b8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ jobs:
101101

102102
- name: Cache Rust toolchain
103103
uses: Swatinem/rust-cache@v2
104+
with:
105+
# Without including the target in the cache key, the cache would be shared across targets.
106+
# Each target will now maintain its own cache, avoiding cross-architecture conflicts.
107+
key: ${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
104108

105109
- name: Use Cross
106110
shell: bash
@@ -123,7 +127,7 @@ jobs:
123127
if: matrix.build == 'linux' || matrix.build == 'macos' || matrix.build == 'macos-intel'
124128
run: strip "target/${{ matrix.target }}/release/umi-transfer"
125129

126-
# For now revert to the old image, since the new image does not regognise the format of the compiled binary.
130+
# For now revert to the old image, since the new image does not recognise the format of the compiled binary.
127131
#- name: Strip release binary (arm)
128132
# if: matrix.build == 'linux-arm'
129133
# run: |

0 commit comments

Comments
 (0)