-
Notifications
You must be signed in to change notification settings - Fork 112
/
.travis.yml
72 lines (66 loc) · 1.63 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: cpp
env:
global:
- OMP_NUM_THREADS=4
- BOOST_BASENAME=boost_1_62_0
matrix:
include:
- compiler: gcc
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- BUILD_EXAMPLES=ON
- TEST_COVERAGE=ON
- TEST_PYTHON=ON
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
- lcov
- openmpi-bin
- libopenmpi-dev
- python3-scipy
- compiler: clang
env:
- BUILD_EXAMPLES=OFF
- TEST_COVERAGE=OFF
- TEST_PYTHON=OFF
- os: osx
osx_image: xcode9.1
env:
- BUILD_EXAMPLES=OFF
- TEST_COVERAGE=OFF
- TEST_PYTHON=OFF
cache:
directories:
- ${HOME}/${BOOST_BASENAME}/boost
- ${HOME}/${BOOST_BASENAME}/stage/lib
before_install:
- eval "${MATRIX_EVAL}"
- |
if [ "$TRAVIS_OS_NAME" = "linux" ] ; then
source .travis/install_boost.sh
fi
script:
- mkdir -p build && cd build
- |
if [ "$CC" = "clang" ] ; then
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(dirname $(which clang++))/../lib
fi
- |
cmake -DAMGCL_TEST_COVERAGE=${TEST_COVERAGE} \
-DAMGCL_BUILD_TESTS=ON \
-DAMGCL_BUILD_EXAMPLES=${BUILD_EXAMPLES} \
-DAMGCL_HAVE_PYTHON=${TEST_PYTHON} \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 ..
- make
- ctest --output-on-failure
after_success:
- |
if [ "$TEST_COVERAGE" = "ON" ]; then
lcov --directory tests --base-directory ../amgcl --capture --output-file coverage.info
lcov --remove coverage.info '/usr*' -o coverage.info
bash <(curl -s https://codecov.io/bash)
fi