Skip to content

Commit 26fbef2

Browse files
committed
cache test build
1 parent 6153df2 commit 26fbef2

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

.github/workflows/cloud_integration_ci.yaml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,26 @@ jobs:
137137
toolchain: ${{ env.RUST_TOOLCHAIN }}
138138

139139
- name: Setup sccache
140+
id: sccache
140141
uses: mozilla-actions/sccache-action@v0.0.6
142+
continue-on-error: true
141143

142144
- name: Configure sccache
145+
if: steps.sccache.outcome == 'success'
143146
run: |
144-
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
145-
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
147+
# Unset RUSTC_WRAPPER first (sccache-action sets it automatically)
148+
echo "RUSTC_WRAPPER=" >> $GITHUB_ENV
149+
sccache --stop-server 2>/dev/null || true
150+
export SCCACHE_GHA_ENABLED=true
151+
export RUSTC_WRAPPER=
152+
if timeout 10 sccache --start-server 2>&1 && timeout 5 sccache --show-stats 2>&1; then
153+
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
154+
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
155+
echo "sccache is available and configured"
156+
else
157+
sccache --stop-server 2>/dev/null || true
158+
echo "sccache unavailable, proceeding without it"
159+
fi
146160
147161
- name: Install prerequisites
148162
run: |
@@ -189,12 +203,25 @@ jobs:
189203
toolchain: ${{ env.RUST_TOOLCHAIN }}
190204

191205
- name: Setup sccache
206+
id: sccache
192207
uses: mozilla-actions/sccache-action@v0.0.6
208+
continue-on-error: true
193209

194210
- name: Configure sccache
211+
if: steps.sccache.outcome == 'success'
195212
run: |
196-
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
197-
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
213+
echo "RUSTC_WRAPPER=" >> $GITHUB_ENV
214+
sccache --stop-server 2>/dev/null || true
215+
export SCCACHE_GHA_ENABLED=true
216+
export RUSTC_WRAPPER=
217+
if timeout 10 sccache --start-server 2>&1 && timeout 5 sccache --show-stats 2>&1; then
218+
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
219+
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
220+
echo "sccache is available and configured"
221+
else
222+
sccache --stop-server 2>/dev/null || true
223+
echo "sccache unavailable, proceeding without it"
224+
fi
198225
199226
- uses: Swatinem/rust-cache@v2
200227
with:

0 commit comments

Comments
 (0)