ci: Add Jenkins and Travis CI support
Change-Id: Iccfd44b910cd2cc703897b5e7fddc15ccb07cf89
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
new file mode 100755
index 0000000..19f014c
--- /dev/null
+++ b/.jenkins.d/30-coverage.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+set -e
+
+JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source "$JDIR"/util.sh
+
+set -x
+
+if [[ $JOB_NAME == *"code-coverage" ]]; then
+ gcovr --object-directory=build \
+ --output=build/coverage.xml \
+ --exclude="$PWD/(tests)" \
+ --root=. \
+ --xml
+
+ # Generate also a detailed HTML output
+ mkdir build/coverage
+ gcovr --object-directory=build \
+ --output=build/coverage/index.html \
+ --exclude="$PWD/(tests)" \
+ --root=. \
+ --html \
+ --html-details
+fi