From 8083cb4c2ca7481841b8bf2a48b6b50e74b118fe Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Fri, 4 Aug 2023 19:07:23 +0200 Subject: [PATCH] CI/pr-size: Generate a markdown table --- .github/workflows/pr-size.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-size.sh b/.github/workflows/pr-size.sh index 46d569bd92..a40f09f4a7 100755 --- a/.github/workflows/pr-size.sh +++ b/.github/workflows/pr-size.sh @@ -23,7 +23,10 @@ avr_ram() avr_size "$@" | sed -ne 's/^Data: *\([0-9]\+\).*/\1/p' } -echo "This PR will consume:" > "$MESSAGE" +cat < "$MESSAGE" +| Target | ΔFlash (bytes) | ΔSRAM (bytes) | +| ------ | -------------- | ------------- | +EOF for TARGET in $@ do # strip the multilang prefix @@ -40,5 +43,5 @@ do flash_d=$(($pr_flash - $base_flash)) ram_d=$(($pr_ram - $base_ram)) - echo "- \`$TARGET\`: ${flash_d}b of flash, ${ram_d}b of ram" >> "$MESSAGE" + echo "| \`$TARGET\` | $flash_d | $ram_d |" >> "$MESSAGE" done