aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/travis_build
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-12-22 22:22:34 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-12-22 22:22:34 +0000
commit204997112044a0920f3b379321c31274f5c73cb7 (patch)
treeb96735ca7a73e4be1cef8f430587874386612389 /scripts/travis_build
parentc8b276a1fbf2669c1d77620c9d6aff0331ebed75 (diff)
downloadYAGE-204997112044a0920f3b379321c31274f5c73cb7.tar.gz
YAGE-204997112044a0920f3b379321c31274f5c73cb7.zip
Improving travis configuration
Diffstat (limited to 'scripts/travis_build')
-rwxr-xr-xscripts/travis_build33
1 files changed, 33 insertions, 0 deletions
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