Skip to content

Commit

Permalink
More pr-size details
Browse files Browse the repository at this point in the history
  • Loading branch information
3d-gussner committed Oct 5, 2023
1 parent 8b9b63c commit de73edc
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/pr-size.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ avr_ram()
}

cat <<EOF > "$MESSAGE"
| Target | ΔFlash (bytes) | ΔSRAM (bytes) |
| ------ | -------------- | ------------- |
All values in bytes. Δ Delta to base
| Target| ΔFlash | ΔSRAM | Used Flash | Used SRAM | Free Flash | Free SRAM |
| ------| ------ | ----- | -----------| --------- | ---------- | --------- |
EOF

einsy_max_upload_size=$(grep "prusa_einsy_rambo.upload.maximum_size" .dependencies/prusa3dboards-*/boards.txt | cut -d "=" -f2)
einsy_max_upload_data_size=8192

for TARGET in $@
do
# strip the multilang prefix
Expand All @@ -43,5 +49,8 @@ do
flash_d=$(($pr_flash - $base_flash))
ram_d=$(($pr_ram - $base_ram))

echo "| \`$TARGET\` | $flash_d | $ram_d |" >> "$MESSAGE"
flash_free=$(($einsy_max_upload_size - $pr_flash))
ram_free=$(($einsy_max_upload_data_size - $pr_ram))

echo "| \`$TARGET\` | $flash_d | $ram_d | $pr_flash | $pr_ram | $flash_free | $ram_free |" >> "$MESSAGE"
done

0 comments on commit de73edc

Please sign in to comment.