Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (62 sloc) 1.87 KB
language: C++
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- g++-5
- lcov
env:
- MATRIX_EVAL="CC=gcc-5 CXX=g++-5"
# - os: linux
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - cmake
# - patchelf
# - g++-6
# env:
# - MATRIX_EVAL="CC=gcc-6 CXX=g++-6"
before_install:
- eval "${MATRIX_EVAL}"
sudo: false
dist: trusty
install:
# Print out some info
- uname -r
- cmake --version
# Obtain the dependencies
- export MIRP_VER=$(cat VERSION)
- export DEPS_VER=$(cat VERSION_DEPS)
- export DEPS_BASE="mirp_deps_v${DEPS_VER}_linux_ivybridge"
- wget https://www.bennyp.org/research/mirp/download/${DEPS_BASE}.tar.bz2
- tar -xvf ${DEPS_BASE}.tar.bz2
- export DEPDIR="$(pwd)/${DEPS_BASE}"
- export INSTALLDIR="$(pwd)/mirp_install"
- export LD_LIBRARY_PATH="${DEPDIR}/lib:${DEPDIR}/lib64:${LD_LIBRARY_PATH}"
script:
# Build MIRP
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${DEPDIR} -DCMAKE_INSTALL_PREFIX="${INSTALLDIR}" -DCMAKE_C_FLAGS="-fprofile-arcs -ftest-coverage" -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage" ../
- make install
- ctest
# Build the examples against the installed MIRP library
- cd ../
- mkdir build_examples
- cd build_examples
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="${DEPDIR};${INSTALLDIR}" ../examples
- make
- ctest
after_success:
- cd ${TRAVIS_BUILD_DIR}/build
- lcov --directory . --capture --output-file coverage.info
- lcov --remove coverage.info '/usr/*' --output-file coverage.info
- lcov --list coverage.info
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"