Commit c210307
perf(ci): cache ~/.elan + external-tags build across crossref_review runs
The orchestrator used to clone external-tags and lake-build crossref-render
on every PR comment. That's elan install (~10s of curl/extract) + Lean
toolchain download (~30s) + source compile (~10s) per PR, paid on the
workflow_run job side of every fork PR.
This restructure makes the workflow_run job:
1. Read the pinned EXTERNAL_TAGS_SHA out of mathlib-ci's
post-comment.sh (single source of truth — bumping the pin remains a
one-line PR to mathlib-ci, and this YAML picks the new value up
automatically).
2. Restore a single actions/cache covering ~/.elan and external-tags/,
keyed by that SHA + runner OS. Cache scope means same paths across
runs, so lake-built rpaths into ~/.elan/toolchains/ stay valid.
3. On cache miss, install elan + clone + lake build once and the cache
captures the result for subsequent runs.
4. Always run the orchestrator with CROSSREF_RENDER_BIN pointing at the
prebuilt binary. The orchestrator (mathlib-ci 051c44c) honours that
env var; if unset it falls back to clone+build, keeping the script
standalone-runnable.
Expected steady-state: ~5s of cache restore + the orchestrator's actual
work (filter TSV, fetch snippets, post comment). First run after a pin
bump: the usual ~1 min, then cached again.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 5bc5ddc commit c210307
1 file changed
Lines changed: 52 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
63 | 109 | | |
64 | 110 | | |
65 | 111 | | |
66 | 112 | | |
67 | 113 | | |
68 | 114 | | |
69 | 115 | | |
70 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
0 commit comments