diff options
author | Max <msuraev@sysmocom.de> | 2017-10-20 16:07:06 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-10-20 18:17:42 +0000 |
commit | 15b05fef7691701186b1e4310634f5ce6acbd1fc (patch) | |
tree | 74065219d7243fe22d21432ef6afb08cfeebd39f /contrib/jenkins.sh | |
parent | 32f9971a71049a0c0ecd0f26a4da17fef4f292ca (diff) |
Cleanup jenkins build scripts
* reorder builds to avoid rm -rf invocation
* avoid useless double autoreconf
* move common parts into shared helper
* move common build steps into separate function
Change-Id: I24e500e132f5c8e8133d35548cb7b4e4552331d0
Diffstat (limited to 'contrib/jenkins.sh')
-rwxr-xr-x | contrib/jenkins.sh | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4a26776d..c397d528 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,31 +1,27 @@ #!/bin/sh # jenkins build helper script for libosmo-sccp. This is how we build on jenkins.osmocom.org -set -ex +. $(dirname "$0")/jenkins_common.sh -verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") +ENABLE_SANITIZE="--enable-sanitize" if [ "x$label" = "xFreeBSD_amd64" ]; then ENABLE_SANITIZE="" -else - ENABLE_SANITIZE="--enable-sanitize" fi -autoreconf --install --force -./configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror" +build() { + $1 --enable-static $2 CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE check \ || cat-testlogs.sh $MAKE distcheck \ || cat-testlogs.sh +} # verify build in dir other than source tree -rm -rf * -git checkout . -autoreconf --install --force -mkdir builddir +mkdir -p builddir cd builddir -../configure --enable-static CFLAGS="-Werror" CPPFLAGS="-Werror" -$MAKE $PARALLEL_MAKE check \ - || cat-testlogs.sh -$MAKE distcheck \ - || cat-testlogs.sh +build ../configure $ENABLE_SANITIZE + +cd .. +build ./configure $ENABLE_SANITIZE + |