diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/jenkins-arm.sh | 25 | ||||
-rwxr-xr-x | contrib/jenkins.sh | 26 | ||||
-rw-r--r-- | contrib/jenkins_common.sh | 7 |
3 files changed, 26 insertions, 32 deletions
diff --git a/contrib/jenkins-arm.sh b/contrib/jenkins-arm.sh index ad992af1..beb53dad 100755 --- a/contrib/jenkins-arm.sh +++ b/contrib/jenkins-arm.sh @@ -1,11 +1,9 @@ #!/bin/sh -set -ex +. $(dirname "$0")/jenkins_common.sh -verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") - -autoreconf --install --force -./configure --enable-static \ +build() { + $1 --enable-static \ --prefix=/usr/local/arm-none-eabi \ --host=arm-none-eabi \ --enable-embedded \ @@ -14,20 +12,13 @@ autoreconf --install --force $MAKE $PARALLEL_MAKE \ || 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 +build ../configure -../configure --enable-static \ - --prefix=/usr/local/arm-none-eabi \ - --host=arm-none-eabi \ - --enable-embedded \ - --disable-shared \ - CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror" +cd .. +build ./configure -$MAKE $PARALLEL_MAKE \ - || cat-testlogs.sh 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 + diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh new file mode 100644 index 00000000..e52a96a9 --- /dev/null +++ b/contrib/jenkins_common.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +set -ex + +verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") + +autoreconf --install --force |