Max | 1ac277d | 2018-01-18 19:15:40 +0100 | [diff] [blame] | 1 | #!/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 | |
| 6 | ENABLE_SANITIZE="--enable-sanitize" |
| 7 | |
| 8 | if [ "x$label" = "xFreeBSD_amd64" ]; then |
| 9 | ENABLE_SANITIZE="" |
| 10 | fi |
| 11 | |
| 12 | src_dir="$PWD" |
| 13 | build() { |
| 14 | build_dir="$1" |
| 15 | |
| 16 | prep_build "$src_dir" "$build_dir" |
| 17 | |
Neels Hofmeyr | d79f01e | 2018-09-12 02:53:54 +0200 | [diff] [blame] | 18 | "$src_dir"/configure --disable-silent-rules --enable-static $ENABLE_SANITIZE --enable-werror \ |
| 19 | --enable-external-tests |
Max | e41ad4d | 2018-01-18 17:37:18 +0100 | [diff] [blame] | 20 | |
| 21 | run_make |
Max | 1ac277d | 2018-01-18 19:15:40 +0100 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | # verify build in dir other than source tree |
| 25 | build builddir |
| 26 | # verify build in source tree |
| 27 | build . |
| 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 Hofmeyr | 4ff41d9 | 2019-01-28 19:11:05 +0100 | [diff] [blame] | 31 | DISTCHECK_CONFIGURE_FLAGS=--enable-external-tests \ |
| 32 | $MAKE distcheck \ |
Max | 1ac277d | 2018-01-18 19:15:40 +0100 | [diff] [blame] | 33 | || cat-testlogs.sh |
Oliver Smith | a3dec04 | 2019-07-10 12:01:50 +0200 | [diff] [blame] | 34 | $MAKE maintainer-clean |
Max | 1ac277d | 2018-01-18 19:15:40 +0100 | [diff] [blame] | 35 | |
| 36 | osmo-clean-workspace.sh |