diff options
| author | Jeff Epler <jepler@gmail.com> | 2025-09-03 13:45:17 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-10-08 15:08:55 +1100 |
| commit | f982158f42df65f2ddf295df9b92d74be6357d44 (patch) | |
| tree | 1cb6863d95ecd482f57b50f423edee53ea35e1fe | |
| parent | 2c34497bd1f7edfbe288a0ddab28ee953d034cea (diff) | |
tools/ci.sh: Let code_size_build be customized via environment.
For instance, to compare HEAD to origin/master on only the minimal x86
build, use
PORTS_TO_CHECK=m REFERENCE=origin/master tools/ci.sh code_size_build
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
| -rwxr-xr-x | tools/ci.sh | 12 |
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 |
