2016-04-13 23:03:38 +00:00
|
|
|
#!/usr/bin/env bash
|
2017-07-10 13:00:00 +00:00
|
|
|
# jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org
|
|
|
|
|
|
|
|
if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then
|
|
|
|
echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
2016-04-13 23:03:38 +00:00
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2016-07-11 17:39:51 +00:00
|
|
|
base="$PWD"
|
|
|
|
deps="$base/deps"
|
|
|
|
inst="$deps/install"
|
2016-10-06 22:58:22 +00:00
|
|
|
export deps inst
|
2016-07-11 17:39:51 +00:00
|
|
|
|
2017-10-27 20:54:40 +00:00
|
|
|
osmo-clean-workspace.sh
|
|
|
|
|
2016-07-11 17:39:51 +00:00
|
|
|
mkdir "$deps" || true
|
|
|
|
|
2016-10-06 22:58:22 +00:00
|
|
|
osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
|
2016-07-11 17:39:51 +00:00
|
|
|
|
2017-08-26 19:19:35 +00:00
|
|
|
verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
|
2017-03-01 14:06:16 +00:00
|
|
|
|
2016-07-11 17:39:51 +00:00
|
|
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
2016-10-06 22:58:22 +00:00
|
|
|
export LD_LIBRARY_PATH="$inst/lib"
|
2016-07-11 17:39:51 +00:00
|
|
|
|
2016-10-06 22:58:22 +00:00
|
|
|
osmo-build-dep.sh libosmo-abis
|
2017-03-31 12:03:39 +00:00
|
|
|
osmo-build-dep.sh libosmo-netif
|
2017-04-09 10:32:51 +00:00
|
|
|
osmo-build-dep.sh libosmo-sccp
|
2016-10-06 22:58:22 +00:00
|
|
|
PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34
|
2017-09-03 20:47:51 +00:00
|
|
|
osmo-build-dep.sh osmo-mgw
|
2016-07-11 17:39:51 +00:00
|
|
|
|
2018-06-20 21:39:13 +00:00
|
|
|
enable_werror=""
|
2016-07-11 17:44:58 +00:00
|
|
|
if [ "x$IU" = "x--enable-iu" ]; then
|
2016-10-06 22:58:22 +00:00
|
|
|
osmo-build-dep.sh libasn1c
|
|
|
|
#osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh
|
2017-04-09 10:32:51 +00:00
|
|
|
osmo-build-dep.sh osmo-iuh
|
2018-06-20 21:39:13 +00:00
|
|
|
else
|
|
|
|
enable_werror="--enable-werror"
|
2016-07-11 17:44:58 +00:00
|
|
|
fi
|
|
|
|
|
2016-10-06 22:58:22 +00:00
|
|
|
set +x
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo
|
2017-07-12 21:37:05 +00:00
|
|
|
echo " =============================== osmo-msc ==============================="
|
2016-10-06 22:58:22 +00:00
|
|
|
echo
|
|
|
|
set -x
|
|
|
|
|
2016-07-11 17:39:51 +00:00
|
|
|
cd "$base"
|
2016-04-13 23:03:38 +00:00
|
|
|
autoreconf --install --force
|
2018-06-20 21:39:13 +00:00
|
|
|
./configure --enable-sanitize $enable_werror --enable-smpp $IU --enable-external-tests
|
2016-07-11 17:39:51 +00:00
|
|
|
$MAKE $PARALLEL_MAKE
|
2016-10-06 22:58:22 +00:00
|
|
|
LD_LIBRARY_PATH="$inst/lib" $MAKE check \
|
|
|
|
|| cat-testlogs.sh
|
2017-07-20 15:57:37 +00:00
|
|
|
LD_LIBRARY_PATH="$inst/lib" \
|
2018-06-20 21:39:13 +00:00
|
|
|
DISTCHECK_CONFIGURE_FLAGS="$enable_werror --enable-smpp $IU --enable-external-tests" \
|
2017-07-20 15:57:37 +00:00
|
|
|
$MAKE distcheck \
|
2016-10-06 22:58:22 +00:00
|
|
|
|| cat-testlogs.sh
|
2017-10-27 20:54:40 +00:00
|
|
|
|
|
|
|
osmo-clean-workspace.sh
|