diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-12-22 22:37:58 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-12-22 22:37:58 +0000 |
commit | 137994df5ca3aa3fba97c0e1718ec45af309bebe (patch) | |
tree | 450d879b5b30c0571ce7ed1928d337ce7146ab25 /scripts/travis_build | |
parent | 224e252ca23d5dcaef2f6236a497e6f42cf49016 (diff) | |
parent | 0f9d8a7f951a58252175c0b3280f24ef6529150f (diff) | |
download | YAGE-137994df5ca3aa3fba97c0e1718ec45af309bebe.tar.gz YAGE-137994df5ca3aa3fba97c0e1718ec45af309bebe.zip |
Merge branch 'develop'
Diffstat (limited to 'scripts/travis_build')
-rwxr-xr-x | scripts/travis_build | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/travis_build b/scripts/travis_build new file mode 100755 index 00000000..40c774eb --- /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" && $BUILD_DOCS -eq 1 ]]; 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 "[Travis] Rebuilding documentation" + git push -q origin gh-pages + cd .. + fi +fi |