Commit f76cb23
committed
Emit a per-job sccache statistics table to the GitHub job summary
KISS analogue of upstream llama.cpp's ccache-action "CCache Statistics" table,
but for this repo's sccache-over-Depot cache (ccache-action can't be dropped in:
it manages its own ccache + actions/cache backend, conflicting with the Depot
WebDAV design). build.sh/build.bat already print `sccache --show-stats` to the
log; now, when running in CI (GITHUB_STEP_SUMMARY set) and sccache was actually
the launcher, they also parse those stats and append a small markdown table:
### sccache statistics
| Cache hits | Requests | Hit rate |
|------------|----------|----------|
| 589 | 600 | 98.2% |
Per-job (GitHub does not merge job summaries), covering every native build job
uniformly — build.sh handles the dockcross/native-Linux/aarch64/vulkan-linux and
macOS jobs; build.bat the Windows jobs. Parses the text stats (top-level
"Compile requests" = total, top-level "Cache hits" = hits; the per-language
"Cache hits (C/C++)" line is skipped by the digit-anchored regex). Best-effort:
skipped silently if the numbers can't be parsed or there were no requests, and
never emitted for local runs (no GITHUB_STEP_SUMMARY) — so local builds are
untouched.
Verified the build.sh parse end-to-end against a realistic sccache --show-stats
sample (req=600, hits=589 -> 98.2%, with the "Compile requests executed" line
correctly excluded); build.sh passes bash -n. The Windows batch path (integer
math with rounding, escaped pipes/parens) is validated by CI on the Windows
runners.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HL7d4uQ3cKR5HwYFPvZvv71 parent 14df14a commit f76cb23
3 files changed
Lines changed: 51 additions & 2 deletions
| 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 | + | |
63 | 85 | | |
64 | 86 | | |
65 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
164 | 185 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
362 | 368 | | |
363 | 369 | | |
364 | 370 | | |
| |||
0 commit comments