aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/osmocom-api-doxygen.sh
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2023-08-25 12:26:41 +0200
committerOliver Smith <osmith@sysmocom.de>2023-08-25 13:31:24 +0200
commit53bd6b8adecf60113f3bd1ccb6addeda7a5bddb8 (patch)
tree95dcf09d39d129edea1948e0b509178ff07e48f8 /scripts/osmocom-api-doxygen.sh
parente4ac3ae199fcac6c345ae56cd88a7ae7ffc9347b (diff)
jobs/osmocom-api: run inside docker
Run the osmocom-api job inside docker, so all depends are available (fixes that it currently fails because liburing isn't available for libosmocore). Use the contrib/known_hosts file, instead of writing an own copy during the job. Change-Id: I6e831c71c4c88772c3e4232fcb1a9e2c1c73d997
Diffstat (limited to 'scripts/osmocom-api-doxygen.sh')
-rwxr-xr-xscripts/osmocom-api-doxygen.sh51
1 files changed, 51 insertions, 0 deletions
diff --git a/scripts/osmocom-api-doxygen.sh b/scripts/osmocom-api-doxygen.sh
new file mode 100755
index 0000000..765b7fb
--- /dev/null
+++ b/scripts/osmocom-api-doxygen.sh
@@ -0,0 +1,51 @@
+#!/bin/sh -ex
+# Repositories for which doxygen documentation will be generated and
+# uploaded, also dependencies which need to be built
+repos_api="
+ libosmocore
+ libosmo-abis
+ libosmo-dsp
+ libosmo-netif
+ libosmo-sccp
+ osmo-gmr
+"
+
+# Source common.sh from osmo-ci.git for osmo_git_clone_url()
+. scripts/common.sh
+
+# Put git repos and install data in a subdir, so it isn't in the root
+# of the cloned osmo-ci.git repository
+mkdir _osmocom_api
+cd _osmocom_api
+
+# Prepare pkgconfig path
+export PKG_CONFIG_PATH=$PWD/install/lib/pkgconfig
+mkdir -p "$PKG_CONFIG_PATH"
+
+# Clone and build the repositories
+for i in $repos_api; do
+ git clone "$(osmo_git_clone_url "$i")"
+ cd "$i"
+ autoreconf -fi
+ ./configure \
+ --prefix=$PWD/../install \
+ --with-systemdsystemunitdir=no
+ make $PARALLEL_MAKE install
+ cd ..
+done
+
+# Upload all docs
+for i in $repos_api; do
+ if ! [ -d "$i"/doc ]; then
+ # e.g. libosmo-abis is built as dependency for others but doesn't
+ # have its own doxygen documentation as of writing
+ continue
+ fi
+
+ rsync \
+ -avz \
+ --delete \
+ -e "ssh -o UserKnownHostsFile=/build/contrib/known_hosts -p 48" \
+ ./"$i"/doc/ \
+ api@ftp.osmocom.org:web-files/latest/"$i"/
+done