forked from GeodynamicWorldBuilder/WorldBuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
286 lines (269 loc) · 10.1 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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
language: cpp
sudo: true
before_install:
- echo ${CMAKE_EXTRA_ARGS}
- echo ${MATRIX_EVAL}
- echo ${PATH}
- echo ${PYTHONPATH}
- echo ${PYTHONHOME}
- eval "${MATRIX_EVAL}"
- echo ${CC}
- echo ${CXX}
- echo ${FC}
- gcc --version
- gcov --version
- if [ "${TRAVIS_OS_NAME}" != "windows" ]; then
make --version;
fi
script:
- cmake --version
- gcc --version
- gcov --version
- mkdir build
- cd build
- mkdir install
- cmake .. -G "${MAKE_FILE_GENERATOR}" ${CMAKE_EXTRA_ARGS} ${MAC_COMPILER_EXTRA}
- touch CMakeFiles/CMakeError.log && cat CMakeFiles/CMakeError.log
- touch lib/gwb.py
- if [ "${TRAVIS_OS_NAME}" == "windows" ]; then
cmake --build . -j 4;
fi
- if [ "${TRAVIS_OS_NAME}" == "windows" ]; then
cmake --build . --target install -j 4;
fi
- if [ "${TRAVIS_OS_NAME}" != "windows" ]; then
make -j 4;
sudo make install -j 4;
fi
- if [ "${MAKE_FILE_GENERATOR}" == "Visual Studio 15 2017 Win64" ]; then
cmake --build . --target run_tests -j 4;
fi
- if [ "${MAKE_FILE_GENERATOR}" != "Visual Studio 15 2017 Win64" ]; then
ctest -VV;
fi
- cat Testing/Temporary/LastTest.log
- if [ "${RUN_COVERALLS}" = "TRUE" ]; then
make indent;
diff=$(git status | grep 'modified' --count);
if [[ "$diff" -gt "0" ]]; then
git diff > diff.log;
cat diff.log;
return 1;
fi
fi
after_success:
- if [ "${RUN_COVERALLS}" = "TRUE" ]; then
coveralls --root ${TRAVIS_BUILD_DIR} --build-root ${TRAVIS_BUILD_DIR}/build/ -i source -i app --gcov-options '\-lp';
fi
- if [ "${RUN_COVERALLS}" = "TRUE" ]; then
bash <(curl -s https://codecov.io/bash);
fi
before_script:
- gcc --version
- gcov --version
cache:
apt: true
matrix:
include:
- name: "windows debug VS 2017 python"
os: windows
language: cpp
env:
- MATRIX_EVAL="which gcc && choco install python --version=3.8.0 -y && choco install swig --version=4.0.1 -y"
- PYTHONPATH=C:/Python38/Lib
- PYTHONHOME=C:/Python38
- PATH=C:/Python38:${PATH}
- MAKE_FILE_GENERATOR="Visual Studio 15 2017 Win64"
- FC=gfortran
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON"
- name: "windows release VS 2017 python"
os: windows
language: cpp
env:
- MATRIX_EVAL="which gcc && choco install python --version=3.8.0 -y && choco install swig --version=4.0.1 -y"
- PYTHONPATH=C:/Python38/Lib
- PYTHONHOME=C:/Python38
- PATH=C:/Python38:${PATH}
- MAKE_FILE_GENERATOR="Visual Studio 15 2017 Win64"
- FC=gfortran
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON"
- name: "linux trusty gcc 6 coverage fortran python"
os: linux
dist: bionic
sudo: true
compiler:
- g++-6
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_CXX_FLAGS=-Werror"
- RUN_COVERALLS="TRUE"
- MATRIX_EVAL="sudo apt install python-setuptools && CC=gcc-6 && CXX=g++-6 && FC=gfortran && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-6 --slave /usr/bin/gcov gcov /usr/bin/gcov-6 && sudo update-alternatives --config gcc && gcc --version && gcov --version && gfortran --version && mkdir astyle && cd astyle && wget 'https://sourceforge.net/projects/astyle/files/astyle/astyle 2.04/astyle_2.04_linux.tar.gz' && tar -zxvf astyle_2.04_linux.tar.gz && cd astyle/build/gcc && make && sudo make install && cd ../../../../ && pip install --user cpp-coveralls" # && export PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR/build/lib"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- gfortran-6
- cmake
- swig
- python3-setuptools
- name: "linux trusty gcc 6 release fortran python"
os: linux
dist: trusty
sudo: false
compiler:
- g++-6
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Werror"
- MATRIX_EVAL="gfortran --version && CC=gcc-6 && CXX=g++-6 && FC=gfortran"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- gfortran
- cmake
- swig
- python3-setuptools
- name: "linux trusty gcc 4.9 debug fortran"
os: linux
dist: trusty
sudo: false
compiler:
- g++-4.9
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-Werror"
- MATRIX_EVAL="gfortran --version && CC=gcc-4.9 && CXX=g++-4.9 && FC=gfortran"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
- gfortran
- cmake
- name: "linux precise gcc 4.9 debug"
os: linux
dist: precise
sudo: false
compiler:
- g++-4.9
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-Werror"
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
- cmake
- name: "linux trusty clang fortran python"
os: linux
dist: trusty
sudo: false
os: linux
compiler:
- clang-3.6
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- MATRIX_EVAL="gfortran --version && CC=clang-3.6 && CXX=clang++-3.6 && GC=gfortran"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-Werror"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
packages:
- clang-3.6
- gfortran
- cmake
- swig
- python3-setuptools
- name: "osx clang fortran python"
sudo: false
os: osx
compiler:
- clang
osx_image: xcode10
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- MATRIX_EVAL="export PATH=$TRAVIS_ROOT/bin:$PATH && which clang && ls -lh /Applications/Xcode-10.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/ && ls -lh /Applications/Xcode-10.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ && brew install gcc || true && brew link --overwrite gcc && brew install swig || true && export FC=gfortran" # && export PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR/build/lib"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-Werror"
- name: "osx clang fortran python"
sudo: false
os: osx
compiler:
- clang
osx_image: xcode10
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- MATRIX_EVAL="export PATH=$TRAVIS_ROOT/bin:$PATH && which clang && brew install swig || true"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-Werror"
- name: "osx clang fortran python"
sudo: false
os: osx
compiler:
- clang
osx_image: xcode11.6
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- MATRIX_EVAL="export PATH=$TRAVIS_ROOT/bin:$PATH && which clang && brew install swig || true"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-Werror"
- name: "windows debug mingw fortran"
os: windows
language: cpp
env:
- MATRIX_EVAL="which gcc && which mingw32-make.exe && which gfortran && ln -s /c/ProgramData/chocolatey/bin/mingw32-make.exe /c/ProgramData/chocolatey/bin/make.exe && which make"
- MAKE_FILE_GENERATOR="MinGW Makefiles"
- FC=gfortran
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_RUN_APP_TESTS=FALSE -DCMAKE_Fortran_COMPILER=/c/ProgramData/chocolatey/bin/gfortran.exe -DCMAKE_SH=CMAKE_SH-NOTFOUND -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_VERBOSE_MAKEFILE=ON"
- name: "windows release mingw fortran"
os: windows
language: cpp
env:
- MATRIX_EVAL="which gcc && which mingw32-make.exe && ln -s /c/ProgramData/chocolatey/bin/mingw32-make.exe /c/ProgramData/chocolatey/bin/make.exe && which make"
- MAKE_FILE_GENERATOR="MinGW Makefiles"
- FC=gfortran
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_RUN_APP_TESTS=FALSE -DCMAKE_Fortran_COMPILER=/c/ProgramData/chocolatey/bin/gfortran.exe -DCMAKE_SH=CMAKE_SH-NOTFOUND -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_VERBOSE_MAKEFILE=ON"
- name: "linux xenial gcc release fortran python"
os: linux
dist: xenial
sudo: false
compiler:
#- g++-6
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Release"
#- MATRIX_EVAL="gfortran --version && CC=gcc-6 && CXX=g++-6 && FC=gfortran"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gfortran
- swig
- python3-setuptools
- name: "linux bionic gcc release fortran python"
os: linux
dist: bionic
sudo: false
compiler:
#- g++-6
env:
- MAKE_FILE_GENERATOR="Unix Makefiles"
- CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Release"
#- MATRIX_EVAL="gfortran --version && CC=gcc-6 && CXX=g++-6 && FC=gfortran"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gfortran
- swig
- python3-setuptools