blob: 7e7ccf0d03a9589bfc3b1044b5fd319214355a3a [file] [log] [blame]
Holger Hans Peter Freythera47b4012016-04-13 19:03:38 -04001#!/usr/bin/env bash
Harald Welte3ea54c82017-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 Freythera47b4012016-04-13 19:03:38 -04009
10set -ex
11
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020012base="$PWD"
13deps="$base/deps"
14inst="$deps/install"
Neels Hofmeyrf1a56de2016-10-07 00:58:22 +020015export deps inst
Holger Hans Peter Freythera47b4012016-04-13 19:03:38 -040016
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020017mkdir "$deps" || true
18rm -rf "$inst"
19
Neels Hofmeyrf1a56de2016-10-07 00:58:22 +020020osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020021
Neels Hofmeyrac27a992017-03-01 15:06:16 +010022"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
23
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020024export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
Neels Hofmeyrf1a56de2016-10-07 00:58:22 +020025export LD_LIBRARY_PATH="$inst/lib"
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020026
Neels Hofmeyrd75f11e2017-04-10 20:57:09 +020027if [ "x$IU" = "x--enable-iu" ]; then
28 sccp_branch="old_sua"
Neels Hofmeyr2102a4a2017-07-10 16:19:08 +020029 osmo_iuh_branch="old_sua"
Neels Hofmeyrd75f11e2017-04-10 20:57:09 +020030fi
31
Neels Hofmeyrf1a56de2016-10-07 00:58:22 +020032osmo-build-dep.sh libosmo-abis
Neels Hofmeyr4aa75e72017-03-31 14:03:39 +020033osmo-build-dep.sh libosmo-netif
Neels Hofmeyrd75f11e2017-04-10 20:57:09 +020034osmo-build-dep.sh libosmo-sccp $sccp_branch
Neels Hofmeyrf1a56de2016-10-07 00:58:22 +020035PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34
36osmo-build-dep.sh openggsn
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020037
Neels Hofmeyr97593742016-07-11 19:44:58 +020038if [ "x$IU" = "x--enable-iu" ]; then
Neels Hofmeyrf1a56de2016-10-07 00:58:22 +020039 osmo-build-dep.sh libasn1c
40 #osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh
Neels Hofmeyr2102a4a2017-07-10 16:19:08 +020041 osmo-build-dep.sh osmo-iuh $osmo_iuh_branch
Neels Hofmeyr97593742016-07-11 19:44:58 +020042fi
43
Neels Hofmeyrf1a56de2016-10-07 00:58:22 +020044set +x
45echo
46echo
47echo
48echo " =============================== openbsc ==============================="
49echo
50set -x
51
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020052cd "$base"
53cd openbsc
Holger Hans Peter Freythera47b4012016-04-13 19:03:38 -040054autoreconf --install --force
Neels Hofmeyr97593742016-07-11 19:44:58 +020055./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020056$MAKE $PARALLEL_MAKE
Neels Hofmeyrf1a56de2016-10-07 00:58:22 +020057LD_LIBRARY_PATH="$inst/lib" $MAKE check \
58 || cat-testlogs.sh
59LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck \
60 || cat-testlogs.sh