add contrib/jenkins.sh for jenkins.osmocom.org build verification

Change-Id: I47701be92476ba9adfdf9783747c6c511cec1903
This commit is contained in:
Harald Welte 2022-02-21 21:11:14 +01:00
parent 31cca182bf
commit 3b90fdbba1
1 changed files with 33 additions and 0 deletions

33
contrib/jenkins.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/sh
# jenkins build helper script for dahdi-tools. 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
fi
set -ex
base="$PWD"
deps="$base/deps"
inst="$deps/install"
export deps inst
osmo-clean-workspace.sh
mkdir "$deps" || true
cd "$deps"
if [ -d dahdi-linux ]; then
(cd dahdi-linux && git fetch && git checkout -f -B master origin/master)
else
git clone https://git.osmocom.org/dahdi-linux
fi
cd $base
autoreconf -fi
./configure --with-dahdi="$deps/dahdi-linux"
$MAKE $PARALLEL_MAKE
osmo-clean-workspace.sh