Holger Hans Peter Freyther | a47b401 | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Harald Welte | d4ee592 | 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 | a47b401 | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 9 | |
| 10 | set -ex |
| 11 | |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 12 | base="$PWD" |
| 13 | deps="$base/deps" |
| 14 | inst="$deps/install" |
Neels Hofmeyr | f1a56de | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 15 | export deps inst |
Holger Hans Peter Freyther | a47b401 | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 16 | |
Neels Hofmeyr | 8863f7a | 2017-10-27 20:14:29 +0200 | [diff] [blame] | 17 | osmo-clean-workspace.sh |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 18 | |
Neels Hofmeyr | 8863f7a | 2017-10-27 20:14:29 +0200 | [diff] [blame] | 19 | mkdir "$deps" || true |
Neels Hofmeyr | f1a56de | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 20 | osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 21 | |
Neels Hofmeyr | 1a232bd | 2017-08-26 21:19:35 +0200 | [diff] [blame] | 22 | verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") |
Neels Hofmeyr | ac27a99 | 2017-03-01 15:06:16 +0100 | [diff] [blame] | 23 | |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 24 | export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" |
Neels Hofmeyr | f1a56de | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 25 | export LD_LIBRARY_PATH="$inst/lib" |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 26 | |
Neels Hofmeyr | f1a56de | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 27 | osmo-build-dep.sh libosmo-abis |
Neels Hofmeyr | 4aa75e7 | 2017-03-31 14:03:39 +0200 | [diff] [blame] | 28 | osmo-build-dep.sh libosmo-netif |
Neels Hofmeyr | 9759374 | 2016-07-11 19:44:58 +0200 | [diff] [blame] | 29 | |
Neels Hofmeyr | f1a56de | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 30 | set +x |
| 31 | echo |
| 32 | echo |
| 33 | echo |
Neels Hofmeyr | e9920f2 | 2017-07-10 15:07:22 +0200 | [diff] [blame] | 34 | echo " =============================== osmo-mgw ===============================" |
Neels Hofmeyr | f1a56de | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 35 | echo |
| 36 | set -x |
| 37 | |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 38 | cd "$base" |
Holger Hans Peter Freyther | a47b401 | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 39 | autoreconf --install --force |
Neels Hofmeyr | 7b8e419 | 2018-03-13 15:39:32 +0100 | [diff] [blame] | 40 | ./configure $MGCP --enable-vty-tests --enable-external-tests --enable-werror |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 41 | $MAKE $PARALLEL_MAKE |
Neels Hofmeyr | f1a56de | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 42 | LD_LIBRARY_PATH="$inst/lib" $MAKE check \ |
| 43 | || cat-testlogs.sh |
Neels Hofmeyr | 0bc77b1 | 2017-07-20 17:57:37 +0200 | [diff] [blame] | 44 | LD_LIBRARY_PATH="$inst/lib" \ |
Neels Hofmeyr | e9920f2 | 2017-07-10 15:07:22 +0200 | [diff] [blame] | 45 | DISTCHECK_CONFIGURE_FLAGS="$MGCP --enable-vty-tests --enable-external-tests" \ |
Neels Hofmeyr | 0bc77b1 | 2017-07-20 17:57:37 +0200 | [diff] [blame] | 46 | $MAKE distcheck \ |
Neels Hofmeyr | f1a56de | 2016-10-07 00:58:22 +0200 | [diff] [blame] | 47 | || cat-testlogs.sh |
Neels Hofmeyr | 8863f7a | 2017-10-27 20:14:29 +0200 | [diff] [blame] | 48 | |
| 49 | osmo-clean-workspace.sh |