From f7accc26f1ae9ee05f69a2e22b3894593257a4d7 Mon Sep 17 00:00:00 2001 From: Griffin Long <151978260+DrunkOnJava@users.noreply.github.com> Date: Mon, 2 Nov 2026 17:58:37 -0500 Subject: [PATCH] ci(measure): the Compare summary leaves kept IFCs out of its text diff and caps it under GitHub's 1 MiB, the whole diff an artifact --- .github/workflows/measure.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/measure.yml b/.github/workflows/measure.yml index 87712da06..2005c2cf1 100644 --- a/.github/workflows/measure.yml +++ b/.github/workflows/measure.yml @@ -423,13 +423,37 @@ jobs: echo echo "### Scorer differences (base → head)" echo + # The kept IFCs and GLBs are compared by hash above; diffed as + # text they made a 3 GB summary GitHub refused (run + # 41537426493). The whole diff is the compare-scorer-diff + # artifact; the summary shows its start, under GitHub's 1 MiB. + diff -r -U0 -x commit.txt -x runner.txt -x '*.log' -x ifc.sha256 -x diagnostics.json \ + -x '*.ifc' -x '*.glb' measure-base measure-head > scorer-diff.txt || true + limit=$((640 * 1024)) + size=$(stat -c %s scorer-diff.txt) echo '```diff' - diff -r -U0 -x commit.txt -x runner.txt -x '*.log' -x ifc.sha256 -x diagnostics.json measure-base measure-head || true + head -c "$limit" scorer-diff.txt + echo echo '```' + if [ "$size" -gt "$limit" ]; then + echo + echo "**Truncated:** the scorer diff is $size bytes and this shows its first $limit; the whole diff is the \`compare-scorer-diff\` artifact." + fi else echo "No base; the scores are in the measure-head artifact." fi - } >> "$GITHUB_STEP_SUMMARY" + } > summary.md + size=$(stat -c %s summary.md) + if [ "$size" -gt 1000000 ]; then + echo "::error::the summary is $size bytes, over GitHub's 1 MiB step summary limit" + exit 1 + fi + cat summary.md >> "$GITHUB_STEP_SUMMARY" + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + if: ${{ hashFiles('scorer-diff.txt') != '' }} + with: + name: compare-scorer-diff + path: scorer-diff.txt # B81: the base and head jobs above run on different runners, so their wall # times compare machines as much as code. With `timing`, one runner builds