blob: 3fee57cf2d7c6b1a8f0644f97b1b505c194b3c4d [file] [log] [blame]
Max1ac277d2018-01-18 19:15:40 +01001#!/bin/sh
2# jenkins build helper script for libosmocore. This is how we build on jenkins.osmocom.org
3
4. $(dirname "$0")/jenkins_common.sh
5
6ENABLE_SANITIZE="--enable-sanitize"
7
8if [ "x$label" = "xFreeBSD_amd64" ]; then
9 ENABLE_SANITIZE=""
10fi
11
12src_dir="$PWD"
13build() {
14 build_dir="$1"
15
16 prep_build "$src_dir" "$build_dir"
17
Neels Hofmeyrd79f01e2018-09-12 02:53:54 +020018 "$src_dir"/configure --disable-silent-rules --enable-static $ENABLE_SANITIZE --enable-werror \
19 --enable-external-tests
Maxe41ad4d2018-01-18 17:37:18 +010020
21 run_make
Max1ac277d2018-01-18 19:15:40 +010022}
23
24# verify build in dir other than source tree
25build builddir
26# verify build in source tree
27build .
28
29# do distcheck only once, which is fine from built source tree, since distcheck
30# is well separated from the source tree state.
Neels Hofmeyr4ff41d92019-01-28 19:11:05 +010031DISTCHECK_CONFIGURE_FLAGS=--enable-external-tests \
Pau Espin Pedrol3c5fa2d2020-10-12 17:40:00 +020032 $MAKE $PARALLEL_MAKE distcheck \
Max1ac277d2018-01-18 19:15:40 +010033 || cat-testlogs.sh
Oliver Smitha3dec042019-07-10 12:01:50 +020034$MAKE maintainer-clean
Max1ac277d2018-01-18 19:15:40 +010035
36osmo-clean-workspace.sh