lzw-assignment/.travis.yml
2018-05-23 16:27:13 +02:00

74 lines
1.7 KiB
YAML

sudo: false
language: cpp
compiler: clang
os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- g++-7
- clang-5.0
- lcov
matrix:
include:
# Linux Clang C++17
- env:
BUILD_TYPE=Debug
BIN_DIR=debug
CC=clang-5.0
CXX=clang++-5.0
- env:
BUILD_TYPE=Release
BIN_DIR=bin
CC=clang-5.0
CXX=clang++-5.0
# Linux GCC C++17
- env:
- MATRIX_EVAL="BUILD_TYPE=Debug && BIN_DIR=debug && CC=gcc-7 && CXX=g++-7"
compiler: gcc
before_install:
- eval "${MATRIX_EVAL}"
- env:
- MATRIX_EVAL="BUILD_TYPE=Release && BIN_DIR=bin && CC=gcc-7 && CXX=g++-7"
compiler: gcc
before_install:
- eval "${MATRIX_EVAL}"
# OSX Clang
- os: osx
osx_image: xcode9.3
env:
BUILD_TYPE=Release
BIN_DIR=bin
before_install:
brew update
install:
- brew upgrade cmake
- brew install lcov
- os: osx
osx_image: xcode9.3
env:
BUILD_TYPE=Debug
BIN_DIR=debug
before_install:
brew update
install:
- brew install lcov
- brew upgrade cmake
script:
- cd build
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
- make -j
after_success:
- cd ${TRAVIS_BUILD_DIR}
- lcov --directory . --capture --output-file coverage.info # capture coverage info
- lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
- lcov --list coverage.info
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"