Skip to content

Commit 917d500

Browse files
committed
Fix CI build cache on macos.
- actions/cache#403 - rust-lang/cargo#8603 Fun stuff.
1 parent 485cf53 commit 917d500

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/validate-commit.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ jobs:
2424
target
2525
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2626
- run: cargo test
27+
# There is a bug with BSD tar on macOS where the first 8MB of the file are
28+
# sometimes all NUL bytes. See https://github.com/actions/cache/issues/403
29+
# and https://github.com/rust-lang/cargo/issues/8603 for some more
30+
# information. An alternative solution here is to install GNU tar, but
31+
# flushing the disk cache seems to work, too.
32+
- run: sudo purge
33+
if: startsWith(matrix.os, 'macos-')
2734

2835
lint:
2936
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)