blob: 033eed726dfb5bd9236beb335851b52d940f98e7 [file] [log] [blame]
Harald Weltee57cbe22017-09-05 22:35:10 +02001#!/usr/bin/env bash
2# 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 Freytherb29ff1d2016-04-13 19:02:13 -04009
10set -ex
11
Harald Weltee57cbe22017-09-05 22:35:10 +020012base="$PWD"
13deps="$base/deps"
14inst="$deps/install"
15export deps inst
16
Neels Hofmeyr29caaab2017-10-27 22:54:29 +020017osmo-clean-workspace.sh
18
Harald Weltee57cbe22017-09-05 22:35:10 +020019mkdir "$deps" || true
Harald Weltee57cbe22017-09-05 22:35:10 +020020
Pau Espin Pedrol077b9032017-12-14 15:26:57 +010021if [ "x$GTP" == "x--enable-gtp-linux" ]; then
22 osmo-build-dep.sh libgtpnl
23fi
Harald Weltee57cbe22017-09-05 22:35:10 +020024osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
25
Maxb87da752017-08-25 17:37:36 +020026verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
27
Harald Weltee57cbe22017-09-05 22:35:10 +020028export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
29export LD_LIBRARY_PATH="$inst/lib"
Holger Hans Peter Freytherb29ff1d2016-04-13 19:02:13 -040030
Harald Weltee57cbe22017-09-05 22:35:10 +020031set +x
32echo
33echo
34echo
Maxea70f362017-09-15 12:16:53 +020035echo " =============================== OsmoGGSN ==============================="
Harald Weltee57cbe22017-09-05 22:35:10 +020036echo
37set -x
38
39cd "$base"
Holger Hans Peter Freytherb29ff1d2016-04-13 19:02:13 -040040autoreconf --install --force
Max1c8c6262017-12-21 17:12:46 +010041./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP
Harald Weltee57cbe22017-09-05 22:35:10 +020042$MAKE $PARALLEL_MAKE
43$MAKE distcheck
Neels Hofmeyr29caaab2017-10-27 22:54:29 +020044
45osmo-clean-workspace.sh