summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/ci.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/ci.sh b/tools/ci.sh
index e6f33416b..1e5a7e542 100755
--- a/tools/ci.sh
+++ b/tools/ci.sh
@@ -82,16 +82,20 @@ function ci_code_size_setup {
function ci_code_size_build {
# check the following ports for the change in their code size
- PORTS_TO_CHECK=bmusxpdv
+ # Override the list by setting PORTS_TO_CHECK in the environment before invoking ci.
+ : ${PORTS_TO_CHECK:=bmusxpdv}
+
SUBMODULES="lib/asf4 lib/berkeley-db-1.xx lib/btstack lib/cyw43-driver lib/lwip lib/mbedtls lib/micropython-lib lib/nxp_driver lib/pico-sdk lib/stm32lib lib/tinyusb"
# Default GitHub pull request sets HEAD to a generated merge commit
# between PR branch (HEAD^2) and base branch (i.e. master) (HEAD^1).
#
# We want to compare this generated commit with the base branch, to see what
- # the code size impact would be if we merged this PR.
- REFERENCE=$(git rev-parse --short HEAD^1)
- COMPARISON=$(git rev-parse --short HEAD)
+ # the code size impact would be if we merged this PR. During CI we are at a merge commit,
+ # so this tests the merged PR against its merge base.
+ # Override the refs by setting REFERENCE and/or COMPARISON in the environment before invoking ci.
+ : ${REFERENCE:=$(git rev-parse --short HEAD^1)}
+ : ${COMPARISON:=$(git rev-parse --short HEAD)}
echo "Comparing sizes of reference ${REFERENCE} to ${COMPARISON}..."
git log --oneline $REFERENCE..$COMPARISON