forked from BlueBrain/HighFive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
138 lines (126 loc) · 4 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
# Adapted from various sources, including:
# - Louis Dionne's Hana: https://github.com/ldionne/hana
# - Paul Fultz II's FIT: https://github.com/pfultz2/Fit
# - Eric Niebler's range-v3: https://github.com/ericniebler/range-v3
# - Gabi Melman spdlog: https://github.com/gabime/spdlog
sudo: required
language: cpp
addons: &gcc7
apt:
packages:
- g++-7
- libboost-all-dev
- libhdf5-openmpi-dev
- libeigen3-dev
- ninja-build
sources:
- ubuntu-toolchain-r-test
matrix:
include:
# Older linux (trusty) with default gcc
# Install serial hdf5 + build serial
- os: linux
dist: trusty
env:
- HIGHFIVE_USE_XTENSOR=False
- HIGHFIVE_USE_OPENCV=False
- HIGHFIVE_PARALLEL_HDF5=False
- IS_BASE_ENVIRON=1
addons:
apt:
packages:
- libboost-all-dev
- libeigen3-dev
- libhdf5-serial-dev
- ninja-build
# Linux gcc-7
# Install parallel hdf5 + build parallel
- os: linux
dist: xenial
env:
- GCC_VERSION=7
- HIGHFIVE_USE_XTENSOR=True
- HIGHFIVE_USE_OPENCV=False
- HIGHFIVE_PARALLEL_HDF5=True
addons: *gcc7
# Mac OSX XCode 10
- os: osx
osx_image: xcode10.3
env:
- HIGHFIVE_USE_XTENSOR=True
- HIGHFIVE_USE_OPENCV=True
- HIGHFIVE_PARALLEL_HDF5=False
# Windows
- os: windows
env:
- HIGHFIVE_USE_XTENSOR=True
- HIGHFIVE_USE_OPENCV=True
- HIGHFIVE_PARALLEL_HDF5=False
env:
global:
- MINCONDA_VERSION="latest"
- MINCONDA_LINUX="Linux-x86_64"
- MINCONDA_OSX="MacOSX-x86_64"
install:
- export HOMEBREW_NO_AUTO_UPDATE=1 # for reproducibility, dont autoupdate
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
MINCONDA_OS=$MINCONDA_LINUX;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [ "$BREW_USE_LATEST" ]; then
brew update;
brew install hdf5; brew upgrade hdf5;
fi;
brew install boost hdf5 eigen ninja;
MINCONDA_OS=$MINCONDA_OSX;
fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
export CMAKE_GENERATOR="Visual Studio 15 2017 Win64" ;
export TESTS_TARGET="RUN_TESTS";
choco install --yes miniconda3 ;
source C:/Tools/miniconda3/Scripts/activate ;
else
export CMAKE_GENERATOR="Ninja" ;
export TESTS_TARGET="test";
wget "http://repo.continuum.io/miniconda/Miniconda3-$MINCONDA_VERSION-$MINCONDA_OS.sh" -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda ;
source $HOME/miniconda/bin/activate;
hash -r ;
fi
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda install -c conda-forge mamba
- if [[ "$HIGHFIVE_USE_XTENSOR" == "True" ]]; then
mamba install -c conda-forge xtl xsimd xtensor;
fi
- if [[ "$HIGHFIVE_USE_OPENCV" == "True" ]]; then
mamba install -c conda-forge libopencv opencv;
fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
mamba install -c conda-forge boost-cpp hdf5 eigen;
fi
before_script:
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
- if [ -n "$CLANG_VERSION" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CXX="clang++" CC="clang"; fi
- which $CXX
- which $CC
- $CXX --version
- cmake --version
script:
- cd ${TRAVIS_BUILD_DIR}
- mkdir -p build && pushd build
- >
cmake --warn-uninitialized --debug-output
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DHIGHFIVE_TEST_SINGLE_INCLUDES:BOOL=ON
-DHIGHFIVE_PARALLEL_HDF5:BOOL=${HIGHFIVE_PARALLEL_HDF5}
-DHIGHFIVE_USE_EIGEN:BOOL=ON
-DHIGHFIVE_USE_XTENSOR:BOOL=${HIGHFIVE_USE_XTENSOR}
-DHIGHFIVE_USE_OPENCV:BOOL=${HIGHFIVE_USE_OPENCV}
-G "${CMAKE_GENERATOR}" ../
- cmake --build .
- CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target ${TESTS_TARGET}
- popd
- if [ $IS_BASE_ENVIRON ]; then
bash tests/test_project_integration.sh;
fi