tools/ci.sh: Add and use new ci_code_size_report function.

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit is contained in:
Jeff Epler
2025-09-03 13:46:37 -05:00
committed by Damien George
parent 77729fe3f7
commit 0224b99863
2 changed files with 6 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ jobs:
- name: Build
run: tools/ci.sh code_size_build
- name: Compute code size difference
run: tools/metrics.py diff ~/size0 ~/size1 | tee diff
run: source tools/ci.sh && ci_code_size_report
- name: Save PR number
if: github.event_name == 'pull_request'
env:

View File

@@ -122,6 +122,11 @@ function ci_code_size_build {
return $STATUS
}
function ci_code_size_report {
# Allow errors from tools/metrics.py to propagate out of the pipe above.
(set -o pipefail; tools/metrics.py diff ~/size0 ~/size1 | tee diff)
}
########################################################################################
# .mpy file format