ci: replace Travis with GitHub Actions
Minor cleanups in docs and build scripts
Change-Id: Icfab337d1b9c78f91ea0c47b65eb4dae6d589b18
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index cd3eb76..95dfe37 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -3,13 +3,13 @@
if has OSX $NODE_LABELS; then
FORMULAE=(boost openssl pkg-config)
- if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then
- FORMULAE+=(python)
+ if [[ $JOB_NAME == *"Docs" ]]; then
+ FORMULAE+=(doxygen graphviz)
fi
- if [[ -n $TRAVIS ]]; then
- # Travis images come with a large number of pre-installed
- # brew packages, don't waste time upgrading all of them
+ if [[ -n $GITHUB_ACTIONS ]]; then
+ # GitHub Actions runners have a large number of pre-installed
+ # Homebrew packages. Don't waste time upgrading all of them.
brew list --versions "${FORMULAE[@]}" || brew update
for FORMULA in "${FORMULAE[@]}"; do
brew list --versions "$FORMULA" || brew install "$FORMULA"
@@ -23,12 +23,23 @@
brew cleanup
fi
+ if [[ $JOB_NAME == *"Docs" ]]; then
+ pip3 install --upgrade --upgrade-strategy=eager sphinx sphinxcontrib-doxylink
+ fi
+
elif has Ubuntu $NODE_LABELS; then
sudo apt-get -qq update
sudo apt-get -qy install build-essential pkg-config python3-minimal \
libboost-all-dev libssl-dev libsqlite3-dev
- if [[ $JOB_NAME == *"code-coverage" ]]; then
- sudo apt-get -qy install gcovr lcov
- fi
+ case $JOB_NAME in
+ *code-coverage)
+ sudo apt-get -qy install lcov python3-pip
+ pip3 install --user --upgrade --upgrade-strategy=eager 'gcovr~=5.0'
+ ;;
+ *Docs)
+ sudo apt-get -qy install doxygen graphviz python3-pip
+ pip3 install --user --upgrade --upgrade-strategy=eager sphinx sphinxcontrib-doxylink
+ ;;
+ esac
fi
diff --git a/.jenkins.d/09-cleanup.sh b/.jenkins.d/09-cleanup.sh
new file mode 100755
index 0000000..e1c0a2e
--- /dev/null
+++ b/.jenkins.d/09-cleanup.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+set -ex
+
+PROJ=ndn-nac
+
+sudo rm -fr /usr/local/include/"$PROJ"
+sudo rm -f /usr/local/lib{,64}/lib"$PROJ"*
+sudo rm -f /usr/local/lib{,64}/pkgconfig/{,lib}"$PROJ".pc
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
index c77175f..70c5c9b 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -2,29 +2,26 @@
set -ex
if [[ $JOB_NAME == *"code-coverage" ]]; then
+ # Generate an XML report (Cobertura format)
gcovr --object-directory=build \
--output=build/coverage.xml \
--exclude="$PWD/tests" \
--root=. \
--xml
- # Generate also a detailed HTML output, but using lcov (better results)
+ # Generate a detailed HTML report using lcov
lcov --quiet \
--capture \
--directory . \
+ --exclude "$PWD/tests/*" \
--no-external \
--rc lcov_branch_coverage=1 \
- --output-file build/coverage-with-tests.info
-
- lcov --quiet \
- --remove build/coverage-with-tests.info "$PWD/tests/*" \
- --rc lcov_branch_coverage=1 \
--output-file build/coverage.info
genhtml --branch-coverage \
--demangle-cpp \
--legend \
- --output-directory build/coverage \
+ --output-directory build/lcov \
--title "ndn-nac unit tests" \
build/coverage.info
fi