.travis.yml 1.6 KB
Newer Older
N
Niels 已提交
1 2
language: cpp

N
Niels 已提交
3 4
sudo: false

N
Niels 已提交
5
# from http://stackoverflow.com/a/32127147/266378
N
Niels 已提交
6 7 8 9 10 11 12 13 14 15
matrix:
  include:
    - os: linux
      compiler: gcc
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: ['g++-4.9', 'valgrind', 'python-pip', 'python-yaml']
      before_script:
        - pip install --user git+git://github.com/eddyxu/cpp-coveralls.git
N
cleanup  
Niels 已提交
16 17 18 19 20 21
      after_success:
        - make clean
        - touch src/json.hpp
        - make json_unit CXXFLAGS="-fprofile-arcs -ftest-coverage -std=c++11 -lstdc++" CXX=$COMPILER
        - ./json_unit "*"
        - coveralls --exclude test/catch.hpp --exclude test/unit.cpp --include src/json.hpp --gcov-options '\-lp' --gcov 'gcov-4.9'
N
Niels 已提交
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
      env: COMPILER=g++-4.9

    - os: linux
      compiler: gcc
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: ['g++-5', 'valgrind']
      env: COMPILER=g++-5

    - os: linux
      compiler: clang
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
          packages: ['clang-3.6', 'valgrind']
      env: COMPILER=clang++-3.6
N
Niels 已提交
39

N
Niels 已提交
40 41 42 43
    - os: linux
      compiler: clang
      addons:
        apt:
N
Niels 已提交
44
          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
N
Niels 已提交
45 46
          packages: ['clang-3.7', 'valgrind']
      env: COMPILER=clang++-3.7
N
Niels 已提交
47 48 49 50 51 52 53
     
    - os: osx
      compiler: clang
      env: COMPILER=clang
      before_install:
        - brew update
        - brew install valgrind
N
Niels 已提交
54

N
Niels 已提交
55
script:
N
try  
Niels 已提交
56
  - make CXX=$COMPILER CXXFLAGS="-lstdc++"
57
  - ./json_unit "*"
N
Niels 已提交
58
  - valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./json_unit