Holger Hans Peter Freyther | 81eb10c | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Harald Welte | 6b0701c | 2017-07-10 15:00:00 +0200 | [diff] [blame] | 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 | 81eb10c | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 9 | |
| 10 | set -ex |
| 11 | |
Neels Hofmeyr | a335ee3 | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 12 | base="$PWD" |
| 13 | deps="$base/deps" |
| 14 | inst="$deps/install" |
Neels Hofmeyr | b88a18c | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 15 | export deps inst |
Holger Hans Peter Freyther | 81eb10c | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 16 | |
Neels Hofmeyr | a335ee3 | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 17 | mkdir "$deps" || true |
| 18 | rm -rf "$inst" |
| 19 | |
Neels Hofmeyr | b88a18c | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 20 | osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false |
Neels Hofmeyr | a335ee3 | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 21 | |
Neels Hofmeyr | c37f338 | 2017-08-26 21:19:35 +0200 | [diff] [blame] | 22 | verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") |
Neels Hofmeyr | 69cdbe6 | 2017-03-01 15:06:16 +0100 | [diff] [blame] | 23 | |
Neels Hofmeyr | a335ee3 | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 24 | export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" |
Neels Hofmeyr | b88a18c | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 25 | export LD_LIBRARY_PATH="$inst/lib" |
Neels Hofmeyr | a335ee3 | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 26 | |
Neels Hofmeyr | b88a18c | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 27 | osmo-build-dep.sh libosmo-abis |
Neels Hofmeyr | 3905e70 | 2017-03-31 14:03:39 +0200 | [diff] [blame] | 28 | osmo-build-dep.sh libosmo-netif |
Philipp Maier | 68760a8 | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 29 | osmo-build-dep.sh libosmo-sccp |
Max | b83d125 | 2017-09-28 16:37:48 +0200 | [diff] [blame] | 30 | osmo-build-dep.sh osmo-ggsn |
Neels Hofmeyr | a335ee3 | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 31 | |
Neels Hofmeyr | 58996b7 | 2016-07-11 19:44:58 +0200 | [diff] [blame] | 32 | if [ "x$IU" = "x--enable-iu" ]; then |
Neels Hofmeyr | b88a18c | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 33 | osmo-build-dep.sh libasn1c |
| 34 | #osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh |
Philipp Maier | 68760a8 | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 35 | osmo-build-dep.sh osmo-iuh |
Neels Hofmeyr | 58996b7 | 2016-07-11 19:44:58 +0200 | [diff] [blame] | 36 | fi |
| 37 | |
Neels Hofmeyr | b88a18c | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 38 | set +x |
| 39 | echo |
| 40 | echo |
| 41 | echo |
Neels Hofmeyr | 91d2c59 | 2017-09-28 16:20:34 +0200 | [diff] [blame] | 42 | echo " =============================== osmo-sgsn ===============================" |
Neels Hofmeyr | b88a18c | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 43 | echo |
| 44 | set -x |
| 45 | |
Neels Hofmeyr | a335ee3 | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 46 | cd "$base" |
Holger Hans Peter Freyther | 81eb10c | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 47 | autoreconf --install --force |
Neels Hofmeyr | 58996b7 | 2016-07-11 19:44:58 +0200 | [diff] [blame] | 48 | ./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests |
Neels Hofmeyr | a335ee3 | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 49 | $MAKE $PARALLEL_MAKE |
Neels Hofmeyr | b88a18c | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 50 | LD_LIBRARY_PATH="$inst/lib" $MAKE check \ |
| 51 | || cat-testlogs.sh |
Neels Hofmeyr | c07d635 | 2017-07-20 17:57:37 +0200 | [diff] [blame] | 52 | LD_LIBRARY_PATH="$inst/lib" \ |
| 53 | DISTCHECK_CONFIGURE_FLAGS="--enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests" \ |
| 54 | $MAKE distcheck \ |
Neels Hofmeyr | b88a18c | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 55 | || cat-testlogs.sh |