Merge pull request #4315 from wavexx/pr_size_table

CI/pr-size: Generate a markdown table
This commit is contained in:
Yuri D'Elia 2023-08-04 19:29:13 +02:00 committed by GitHub
commit cf0116ea74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -23,7 +23,10 @@ avr_ram()
avr_size "$@" | sed -ne 's/^Data: *\([0-9]\+\).*/\1/p'
}
echo "This PR will consume:" > "$MESSAGE"
cat <<EOF > "$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