Skip to content

Commit aeae5d0

Browse files
bumahkib7claude
andcommitted
fix: make sccache optional when artifact cache is down
Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 7bc7ae9 commit aeae5d0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ jobs:
4343
uses: mozilla-actions/[email protected]
4444
continue-on-error: true
4545
- name: Configure sccache
46+
continue-on-error: true
4647
run: |
47-
if command -v sccache &> /dev/null; then
48+
if command -v sccache &> /dev/null && sccache --start-server 2>/dev/null; then
4849
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
4950
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
51+
else
52+
echo "sccache unavailable, running without cache"
5053
fi
5154
- name: Cache cargo registry
5255
uses: actions/cache@v4
@@ -83,10 +86,13 @@ jobs:
8386
uses: mozilla-actions/[email protected]
8487
continue-on-error: true
8588
- name: Configure sccache
89+
continue-on-error: true
8690
run: |
87-
if command -v sccache &> /dev/null; then
91+
if command -v sccache &> /dev/null && sccache --start-server 2>/dev/null; then
8892
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
8993
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
94+
else
95+
echo "sccache unavailable, running without cache"
9096
fi
9197
- name: Cache cargo registry
9298
uses: actions/cache@v4
@@ -122,10 +128,13 @@ jobs:
122128
uses: mozilla-actions/[email protected]
123129
continue-on-error: true
124130
- name: Configure sccache
131+
continue-on-error: true
125132
run: |
126-
if command -v sccache &> /dev/null; then
133+
if command -v sccache &> /dev/null && sccache --start-server 2>/dev/null; then
127134
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
128135
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
136+
else
137+
echo "sccache unavailable, running without cache"
129138
fi
130139
- name: Cache cargo registry
131140
uses: actions/cache@v4

0 commit comments

Comments
 (0)