From: Luca Heltai Date: Tue, 5 Aug 2014 12:24:11 +0000 (+0200) Subject: Added .travis.yml X-Git-Tag: v8.2.0-rc1~214^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7514d20183e4b217d2036b9e41b6c97f80a6580;p=dealii.git Added .travis.yml --- diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..08b449bd0a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: C++ + +before_install: ./contrib/utilities/setup_travis.sh + +compiler: +- clang +- gcc + +script: ./contrib/utilities/run_travis.sh $CI_TEST_SUITE $CI_BUILD_TYPE + +branches: + only: + - master + +env: + - CI_TEST_SUITE=mini CI_BUILD_TYPE=Debug + - CI_TEST_SUITE=mini CI_BUILD_TYPE=Release + - CI_TEST_SUITE=build CI_BUILD_TYPE=Debug + - CI_TEST_SUITE=build CI_BUILD_TYPE=Release +# This is way too long. We should find a way to do this in little pieces... +# - CI_TEST_SUITE=tests diff --git a/README.md b/README.md index 1b29ac56f8..a49218748c 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,8 @@ Further information: For further information have a look at ./doc/index.html or at http://www.dealii.org. + +Continuous Integration Status: +------------------------ + +[![Build Status](https://travis-ci.org/dealii/dealii.png)](https://travis-ci.org/dealii/dealii) diff --git a/contrib/utilities/run_travis.sh b/contrib/utilities/run_travis.sh new file mode 100755 index 0000000000..63ac0eecaa --- /dev/null +++ b/contrib/utilities/run_travis.sh @@ -0,0 +1,23 @@ +#!/bin/sh +case $1 in +mini) + echo "Building and running mini tests in $2 mode." + mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=$2 ../ && make -j4 && make tests + ;; +build) + echo "Running build tests." + mkdir build_test + cd build_test + ctest -DCMAKE_BUILD_TYPE=$2 -V -j4 -S ../tests/run_buildtest.cmake + ;; +tests) + echo "Running full testsuite." + mkdir full_tests + cd full_tests + ctest -DCMAKE_BUILD_TYPE=$2 -V -j4 -S ../tests/run_testsuite.cmake + ;; +*) + echo "Unrecognized test type! [$1]" + exit 1 +esac + diff --git a/contrib/utilities/setup_travis.sh b/contrib/utilities/setup_travis.sh new file mode 100755 index 0000000000..ec39454533 --- /dev/null +++ b/contrib/utilities/setup_travis.sh @@ -0,0 +1,17 @@ +#/bin/sh -f + +# things to do for travis-ci in the before_install section + +if ( test "`uname -s`" = "Darwin" ) +then + #cmake v2.8.12 is installed on the Mac workers now + #brew update + #brew install cmake + echo +else + #install a newer cmake since at this time Travis only has version 2.8.7 + sudo apt-get install build-essential + echo "yes" | sudo add-apt-repository ppa:kalakris/cmake + sudo apt-get update -qq + sudo apt-get install cmake +fi