blob: 5798c950f7f7f13dd9268509ab9330613e2ea95c [file] [log] [blame]
Max6081bd02017-08-25 17:33:32 +02001#!/bin/sh
2# jenkins build helper script for libosmo-sccp. This is how we build on jenkins.osmocom.org
Holger Hans Peter Freytherd1632182016-04-13 18:47:15 -04003
Max15b05fe2017-10-20 16:07:06 +02004. $(dirname "$0")/jenkins_common.sh
Holger Hans Peter Freyther70029752016-04-13 18:50:41 -04005
Max15b05fe2017-10-20 16:07:06 +02006ENABLE_SANITIZE="--enable-sanitize"
Neels Hofmeyr9ab00722017-03-01 15:08:17 +01007
Pau Espin Pedrol56c5b942017-06-23 15:33:30 +02008if [ "x$label" = "xFreeBSD_amd64" ]; then
9 ENABLE_SANITIZE=""
Pau Espin Pedrol56c5b942017-06-23 15:33:30 +020010fi
11
Neels Hofmeyr754e6872017-10-23 14:57:56 +020012src_dir="$PWD"
Max15b05fe2017-10-20 16:07:06 +020013build() {
Neels Hofmeyr754e6872017-10-23 14:57:56 +020014 build_dir="$1"
15
16 prep_build "$src_dir" "$build_dir"
17
18 "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror"
19 $MAKE $PARALLEL_MAKE check \
20 || cat-testlogs.sh
Max15b05fe2017-10-20 16:07:06 +020021}
Neels Hofmeyrd4089f42017-03-07 22:21:35 +010022
23# verify build in dir other than source tree
Neels Hofmeyr754e6872017-10-23 14:57:56 +020024build builddir
25# verify build in source tree
26build .
Max15b05fe2017-10-20 16:07:06 +020027
Neels Hofmeyr754e6872017-10-23 14:57:56 +020028# do distcheck only once, which is fine from built source tree, since distcheck
29# is well separated from the source tree state.
30$MAKE distcheck \
31 || cat-testlogs.sh
Neels Hofmeyr229fa072017-10-27 22:40:30 +020032
33osmo-clean-workspace.sh