-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy path.travis.yml
110 lines (97 loc) · 3.3 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
# Based on: http://conda.pydata.org/docs/travis.html
# trusty beta
dist: trusty
sudo: required
# Travis-CI does not currently support Python and Mac OS X
language: c
os:
- linux
- osx
env:
global:
- ADIOS_ROOT: $HOME/.cache/adios
matrix:
- PYTHON_VERSION=2.7
# - PYTHON_VERSION=3.4
matrix:
allow_failures:
- os: osx
cache:
apt: true
brew: true
directories:
- $HOME/.cache/adios
before_install:
# Set the anaconda environment
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "$PYTHON_VERSION" == "2.7" ]]; then
curl https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -o miniconda.sh;
else
curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh;
fi
else
if [[ "$PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
# create and activate a test-environment
- conda create -q -n test-environment python=$PYTHON_VERSION
- source activate test-environment
install:
# ADIOS C library
- export LD_LIBRARY_PATH=$ADIOS_ROOT/lib:$LD_LIBRARY_PATH
- export PATH=$ADIOS_ROOT/bin:$PATH
- ADIOS_FOUND=$(which adios_config >/dev/null && { echo 0; } || { echo 1; })
- if [ $ADIOS_FOUND -ne 0 ]; then
mkdir -p $ADIOS_ROOT &&
travis_retry git clone --depth=50 --branch=master https://github.com/ornladios/ADIOS.git $ADIOS_ROOT/src &&
cd $ADIOS_ROOT/src &&
./autogen.sh &&
CFLAGS="-fPIC -g" ./configure --enable-static --disable-shared --prefix=$ADIOS_ROOT --with-mxml=/usr --with-zlib=/usr --disable-fortran --without-mpi &&
make && make install &&
cd - &&
rm -rf $ADIOS_ROOT/src;
fi
# other libraries
- conda config --add channels hydroffice
- conda config --add channels SciTools
- conda config --add channels osgeo
- conda config --add channels IOOS
- conda config --add channels aaren
- conda config --add channels noaa-orr-erd
- conda config --add channels diffpy
# python packages
- conda install -q h5py lxml numpy matplotlib pydap wxpython requests shapely proj4 geos cartopy setuptools gdal
- pip install --no-deps hydroffice.bag
- pip install --no-deps 'git+https://github.com/ornladios/ADIOS.git#egg=adios&subdirectory=wrappers/numpy'
- pip install --no-deps -e .
script:
- "python -m unittest hdf_compass.array_model.test"
- "python -m unittest hdf_compass.asc_model.test"
- "python -m unittest hdf_compass.bag_model.test"
- "python -m unittest hdf_compass.filesystem_model.test"
- "python -m unittest hdf_compass.hdf5_model.test"
- "python -m unittest hdf_compass.opendap_model.test"
- "python -m unittest hdf_compass.adios_model.test"
after_script:
# If tests are successful, create a source distribution.
- python setup.py sdist
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
python setup.py bdist_wheel;
fi
addons:
artifacts:
debug: true
paths:
- ./dist
apt:
packages:
- libmxml-dev