diff options
| author | Jeff Epler <jepler@gmail.com> | 2025-09-03 13:46:37 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-10-08 15:08:28 +1100 |
| commit | 0224b998636af09157a033933012e669cf12a071 (patch) | |
| tree | 054f401cee4c0d7772bf6c18c94f3a125682ff65 | |
| parent | 77729fe3f7198dc5c6f353ec78856159544c7abf (diff) | |
tools/ci.sh: Add and use new ci_code_size_report function.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
| -rw-r--r-- | .github/workflows/code_size.yml | 2 | ||||
| -rwxr-xr-x | tools/ci.sh | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.github/workflows/code_size.yml b/.github/workflows/code_size.yml index 34bdf744c..f82d1d0c7 100644 --- a/.github/workflows/code_size.yml +++ b/.github/workflows/code_size.yml @@ -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: diff --git a/tools/ci.sh b/tools/ci.sh index 64c9d465d..17044edf2 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -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 |
