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 | |
Max | e41ad4d | 2018-01-18 17:37:18 +0100 | [diff] [blame] | 18 | "$src_dir"/configure --disable-silent-rules --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror" |
| 19 | |
| 20 | run_make |
Max | 1ac277d | 2018-01-18 19:15:40 +0100 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | # verify build in dir other than source tree |
| 24 | build builddir |
| 25 | # verify build in source tree |
| 26 | build . |
| 27 | |
| 28 | # 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 |
| 32 | |
| 33 | osmo-clean-workspace.sh |