-
Notifications
You must be signed in to change notification settings - Fork 4
/
xtensor.travis.yml
224 lines (220 loc) · 6.54 KB
/
xtensor.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
language: cpp
dist: xenial
env:
matrix:
fast_finish: true
include:
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env: COMPILER=gcc GCC=4.9 CHECK_CYCLIC_INCLUDES=1
- os: linux
if: branch = coverity
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env: COMPILER=gcc GCC=7 COVERITY_SCAN=1
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env: COMPILER=gcc GCC=5 DISABLE_XSIMD=1
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env: COMPILER=gcc GCC=6 DISABLE_EXCEPTION=1
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env: COMPILER=gcc GCC=6 COLUMN_MAJOR_LAYOUT=1
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env: COMPILER=gcc GCC=7
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env: COMPILER=gcc GCC=7 ENABLE_TBB=1
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env: COMPILER=gcc GCC=7 ENABLE_OPENMP=1
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
env: COMPILER=gcc GCC=8 BOUND_CHECKS=1 BUILD_BENCHMARK=1
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
env: COMPILER=gcc GCC=8 ENABLE_CPP17=1
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
env: COMPILER=gcc GCC=9
- os: linux
if: branch = master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
env: COMPILER=gcc GCC=9 ENABLE_CPP20=1
- os: osx
if: branch = master
osx_image: xcode9
compiler: clang
allow_failures:
- env: COMPILER=gcc GCC=9 ENABLE_CPP20=1
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
export CXX=g++-$GCC CC=gcc-$GCC;
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 "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 config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda env create --file environment-dev.yml
- source activate xtensor
- |
if [[ "$CHECK_CYCLIC_INCLUDES" == 1 ]]; then
set -e
conda install networkx -c conda-forge
cd tools
chmod +x check_circular.py
./check_circular.py
cd ..
set +e
fi
- if [[ "$ENABLE_TBB" == 1 ]]; then
conda install tbb-devel -c conda-forge;
fi
# download & install coverity tool
- |
if [[ "$COVERITY_SCAN" == 1 ]]; then
wget https://scan.coverity.com/download/linux64 --post-data "token=dhiOJUHtbFzXmULLZQCwiQ&project=xTensor" -O coverity_tool.tgz
tar xaf coverity_tool.tgz
rm coverity_tool.tgz
mv cov-analysis-linux64-* cov-analysis-linux64
export PATH="${PATH}:${PWD}/cov-analysis-linux64/bin"
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$COMPILER" == "gcc" ]]; then
cov-configure --template --comptype gcc --compiler g++-$GCC
fi
fi
fi
# Testing
- mkdir build
- cd build
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cat /proc/cpuinfo;
ldd --version;
fi
- if [[ "$BOUND_CHECKS" == 1 ]]; then
cmake -DXTENSOR_ENABLE_ASSERT=ON -DDOWNLOAD_GTEST=ON -DBUILD_BENCHMARK=ON ..;
elif [[ "$COLUMN_MAJOR_LAYOUT" == 1 ]]; then
cmake -DDOWNLOAD_GTEST=ON -DDEFAULT_COLUMN_MAJOR=ON ..;
elif [[ "$DISABLE_XSIMD" == 1 ]]; then
cmake -DDOWNLOAD_GTEST=ON ..;
elif [[ "$ENABLE_TBB" == 1 ]]; then
cmake -DDOWNLOAD_GTEST=ON -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=/home/travis/miniconda/include -DTBB_LIBRARY=/home/travis/miniconda/lib ..;
elif [[ "$ENABLE_OPENMP" == 1 ]]; then
cmake -DDOWNLOAD_GTEST=ON -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_OPENMP=ON ..;
elif [[ "$ENABLE_CPP17" == 1 ]]; then
cmake -DDOWNLOAD_GTEST=ON -DXTENSOR_USE_XSIMD=ON -DCPP17=ON ..;
elif [[ "$ENABLE_CPP20" == 1 ]]; then
cmake -DDOWNLOAD_GTEST=ON -DXTENSOR_USE_XSIMD=ON -DCPP20=ON ..;
elif [[ "$DISABLE_EXCEPTION" == 1 ]]; then
cmake -DDOWNLOAD_GTEST=ON -DXTENSOR_DISABLE_EXCEPTIONS=ON ..;
else
cmake -DXTENSOR_USE_XSIMD=ON -DDOWNLOAD_GTEST=ON ..;
fi
# build & prepare tarball with coverity scanner
- |
if [[ "$COVERITY_SCAN" == 1 ]]; then
cov-build --dir cov-int make -j2 test_xtensor_core_lib
tar czvf cov-int.tgz cov-int
curl --form token=dhiOJUHtbFzXmULLZQCwiQ \
--form email=jaeho.kim@siemens-healthineers.com \
--form file=@cov-int.tgz \
--form version="CoverityBranch" \
--form description="Automatic Coverity Scan build from Coverity branch" \
https://scan.coverity.com/builds?project=xTensor
fi
make -j2 test_xtensor_lib
- if [[ "$BUILD_BENCHMARK" == 1 ]]; then
make -j2 benchmark_xtensor ;
fi
- cd test
script:
- ./test_xtensor_lib