blob: ff93c402a19d7296ec62c39cc6a72e2b1d9e902d [file] [log] [blame]
Harald Welte6fded672018-06-05 19:02:18 +02001#!/usr/bin/env bash
Max14474d32019-01-31 16:08:12 +01002# jenkins build helper: this is how we build on jenkins.osmocom.org
Harald Welte6fded672018-06-05 19:02:18 +02003
4if ! [ -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
7fi
8
9
10set -ex
11
12base="$PWD"
13deps="$base/deps"
14inst="$deps/install"
15export deps inst
16
17osmo-clean-workspace.sh
18
19mkdir "$deps" || true
20
21osmo-build-dep.sh libosmocore "" '--disable-doxygen --enable-gnutls'
22
23verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
24
25export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
26export LD_LIBRARY_PATH="$inst/lib"
27
Max9a852f22019-01-31 15:58:57 +010028osmo-build-dep.sh libosmo-abis
29osmo-build-dep.sh libosmo-netif "" '--disable-doxygen'
30
Harald Welte6fded672018-06-05 19:02:18 +020031set +x
32echo
33echo
34echo
35echo " =============================== osmo-sysmon ============================"
36echo
37set -x
38
39cd "$base"
40autoreconf --install --force
41./configure --enable-sanitize --enable-external-tests --enable-werror
42$MAKE $PARALLEL_MAKE
Max14474d32019-01-31 16:08:12 +010043
Harald Welte6fded672018-06-05 19:02:18 +020044LD_LIBRARY_PATH="$inst/lib" \
45 DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests --enable-werror" \
46 $MAKE distcheck \
47 || cat-testlogs.sh
48
Oliver Smithc1871cd2019-07-10 13:25:45 +020049$MAKE maintainer-clean
Harald Welte6fded672018-06-05 19:02:18 +020050osmo-clean-workspace.sh