2 # jenkins build helper script for osmocom-bb. This is how we build on jenkins.osmocom.org
4 # environment variables:
5 # * WITH_MANUALS: build manual PDFs if set to "1"
6 # * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1")
16 osmo-clean-workspace.sh
20 # exclude ancient local copy of libosmocore.git
21 verify_value_string_arrays_are_terminated.py \
22 $
(find .
-path .
/src
/shared
/libosmocore
-prune -o -name '*.[hc]' -print)
24 export PKG_CONFIG_PATH
="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
25 export LD_LIBRARY_PATH
="$inst/lib"
27 osmo-build-dep.sh libosmocore
"" --disable-doxygen
28 osmo-build-dep.sh libosmo-gprs
29 osmo-build-dep.sh gapk
35 echo " =============================== OsmocomBB ==============================="
40 # building those sub-projects where 'distcheck' is known-working
41 for dir
in gprsdecode layer23 trxcon virt_phy
; do
42 cd $base/src
/host
/$dir
44 .
/configure
--enable-werror
46 DISTCHECK_CONFIGURE_FLAGS
="--enable-werror" $MAKE $PARALLEL_MAKE distcheck
49 # TODO: make sure 'distcheck' passes also for these
50 # TODO: make sure '--enable-werror' passes also for these
51 for dir
in osmocon
; do
52 cd $base/src
/host
/$dir
58 # Build and publish manuals
59 if [ "$WITH_MANUALS" = "1" ]; then
60 make -C "$base/doc/manuals"
61 make -C "$base/doc/manuals" check
63 if [ "$PUBLISH" = "1" ]; then
64 make -C "$base/doc/manuals" publish
68 # Test 'maintainer-clean'
69 for dir
in gprsdecode layer23 osmocon trxcon virt_phy
; do
70 cd "$base/src/host/$dir"
74 # Build the firmware (against the local copy of libosmocore)
78 # TRX Toolkit unit tests
79 cd "$base/src/target/trx_toolkit"
80 python3
-m unittest discover
-v
82 osmo-clean-workspace.sh