contrib/jenkins.sh: run "make maintainer-clean"
[osmocom-bb.git] / contrib / jenkins.sh
blob52c6566179995ed9cc255d4078b8afc47ce882cb
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 osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
22 # TODO: ask whether fail is expected, because osmocom-bb build succeeds?
23 #"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
25 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
26 export LD_LIBRARY_PATH="$inst/lib"
28 set +x
29 echo
30 echo
31 echo
32 echo " =============================== OsmocomBB ==============================="
33 echo
34 set -x
37 # building those sub-projects where 'distcheck' is known-working
38 for dir in gprsdecode layer23; do
39 cd $base/src/host/$dir
40 autoreconf -fi
41 ./configure
42 make distcheck
43 done
45 # TODO: make sure 'distcheck' passes also for these
46 for dir in gsmmap osmocon trxcon virt_phy; do
47 cd $base/src/host/$dir
48 autoreconf -fi
49 ./configure
50 make
51 done
53 # Build and publish manuals
54 if [ "$WITH_MANUALS" = "1" ]; then
55 osmo-build-dep.sh osmo-gsm-manuals
56 make -C "$base/doc/manuals"
57 make -C "$base/doc/manuals" check
59 if [ "$PUBLISH" = "1" ]; then
60 make -C "$base/doc/manuals" publish
64 # Test 'maintainer-clean'
65 for dir in gprsdecode layer23 gsmmap osmocon trxcon virt_phy; do
66 cd "$base/src/host/$dir"
67 make maintainer-clean
68 done
70 osmo-clean-workspace.sh