forked from cdslaborg/paramonte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
355 lines (334 loc) · 16.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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
language: c
sudo: true
branches:
only:
- main
#- master
#- revive
#- archive
#- ParaDISE
#- ParaTemp
#- ParaNest
#- dev
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
# Credit https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/9
# Cache only .git files under "/usr/local/Homebrew" so "brew update" does not take 5min every build
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
after_success:
#- bash <(curl -s https://codecov.io/bash)
- bash <(curl --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash) || (sleep 30 && bash <(curl --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash))
matrix:
include:
################################################################################################################################
#### linux test latest OpenMPI release
################################################################################################################################
# - os: linux
# dist: trusty
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - cmake
# - gcc-9
# - g++-9
# - gfortran-9
# - libopenmpi-dev
# - openmpi-bin
# script:
# - pmRootDir="$(pwd)"
# - pmBinDir="${pmRootDir}/bin/"
# - echo "pmRootDir = ${pmRootDir}"
# - echo "pmBinDir = ${pmBinDir}"
# - if ! [ -d "${pmBinDir}" ]; then mkdir -p ${pmRootDir}/bin/; fi
# - echo "$(dpkg -L libopenmpi-dev)"
# - echo "$(dpkg -L openmpi-bin)"
# - MPIEXEC_PATH="$(dpkg -L openmpi-bin | egrep bin/mpiexec.openmpi)"
# - MPI_BIN_DIR="$(dirname "${MPIEXEC_PATH}")"
# - MPI_LIB_DIR="${MPI_BIN_DIR}/../lib"
# - PATH="${MPI_BIN_DIR}:${PATH}"
# - export LD_LIBRARY_PATH="${MPI_LIB_DIR}:${LD_LIBRARY_PATH}"
# - "wget https://github.com/cdslaborg/paramonte/releases/latest/download/libparamonte_c_linux_amd64_gnu_release_shared_heap_openmpi.tar.gz"
# - "wget https://github.com/cdslaborg/paramonte/releases/latest/download/libparamonte_cpp_linux_amd64_gnu_release_shared_heap_openmpi.tar.gz"
# - "wget https://github.com/cdslaborg/paramonte/releases/latest/download/libparamonte_fortran_linux_amd64_gnu_release_shared_heap_openmpi.tar.gz"
# - ls libparamonte*.tar.gz* | xargs -i tar xvzf {}
# - cd libparamonte_c_linux_amd64_gnu_release_shared_heap_openmpi && ./build.sh && ./run.sh --nproc 2 && cd ..
# - cd libparamonte_cpp_linux_amd64_gnu_release_shared_heap_openmpi && ./build.sh && ./run.sh --nproc 2 && cd ..
# - cd libparamonte_fortran_linux_amd64_gnu_release_shared_heap_openmpi && ./build.sh && ./run.sh --nproc 2 && cd ..
################################################################################################################################
#### linux test latest MPICH release
################################################################################################################################
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- gfortran-9
- libmpich-dev
- python3
- mpich
script:
- pmRootDir="$(pwd)"
- pmBinDir="${pmRootDir}/bin/"
- pmAuxilDir="${pmRootDir}/auxil/"
- echo "pmRootDir = ${pmRootDir}"
- echo "pmBinDir = ${pmBinDir}"
- if ! [ -d "${pmBinDir}" ]; then mkdir -p ${pmRootDir}/bin/; fi
- echo "$(dpkg -L libopenmpi-dev)"
- echo "$(dpkg -L mpich)"
- MPIEXEC_PATH="$(dpkg -L mpich | egrep bin/mpiexec.mpich)"
- MPI_BIN_DIR="$(dirname "${MPIEXEC_PATH}")"
- PATH="${MPI_BIN_DIR}:${PATH}"
- ulimit -s unlimited
#- sudo apt install python3-pip
#- pip3 install --user --upgrade numpy
#- pip3 install --user --upgrade pandas
- cd "${pmAuxilDir}" && ./testRelease.sh --par "none mpich" --build "debug release" --lang "c cpp"
- cd "${pmAuxilDir}" && ./testRelease.sh --par "none" --build "debug release" --lang "fortran" -s intel
#- cd "${pmAuxilDir}" && ./testRelease.sh --par "none" --build "debug release" --lang "fortran" -s gnu
#- "wget https://github.com/cdslaborg/paramonte/releases/latest/download/libparamonte_c_linux_amd64_gnu_release_shared_heap_mpich.tar.gz"
#- "wget https://github.com/cdslaborg/paramonte/releases/latest/download/libparamonte_cpp_linux_amd64_gnu_release_shared_heap_mpich.tar.gz"
#- "wget https://github.com/cdslaborg/paramonte/releases/latest/download/libparamonte_fortran_linux_amd64_gnu_release_shared_heap_mpich.tar.gz"
#- ls libparamonte*.tar.gz* | xargs -i tar xvzf {}
#- cd libparamonte_c_linux_amd64_gnu_release_shared_heap_mpich && ./build.sh && ./run.sh --nproc 2 && cd ..
#- cd libparamonte_cpp_linux_amd64_gnu_release_shared_heap_mpich && ./build.sh && ./run.sh --nproc 2 && cd ..
#- cd libparamonte_fortran_linux_amd64_gnu_release_shared_heap_mpich && ./build.sh && ./run.sh --nproc 2 && cd ..
################################################################################################################################
#### linux complete build
################################################################################################################################
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- gfortran-9
- libblas-dev
- liblapack-dev
- libopenmpi-dev
- openmpi-bin
#- mpich
#- libmpich-dev
#- libblas-dev
#- liblapack-dev
#- libopenmpi-dev
#- openmpi-bin
script:
#- chmod +x ./.travis/install_cmake.sh && ./.travis/install_cmake.sh
#- export PATH="/usr/local/cmake-3.16.3/bin:${PATH}"
#- echo "The MPIEXEC binary path: $(which mpiexec)" || echo "MPI library not found...skipping"
#- ls /usr/bin/
#- echo "$(( IFS=:; for p in $PATH; do unset lsout; lsout=$(ls -dm "$p"/*mpifort*); if ! [[ -z "${lsout// }" ]]; then echo "${lsout}, "; fi; done ) 2>/dev/null)"
#- echo "$(( IFS=:; for p in $PATH; do unset lsout; lsout=$(ls -dm "$p"/*mpicc*); if ! [[ -z "${lsout// }" ]]; then echo "${lsout}, "; fi; done ) 2>/dev/null)"
#- sudo apt install openmpi-bin
#- echo $(which mpicc)
#- echo $(which mpif90)
#- echo $(which mpifort)
#- echo $(which mpiexec)
#- echo $(which mpirun)
#- mpiexecFlag="$(command -v mpiexec.openmpi)"
#- if [ -f "${mpiexecFlag}" ]; then mpiexecFlag="--mpiexec ${mpiexecFlag}"; else unset mpiexecFlag; echo "mpiexec not found..."; fi
#- echo "mpiexecFlag = ${mpiexecFlag}"
- echo "FCFLAG = ${FCFLAG}"
- cmake --version || echo "cmake not found..."
- gfortran --version && FCFLAG="-f $(which gfortran)" || echo "gfortran not found..."
- gfortran-9 --version && FCFLAG="-f $(which gfortran-9)" || echo "gfortran-9 not found..."
- ./install.sh --lang "C C++ Fortran" --build release --lib shared --mem heap --par "none" --yes-to-all ${FCFLAG} ${mpiexecFlag}
- pmRootDir="$(pwd)"
- ulimit -s unlimited
- ls ${pmRootDir}/bin/
- cd ${pmRootDir}/bin/libparamonte_c_linux_amd64_gnu_release_shared_heap && ls && ./build.sh && ./run.sh
- cd ${pmRootDir}/bin/libparamonte_cpp_linux_amd64_gnu_release_shared_heap && ls && ./build.sh && ./run.sh
- cd ${pmRootDir}/bin/libparamonte_fortran_linux_amd64_gnu_release_shared_heap && ls && ./build.sh && ./run.sh
#- cd ${pmRootDir}/bin/libparamonte_c_linux_amd64_gnu_release_shared_heap_openmpi && ./build.sh && ./run.sh --nproc 2
#- cd ${pmRootDir}/bin/libparamonte_cpp_linux_amd64_gnu_release_shared_heap_openmpi && ./build.sh && ./run.sh --nproc 2
#- cd ${pmRootDir}/bin/libparamonte_fortran_linux_amd64_gnu_release_shared_heap_openmpi && ./build.sh && ./run.sh --nproc 2
################################################################################################################################
#### code coverage
################################################################################################################################
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- lcov
- cmake
- gcc-9
- gfortran
- gfortran-9
- libmpich-dev
- mpich
script:
- ulimit -s unlimited
- echo >&2 "FCFLAG = ${FCFLAG}"
- cmake --version || echo "cmake not found..."
- gfortran --version && FCFLAG="-f $(which gfortran)" || echo "gfortran not found..."
- gfortran-9 --version && FCFLAG="-f $(which gfortran-9)" || echo "gfortran-9 not found..."
- echo >&2 "FCFLAG = ${FCFLAG}"
- ./install.sh --codecov --par none --yes-to-all ${FCFLAG}
################################################################################################################################
#### macOS
################################################################################################################################
- &macOS
os: osx
osx_image: xcode12
addons:
homebrew:
packages:
- cmake
- mpich
- gcc@10
- shellcheck
update: true
before_install:
- brew install gcc@10 || brew upgrade gcc
- brew install cmake || brew upgrade cmake
#- brew install mpich || brew upgrade mpich
- brew unlink mpich || echo "NO MPICH INSTALLATION FOUND"
- brew install openmpi || brew upgrade openmpi
- brew link openmpi
- brew link cmake
- brew link gcc
#- brew link mpich
script:
- cmake --version
- ./install.sh --lang "C C++ Fortran" --build release --lib shared --mem heap --par "none mpi" #-s gnu
- pmRootDir=$(pwd)
- ls ${pmRootDir}/bin/
- |
for buildDir in ${pmRootDir}/bin/*; do
echo ""
echo "Running example in ${buildDir}"
echo ""
if [[ "${dir}" =~ .*"_impi".* || "${dir}" =~ .*"_mpich".* || "${dir}" =~ .*"_openmpi".* ]]; then
cd ${buildDir} && ls && ./build.sh && ./run.sh --nproc 2
else
cd ${buildDir} && ls && ./build.sh && ./run.sh
fi
cd "${pmRootDir}"
done
####################################################################################################################################
#### OTHER
####################################################################################################################################
# - &macOS
# os: osx
# osx_image: xcode11
# env:
# GCC=9
# CC=gcc-9
# CXX=g++-9
# FC=gfortran-9
# addons:
# homebrew:
# packages:
# - gcc@9
# - cmake
# - openmpi
# - shellcheck
# update: true
# before_install:
# - brew install gcc@9 || brew upgrade gcc
# - brew install cmake || brew upgrade cmake
# - brew install openmpi || brew upgrade openmpi
# - brew link gcc
# - brew link cmake
# - brew link openmpi
# script:
# - cmake --version
# - ./install.sh --lang "C C++ Fortran" --build release --lib shared --mem heap --par "none mpi" #-s gnu
# - echo $(pwd)
# - pmRootDir="$(pwd)";
# - cd ${pmRootDir}/bin/libparamonte_c_darwin_amd64_gnu_release_shared_heap && ./build.sh && ./run.sh
# - cd ${pmRootDir}/bin/libparamonte_cpp_darwin_amd64_gnu_release_shared_heap && ./build.sh && ./run.sh
# - cd ${pmRootDir}/bin/libparamonte_fortran_darwin_amd64_gnu_release_shared_heap && ./build.sh && ./run.sh
# - cd ${pmRootDir}/bin/libparamonte_c_darwin_amd64_gnu_release_shared_heap_openmpi && ./build.sh && ./run.sh --nproc 2
# - cd ${pmRootDir}/bin/libparamonte_cpp_darwin_amd64_gnu_release_shared_heap_openmpi && ./build.sh && ./run.sh --nproc 2
# - cd ${pmRootDir}/bin/libparamonte_fortran_darwin_amd64_gnu_release_shared_heap_openmpi && ./build.sh && ./run.sh --nproc 2
# - &ubuntu
# os: linux
# sudo: true
# dist: xenial
# cache:
# apt: true
# directories:
# - "$CACHE"
# addons:
# apt:
# sources: &linuxsrcs
# - ubuntu-toolchain-r-test
# - sourceline: 'deb https://apt.kitware.com/ubuntu/ xenial main'
# key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
# packages: &gcc10pkgs
# - gcc
# - g++
# - cmake
# - mpich
# - gfortran-8
# script:
# #- chmod +x ./.travis/install_cmake.sh && ./.travis/install_cmake.sh
# - cmake --version
# - gfortran --version
# - gfortran-8 --version
# #- echo >&2 "The MPIEXEC binday path: $(which mpiexec) || echo >&2 "MPI library not found...skipping"
# - ./install.sh --lang "C C++ Fortran" --build release --lib shared --mem heap --par "none" --yes-to-all
# - cd /Users/travis/build/cdslaborg/paramonte/bin/libparamonte_c_darwin_amd64_gnu_release_shared_heap && ./build.sh && ./run.sh
# - cd /Users/travis/build/cdslaborg/paramonte/bin/libparamonte_cpp_darwin_amd64_gnu_release_shared_heap && ./build.sh && ./run.sh
# - cd /Users/travis/build/cdslaborg/paramonte/bin/libparamonte_fortran_darwin_amd64_gnu_release_shared_heap && ./build.sh && ./run.sh
# #- cd /Users/travis/build/cdslaborg/paramonte/bin/libparamonte_c_darwin_amd64_gnu_release_shared_heap_mpich && ./build.sh && ./run.sh --nproc 2
# #- cd /Users/travis/build/cdslaborg/paramonte/bin/libparamonte_cpp_darwin_amd64_gnu_release_shared_heap_mpich && ./build.sh && ./run.sh --nproc 2
# #- cd /Users/travis/build/cdslaborg/paramonte/bin/libparamonte_fortran_darwin_amd64_gnu_release_shared_heap_mpich && ./build.sh && ./run.sh --nproc 2
# - os: linux
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - mpich
# - gfortran-8
# script:
# - chmod +x ./.travis/install_cmake.sh && ./.travis/install_cmake.sh
# - export FC=gfortran-8
# - cmake --version
# - gfortran-8 --version
# - echo >&2 "The MPIEXEC binday path: $(which mpiexec) || echo >&2 "MPI library not found...skipping"
# - ./install.sh --lang "C C++ Fortran" --build release --lib shared --mem heap --par none
# #- ./install.sh --lang "C C++ Fortran" --build release --lib shared --mem heap --par none --fortran $(which gfortran-8) --mpiexec $(which mpiexec) --yes-to-all
# - name: "darwin"
# os: osx
# osx_image: xcode10
# addons:
# homebrew:
# packages:
# - gcc
# - cmake
# - openmpi
# - update: true
#before_install:
#- brew install gcc || brew upgrade gcc
#- brew install cmake || brew upgrade cmake
#- brew install openmpi || brew upgrade openmpi
#- brew link openmpi
# script:
# - brew link gcc
# - brew link cmake
# - cmake --version
# - ./install.sh --lang "C C++ Fortran" --build release --lib shared --mem heap --par "none mpi" -s gnu
# - os: osx
# script:
# - wget "https://github.com/cdslaborg/paramonte/releases/download/v1.4.0/libparamonte_c_darwin_amd64_gnu_release_shared_heap.tar.gz"
# - tar xvzf libparamonte_c_darwin_amd64_gnu_release_shared_heap.tar.gz
# - cd libparamonte_c_darwin_amd64_gnu_release_shared_heap
# - ./build.sh
# - ./run.sh