mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-01 19:12:14 +00:00
ci: make the cache size report readable from the API (#5568)
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.
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user