aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2016-11-06 21:31:02 +0100
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-03-14 20:36:38 +0100
commit03db9833e833959bb2414b736fddb967763d0d4f (patch)
tree2eb154ca40f04e9d3eea449598b0fb075e621ad5
parent33153b8f3a2e4974ae5b1e9f4017f669e35207fe (diff)
downloadvolse-hubzilla-03db9833e833959bb2414b736fddb967763d0d4f.tar.gz
volse-hubzilla-03db9833e833959bb2414b736fddb967763d0d4f.tar.bz2
volse-hubzilla-03db9833e833959bb2414b736fddb967763d0d4f.zip
:green_heart: Update Travis CI's Doxygen.
Travis CI has Doxygen 1.7. We need 1.8 to generate our API documentation. Get a static version and use it. Always build API Documentation, but changed Doxygen configuration to only print out errors in the documentation generation, so these can be reviewed.
-rw-r--r--.travis.yml6
-rwxr-xr-xtests/travis/gen_apidocs.sh41
-rw-r--r--util/Doxyfile9
3 files changed, 42 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml
index 6938033ce..1412390ab 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,8 +21,9 @@ addons:
# Install dependencies for generating API documentation with doxygen
apt:
packages:
- - doxygen
- - doxygen-latex
+ # default doxygen 1.7 is too old, we install our own
+ #- doxygen
+ #- doxygen-latex
- graphviz
- ttf-liberation
@@ -75,6 +76,7 @@ matrix:
cache:
directories:
- $HOME/.composer/cache
+ - $HOME/doxygen/doxygen-$DOXY_VER/bin
diff --git a/tests/travis/gen_apidocs.sh b/tests/travis/gen_apidocs.sh
index dc25347c6..248818117 100755
--- a/tests/travis/gen_apidocs.sh
+++ b/tests/travis/gen_apidocs.sh
@@ -34,25 +34,42 @@ if [[ "$TRAVIS_JOB_NUMBER" != "${TRAVIS_BUILD_NUMBER}.1" ]]; then
exit
fi
-# @TODO get newer doxygen
-echo "Doxygen version 1.7 is too old for us :("
-doxygen --version
+# Get newer Doxygen
+#echo "Doxygen version 1.7 is too old for us :("
+#doxygen --version
-# Only build API documentation for master branch push
-if [[ "$TRAVIS_EVENT_TYPE" != "push" ]] || [[ "$TRAVIS_BRANCH" != "master" ]]; then
- echo "Conditions not met to build API documentation."
- echo "We are finished ..."
- exit
+# Travis CI has an old Doxygen 1.7 build, so we fetch a recent static binary
+export DOXY_BINPATH=$HOME/doxygen/doxygen-$DOXY_VER/bin
+if [ ! -e "$DOXY_BINPATH/doxygen" ]; then
+ echo "Installing newer Doxygen $DOXY_VER ..."
+ mkdir -p $HOME/doxygen && cd $HOME/doxygen
+ wget -O - http://ftp.stack.nl/pub/users/dimitri/doxygen-$DOXY_VER.linux.bin.tar.gz | tar xz
+ export PATH=$PATH:$DOXY_BINPATH
fi
+echo "Doxygen version"
+doxygen --version
-echo "Generating Doxygen API documentation for master ..."
-
+echo "Generating Doxygen API documentation ..."
cd $TRAVIS_BUILD_DIR
mkdir -p ./doc/html
-
-# Redirect stderr and stdout to log file and console
+# Redirect stderr and stdout to log file and console to be able to review documentation errors
doxygen $DOXYFILE 2>&1 | tee ./doc/html/doxygen.log
+
+# There is no sane way yet, to prevent missuse of the push tokens in our workflow.
+# We would need a way to limit a token to only push to gh-pages or a way to prevent
+# manipulations to travis scripts which is not possible because we want it to run
+# for pull requests.
+# There are protected branches in GitHub, but they do not work for forced pushes.
+exit
+
+# Only continue for master branch pushes
+if [[ "$TRAVIS_EVENT_TYPE" != "push" ]] || [[ "$TRAVIS_BRANCH" != "master" ]]; then
+ echo "Conditions not met to build API documentation."
+ echo "We are finished ..."
+# exit
+fi
+
# Check if GitHub token is configured in Travis to be able to push to the repo
if [ -z "$GHP_TOKEN" ]; then
echo "No GitHub token configured in Travis, can not deploy to gh-pages ..."
diff --git a/util/Doxyfile b/util/Doxyfile
index f6c0692ee..1bca6cbd4 100644
--- a/util/Doxyfile
+++ b/util/Doxyfile
@@ -23,3 +23,12 @@ ALIASES += "TODO=\todo"
ALIASES += "BUG=\bug"
ALIASES += "hooks=\xrefitem hooks \"Hooks\" \"Hooks List\""
ALIASES += "HOOKS=\hooks"
+# Output
+QUIET = YES
+WARNINGS = YES
+# Dot tool config
+HAVE_DOT = YES
+DOT_IMAGE_FORMAT = svg
+INTERACTIVE_SVG = YES
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = NO