Harald Welte | 6fded67 | 2018-06-05 19:02:18 +0200 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org |
| 3 | |
| 4 | if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then |
| 5 | echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" |
| 6 | exit 2 |
| 7 | fi |
| 8 | |
| 9 | |
| 10 | set -ex |
| 11 | |
| 12 | base="$PWD" |
| 13 | deps="$base/deps" |
| 14 | inst="$deps/install" |
| 15 | export deps inst |
| 16 | |
| 17 | osmo-clean-workspace.sh |
| 18 | |
| 19 | mkdir "$deps" || true |
| 20 | |
| 21 | osmo-build-dep.sh libosmocore "" '--disable-doxygen --enable-gnutls' |
| 22 | |
| 23 | verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") |
| 24 | |
| 25 | export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" |
| 26 | export LD_LIBRARY_PATH="$inst/lib" |
| 27 | |
| 28 | set +x |
| 29 | echo |
| 30 | echo |
| 31 | echo |
| 32 | echo " =============================== osmo-sysmon ============================" |
| 33 | echo |
| 34 | set -x |
| 35 | |
| 36 | cd "$base" |
| 37 | autoreconf --install --force |
| 38 | ./configure --enable-sanitize --enable-external-tests --enable-werror |
| 39 | $MAKE $PARALLEL_MAKE |
| 40 | #LD_LIBRARY_PATH="$inst/lib" $MAKE check \ |
| 41 | # || cat-testlogs.sh |
| 42 | LD_LIBRARY_PATH="$inst/lib" \ |
| 43 | DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests --enable-werror" \ |
| 44 | $MAKE distcheck \ |
| 45 | || cat-testlogs.sh |
| 46 | |
| 47 | osmo-clean-workspace.sh |