.travis.yml 2.12 KB
Newer Older
Gauthier Quesnel's avatar
Gauthier Quesnel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
language: cpp

os:
  - linux
  - osx

branches:
  only:
    - master
    - test

addons:
  apt:
    packages: &common_packages
      - lcov
      - cmake
      - make
      - gdb

env:
  jobs:
    - BOGUS_JOB=true

jobs:
  exclude:
    - env: BOGUS_JOB=true

  include:
    - os: linux
      dist: xenial
      env: CXX_COMPILER=g++-9 CXX_FLAGS=-std=c++2a
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - *common_packages
            - g++-9
    - os: linux
      env: CXX_COMPILER="clang++-9 -stdlib=libc++" CXX_FLAGS=-std=c++2a
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-9
          packages:
            - *common_packages
            - clang-9
            - libc++-9-dev
    - os: osx
      osx_image: xcode11.2
      env: CXX_COMPILER=clang++ CXXSTD=c++2a

install:
  - cd ..
  - cd irritator
  - mkdir build
  - cd build
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then CXXFLAGS="$CXX_FLAGS" cmake -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug .. ; fi
  - if [ "$TRAVIS_OS_NAME" != "osx" ]; then CXXFLAGS="$CXX_FLAGS" -g -O0 --coverage -fprofile-arcs -ftest-coverage" cmake -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None .. ; fi

script:
  - make
  - sudo make install
  - ctest

after_success:
  - if [ "$TRAVIS_OS_NAME" != "osx" ]; then cd ${TRAVIS_BUILD_DIR} ; fi
  - if [ "$TRAVIS_OS_NAME" != "osx" ]; then lcov --directory . --capture --output-file coverage.info ; fi
  - if [ "$TRAVIS_OS_NAME" != "osx" ]; then lcov --remove coverage.info '/usr/*' --output-file coverage.info ; fi
  - if [ "$TRAVIS_OS_NAME" != "osx" ]; then lcov --remove coverage.info 'external/*' --output-file coverage.info ; fi
  - if [ "$TRAVIS_OS_NAME" != "osx" ]; then lcov --list coverage.info ; fi
  - if [ "$TRAVIS_OS_NAME" != "osx" ]; then bash <(curl -s https://codecov.io/bash) ; fi

notifications:
  email:
    on_success: always