Closed Riksu9000 closed 1 year ago
How will this work if a pull request isn't based off of the latest develop, but an older version? If there have been commits that increase space usage in develop, it might look like a PR adds less than it actually does, or even that it lowers space usage when it actually increases it.
Great point. I looked into it and it seems that the checkout action automatically merges the branches when checking out the head branch, so the only difference between base and head ref are the commits of the PR.
https://github.com/Riksu9000/InfiniTime/pull/16
develop is at 6439189373f2e70e25a130bccc7d4a6b8a7538d1 test-change is at d7d7856f0dba4dfa7e3e43b544c5391fd74e123e
I tested it by pushing a different commit to develop and test-change branches, then inspecting the build-firmware check log, which reads:
HEAD is now at e8cb4b2 Merge d7d7856f0dba4dfa7e3e43b544c5391fd74e123e into 6439189373f2e70e25a130bccc7d4a6b8a7538d1
Add workflow jobs that create and update a comment on PRs with the build size and difference from the base branch (develop).
It will not work on this PR, because develop doesn't contain the getSize.sh script.
Here's an example of the jobs in action https://github.com/Riksu9000/InfiniTime/pull/15