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>
This commit is contained in:
parent
193603dbac
commit
4c55b0879b
1 changed files with 11 additions and 4 deletions
15
tools/ci.sh
15
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
|
||||
}
|
||||
|
||||
########################################################################################
|
||||
|
|
|
|||
Loading…
Reference in a new issue