2017-05-24 12:35:49 +00:00
|
|
|
#!/bin/sh
|
2018-12-07 13:30:26 +00:00
|
|
|
# jenkins build helper script for osmocom-bb. This is how we build on jenkins.osmocom.org
|
|
|
|
#
|
|
|
|
# environment variables:
|
|
|
|
# * WITH_MANUALS: build manual PDFs if set to "1"
|
|
|
|
# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1")
|
|
|
|
#
|
2017-05-24 12:35:49 +00:00
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
base="$PWD"
|
|
|
|
deps="$base/deps"
|
|
|
|
inst="$deps/install"
|
|
|
|
export deps inst
|
|
|
|
|
2017-10-30 04:03:19 +00:00
|
|
|
osmo-clean-workspace.sh
|
|
|
|
|
2017-05-24 12:35:49 +00:00
|
|
|
mkdir "$deps" || true
|
|
|
|
|
2023-05-17 10:01:26 +00:00
|
|
|
# exclude ancient local copy of libosmocore.git
|
|
|
|
verify_value_string_arrays_are_terminated.py \
|
|
|
|
$(find . -path ./src/shared/libosmocore -prune -o -name '*.[hc]' -print)
|
2017-05-24 12:35:49 +00:00
|
|
|
|
|
|
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
export LD_LIBRARY_PATH="$inst/lib"
|
|
|
|
|
2018-08-27 20:47:05 +00:00
|
|
|
osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
|
2022-12-30 11:49:49 +00:00
|
|
|
osmo-build-dep.sh libosmo-gprs
|
2018-08-27 20:47:05 +00:00
|
|
|
osmo-build-dep.sh gapk
|
|
|
|
|
2017-05-24 12:35:49 +00:00
|
|
|
set +x
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo " =============================== OsmocomBB ==============================="
|
|
|
|
echo
|
|
|
|
set -x
|
|
|
|
|
2018-08-24 06:43:02 +00:00
|
|
|
|
2019-05-22 19:45:57 +00:00
|
|
|
# building those sub-projects where 'distcheck' is known-working
|
2023-01-02 14:12:22 +00:00
|
|
|
for dir in gprsdecode layer23 trxcon virt_phy; do
|
2019-05-22 19:45:57 +00:00
|
|
|
cd $base/src/host/$dir
|
|
|
|
autoreconf -fi
|
2023-01-02 15:39:59 +00:00
|
|
|
./configure --enable-werror
|
|
|
|
$MAKE $PARALLEL_MAKE
|
|
|
|
DISTCHECK_CONFIGURE_FLAGS="--enable-werror" $MAKE $PARALLEL_MAKE distcheck
|
2019-05-22 19:45:57 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
# TODO: make sure 'distcheck' passes also for these
|
2023-01-02 15:39:59 +00:00
|
|
|
# TODO: make sure '--enable-werror' passes also for these
|
2023-01-02 18:41:00 +00:00
|
|
|
for dir in osmocon; do
|
2018-08-24 06:43:02 +00:00
|
|
|
cd $base/src/host/$dir
|
|
|
|
autoreconf -fi
|
|
|
|
./configure
|
2023-01-02 14:20:18 +00:00
|
|
|
$MAKE $PARALLEL_MAKE
|
2018-08-24 06:43:02 +00:00
|
|
|
done
|
2017-10-30 04:03:19 +00:00
|
|
|
|
2018-12-07 13:30:26 +00:00
|
|
|
# Build and publish manuals
|
|
|
|
if [ "$WITH_MANUALS" = "1" ]; then
|
|
|
|
make -C "$base/doc/manuals"
|
|
|
|
make -C "$base/doc/manuals" check
|
|
|
|
|
|
|
|
if [ "$PUBLISH" = "1" ]; then
|
|
|
|
make -C "$base/doc/manuals" publish
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2019-07-10 10:22:24 +00:00
|
|
|
# Test 'maintainer-clean'
|
2023-01-02 18:41:00 +00:00
|
|
|
for dir in gprsdecode layer23 osmocon trxcon virt_phy; do
|
2019-07-10 10:22:24 +00:00
|
|
|
cd "$base/src/host/$dir"
|
|
|
|
make maintainer-clean
|
|
|
|
done
|
|
|
|
|
2019-12-21 15:00:53 +00:00
|
|
|
# Build the firmware (against the local copy of libosmocore)
|
|
|
|
cd "$base/src"
|
|
|
|
make firmware
|
|
|
|
|
2019-12-13 12:22:49 +00:00
|
|
|
# TRX Toolkit unit tests
|
|
|
|
cd "$base/src/target/trx_toolkit"
|
|
|
|
python3 -m unittest discover -v
|
|
|
|
|
2017-10-30 04:03:19 +00:00
|
|
|
osmo-clean-workspace.sh
|