blob: 288298907f7b2ab2350c1abea89d0144412c5c9e [file] [log] [blame]
Holger Hans Peter Freyther81eb10c2016-04-13 19:03:38 -04001#!/usr/bin/env bash
Harald Welte6b0701c2017-07-10 15:00:00 +02002# jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org
3
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
Holger Hans Peter Freyther81eb10c2016-04-13 19:03:38 -04009
10set -ex
11
Neels Hofmeyra335ee32016-07-11 19:39:51 +020012base="$PWD"
13deps="$base/deps"
14inst="$deps/install"
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020015export deps inst
Holger Hans Peter Freyther81eb10c2016-04-13 19:03:38 -040016
Neels Hofmeyra335ee32016-07-11 19:39:51 +020017mkdir "$deps" || true
18rm -rf "$inst"
19
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020020osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
Neels Hofmeyra335ee32016-07-11 19:39:51 +020021
Neels Hofmeyrc37f3382017-08-26 21:19:35 +020022verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
Neels Hofmeyr69cdbe62017-03-01 15:06:16 +010023
Neels Hofmeyra335ee32016-07-11 19:39:51 +020024export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020025export LD_LIBRARY_PATH="$inst/lib"
Neels Hofmeyra335ee32016-07-11 19:39:51 +020026
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020027osmo-build-dep.sh libosmo-abis
Neels Hofmeyr3905e702017-03-31 14:03:39 +020028osmo-build-dep.sh libosmo-netif
Philipp Maier68760a82017-04-09 12:32:51 +020029osmo-build-dep.sh libosmo-sccp
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020030osmo-build-dep.sh openggsn
Neels Hofmeyra335ee32016-07-11 19:39:51 +020031
Neels Hofmeyr58996b72016-07-11 19:44:58 +020032if [ "x$IU" = "x--enable-iu" ]; then
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020033 osmo-build-dep.sh libasn1c
34 #osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh
Philipp Maier68760a82017-04-09 12:32:51 +020035 osmo-build-dep.sh osmo-iuh
Neels Hofmeyr58996b72016-07-11 19:44:58 +020036fi
37
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020038set +x
39echo
40echo
41echo
Neels Hofmeyr0dd8d342017-07-12 23:37:05 +020042echo " =============================== osmo-msc ==============================="
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020043echo
44set -x
45
Neels Hofmeyra335ee32016-07-11 19:39:51 +020046cd "$base"
Holger Hans Peter Freyther81eb10c2016-04-13 19:03:38 -040047autoreconf --install --force
Neels Hofmeyr58996b72016-07-11 19:44:58 +020048./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests
Neels Hofmeyra335ee32016-07-11 19:39:51 +020049$MAKE $PARALLEL_MAKE
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020050LD_LIBRARY_PATH="$inst/lib" $MAKE check \
51 || cat-testlogs.sh
Neels Hofmeyrc07d6352017-07-20 17:57:37 +020052LD_LIBRARY_PATH="$inst/lib" \
53 DISTCHECK_CONFIGURE_FLAGS="--enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests" \
54 $MAKE distcheck \
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020055 || cat-testlogs.sh