travis: Add apidoc check
authorTobias Brunner <tobias@strongswan.org>
Thu, 30 Jun 2016 08:34:54 +0000 (10:34 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 5 Sep 2016 14:58:29 +0000 (16:58 +0200)
This requires at least Ubuntu 14.04 (the Doxygen version in 12.04 has some
issues with our Doxyfile and prints lots of warnings).

.travis.yml
scripts/test.sh

index 99176ba..70a69d5 100644 (file)
@@ -42,6 +42,8 @@ matrix:
     - compiler: gcc
       env: TEST=dist
     - compiler: gcc
+      env: TEST=apidoc
+    - compiler: gcc
       env: TEST=win64 MONOLITHIC=yes
     - compiler: gcc
       env: TEST=win32 MONOLITHIC=yes
index 9365492..5bb6192 100755 (executable)
@@ -110,6 +110,11 @@ osx)
 dist)
        TARGET=distcheck
        ;;
+apidoc)
+       DEPS="doxygen"
+       CONFIG="--disable-defaults"
+       TARGET=apidoc
+       ;;
 *)
        echo "$0: unknown test $TEST" >&2
        exit 1
@@ -146,5 +151,27 @@ CONFIG="$CONFIG
 
 echo "$ ./autogen.sh"
 ./autogen.sh || exit $?
-echo "$ CC=$CC CFLAGS=\"$CFLAGS\" ./configure $CONFIG && make $TARGET"
-CC="$CC" CFLAGS="$CFLAGS" ./configure $CONFIG && make -j4 $TARGET
+echo "$ CC=$CC CFLAGS=\"$CFLAGS\" ./configure $CONFIG"
+CC="$CC" CFLAGS="$CFLAGS" ./configure $CONFIG || exit $?
+
+case "$TEST" in
+apidoc)
+       exec 2>make.warnings
+       ;;
+*)
+       ;;
+esac
+
+echo "$ make $TARGET"
+make -j4 $TARGET
+
+case "$TEST" in
+apidoc)
+       if test -s make.warnings; then
+               cat make.warnings
+               exit 1
+       fi
+       ;;
+*)
+       ;;
+esac