1language: cpp
2
3# NOTE: The COMPILER variable is unused. It simply makes the display on
4# travis-ci.org more readable.
5matrix:
6    include:
7        - compiler: gcc
8          env: COMPILER=g++-4.6     STD=c++0x BUILD_TYPE=Coverage
9        - compiler: gcc
10          env: COMPILER=g++-4.6     STD=c++0x BUILD_TYPE=Debug
11        - compiler: gcc
12          env: COMPILER=g++-4.6     STD=c++0x BUILD_TYPE=Release
13        - compiler: gcc
14          env: COMPILER=g++-4.8     STD=c++11 BUILD_TYPE=Debug
15        - compiler: gcc
16          env: COMPILER=g++-4.8     STD=c++11 BUILD_TYPE=Release
17        - compiler: clang
18          env: COMPILER=clang++-3.6 STD=c++11 BUILD_TYPE=Debug
19        - compiler: clang
20          env: COMPILER=clang++-3.6 STD=c++11 BUILD_TYPE=Release
21
22before_script:
23    - source .travis-setup.sh
24    - mkdir build && cd build
25
26install:
27  - if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
28      PATH=~/.local/bin:${PATH};
29      pip install --user --upgrade pip;
30      pip install --user cpp-coveralls;
31    fi
32
33script:
34    - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS="-std=${STD}"
35    - make
36    - make CTEST_OUTPUT_ON_FAILURE=1 test
37
38after_success:
39  - if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
40      coveralls --include src --include include --gcov-options '\-lp' --root .. --build-root .;
41    fi
42