ci: retry Mathlib cache fetches that drop a few transfers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FYqwNMyPUHeTbFWg83GQq6
This commit is contained in:
@@ -27,7 +27,14 @@ else
|
||||
cd "$DIR"
|
||||
elan toolchain install "$(cat lean-toolchain)" >&2
|
||||
timeout 1800 lake update >&2
|
||||
timeout 5400 lake exe cache get >&2
|
||||
# The cache is ~9,000 files; a few transient transfer failures are normal, and a
|
||||
# re-run fetches only what is still missing (downloads persist in ~/.cache/mathlib).
|
||||
for attempt in 1 2 3 4; do
|
||||
if timeout 5400 lake exe cache get >&2; then break; fi
|
||||
[ "$attempt" -eq 4 ] && { echo "prepare-mathlib: cache get failed 4 times" >&2; exit 1; }
|
||||
echo "prepare-mathlib: cache get attempt $attempt failed; retrying" >&2
|
||||
sleep $((attempt * 15))
|
||||
done
|
||||
start=$(date +%s)
|
||||
timeout 1200 lake env lean LeanBench.lean >&2 || {
|
||||
status=$?
|
||||
|
||||
Reference in New Issue
Block a user