From f52cf145acea5db288543de0f2e886988d5676cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Boddenberg?= Date: Mon, 4 Sep 2017 20:42:55 +0200 Subject: Make use of osmo-build.sh to use dependency artifacts for builds. Change-Id: I8a2ff700bbe3806bb2c1d561c6f2249fae3d8dd8 Note: this patchset depends on https://gerrit.osmocom.org/#/c/3822/1 --- contrib/jenkins.sh | 91 +++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 46 deletions(-) (limited to 'contrib') diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 892d7214b..61b27be8d 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,59 +1,58 @@ -#!/usr/bin/env bash -# jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org +#!/bin/sh -ex -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 -fi +artifact_deps() { + x="$($1 libosmocore)" + x="${x}_$($1 libosmo-abis)" + x="${x}_$($1 libosmo-netif)" + x="${x}_$($1 libosmo-sccp "$sccp_branch")" + x="${x}_$($1 libsmpp34)" + x="${x}_$($1 openggsn)" -set -ex + if [ "x$IU" = "x--enable-iu" ]; then + x="${x}_$($1 libasn1c)" + x="${x}_$($1 osmo-iuh "$osmo_iuh_branch")" + fi -base="$PWD" -deps="$base/deps" -inst="$deps/install" -export deps inst + echo "${x}.tar.gz" +} -mkdir "$deps" || true -rm -rf "$inst" +build_deps() { -verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") + osmo-build-dep.sh libosmocore master ac_cv_path_DOXYGEN=false + verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") + osmo-build-dep.sh libosmo-abis + osmo-build-dep.sh libosmo-netif + osmo-build-dep.sh libosmo-sccp "$sccp_branch" + PARALLEL_MAKE=-j1 osmo-build-dep.sh libsmpp34 + osmo-build-dep.sh openggsn -export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" -export LD_LIBRARY_PATH="$inst/lib" + if [ "x$IU" = "x--enable-iu" ]; then + osmo-build-dep.sh libasn1c + osmo-build-dep.sh osmo-iuh "$osmo_iuh_branch" + fi +} -if [ "x$IU" = "x--enable-iu" ]; then - sccp_branch="old_sua" - osmo_iuh_branch="old_sua" -fi +build_project() { + + cd "$base/openbsc" + + autoreconf --install --force + + ./configure "$SMPP" "$MGCP" "$IU" \ + --enable-osmo-bsc \ + --enable-nat \ + --enable-vty-tests \ + --enable-external-tests -osmo-build-dep.sh libosmocore -osmo-build-dep.sh libosmo-abis -osmo-build-dep.sh libosmo-netif -osmo-build-dep.sh libosmo-sccp $sccp_branch -PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34 -osmo-build-dep.sh openggsn + "$MAKE" $PARALLEL_MAKE + "$MAKE" check || cat-testlogs.sh + "$MAKE" distcheck || cat-testlogs.sh +} if [ "x$IU" = "x--enable-iu" ]; then - osmo-build-dep.sh libasn1c - #osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh - osmo-build-dep.sh osmo-iuh $osmo_iuh_branch + sccp_branch="old_sua" + osmo_iuh_branch="old_sua" fi -set +x -echo -echo -echo -echo " =============================== openbsc ===============================" -echo -set -x - -cd "$base" -cd openbsc -autoreconf --install --force -./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests -$MAKE $PARALLEL_MAKE -LD_LIBRARY_PATH="$inst/lib" $MAKE check \ - || cat-testlogs.sh -LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck \ - || cat-testlogs.sh +. osmo-build.sh -- cgit v1.2.3