-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
247 lines (234 loc) · 8.85 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
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
language: cpp
# python wrapper needs shared dependencies!
matrix:
include:
- os: linux
dist: focal
compiler: gcc
env:
- H5GEO_SUPERBUILD=False
- H5GEO_USE_THREADS=True
- H5GEO_BUILD_SHARED_LIBS=True
- H5GEO_BUILD_TESTS=True
- H5GEO_BUILD_h5geopy=True
- H5GEO_USE_GDAL=False
- HDF5_RUNTIME_DIRS=""
- H5GEOPY_COPY_RUNTIME_DEPS=False
- CMAKE_GENERATOR="Ninja"
- TESTS_TARGET="test"
- PYTEST_COMMAND="python -m unittest discover h5geopy.tests"
addons:
apt:
packages:
- libhdf5-dev
- ninja-build
- libtbb-dev
- os: linux
dist: focal
compiler: clang
env:
- H5GEO_SUPERBUILD=False
- H5GEO_USE_THREADS=True
- H5GEO_BUILD_SHARED_LIBS=True
- H5GEO_BUILD_TESTS=True
- H5GEO_BUILD_h5geopy=True
- H5GEO_USE_GDAL=False
- HDF5_RUNTIME_DIRS=""
- H5GEOPY_COPY_RUNTIME_DEPS=True
- CMAKE_GENERATOR="Ninja"
- TESTS_TARGET="test"
- PYTEST_COMMAND="python -m unittest discover h5geopy.tests"
addons:
apt:
packages:
- libhdf5-dev
- ninja-build
- libtbb-dev
- os: linux
dist: focal
compiler: clang
env:
- H5GEO_SUPERBUILD=False
- H5GEO_USE_THREADS=False
- H5GEO_BUILD_SHARED_LIBS=True
- H5GEO_BUILD_TESTS=True
- H5GEO_BUILD_h5geopy=True
- H5GEO_USE_GDAL=False
- HDF5_RUNTIME_DIRS=""
- H5GEOPY_COPY_RUNTIME_DEPS=True
- CMAKE_GENERATOR="Ninja"
- TESTS_TARGET="test"
- PYTEST_COMMAND="python -m unittest discover h5geopy.tests"
addons:
apt:
packages:
- libhdf5-dev
- ninja-build
- os: windows
env:
- H5GEO_SUPERBUILD=True
- H5GEO_USE_THREADS=True
- H5GEO_BUILD_SHARED_LIBS=True
- H5GEO_BUILD_TESTS=True
- H5GEO_BUILD_h5geopy=True
- H5GEO_USE_GDAL=True
- HDF5_RUNTIME_DIRS="C:/Users/travis/build/tierra-colada/install/HDF5-install/bin"
- H5GEOPY_COPY_RUNTIME_DEPS=True
- CMAKE_GENERATOR="Visual Studio 15 2017 Win64"
- TESTS_TARGET="RUN_TESTS"
- PYTEST_COMMAND="python -m unittest discover h5geopy.tests"
- os: windows
env:
- H5GEO_SUPERBUILD=True
- H5GEO_USE_THREADS=True
- H5GEO_BUILD_SHARED_LIBS=True
- H5GEO_BUILD_TESTS=True
- H5GEO_BUILD_h5geopy=True
- H5GEO_USE_GDAL=True
- HDF5_RUNTIME_DIRS="C:/Users/travis/build/tierra-colada/install/HDF5-install/bin"
- H5GEOPY_COPY_RUNTIME_DEPS=False
- CMAKE_GENERATOR="Visual Studio 15 2017 Win64"
- TESTS_TARGET="RUN_TESTS"
- PYTEST_COMMAND="python -m unittest discover h5geopy.tests"
- os: osx
osx_image: xcode12.2
compiler: clang
env:
- H5GEO_SUPERBUILD=False
- H5GEO_USE_THREADS=False
- H5GEO_BUILD_SHARED_LIBS=True
- H5GEO_BUILD_TESTS=True
- H5GEO_BUILD_h5geopy=True
- H5GEO_USE_GDAL=False
- HDF5_RUNTIME_DIRS=""
- H5GEOPY_COPY_RUNTIME_DEPS=True
- CMAKE_GENERATOR="Ninja"
- TESTS_TARGET="test"
- PYTEST_COMMAND="python -m unittest discover h5geopy.tests"
- ALLOW_FAILURE=true
allow_failures:
- os: osx
- env: ALLOW_FAILURE=true
env:
global:
- CMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/../install
- EIGEN3_SRC=${TRAVIS_BUILD_DIR}/../eigen
- EIGEN3_ROOT=${TRAVIS_BUILD_DIR}/../eigen
- mio_SRC=${TRAVIS_BUILD_DIR}/../mio
- mio_ROOT=${TRAVIS_BUILD_DIR}/../mio
- magic_enum_SRC=${TRAVIS_BUILD_DIR}/../magic_enum
- magic_enum_ROOT=${TRAVIS_BUILD_DIR}/../magic_enum
- h5gt_SRC=${TRAVIS_BUILD_DIR}/../h5gt
- h5gt_ROOT=${TRAVIS_BUILD_DIR}/../h5gt
- UNITS_SRC=${TRAVIS_BUILD_DIR}/../units
- UNITS_ROOT=${CMAKE_INSTALL_PREFIX}
# WINDOWS uses superbuild
before_install:
- git clone --branch v0.5.0 https://github.com/LLNL/units.git $UNITS_SRC;
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
git clone --branch 3.4.0 https://gitlab.com/libeigen/eigen.git $EIGEN3_SRC;
git clone --branch v0.7.3 https://github.com/Neargye/magic_enum.git $magic_enum_SRC;
git clone https://github.com/mandreyel/mio.git $mio_SRC;
git --git-dir mio/.git checkout 3f86a95c0784d73ce6815237ec33ed25f233b643;
git clone --branch main https://github.com/tierra-colada/h5gt $h5gt_SRC;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/bin;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/lib;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
git clone --branch 3.4.0 https://gitlab.com/libeigen/eigen.git $EIGEN3_SRC;
git clone --branch v0.7.3 https://github.com/Neargye/magic_enum.git $magic_enum_SRC;
git clone https://github.com/mandreyel/mio.git $mio_SRC;
git --git-dir mio/.git checkout 3f86a95c0784d73ce6815237ec33ed25f233b643;
git clone --branch main https://github.com/tierra-colada/h5gt $h5gt_SRC;
wget "http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh" -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
$HOME/miniconda/condabin/conda create --name py37 python=3.7 --yes;
source $HOME/miniconda/bin/activate py37;
hash -r;
conda config --set always_yes yes --set changeps1 no;
conda update -q conda;
conda install -c conda-forge mamba;
mamba install -c conda-forge tbb zlib hdf5 ninja;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/bin;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/lib;
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
choco install --yes miniconda3;
source C:/Tools/miniconda3/Scripts/activate;
conda config --set always_yes yes --set changeps1 no;
conda update -q conda;
echo $PATH;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/ZLIB-install/bin;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/HDF5-install/bin;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/UNITS-install/bin;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/UNITS-install/lib;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/SQLite3-install/bin;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/PROG-install/bin;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/GEOS-install/bin;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/GDAL-install/bin;
export PATH=$PATH:$TRAVIS_BUILD_DIR/build/Debug;
export PATH=$PATH:$TRAVIS_BUILD_DIR/build/Release;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/bin;
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/lib;
fi
before_script:
- if [[ "$TRAVIS_COMPILER" == "gcc" ]]; then
gcc --version;
elif [[ "$TRAVIS_COMPILER" == "clang" ]]; then
clang --version;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pyenv global 3.9 3.9.0;
fi
- cmake --version
- python --version
- mkdir ${CMAKE_INSTALL_PREFIX}
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then
mkdir $UNITS_SRC/build;
cd $UNITS_SRC/build;
cmake ..
-DUNITS_BUILD_FUZZ_TARGETS:BOOL=OFF
-DUNITS_BUILD_SHARED_LIBRARY:BOOL=ON
-DUNITS_BUILD_STATIC_LIBRARY:BOOL=OFF
-DUNITS_ENABLE_TESTS:BOOL=OFF
-DUNITS_HEADER_ONLY:BOOL=OFF
-DCMAKE_BUILD_TYPE=Release;
cmake --build . --config Release;
cmake --install . --config Release --prefix $CMAKE_INSTALL_PREFIX;
mkdir ${h5gt_SRC}/build;
cd ${h5gt_SRC}/build;
cmake ..
-DCMAKE_BUILD_TYPE=Release
-DH5GT_UNIT_TESTS:BOOL=OFF
-DH5GT_EXAMPLES:BOOL=OFF
-DH5GT_BUILD_h5gtpy:BOOL=ON
-DHDF5_RUNTIME_DIR:PATH=${HDF5_RUNTIME_DIRS};
cmake --build . --config Release;
cmake --install . --config Release --prefix ${CMAKE_INSTALL_PREFIX};
fi
script:
- cd ${TRAVIS_BUILD_DIR}
- mkdir -p build && pushd build
- >
cmake --warn-uninitialized --debug-output
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DEigen3_ROOT:PATH=$EIGEN3_ROOT
-Dmagic_enum_ROOT:PATH=$magic_enum_ROOT
-Dh5gt_ROOT:PATH=$h5gt_ROOT
-DUNITS_ROOT:PATH=$UNITS_ROOT
-DH5GEO_SUPERBUILD:BOOL=${H5GEO_SUPERBUILD}
-DH5GEO_USE_THREADS:BOOL=${H5GEO_USE_THREADS}
-DH5GEO_BUILD_SHARED_LIBS:BOOL=${H5GEO_BUILD_SHARED_LIBS}
-DH5GEO_BUILD_h5geopy:BOOL=${H5GEO_BUILD_h5geopy}
-DH5GEO_USE_GDAL:BOOL=${H5GEO_USE_GDAL}
-DHDF5_RUNTIME_DIR:PATH=${HDF5_RUNTIME_DIRS}
-DH5GEOPY_COPY_RUNTIME_DEPS:BOOL=${H5GEOPY_COPY_RUNTIME_DEPS}
-DH5GEO_BUILD_TESTS:BOOL=${H5GEO_BUILD_TESTS}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-G "${CMAKE_GENERATOR}" ../
- cmake --build . --config Release -j
# INSTALL before running test to simplify `h5geo` bin dir addition to PATH env
- cmake --install . --prefix ../install --config Release
- CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target ${TESTS_TARGET} --config Release
- ${PYTEST_COMMAND}
# - popd
# - bash tests/test_project_integration.sh;