Skip to content
Browse files

Add automatic documentation generation with doxygen via travis

  • Loading branch information...
1 parent a62af5d commit ac26170634707e9f96274960ea3488a1c24853bb @Nothing4You Nothing4You committed
Showing with 1,831 additions and 1 deletion.
  1. +19 −0 .travis-generate-docs.sh
  2. +16 −1 .travis.yml
  3. +1,796 −0 Doxyfile
View
19 .travis-generate-docs.sh
@@ -0,0 +1,19 @@
+#!/bin/bash -x
+
+echo "Generating docs with doxygen..."
+
+doxygen
+
+cd "$HOME"
+git config --global user.email "travis@travis-ci.org"
+git config --global user.name "travis-ci"
+git clone --branch=gh-pages https://${GH_TOKEN}@github.com/znc/znc gh-pages || exit 1
+
+cd gh-pages
+git rm -rf *
+cp -rf "$TRAVIS_BUILD_DIR"/doc/html/* ./ || exit 1
+git add .
+git commit -m "Latest docs on successful travis build $TRAVIS_BUILD_NUMBER (commit $TRAVIS_COMMIT) auto-pushed to gh-pages"
+git push origin gh-pages
+
+echo "Published docs to gh-pages."
View
17 .travis.yml
@@ -3,7 +3,10 @@ compiler:
- gcc
- clang
env:
- - CFGFLAGS= MYCXXFLAGS= MYLDFLAGS=
+ matrix:
+ - CFGFLAGS= MYCXXFLAGS= MYLDFLAGS=
+ global:
+ secure: <<TOKEN>>
matrix:
include:
- compiler: clang
@@ -15,7 +18,9 @@ before_install:
- sudo apt-get install -qq libperl-dev python3-dev tcl-dev libsasl2-dev libgtest-dev libicu-dev
- apt-cache show swig
- ( cd ~ && wget http://prdownloads.sourceforge.net/swig/swig-2.0.8.tar.gz && tar xvf swig-2.0.8.tar.gz && cd swig-2.0.8 && ./configure && make && sudo make install )
+ - sudo apt-get install doxygen graphviz
script:
+ - curl -o travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py
- ./bootstrap.sh
- mkdir build
- cd build
@@ -24,6 +29,16 @@ script:
- make V=1
- make V=1 test
- sudo make install
+ - cd ..
+after_success:
+ - python travis_after_all.py
+ - cat .to_export_back
+ - export $(cat .to_export_back)
+ - |
+ if [ "$BUILD_LEADER" == "YES" ] && [ "$BUILD_AGGREGATE_STATUS" == "others_succeeded" ] && [ "$TRAVIS_REPO_SLUG" == "znc/znc" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
+ echo "All builds passed!"
+ ./.travis-generate-docs.sh
+ fi
notifications:
irc:
channels:
View
1,796 Doxyfile
1,796 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit ac26170

Please sign in to comment.
Something went wrong with that request. Please try again.