Skip to content

Commit

Permalink
Merge pull request prusa3d#4315 from wavexx/pr_size_table
Browse files Browse the repository at this point in the history
CI/pr-size: Generate a markdown table
  • Loading branch information
wavexx authored Aug 4, 2023
2 parents 95d8711 + 8083cb4 commit cf0116e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/pr-size.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit cf0116e

Please sign in to comment.