Skip to content

Commit 504c7b0

Browse files
committed
TEST: embed full bloaty reports in step summary + ship head_only.txt
Adds two collapsed <details> blocks to $GITHUB_STEP_SUMMARY: - Full per-symbol diff (-d sections,executorch,shortsymbols -n 100) - Full bloaty report for the head binary (same, no diff) Also writes head_only.txt to the artifact so the new-binary view is accessible to the workflow_run poster without re-running bloaty.
1 parent 55b2c93 commit 504c7b0

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/scripts/bloaty_diff.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,10 @@ def cmd_measure(args: argparse.Namespace) -> int:
318318
report.groups_base = run_bloaty(base, "executorch")
319319
report.symbols_base = run_bloaty(base, "shortsymbols")
320320

321-
(out_dir / "full.txt").write_text(
322-
bloaty_text(head, base, "sections,executorch,shortsymbols", top_n=100)
323-
)
321+
full_diff = bloaty_text(head, base, "sections,executorch,shortsymbols", top_n=100)
322+
head_only = bloaty_text(head, None, "sections,executorch,shortsymbols", top_n=100)
323+
(out_dir / "full.txt").write_text(full_diff)
324+
(out_dir / "head_only.txt").write_text(head_only)
324325

325326
# Atomic write so a partial failure can't ship a half-written metadata.json.
326327
metadata = {
@@ -359,6 +360,15 @@ def cmd_measure(args: argparse.Namespace) -> int:
359360
f"Δ within ±{DELTA_NOISE_BYTES} bytes; nothing to report.\n"
360361
)
361362
f.write("\n")
363+
if base is not None:
364+
f.write(
365+
f"<details><summary>Full per-symbol diff ({report.job})</summary>\n\n"
366+
f"```\n{full_diff}```\n\n</details>\n\n"
367+
)
368+
f.write(
369+
f"<details><summary>Full bloaty report for head binary ({report.job})</summary>\n\n"
370+
f"```\n{head_only}```\n\n</details>\n\n"
371+
)
362372

363373
delta_str = (
364374
fmt_delta(report.stripped_delta) if report.stripped_delta is not None else "n/a"

0 commit comments

Comments
 (0)