From be7ba1bba988f75a1765ca447a5482090137ca53 Mon Sep 17 00:00:00 2001 From: Zhengchao An Date: Sat, 1 Aug 2026 19:23:42 +0800 Subject: [PATCH] ci: make the cache size report readable from the API (#5568) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The figures went only to $GITHUB_STEP_SUMMARY, which renders in the UI but never appears in the job log — and the REST API exposes the log, not the summary. So the one number the cache-all-crates decision rests on could not be fetched by the script that needed it. Print to stdout as well, between markers, and keep the summary rendering. --- .github/workflows/cache-warm.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache-warm.yml b/.github/workflows/cache-warm.yml index c1aa36f39..9c02ca4e5 100644 --- a/.github/workflows/cache-warm.yml +++ b/.github/workflows/cache-warm.yml @@ -166,11 +166,19 @@ jobs: - name: Report cache input sizes if: always() run: | + # tee, not a plain redirect: sent only to $GITHUB_STEP_SUMMARY these + # numbers are readable in the UI but absent from the job log, and the + # REST API exposes the log, not the summary — which made the figures + # unreachable for exactly the scripted comparison they exist for. + sizes="$(du -sh ~/.cargo/registry/src ~/.cargo/registry/cache \ + ~/.cargo/registry/index ~/.cargo/git target 2>/dev/null || true)" + echo "cache-input-sizes-begin" + printf '%s\n' "$sizes" + echo "cache-input-sizes-end" { echo "### Cache input sizes (ci-dev)" echo '```' - du -sh ~/.cargo/registry/src ~/.cargo/registry/cache ~/.cargo/registry/index \ - ~/.cargo/git target 2>/dev/null || true + printf '%s\n' "$sizes" echo '```' } >> "$GITHUB_STEP_SUMMARY"