Harald Welte | e57cbe2 | 2017-09-05 22:35:10 +0200 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org |
| 3 | |
| 4 | if ! [ -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 |
| 7 | fi |
| 8 | |
Holger Hans Peter Freyther | b29ff1d | 2016-04-13 19:02:13 -0400 | [diff] [blame] | 9 | |
| 10 | set -ex |
| 11 | |
Harald Welte | e57cbe2 | 2017-09-05 22:35:10 +0200 | [diff] [blame] | 12 | base="$PWD" |
| 13 | deps="$base/deps" |
| 14 | inst="$deps/install" |
| 15 | export deps inst |
| 16 | |
Neels Hofmeyr | 29caaab | 2017-10-27 22:54:29 +0200 | [diff] [blame] | 17 | osmo-clean-workspace.sh |
| 18 | |
Harald Welte | e57cbe2 | 2017-09-05 22:35:10 +0200 | [diff] [blame] | 19 | mkdir "$deps" || true |
Harald Welte | e57cbe2 | 2017-09-05 22:35:10 +0200 | [diff] [blame] | 20 | |
Pau Espin Pedrol | 077b903 | 2017-12-14 15:26:57 +0100 | [diff] [blame] | 21 | if [ "x$GTP" == "x--enable-gtp-linux" ]; then |
| 22 | osmo-build-dep.sh libgtpnl |
| 23 | fi |
Harald Welte | e57cbe2 | 2017-09-05 22:35:10 +0200 | [diff] [blame] | 24 | osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false |
| 25 | |
Max | b87da75 | 2017-08-25 17:37:36 +0200 | [diff] [blame] | 26 | verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") |
| 27 | |
Harald Welte | e57cbe2 | 2017-09-05 22:35:10 +0200 | [diff] [blame] | 28 | export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" |
| 29 | export LD_LIBRARY_PATH="$inst/lib" |
Holger Hans Peter Freyther | b29ff1d | 2016-04-13 19:02:13 -0400 | [diff] [blame] | 30 | |
Harald Welte | e57cbe2 | 2017-09-05 22:35:10 +0200 | [diff] [blame] | 31 | set +x |
| 32 | echo |
| 33 | echo |
| 34 | echo |
Max | ea70f36 | 2017-09-15 12:16:53 +0200 | [diff] [blame] | 35 | echo " =============================== OsmoGGSN ===============================" |
Harald Welte | e57cbe2 | 2017-09-05 22:35:10 +0200 | [diff] [blame] | 36 | echo |
| 37 | set -x |
| 38 | |
| 39 | cd "$base" |
Holger Hans Peter Freyther | b29ff1d | 2016-04-13 19:02:13 -0400 | [diff] [blame] | 40 | autoreconf --install --force |
Neels Hofmeyr | 9f98822 | 2018-03-05 20:53:20 +0100 | [diff] [blame] | 41 | ./configure --enable-sanitize --enable-werror $GTP |
Harald Welte | e57cbe2 | 2017-09-05 22:35:10 +0200 | [diff] [blame] | 42 | $MAKE $PARALLEL_MAKE |
| 43 | $MAKE distcheck |
Neels Hofmeyr | 29caaab | 2017-10-27 22:54:29 +0200 | [diff] [blame] | 44 | |
| 45 | osmo-clean-workspace.sh |