From a7514d20183e4b217d2036b9e41b6c97f80a6580 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Tue, 5 Aug 2014 14:24:11 +0200 Subject: [PATCH] Added .travis.yml --- .travis.yml | 21 +++++++++++++++++++++ README.md | 5 +++++ contrib/utilities/run_travis.sh | 23 +++++++++++++++++++++++ contrib/utilities/setup_travis.sh | 17 +++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 .travis.yml create mode 100755 contrib/utilities/run_travis.sh create mode 100755 contrib/utilities/setup_travis.sh 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 -- 2.39.5