blob: fa7c60efa1f38181e30eda0aa78240d4f63dba2b [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 Hofmeyr4cd0b592017-10-27 22:54:46 +020017osmo-clean-workspace.sh
18
Neels Hofmeyra335ee32016-07-11 19:39:51 +020019mkdir "$deps" || true
Neels Hofmeyra335ee32016-07-11 19:39:51 +020020
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020021osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
Neels Hofmeyra335ee32016-07-11 19:39:51 +020022
Neels Hofmeyrc37f3382017-08-26 21:19:35 +020023verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
Neels Hofmeyr69cdbe62017-03-01 15:06:16 +010024
Neels Hofmeyra335ee32016-07-11 19:39:51 +020025export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020026export LD_LIBRARY_PATH="$inst/lib"
Neels Hofmeyra335ee32016-07-11 19:39:51 +020027
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020028osmo-build-dep.sh libosmo-abis
Neels Hofmeyr3905e702017-03-31 14:03:39 +020029osmo-build-dep.sh libosmo-netif
Maxb83d1252017-09-28 16:37:48 +020030osmo-build-dep.sh osmo-ggsn
Neels Hofmeyra335ee32016-07-11 19:39:51 +020031
Neels Hofmeyr58996b72016-07-11 19:44:58 +020032if [ "x$IU" = "x--enable-iu" ]; then
Maxb9b62402017-10-26 15:15:53 +020033 osmo-build-dep.sh libosmo-sccp
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020034 osmo-build-dep.sh libasn1c
35 #osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh
Philipp Maier68760a82017-04-09 12:32:51 +020036 osmo-build-dep.sh osmo-iuh
Neels Hofmeyr58996b72016-07-11 19:44:58 +020037fi
38
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020039set +x
40echo
41echo
42echo
Neels Hofmeyr91d2c592017-09-28 16:20:34 +020043echo " =============================== osmo-sgsn ==============================="
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020044echo
45set -x
46
Neels Hofmeyra335ee32016-07-11 19:39:51 +020047cd "$base"
Holger Hans Peter Freyther81eb10c2016-04-13 19:03:38 -040048autoreconf --install --force
Neels Hofmeyr58996b72016-07-11 19:44:58 +020049./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests
Neels Hofmeyra335ee32016-07-11 19:39:51 +020050$MAKE $PARALLEL_MAKE
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020051LD_LIBRARY_PATH="$inst/lib" $MAKE check \
52 || cat-testlogs.sh
Neels Hofmeyrc07d6352017-07-20 17:57:37 +020053LD_LIBRARY_PATH="$inst/lib" \
54 DISTCHECK_CONFIGURE_FLAGS="--enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests" \
55 $MAKE distcheck \
Neels Hofmeyrb88a18c2016-10-07 00:58:22 +020056 || cat-testlogs.sh
Neels Hofmeyr4cd0b592017-10-27 22:54:46 +020057
58osmo-clean-workspace.sh