-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
72 lines (62 loc) · 1.87 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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"