Skip to content

Commit 0f51be3

Browse files
committed
ci: harden release sccache
1 parent 28889d1 commit 0f51be3

File tree

5 files changed

+68
-8
lines changed

5 files changed

+68
-8
lines changed

.github/workflows/android-apk-release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ jobs:
135135
SCCACHE_REGION: auto
136136
SCCACHE_S3_USE_SSL: "true"
137137
SCCACHE_S3_KEY_PREFIX: ci/android
138+
SCCACHE_LOG: info
139+
SCCACHE_ERROR_LOG: ${{ runner.temp }}/sccache-android.log
138140
AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
139141
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
140142

@@ -170,6 +172,12 @@ jobs:
170172
- name: Setup sccache
171173
uses: mozilla-actions/sccache-action@v0.0.9
172174

175+
- name: Prime sccache
176+
run: |
177+
sccache --stop-server || true
178+
sccache --start-server
179+
sccache --show-stats || true
180+
173181
- name: Download shared prep artifact
174182
uses: actions/download-artifact@v4
175183
with:
@@ -190,7 +198,9 @@ jobs:
190198
touch .build-stamps/sync .build-stamps/bindings-kotlin
191199
192200
- name: Install cargo-ndk
193-
run: cargo install cargo-ndk
201+
env:
202+
RUSTC_WRAPPER: sccache
203+
run: cargo install cargo-ndk --locked
194204

195205
- name: Build Rust JNI libs
196206
env:

.github/workflows/android-play-release.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ jobs:
9191
SCCACHE_REGION: auto
9292
SCCACHE_S3_USE_SSL: "true"
9393
SCCACHE_S3_KEY_PREFIX: ci/android
94+
SCCACHE_LOG: info
95+
SCCACHE_ERROR_LOG: ${{ runner.temp }}/sccache-android.log
9496
AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
9597
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
9698

@@ -149,6 +151,12 @@ jobs:
149151
- name: Setup sccache
150152
uses: mozilla-actions/sccache-action@v0.0.9
151153

154+
- name: Prime sccache
155+
run: |
156+
sccache --stop-server || true
157+
sccache --start-server
158+
sccache --show-stats || true
159+
152160
- name: Download shared prep artifact
153161
uses: actions/download-artifact@v4
154162
with:
@@ -169,7 +177,9 @@ jobs:
169177
touch .build-stamps/sync .build-stamps/bindings-kotlin
170178
171179
- name: Install cargo-ndk
172-
run: cargo install cargo-ndk
180+
env:
181+
RUSTC_WRAPPER: sccache
182+
run: cargo install cargo-ndk --locked
173183

174184
- name: Setup Gradle
175185
uses: gradle/actions/setup-gradle@v4
@@ -205,7 +215,10 @@ jobs:
205215
LITTER_PLAY_SERVICE_ACCOUNT_JSON: ${{ runner.temp }}/play-service-account.json
206216
LITTER_PLAY_TRACK: internal
207217
LITTER_VERSION_CODE_OVERRIDE: ${{ env.LITTER_VERSION_CODE_OVERRIDE }}
208-
run: make play-release
218+
run: |
219+
set -euo pipefail
220+
trap 'status=$?; echo "==> sccache stats"; sccache --show-stats || true; if [ -f "$SCCACHE_ERROR_LOG" ]; then echo "==> sccache error log"; tail -200 "$SCCACHE_ERROR_LOG" || true; fi; exit $status' EXIT
221+
make play-release
209222
210223
- name: Generate checksums
211224
run: |

.github/workflows/ios-testflight.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
SCCACHE_REGION: auto
3030
SCCACHE_S3_USE_SSL: "true"
3131
SCCACHE_S3_KEY_PREFIX: ci/ios
32+
SCCACHE_LOG: info
33+
SCCACHE_ERROR_LOG: ${{ runner.temp }}/sccache-ios.log
3234
AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
3335
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
3436

@@ -83,6 +85,12 @@ jobs:
8385
- name: Setup sccache
8486
uses: mozilla-actions/sccache-action@v0.0.9
8587

