-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
185 lines (183 loc) · 4.75 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
language: cpp
dist: trusty
env:
matrix:
include:
# code coverage:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- libfftw3-dev
- lcov
env: COMPILER=gcc GCC=7 COVERAGE=ON
# normal tests:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
- libfftw3-dev
env: COMPILER=gcc GCC=4.9
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- libfftw3-dev
env: COMPILER=gcc GCC=5
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- libfftw3-dev
env: COMPILER=gcc GCC=6
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- libfftw3-dev
env: COMPILER=gcc GCC=7
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- libfftw3-dev
env: COMPILER=gcc GCC=7 DISABLE_EXCEPTION=1
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-3.6
packages:
- g++-4.9
- clang-3.6
- libfftw3-dev
env: COMPILER=clang CLANG=3.6
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-3.9
packages:
- g++-4.9
- clang-3.9
- libfftw3-dev
env: COMPILER=clang CLANG=3.9
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- g++-4.9
- clang-4.0
- libfftw3-dev
env: COMPILER=clang CLANG=4.0
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- g++-4.9
- clang-5.0
- libfftw3-dev
env: COMPILER=clang CLANG=5.0
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
packages:
- clang-6.0
- libfftw3-dev
env: COMPILER=clang CLANG=6.0
# osx 10.11
- os: osx
osx_image: xcode8
compiler: clang
# osx 10.12
- os: osx
osx_image: xcode9.2
compiler: clang
# osx 10.13
- os: osx
osx_image: xcode10
compiler: clang
env:
global:
- MINCONDA_VERSION="latest"
- MINCONDA_LINUX="Linux-x86_64"
- MINCONDA_OSX="MacOSX-x86_64"
before_install:
- |
# Configure build variables
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$COMPILER" == "gcc" ]]; then
export CXX=g++-$GCC CC=gcc-$GCC;
fi
if [[ "$COMPILER" == "clang" ]]; then
export CXX=clang++-$CLANG CC=clang-$CLANG;
fi
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export CXX=clang++ CC=clang;
fi
install:
# Define the version of miniconda to download
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
MINCONDA_OS=$MINCONDA_LINUX;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
MINCONDA_OS=$MINCONDA_OSX;
fi
- wget --tries=10 "http://repo.continuum.io/miniconda/Miniconda3-$MINCONDA_VERSION-$MINCONDA_OS.sh" -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda update -yq conda
- conda install -y cmake xtl==0.6.9 xtensor=0.21.2 nlohmann_json=3.7.1 -c conda-forge
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
conda install -y fftw -c conda-forge
fi
# Testing
- mkdir $TRAVIS_BUILD_DIR/build
- cd $TRAVIS_BUILD_DIR/build
- cmake -DDOWNLOAD_GTEST=ON -DCOVERAGE=$COVERAGE ..
- make -j2 test_xtensor-fftw VERBOSE=1
- if [[ "$COVERAGE" == "ON" ]]; then gem install coveralls-lcov; fi
script:
- cd test
- ./test_xtensor-fftw
after_success:
- |
if [[ "${COVERAGE}" == "ON" ]]; then
cd ${TRAVIS_BUILD_DIR}/build
ls
ls test
lcov --directory . --capture --output-file coverage.info # capture coverage info
lcov --remove coverage.info 'tests/*' '/usr/*' 'miniconda/*' --output-file coverage.info # filter out system and test code and external includes
lcov --list coverage.info # debug before upload
coveralls-lcov coverage.info # uploads to coveralls
fi