doc/manuals: set OSMO_REPOSITORY
[osmocom-bb.git] / contrib / jenkins.sh
blob5cc3a67f6fe1cbbc616ba91cb3679f9401557f73
1 #!/bin/sh
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")
9 set -ex
11 base="$PWD"
12 deps="$base/deps"
13 inst="$deps/install"
14 export deps inst
16 osmo-clean-workspace.sh
18 mkdir "$deps" || true
20 # TODO: ask whether fail is expected, because osmocom-bb build succeeds?
21 #"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
23 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
24 export LD_LIBRARY_PATH="$inst/lib"
26 osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
27 osmo-build-dep.sh libosmo-gprs
28 osmo-build-dep.sh gapk
30 set +x
31 echo
32 echo
33 echo
34 echo " =============================== OsmocomBB ==============================="
35 echo
36 set -x
39 # building those sub-projects where 'distcheck' is known-working
40 for dir in gprsdecode layer23 trxcon virt_phy; do
41 cd $base/src/host/$dir
42 autoreconf -fi
43 ./configure --enable-werror
44 $MAKE $PARALLEL_MAKE
45 DISTCHECK_CONFIGURE_FLAGS="--enable-werror" $MAKE $PARALLEL_MAKE distcheck
46 done
48 # TODO: make sure 'distcheck' passes also for these
49 # TODO: make sure '--enable-werror' passes also for these
50 for dir in osmocon; do
51 cd $base/src/host/$dir
52 autoreconf -fi
53 ./configure
54 $MAKE $PARALLEL_MAKE
55 done
57 # Build and publish manuals
58 if [ "$WITH_MANUALS" = "1" ]; then
59 make -C "$base/doc/manuals"
60 make -C "$base/doc/manuals" check
62 if [ "$PUBLISH" = "1" ]; then
63 make -C "$base/doc/manuals" publish
67 # Test 'maintainer-clean'
68 for dir in gprsdecode layer23 osmocon trxcon virt_phy; do
69 cd "$base/src/host/$dir"
70 make maintainer-clean
71 done
73 # Build the firmware (against the local copy of libosmocore)
74 cd "$base/src"
75 make firmware
77 # TRX Toolkit unit tests
78 cd "$base/src/target/trx_toolkit"
79 python3 -m unittest discover -v
81 osmo-clean-workspace.sh