summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-05-31 13:44:03 +1000
committerDamien George <damien@micropython.org>2025-06-05 14:57:23 +1000
commit4c55b0879b38b373b44e84552d6754b7842b5b72 (patch)
tree54a6a783ed2e8def27a38534c9c81a856cdf258d /tools
parent193603dbac9712df5a54f4cecf3cab17851e2ce8 (diff)
tools/ci.sh: Allow errors in code-size build to fail the CI.
It was possible for CI to pass even if the bare-arm port fails to build. This commit fixes that. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/ci.sh b/tools/ci.sh
index 32eb99235..ea67e2c10 100755
--- a/tools/ci.sh
+++ b/tools/ci.sh
@@ -93,23 +93,30 @@ function ci_code_size_build {
function code_size_build_step {
COMMIT=$1
OUTFILE=$2
- IGNORE_ERRORS=$3
echo "Building ${COMMIT}..."
git checkout --detach $COMMIT
git submodule update --init $SUBMODULES
git show -s
tools/metrics.py clean $PORTS_TO_CHECK
- tools/metrics.py build $PORTS_TO_CHECK | tee $OUTFILE || $IGNORE_ERRORS
+ tools/metrics.py build $PORTS_TO_CHECK | tee $OUTFILE
+ return $?
}
+ # Allow errors from tools/metrics.py to propagate out of the pipe above.
+ set -o pipefail
+
# build reference, save to size0
# ignore any errors with this build, in case master is failing
- code_size_build_step $REFERENCE ~/size0 true
+ code_size_build_step $REFERENCE ~/size0
# build PR/branch, save to size1
- code_size_build_step $COMPARISON ~/size1 false
+ code_size_build_step $COMPARISON ~/size1
+ STATUS=$?
+ set +o pipefail
unset -f code_size_build_step
+
+ return $STATUS
}
########################################################################################