← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/build_docs_on_travis into lp:widelands

 

SirVer has proposed merging lp:~widelands-dev/widelands/build_docs_on_travis into lp:widelands.

Commit message:
Build documentation on travis, so that we get notified of errors earlier.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/build_docs_on_travis/+merge/315431
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/build_docs_on_travis into lp:widelands.
=== modified file '.travis.sh'
--- .travis.sh	2016-08-27 09:46:22 +0000
+++ .travis.sh	2017-01-24 07:39:35 +0000
@@ -33,6 +33,8 @@
    libsdl2-mixer-dev \
    libsdl2-net-dev \
    libsdl2-ttf-dev \
+   texlive-latex-base \
+   python-sphinx \
 ; do sleep 10; done
 
 # Configure the build
@@ -40,14 +42,26 @@
 cd build
 cmake .. -DCMAKE_BUILD_TYPE:STRING="$BUILD_TYPE"
 
-# Any codecheck warning is an error in Debug builds. Keep the codebase clean!!
 if [ "$BUILD_TYPE" == "Debug" ]; then
+   # Any codecheck warning is an error in Debug builds. Keep the codebase
+   # clean!!
    # Suppress color output.
    TERM=dumb make -j1 codecheck 2>&1 | tee codecheck.out
    if grep '^[/_.a-zA-Z]\+:[0-9]\+:' codecheck.out; then 
-      echo "You have codecheck warnings (see above) Please fix."
+      echo "You have codecheck warnings (see above). Please fix."
       exit 1 # CodeCheck warnings.
    fi
+
+   # The same goes for errors in the documentation.
+   pushd ../doc/sphinx
+   ./extract_rst.py
+   sphinx-build -w warnings.out -N -b html -d build/doctrees source build/html
+   if [ -s warnings.out ]; then
+      cat warnings.out
+      echo "You have warnings in the documentation (see above). Please fix."
+      exit 1
+   fi
+   popd
 fi
 
 # Do the actual build.


References