diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2018-11-23 12:42:05 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-11-27 12:48:15 +0100
commit3bd747e3af13bce7f943a5531efa1a8e47cf93b5 (patch)
parent650176435412d601d4bf973ced2c99dd8693d80e (diff)
contrib/jenkins.sh: Update script to fix several issues and use recent
osmo-ci utils Previous script didn't clean workspace and git repositories were allegedly not being updated, hiding build failures against newer deps. Currently cellmgr-ng is not being maintained and fails to build against recent libosmo-sccp. For that dep repo, tag "old_sua" is used since after that tag, APIs changed considerably and it is known that cellmgr-ng cannot build starting from there. It's up to whoever wants to maintain it to make changes in cellmgr-ng to support newer libosmo-sccp. While building with new jenkins.sh script and "old_sua" tag, still there are some build issues (mostly related to build system), like some Makefile.am files missing some LDFLAGS. Some of them are fixed in follow-up patches. Some other are left as an exercise for whover wants to revive this repo. Change-Id: Ic597664198547ec367d7926d4e401b9734c8cfa9
1 files changed, 39 insertions, 30 deletions
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 679df6a..17f182c 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -1,41 +1,50 @@
#!/usr/bin/env bash
+# jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org
+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
set -ex
-rm -rf deps/install
-mkdir deps || true
-cd deps
-osmo-deps.sh libosmocore
+export deps inst
-cd libosmocore
-autoreconf --install --force
-./configure --prefix=$PWD/../install ac_cv_path_DOXYGEN=false
-cd ../
-osmo-deps.sh libosmo-abis
-cd libosmo-abis
-autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=$PWD/../install
-PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE install
+mkdir "$deps" || true
-cd ../
-osmo-deps.sh libosmo-netif
-cd libosmo-netif
-autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=$PWD/../install
-PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE install
+osmo-build-dep.sh libosmocore "" "--disable-doxygen"
+verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
-cd ../
-osmo-deps.sh libosmo-sccp
-cd libosmo-sccp
-autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install
-PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig $MAKE $PARALLEL_MAKE install
+export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
+export LD_LIBRARY_PATH="$inst/lib"
+osmo-build-dep.sh libosmo-abis
+osmo-build-dep.sh libosmo-netif
+osmo-build-dep.sh libosmo-sccp old_sua
+set +x
+echo " =============================== cellmgr-ng ==============================="
+set -x
-cd ../../
+cd "$base"
autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure --enable-external-tests
-PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE
-PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck
+./configure --enable-external-tests
+LD_LIBRARY_PATH="$inst/lib" $MAKE check \
+ || cat-testlogs.sh
+LD_LIBRARY_PATH="$inst/lib" \
+ DISTCHECK_CONFIGURE_FLAGS="--enable-external-tests" \
+ $MAKE distcheck \
+ || cat-testlogs.sh