88+
- name: Prime sccache
89+
run: |
90+
sccache --stop-server || true
91+
sccache --start-server
92+
sccache --show-stats || true
93+
8694
- name: Decode App Store Connect API key
8795
env:
8896
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
@@ -165,4 +173,7 @@ jobs:
165173
MARKETING_VERSION: ${{ env.MARKETING_VERSION }}
166174
BETA_GROUP_NAMES: ${{ env.BETA_GROUP_NAMES }}
167175
WAIT_FOR_PROCESSING: ${{ env.WAIT_FOR_PROCESSING }}
168-
run: make testflight
176+
run: |
177+
set -euo pipefail
178+
trap 'status=$?; echo "==> sccache stats"; sccache --show-stats || true; if [ -f "$SCCACHE_ERROR_LOG" ]; then echo "==> sccache error log"; tail -200 "$SCCACHE_ERROR_LOG" || true; fi; exit $status' EXIT
179+
make testflight

.github/workflows/mobile-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ jobs:
180180
touch .build-stamps/sync .build-stamps/bindings-kotlin
181181
182182
- name: Install cargo-ndk
183-
run: cargo install cargo-ndk
183+
env:
184+
RUSTC_WRAPPER: sccache
185+
run: cargo install cargo-ndk --locked
184186

185187
- name: Build Rust JNI libs
186188
env:

.github/workflows/mobile-release.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ jobs:
197197
SCCACHE_REGION: auto
198198
SCCACHE_S3_USE_SSL: "true"
199199
SCCACHE_S3_KEY_PREFIX: ci/android
200+
SCCACHE_LOG: info
201+
SCCACHE_ERROR_LOG: ${{ runner.temp }}/sccache-android.log
200202
AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
201203
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
202204

@@ -255,6 +257,12 @@ jobs:
255257
- name: Setup sccache
256258
uses: mozilla-actions/sccache-action@v0.0.9
257259

260+
- name: Prime sccache
261+
run: |
262+
sccache --stop-server || true
263+
sccache --start-server
264+
sccache --show-stats || true
265+
258266
- name: Download shared prep artifact
259267
uses: actions/download-artifact@v4
260268
with:
@@ -275,7 +283,9 @@ jobs:
275283
touch .build-stamps/sync .build-stamps/bindings-kotlin
276284
277285
- name: Install cargo-ndk
278-
run: cargo install cargo-ndk
286+
env:
287+
RUSTC_WRAPPER: sccache
288+
run: cargo install cargo-ndk --locked
279289

280290
- name: Setup Gradle
281291
uses: gradle/actions/setup-gradle@v4
@@ -311,7 +321,10 @@ jobs:
311321
LITTER_PLAY_SERVICE_ACCOUNT_JSON: ${{ runner.temp }}/play-service-account.json
312322
LITTER_PLAY_TRACK: internal
313323
LITTER_VERSION_CODE_OVERRIDE: ${{ env.LITTER_VERSION_CODE_OVERRIDE }}
314-
run: make play-release
324+
run: |
325+
set -euo pipefail
326+
trap 'status=$?; echo "==> sccache stats"; sccache --show-stats || true; if [ -f "$SCCACHE_ERROR_LOG" ]; then echo "==> sccache error log"; tail -200 "$SCCACHE_ERROR_LOG" || true; fi; exit $status' EXIT
327+
make play-release
315328
316329
- name: Generate checksums
317330
run: |
@@ -345,6 +358,8 @@ jobs:
345358
SCCACHE_REGION: auto
346359
SCCACHE_S3_USE_SSL: "true"
347360
SCCACHE_S3_KEY_PREFIX: ci/ios
361+
SCCACHE_LOG: info
362+
SCCACHE_ERROR_LOG: ${{ runner.temp }}/sccache-ios.log
348363
AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
349364
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
350365

@@ -399,6 +414,12 @@ jobs:
399414
- name: Setup sccache
400415
uses: mozilla-actions/sccache-action@v0.0.9
401416

417+
- name: Prime sccache
418+
run: |
419+
sccache --stop-server || true
420+
sccache --start-server
421+
sccache --show-stats || true
422+
402423
- name: Download shared prep artifact
403424
uses: actions/download-artifact@v4
404425
with:
@@ -486,4 +507,7 @@ jobs:
486507
MARKETING_VERSION: ${{ env.MARKETING_VERSION }}
487508
BETA_GROUP_NAMES: ${{ env.BETA_GROUP_NAMES }}
488509
WAIT_FOR_PROCESSING: ${{ env.WAIT_FOR_PROCESSING }}
489-
run: make testflight
510+
run: |
511+
set -euo pipefail
512+
trap 'status=$?; echo "==> sccache stats"; sccache --show-stats || true; if [ -f "$SCCACHE_ERROR_LOG" ]; then echo "==> sccache error log"; tail -200 "$SCCACHE_ERROR_LOG" || true; fi; exit $status' EXIT
513+
make testflight

0 commit comments

Comments
 (0)