ci: retry Mathlib cache fetches that drop a few transfers
ci / lean (push) Successful in 2m24s
ci / image (push) Failing after 19m16s
ci / python (push) Successful in 16s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FYqwNMyPUHeTbFWg83GQq6
This commit is contained in:
2026-10-21 11:08:48 +00:00
parent 066b3f158b
commit 09ea8a67ce
2 changed files with 14 additions and 2 deletions
+6 -1
View File
@@ -46,7 +46,12 @@ RUN elan toolchain install "$(cat lean/lean-toolchain)" \
RUN cd lean && timeout 1800 lake update
# Mathlib's prebuilt artifacts. Slow, large, and cached as its own layer.
RUN cd lean && timeout 5400 lake exe cache get
# A handful of the ~9,000 transfers failing is normal; a re-run fetches only what is missing.
RUN cd lean && for attempt in 1 2 3 4; do \
timeout 5400 lake exe cache get && break; \
[ "$attempt" -eq 4 ] && exit 1; \
echo "cache get attempt $attempt failed; retrying" >&2; sleep $((attempt * 15)); \
done
# The honest check that this image can do its job, and it is exactly what
# verification does at runtime: elaborate a file against Mathlib with `lake env lean`.