2017-04-08 13:56:31 +00:00
|
|
|
#!/bin/sh
|
2017-03-28 10:16:58 +00:00
|
|
|
set -x -e
|
|
|
|
|
|
|
|
base="$PWD"
|
2017-04-08 13:56:31 +00:00
|
|
|
prefix="$base/inst-osmo-bts-trx"
|
|
|
|
|
|
|
|
rm -f "$base/osmo-bts-trx*.tgz"
|
2017-03-28 10:16:58 +00:00
|
|
|
|
|
|
|
deps="
|
|
|
|
libosmocore
|
|
|
|
libosmo-abis
|
|
|
|
osmo-trx
|
|
|
|
osmo-bts
|
|
|
|
"
|
|
|
|
|
|
|
|
have_repo() {
|
|
|
|
repo="$1"
|
|
|
|
cd "$base"
|
2017-05-12 14:24:16 +00:00
|
|
|
if [ ! -d "$repo" ]; then
|
|
|
|
git clone "git://git.osmocom.org/$repo" "$repo"
|
2017-03-28 10:16:58 +00:00
|
|
|
fi
|
|
|
|
cd "$repo"
|
|
|
|
git clean -dxf
|
2017-05-12 14:24:16 +00:00
|
|
|
git fetch origin
|
|
|
|
git reset --hard origin/master
|
|
|
|
git rev-parse HEAD
|
2017-03-28 10:16:58 +00:00
|
|
|
cd "$base"
|
|
|
|
}
|
|
|
|
|
|
|
|
# for gsm_data_shared.*
|
|
|
|
have_repo openbsc
|
|
|
|
|
|
|
|
|
|
|
|
rm -rf "$prefix"
|
|
|
|
mkdir -p "$prefix"
|
|
|
|
|
|
|
|
export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
|
|
|
|
export LD_LIBRARY_PATH="$prefix/lib"
|
|
|
|
|
|
|
|
for dep in $deps; do
|
2017-05-24 16:17:01 +00:00
|
|
|
set +x; echo "
|
|
|
|
|
|
|
|
====================== $dep
|
|
|
|
|
|
|
|
"; set -x
|
|
|
|
|
2017-03-28 10:16:58 +00:00
|
|
|
have_repo "$dep"
|
|
|
|
cd "$dep"
|
2017-04-08 13:56:31 +00:00
|
|
|
rm -rf *
|
|
|
|
git checkout .
|
2017-03-28 10:16:58 +00:00
|
|
|
|
|
|
|
echo "$(git rev-parse HEAD) $dep" >> "$prefix/osmo-bts-trx_osmo-trx_git_hashes.txt"
|
|
|
|
|
|
|
|
autoreconf -fi
|
|
|
|
|
|
|
|
config_opts=""
|
|
|
|
|
|
|
|
case "$repo" in
|
|
|
|
'osmo-bts') config_opts="--enable-trx --with-openbsc=$base/openbsc/openbsc/include" ;;
|
|
|
|
'osmo-trx') config_opts="--without-sse" ;;
|
|
|
|
esac
|
|
|
|
|
2017-05-24 16:17:01 +00:00
|
|
|
set +x; echo; echo; set -x
|
2017-03-28 10:16:58 +00:00
|
|
|
./configure --prefix="$prefix" $config_opts
|
2017-05-24 16:17:01 +00:00
|
|
|
set +x; echo; echo; set -x
|
2017-03-28 10:16:58 +00:00
|
|
|
make -j8
|
2017-05-24 16:17:01 +00:00
|
|
|
set +x; echo; echo; set -x
|
2017-03-28 10:16:58 +00:00
|
|
|
make install
|
|
|
|
done
|
|
|
|
|
2017-05-22 17:32:06 +00:00
|
|
|
# don't package documentation -- the libosmocore docs can be up to 16 Mb large,
|
|
|
|
# a significant amount compared to the binaries
|
2017-05-28 22:41:07 +00:00
|
|
|
rm -rf "$prefix/share/doc"
|
2017-05-22 17:32:06 +00:00
|
|
|
|
2017-03-28 10:16:58 +00:00
|
|
|
# build the archive that is going to be copied to the tester
|
contrib: rethink jenkins jobs with build slave approach
Previously, the idea was to run a test remotely via SSH. This has moved to
operating an actual jenkins build slave on the main unit, which simplifies
things.
Also, previously (in the old osmo-gsm-tester), there was a daemon running,
accepting new trials by a directory appearing. Now, we're directly launching a
test run, which simplifies things.
Remove all SSH stuff from the "run" script.
Compose the checksums of the built binary-tars in the actual build jobs. In the
"run" job, only combine those checksums to one file. (Otherwise we would
compose the sums after transmitting over the network to the build slave.)
Instead of storing trials in a common location on the system, just keep one
trial in the workspace per run. After the run, tar up the trial dir to enable
easy archiving of build results.
The common location on the system might still be a good idea if we're one day
going to move to concurrent runs with scheduling of hardware resources, but so
far we're having simple one-shot runs.
Change-Id: I129f5189ce2bebd761bc752b158fb8778b31010e
2017-05-13 23:57:25 +00:00
|
|
|
rm "$base"/*.tgz "$base"/*.md5 || true
|
2017-04-08 13:56:31 +00:00
|
|
|
cd "$prefix"
|
contrib: rethink jenkins jobs with build slave approach
Previously, the idea was to run a test remotely via SSH. This has moved to
operating an actual jenkins build slave on the main unit, which simplifies
things.
Also, previously (in the old osmo-gsm-tester), there was a daemon running,
accepting new trials by a directory appearing. Now, we're directly launching a
test run, which simplifies things.
Remove all SSH stuff from the "run" script.
Compose the checksums of the built binary-tars in the actual build jobs. In the
"run" job, only combine those checksums to one file. (Otherwise we would
compose the sums after transmitting over the network to the build slave.)
Instead of storing trials in a common location on the system, just keep one
trial in the workspace per run. After the run, tar up the trial dir to enable
easy archiving of build results.
The common location on the system might still be a good idea if we're one day
going to move to concurrent runs with scheduling of hardware resources, but so
far we're having simple one-shot runs.
Change-Id: I129f5189ce2bebd761bc752b158fb8778b31010e
2017-05-13 23:57:25 +00:00
|
|
|
this="osmo-bts-trx.build-${BUILD_NUMBER}"
|
|
|
|
tar="${this}.tgz"
|
|
|
|
tar czf "$base/$tar" *
|
|
|
|
cd "$base"
|
|
|
|
md5sum "$tar" > "${this}.md5"
|