2017-08-25 15:27:06 +00:00
|
|
|
#!/bin/sh
|
2017-07-10 13:00:00 +00:00
|
|
|
# jenkins build helper script for libosmo-sccp. This is how we build on jenkins.osmocom.org
|
2018-11-30 14:56:41 +00:00
|
|
|
#
|
|
|
|
# environment variables:
|
|
|
|
# * WITH_MANUALS: build manual PDFs if set to "1"
|
|
|
|
# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1")
|
|
|
|
#
|
2017-07-10 13:00:00 +00:00
|
|
|
|
|
|
|
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 22:57:09 +00:00
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2016-10-06 22:53:50 +00:00
|
|
|
base="$PWD"
|
|
|
|
deps="$base/deps"
|
|
|
|
inst="$deps/install"
|
|
|
|
export deps inst
|
2016-04-13 22:57:09 +00:00
|
|
|
|
2017-10-27 20:51:11 +00:00
|
|
|
osmo-clean-workspace.sh
|
|
|
|
|
2016-10-06 22:53:50 +00:00
|
|
|
mkdir "$deps" || true
|
2016-04-13 22:57:09 +00:00
|
|
|
|
2017-08-25 15:27:06 +00:00
|
|
|
verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
|
2017-03-01 14:39:34 +00:00
|
|
|
|
2016-10-06 22:53:50 +00:00
|
|
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
export LD_LIBRARY_PATH="$inst/lib"
|
2018-11-30 14:56:41 +00:00
|
|
|
export PATH="$inst/bin:$PATH"
|
2016-10-06 22:53:50 +00:00
|
|
|
|
2018-02-20 19:20:10 +00:00
|
|
|
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
2016-10-06 22:53:50 +00:00
|
|
|
osmo-build-dep.sh libosmo-abis
|
|
|
|
osmo-build-dep.sh libosmo-netif
|
|
|
|
|
2018-11-30 14:56:41 +00:00
|
|
|
# Additional configure options and depends
|
|
|
|
CONFIG=""
|
|
|
|
if [ "$WITH_MANUALS" = "1" ]; then
|
|
|
|
CONFIG="--enable-manuals"
|
|
|
|
fi
|
|
|
|
|
2016-10-06 22:53:50 +00:00
|
|
|
set +x
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo " =============================== libosmo-sccp ==============================="
|
|
|
|
echo
|
|
|
|
set -x
|
2016-04-13 22:57:09 +00:00
|
|
|
|
|
|
|
autoreconf --install --force
|
2018-11-30 14:56:41 +00:00
|
|
|
./configure --enable-sanitize --enable-werror --enable-external-tests $CONFIG
|
2016-10-06 22:53:50 +00:00
|
|
|
$MAKE $PARALLEL_MAKE
|
2018-11-30 14:56:41 +00:00
|
|
|
DISTCHECK_CONFIGURE_FLAGS="--enable-external-tests $CONFIG" \
|
2020-10-12 16:28:55 +00:00
|
|
|
$MAKE $PARALLEL_MAKE distcheck \
|
2016-10-06 22:53:50 +00:00
|
|
|
|| cat-testlogs.sh
|
2017-10-27 20:51:11 +00:00
|
|
|
|
2018-11-30 14:56:41 +00:00
|
|
|
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
|
|
|
|
make -C "$base/doc/manuals" publish
|
|
|
|
fi
|
|
|
|
|
2020-10-12 16:28:55 +00:00
|
|
|
$MAKE $PARALLEL_MAKE maintainer-clean
|
2017-10-27 20:51:11 +00:00
|
|
|
osmo-clean-workspace.sh
|