forked from Unidata/netcdf4-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
124 lines (116 loc) · 3.03 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
language: python
dist: xenial
cache: pip
addons:
apt:
packages:
- libhdf5-serial-dev
- netcdf-bin
- libnetcdf-dev
env:
global:
- DEPENDS="numpy>=1.10.0 cython>=0.21 setuptools>=18.0 cftime"
- NO_NET=1
- MPI=0
python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8-dev"
matrix:
allow_failures:
- python: "3.8-dev"
- python: 3.7
env:
- MPI=1
- CC=mpicc.mpich
- DEPENDS="numpy>=1.10.0 cython>=0.21 setuptools>=18.0 mpi4py>=1.3.1 cftime"
- NETCDF_VERSION=GITMASTER
- NETCDF_DIR=$HOME
- PATH=${NETCDF_DIR}/bin:${PATH} # pick up nc-config here
include:
# Absolute minimum dependencies.
- python: 2.7
env:
- DEPENDS="numpy==1.10.0 cython==0.21 ordereddict==1.1 setuptools==18.0 cftime"
# test MPI with latest released version
- python: 3.7
env:
- MPI=1
- CC=mpicc.mpich
- DEPENDS="numpy>=1.10.0 cython>=0.21 setuptools>=18.0 mpi4py>=1.3.1 cftime"
- NETCDF_VERSION=4.6.3
- NETCDF_DIR=$HOME
- PATH=${NETCDF_DIR}/bin:${PATH} # pick up nc-config here
addons:
apt:
packages:
- mpich
- libmpich-dev
- libhdf5-mpich-dev
# test MPI with latest released version
- python: 3.7
env:
- MPI=1
- CC=mpicc.mpich
- DEPENDS="numpy>=1.10.0 cython>=0.21 setuptools>=18.0 mpi4py>=1.3.1 cftime"
- NETCDF_VERSION=4.6.3
- PNETCDF_VERSION=1.11.0
- NETCDF_DIR=$HOME
- PATH=${NETCDF_DIR}/bin:${PATH} # pick up nc-config here
addons:
apt:
packages:
- mpich
- libmpich-dev
- libhdf5-mpich-dev
# test with netcdf-c from github master
- python: 3.7
env:
- MPI=1
- CC=mpicc.mpich
- DEPENDS="numpy>=1.10.0 cython>=0.21 setuptools>=18.0 mpi4py>=1.3.1 cftime"
- NETCDF_VERSION=GITMASTER
- NETCDF_DIR=$HOME
- PATH=${NETCDF_DIR}/bin:${PATH} # pick up nc-config here
addons:
apt:
packages:
- mpich
- libmpich-dev
- libhdf5-mpich-dev
notifications:
email: false
before_install:
- pip install Cython # workaround for pip bug
- pip install $DEPENDS
install:
- if [ $MPI -eq 1 ] ; then ci/travis/build-parallel-netcdf.sh; fi
- python setup.py build
- python setup.py install
script:
- cd test
- python run_all.py
- |
echo "MPI = ${MPI}"
echo "PNETCDF_VERSION = ${PNETCDF_VERSION}"
if [ $MPI -eq 1 ] ; then
cd ../examples
mpirun.mpich -np 4 python mpi_example.py
if [ $? -ne 0 ] ; then
echo "mpi test failed!"
exit 1
else
echo "mpi test passed!"
fi
if [ -n "${PNETCDF_VERSION}" ] ; then
mpirun.mpich -np 4 python mpi_example.py NETCDF3_64BIT_DATA
if [ $? -ne 0 ] ; then
echo "PnetCDF mpi test failed!"
exit 1
else
echo "PnetCDF mpi test passed!"
fi
fi
fi