Skip to content

Commit 9181bce

Browse files
ci: stop using @moonrepo/setup-rust for cache
1 parent 8e5ffb4 commit 9181bce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,18 @@ jobs:
5959
- uses: moonrepo/setup-rust@v1
6060
with:
6161
targets: ${{ matrix.job.target }}
62+
# moonrepo/setup-rust does not allow for different cache keys per matrix job
63+
# This causes cache to be shared between `linux-gnu` and `linux-musl` builds which can cause build failures for native dependencies
64+
# We disable the cache here and use Swatinem/rust-cache instead
65+
cache: false
6266
env:
6367
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6468

69+
# Use this in place of the moonrepo/setup-rust cache, see above for explanation
70+
- uses: Swatinem/rust-cache@v2
71+
with:
72+
shared-key: ${{ matrix.job.target }}
73+
6574
- uses: taiki-e/install-action@v2
6675
with:
6776

0 commit comments

Comments
 (0)