2017-08-25 15:33:32 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# jenkins build helper script for libosmo-sccp. This is how we build on jenkins.osmocom.org
|
2016-04-13 22:47:15 +00:00
|
|
|
|
2017-10-20 14:07:06 +00:00
|
|
|
. $(dirname "$0")/jenkins_common.sh
|
2016-04-13 22:50:41 +00:00
|
|
|
|
2017-10-20 14:07:06 +00:00
|
|
|
ENABLE_SANITIZE="--enable-sanitize"
|
2017-03-01 14:08:17 +00:00
|
|
|
|
2017-06-23 13:33:30 +00:00
|
|
|
if [ "x$label" = "xFreeBSD_amd64" ]; then
|
|
|
|
ENABLE_SANITIZE=""
|
|
|
|
fi
|
|
|
|
|
2017-10-23 12:57:56 +00:00
|
|
|
src_dir="$PWD"
|
2017-10-20 14:07:06 +00:00
|
|
|
build() {
|
2017-10-23 12:57:56 +00:00
|
|
|
build_dir="$1"
|
|
|
|
|
|
|
|
prep_build "$src_dir" "$build_dir"
|
|
|
|
|
|
|
|
"$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror"
|
2017-11-17 00:17:47 +00:00
|
|
|
$MAKE V=1 $PARALLEL_MAKE check \
|
2017-10-23 12:57:56 +00:00
|
|
|
|| cat-testlogs.sh
|
2017-10-20 14:07:06 +00:00
|
|
|
}
|
2017-03-07 21:21:35 +00:00
|
|
|
|
|
|
|
# verify build in dir other than source tree
|
2017-10-23 12:57:56 +00:00
|
|
|
build builddir
|
|
|
|
# verify build in source tree
|
|
|
|
build .
|
2017-10-20 14:07:06 +00:00
|
|
|
|
2017-10-23 12:57:56 +00:00
|
|
|
# do distcheck only once, which is fine from built source tree, since distcheck
|
|
|
|
# is well separated from the source tree state.
|
|
|
|
$MAKE distcheck \
|
|
|
|
|| cat-testlogs.sh
|
2017-10-27 20:40:30 +00:00
|
|
|
|
|
|
|
osmo-clean-workspace.sh
|