Blame .travis.yml

rpm-build a7f80b
language: cpp
rpm-build a7f80b
sudo: false
rpm-build a7f80b
rpm-build a7f80b
branches:
rpm-build a7f80b
  except:
rpm-build a7f80b
  - /dev-appveyor.*/
rpm-build a7f80b
rpm-build a7f80b
common_sources: &all_sources
rpm-build a7f80b
  - ubuntu-toolchain-r-test
rpm-build a7f80b
  - llvm-toolchain-trusty
rpm-build a7f80b
  - llvm-toolchain-trusty-3.9
rpm-build a7f80b
  - llvm-toolchain-trusty-4.0
rpm-build a7f80b
  - llvm-toolchain-trusty-5.0
rpm-build a7f80b
rpm-build a7f80b
matrix:
rpm-build a7f80b
  include:
rpm-build a7f80b
rpm-build a7f80b
    # 1/ Linux Clang Builds
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
        apt:
rpm-build a7f80b
          sources: *all_sources
rpm-build a7f80b
          packages: ['clang-3.5']
rpm-build a7f80b
      env: COMPILER='clang++-3.5'
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
        apt:
rpm-build a7f80b
          sources: *all_sources
rpm-build a7f80b
          packages: ['clang-3.6']
rpm-build a7f80b
      env: COMPILER='clang++-3.6'
rpm-build a7f80b
rpm-build a7f80b
    # Clang 3.7 is intentionally skipped as we cannot get it easily on
rpm-build a7f80b
    # TravisCI container
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
        apt:
rpm-build a7f80b
          sources: *all_sources
rpm-build a7f80b
          packages: ['lcov', 'clang-3.8']
rpm-build a7f80b
      env: COMPILER='clang++-3.8'
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
          apt:
rpm-build a7f80b
              sources: *all_sources
rpm-build a7f80b
              packages: ['clang-3.9']
rpm-build a7f80b
      env: COMPILER='clang++-3.9'
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
          apt:
rpm-build a7f80b
              sources: *all_sources
rpm-build a7f80b
              packages: ['clang-4.0']
rpm-build a7f80b
      env: COMPILER='clang++-4.0'
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
          apt:
rpm-build a7f80b
              sources: *all_sources
rpm-build a7f80b
              packages: ['clang-5.0']
rpm-build a7f80b
      env: COMPILER='clang++-5.0'
rpm-build a7f80b
rpm-build a7f80b
    # 2/ Linux GCC Builds
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: gcc
rpm-build a7f80b
      addons:
rpm-build a7f80b
        apt:
rpm-build a7f80b
         sources: *all_sources
rpm-build a7f80b
         packages: ['g++-4.8']
rpm-build a7f80b
      env: COMPILER='g++-4.8'
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: gcc
rpm-build a7f80b
      addons:
rpm-build a7f80b
        apt:
rpm-build a7f80b
          sources: *all_sources
rpm-build a7f80b
          packages: ['g++-4.9']
rpm-build a7f80b
      env: COMPILER='g++-4.9'
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: gcc
rpm-build a7f80b
      addons:
rpm-build a7f80b
        apt:
rpm-build a7f80b
          sources: *all_sources
rpm-build a7f80b
          packages: ['g++-5']
rpm-build a7f80b
      env: COMPILER='g++-5'
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: gcc
rpm-build a7f80b
      addons: &gcc6
rpm-build a7f80b
        apt:
rpm-build a7f80b
          sources: *all_sources
rpm-build a7f80b
          packages: ['g++-6']
rpm-build a7f80b
      env: COMPILER='g++-6'
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: gcc
rpm-build a7f80b
      addons: &gcc7
rpm-build a7f80b
        apt:
rpm-build a7f80b
          sources: *all_sources
rpm-build a7f80b
          packages: ['g++-7']
rpm-build a7f80b
      env: COMPILER='g++-7'
rpm-build a7f80b
rpm-build a7f80b
    # 3b/ Linux C++14 Clang builds
rpm-build a7f80b
    # Note that we need newer libstdc++ for C++14 support
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
          apt:
rpm-build a7f80b
              packages: ['clang-3.8', 'libstdc++-6-dev']
rpm-build a7f80b
              sources:
rpm-build a7f80b
                  - ubuntu-toolchain-r-test
rpm-build a7f80b
                  - llvm-toolchain-trusty
rpm-build a7f80b
      env: COMPILER='clang++-3.8' CPP14=1
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
          apt:
rpm-build a7f80b
              sources: *all_sources
rpm-build a7f80b
              packages: ['clang-3.9', 'libstdc++-6-dev']
rpm-build a7f80b
      env: COMPILER='clang++-3.9' CPP14=1
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
          apt:
rpm-build a7f80b
              sources: *all_sources
rpm-build a7f80b
              packages: ['clang-4.0', 'libstdc++-6-dev']
rpm-build a7f80b
      env: COMPILER='clang++-4.0' CPP14=1
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
          apt:
rpm-build a7f80b
              sources: *all_sources
rpm-build a7f80b
              packages: ['clang-5.0', 'libstdc++-6-dev']
rpm-build a7f80b
      env: COMPILER='clang++-5.0' CPP14=1
rpm-build a7f80b
rpm-build a7f80b
rpm-build a7f80b
    # 4a/ Linux C++14 GCC builds
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: gcc
rpm-build a7f80b
      addons: *gcc6
rpm-build a7f80b
      env: COMPILER='g++-6' CPP14=1
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: gcc
rpm-build a7f80b
      addons: *gcc7
