From 204997112044a0920f3b379321c31274f5c73cb7 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 22 Dec 2017 22:22:34 +0000 Subject: Improving travis configuration --- scripts/travis_build | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 scripts/travis_build (limited to 'scripts/travis_build') diff --git a/scripts/travis_build b/scripts/travis_build new file mode 100755 index 00000000..3cca70a2 --- /dev/null +++ b/scripts/travis_build @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# check compiler versions +$CC --version +$CXX --version + +# go to correct directory +cd $TRAVIS_BUILD_DIR + +# start building +mkdir -p build +cd build +cmake .. +make +cd tests +ctest +cd ../.. + +# update docs if we are on the master branch +if [[ "$TRAVIS_BRANCH" == "master" ]]; then + if [ -d "$TRAVIS_BUILD_DIR/build/doc_doxygen/html" ]; then + git clone -b gh-pages "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git" YAGE_gh-pages + cd YAGE_gh-pages + git config user.name "TravisBot" + git config user.email "" + rm -rf * + cp -r ../build/doc_doxygen/html/* . + git add -A . + git commit -m "Rebuilding documentation" + git push -q origin gh-pages + cd .. + fi +fi -- cgit