Includes: - A cmake script to setup lcov targets - A predefined cppast_coverage target (Disabled by default, enable by setting CPPAST_TEST_GCOV var to TRUE/ON/1) - Coverage report submission to coveralls.io
67 lines
2.8 KiB
YAML
67 lines
2.8 KiB
YAML
language: cpp
|
|
|
|
matrix:
|
|
include:
|
|
- os: linux
|
|
compiler: gcc
|
|
addons:
|
|
apt:
|
|
sources: ['ubuntu-toolchain-r-test']
|
|
packages: ['g++-5']
|
|
env: TOOLSET=g++-5 LLVM_DOWNLOAD_OS_NAME=x86_64-linux-gnu-ubuntu-14.04 LLVM_VERSION=3.9.1
|
|
|
|
- os: linux
|
|
compiler: gcc
|
|
addons:
|
|
apt:
|
|
sources: ['ubuntu-toolchain-r-test']
|
|
packages: ['g++-5', 'lcov']
|
|
env: TOOLSET=g++-5 LLVM_DOWNLOAD_OS_NAME=x86_64-linux-gnu-ubuntu-14.04 LLVM_VERSION=4.0.0 CPPAST_TEST_GCOV=ON
|
|
|
|
- os: linux
|
|
compiler: clang
|
|
addons:
|
|
apt:
|
|
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.9']
|
|
packages: ['g++-4.9', 'g++-5', 'clang-3.9']
|
|
env: TOOLSET=clang++-3.9 LLVM_DOWNLOAD_OS_NAME=x86_64-linux-gnu-ubuntu-14.04 LLVM_VERSION=3.9.1
|
|
|
|
- os: linux
|
|
compiler: clang
|
|
addons:
|
|
apt:
|
|
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.9']
|
|
packages: ['g++-4.9', 'g++-5', 'clang-3.9']
|
|
env: TOOLSET=clang++-3.9 LLVM_DOWNLOAD_OS_NAME=x86_64-linux-gnu-ubuntu-14.04 LLVM_VERSION=4.0.0
|
|
|
|
- os: osx
|
|
compiler: clang
|
|
env: TOOLSET=clang++ LLVM_DOWNLOAD_OS_NAME=x86_64-apple-darwin LLVM_VERSION=4.0.0
|
|
|
|
install:
|
|
- cd ../
|
|
|
|
- if [[ "$CPPAST_TEST_GCOV" == "ON" ]]; then pip install --user cpp-coveralls; fi
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget --no-check-certificate https://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -xzf cmake-3.3.1-Linux-x86_64.tar.gz; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CMAKE=$TRAVIS_BUILD_DIR/../cmake-3.3.1-Linux-x86_64/bin/cmake; fi
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget --no-check-certificate https://cmake.org/files/v3.3/cmake-3.3.0-Darwin-x86_64.tar.gz; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -xzf cmake-3.3.0-Darwin-x86_64.tar.gz && ls && ls cmake-3.3.0-Darwin-x86_64; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CMAKE=$TRAVIS_BUILD_DIR/../cmake-3.3.0-Darwin-x86_64/CMake.app/Contents/bin/cmake; fi
|
|
|
|
- export CXX=$TOOLSET
|
|
- $CXX --version
|
|
- $CMAKE --version
|
|
|
|
- cd cppast/
|
|
|
|
script:
|
|
- mkdir build/ && cd build/
|
|
- $CMAKE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-Werror -pedantic -Wall -Wextra -Wconversion -Wsign-conversion -Wno-parentheses -Wno-assume" -DLLVM_DOWNLOAD_OS_NAME=$LLVM_DOWNLOAD_OS_NAME -DLLVM_PREFERRED_VERSION=$LLVM_VERSION ../ -DCPPAST_TEST_GCOV=$CPPAST_TEST_GCOV
|
|
- $CMAKE --build .
|
|
- if [[ "$LLVM_VERSION" == "4.0.0" ]]; then ./test/cppast_test \*; else ./test/cppast_test; fi
|
|
|
|
after_script:
|
|
- if [[ "$CPPAST_TEST_GCOV" == "ON" ]]; then $CMAKE --build . --target cppast_coverage && cd ../ && coveralls --no-gcov --lcov-file build/cppast_coverage.info.cleaned; fi
|