rpm-build a7f80b
      env: COMPILER='g++-7' CPP14=1
rpm-build a7f80b
rpm-build a7f80b
    # 5/ OSX Clang Builds
rpm-build a7f80b
    - os: osx
rpm-build a7f80b
      osx_image: xcode7.3
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      env: COMPILER='clang++'
rpm-build a7f80b
rpm-build a7f80b
    - os: osx
rpm-build a7f80b
      osx_image: xcode8
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      env: COMPILER='clang++'
rpm-build a7f80b
rpm-build a7f80b
    - os: osx
rpm-build a7f80b
      osx_image: xcode9
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      env: COMPILER='clang++'
rpm-build a7f80b
rpm-build a7f80b
    - os: osx
rpm-build a7f80b
      osx_image: xcode9.1
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      env: COMPILER='clang++'
rpm-build a7f80b
rpm-build a7f80b
    - os: osx
rpm-build a7f80b
      osx_image: xcode9.1
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      env: COMPILER='clang++' CPP14=1
rpm-build a7f80b
rpm-build a7f80b
    # 6/ Special builds -- examples, coverage, valgrind, etc.
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: gcc
rpm-build a7f80b
      addons:
rpm-build a7f80b
        apt:
rpm-build a7f80b
          sources: *all_sources
rpm-build a7f80b
          packages: ['lcov', 'g++-7']
rpm-build a7f80b
      env: COMPILER='g++-7' CPP14=1 EXAMPLES=1 COVERAGE=1
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      addons:
rpm-build a7f80b
        apt:
rpm-build a7f80b
          packages: ['clang-3.8', 'lcov']
rpm-build a7f80b
          sources:
rpm-build a7f80b
            - ubuntu-toolchain-r-test
rpm-build a7f80b
            - llvm-toolchain-trusty
rpm-build a7f80b
      env: COMPILER='clang++-3.8' EXAMPLES=1 COVERAGE=1
rpm-build a7f80b
rpm-build a7f80b
    - os: linux
rpm-build a7f80b
      compiler: gcc
rpm-build a7f80b
      addons:
rpm-build a7f80b
        apt:
rpm-build a7f80b
          sources: *all_sources
rpm-build a7f80b
          packages: ['valgrind', 'lcov', 'g++-7']
rpm-build a7f80b
      env: COMPILER='g++-7' CPP14=1 VALGRIND=1      
rpm-build a7f80b
      
rpm-build a7f80b
    - os: osx
rpm-build a7f80b
      osx_image: xcode9.1
rpm-build a7f80b
      compiler: clang
rpm-build a7f80b
      env: COMPILER='clang++' CPP14=1 EXAMPLES=1 COVERAGE=1
rpm-build a7f80b
rpm-build a7f80b
install:
rpm-build a7f80b
  - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
rpm-build a7f80b
  - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
rpm-build a7f80b
  - |
rpm-build a7f80b
    if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
rpm-build a7f80b
      CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz"
rpm-build a7f80b
      mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
rpm-build a7f80b
      export PATH=${DEPS_DIR}/cmake/bin:${PATH}
rpm-build a7f80b
    elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
rpm-build a7f80b
        which cmake || brew install cmake;
rpm-build a7f80b
    fi
rpm-build a7f80b
rpm-build a7f80b
before_script:
rpm-build a7f80b
  - export CXX=${COMPILER}
rpm-build a7f80b
  - cd ${TRAVIS_BUILD_DIR}
rpm-build a7f80b
  # Regenerate single header file, so it is tested in the examples...
rpm-build a7f80b
  - python scripts/generateSingleHeader.py
rpm-build a7f80b
rpm-build a7f80b
  - |
rpm-build a7f80b
    # Use Debug builds for running Valgrind and building examples
rpm-build a7f80b
    cmake -H. -BBuild-Debug -DCMAKE_BUILD_TYPE=Debug -Wdev -DUSE_CPP14=${CPP14} -DCATCH_USE_VALGRIND=${VALGRIND} -DCATCH_BUILD_EXAMPLES=${EXAMPLES} -DCATCH_ENABLE_COVERAGE=${COVERAGE}
rpm-build a7f80b
    # Don't bother with release build for coverage build
rpm-build a7f80b
    cmake -H. -BBuild-Release -DCMAKE_BUILD_TYPE=Release -Wdev -DUSE_CPP14=${CPP14}
rpm-build a7f80b
rpm-build a7f80b
rpm-build a7f80b
script:
rpm-build a7f80b
  - |
rpm-build a7f80b
    cd Build-Debug
rpm-build a7f80b
    make -j 2
rpm-build a7f80b
    CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2
rpm-build a7f80b
    # Coverage collection does not work for OS X atm
rpm-build a7f80b
    echo "${TRAVIS_OS_NAME}";
rpm-build a7f80b
    echo "${COVERAGE}";
rpm-build a7f80b
    if [[ "${TRAVIS_OS_NAME}" == "linux" ]] && [[ "${COVERAGE}" == "1" ]]; then
rpm-build a7f80b
      make gcov
rpm-build a7f80b
      make lcov
rpm-build a7f80b
      bash <(curl -s https://codecov.io/bash) -X gcov || echo "Codecov did not collect coverage reports"
rpm-build a7f80b
    fi
rpm-build a7f80b
    # Go to release build
rpm-build a7f80b
    cd ../Build-Release
rpm-build a7f80b
    make -j 2
rpm-build a7f80b
    CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2