forked from SciTools/iris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
124 lines (102 loc) · 5.72 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
#
# Based on pelson's travis work for cartopy.
#
# Please update the cartopy, test data, and sample data git references below if appropriate.
#
# Note: Contrary to the travis documentation,
# http://about.travis-ci.org/docs/user/languages/python/#Travis-CI-Uses-Isolated-virtualenvs
# we will use the system python because it takes too long to install scipy from source.
#
language: python
python:
- 2.7
git:
depth: 0
install:
- export CARTOPY_REF="v0.8.0"
- export CARTOPY_SUFFIX=$(echo "${CARTOPY_REF}" | sed "s/^v//")
- export IRIS_TEST_DATA_REF="07d756b2d9ad3bdd28d877dcc60cb2e45af1eb08"
- export IRIS_TEST_DATA_SUFFIX=$(echo "${IRIS_TEST_DATA_REF}" | sed "s/^v//")
- export IRIS_SAMPLE_DATA_REF="8fd26fa65bd3e42d9910ca6ee7ffa846bb015d5e"
- export IRIS_SAMPLE_DATA_SUFFIX=$(echo "${IRIS_SAMPLE_DATA_REF}" | sed "s/^v//")
# add repo
- ./.travis_no_output sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3E5C1192
- yes | ./.travis_no_output sudo add-apt-repository ppa:olivier-berten/geo
- ./.travis_no_output sudo apt-get update
# install deps
- ./.travis_no_output sudo apt-get install python-scipy cython python-pip
- ./.travis_no_output sudo /usr/bin/pip install --use-mirrors shapely nose pyshp pep8 mock
- ./.travis_no_output sudo /usr/bin/pip install matplotlib==1.2.0
- ./.travis_no_output sudo apt-get install libgeos-dev libproj-dev
- ./.travis_no_output sudo apt-get install libudunits2-dev libhdf5-serial-dev netcdf-bin libnetcdf-dev
- ./.travis_no_output sudo apt-get install make unzip python-sphinx graphviz
- ./.travis_no_output sudo /usr/bin/pip install pyke netCDF4 pandas
- ./.travis_no_output sudo apt-get install openjdk-7-jre
- ./.travis_no_output sudo apt-get install python-gdal
- export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server:$LD_LIBRARY_PATH
# cfchecker
- ./.travis_no_output sudo /usr/bin/pip install cdat-lite
- ./.travis_no_output sudo /usr/bin/pip install cfchecker
# Using table 23 due to a bug present in the current version
- ./.travis_no_output wget http://cf-pcmdi.llnl.gov/documents/cf-standard-names/standard-name-table/23/cf-standard-name-table.xml
# - ./.travis_no_output wget http://cf-pcmdi.llnl.gov/documents/cf-standard-names/standard-name-table/current/cf-standard-name-table.xml
- ./.travis_no_output wget http://cf-pcmdi.llnl.gov/documents/cf-standard-names/area-type-table/current/area-type-table.xml
- echo '#!/usr/bin/env sh' > cfchecker
- echo "cfchecks -s `pwd`/cf-standard-name-table.xml -a `pwd`/area-type-table.xml -u /usr/share/xml/udunits/udunits2.xml \$1" >> cfchecker
- ./.travis_no_output sudo cp cfchecker /usr/local/bin/cfchecker
- ./.travis_no_output sudo chmod a+x /usr/local/bin/cfchecker
# grib api
- ./.travis_no_output sudo apt-get install libjasper-dev
- ./.travis_no_output sudo apt-get build-dep libgrib-api-1.9.9 libgrib-api-dev libgrib-api-tools
- ./.travis_no_output wget https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.9.16.tar.gz --no-check-certificate
- ./.travis_no_output tar -xvf grib_api-1.9.16.tar.gz
- cd grib_api-1.9.16/
- ../.travis_no_output CFLAGS="-fPIC" ./configure --with-jasper=/usr/local/lib --disable-fortran --enable-python
- ../.travis_no_output make
- ../.travis_no_output sudo make install
- cd python
- ../../.travis_no_output sudo /usr/bin/python setup.py install
- cd ../..
# distutils
- ./.travis_no_output wget http://python-distribute.org/distribute_setup.py
- ./.travis_no_output sudo /usr/bin/python distribute_setup.py
# cartopy
- ./.travis_no_output wget -O cartopy.zip https://github.com/SciTools/cartopy/archive/${CARTOPY_REF}.zip
- ./.travis_no_output unzip -q cartopy.zip
- ln -s $(pwd)/cartopy-${CARTOPY_SUFFIX} cartopy
- cd cartopy
- ../.travis_no_output /usr/bin/python setup.py install --user
- cd ..
# mo_unpack
- ./.travis_no_output wget https://puma.nerc.ac.uk/trac/UM_TOOLS/raw-attachment/wiki/unpack/unpack-030712.tgz
- ./.travis_no_output tar -xf unpack-030712.tgz
- cd unpack-030712/libmo_unpack
#? - gcc -c -fPIC -O4 -mfpmath=sse -msse -I include -D_LARGEFILE_SOURCE -D_LARGEFILE_SOURCE64 -D_FILE_OFFSET_BITS=64 *.c
- ../../.travis_no_output gcc -c -fPIC -O4 -mfpmath=sse -msse -I include -D_LARGEFILE_SOURCE *.c
- ../../.travis_no_output gcc -shared -Wl,-soname,libmo_unpack.so -o lib/libmo_unpack.so *.o
- ../../.travis_no_output sudo cp lib/* /usr/local/lib
- ../../.travis_no_output sudo cp include/* /usr/local/include
- cd ../..
# iris test data
- ./.travis_no_output wget -O iris-test-data.zip https://github.com/SciTools/iris-test-data/archive/${IRIS_TEST_DATA_REF}.zip
- ./.travis_no_output unzip -q iris-test-data.zip
- ln -s $(pwd)/iris-test-data-${IRIS_TEST_DATA_SUFFIX} iris-test-data
# iris sample data
- ./.travis_no_output wget -O iris-sample-data.zip https://github.com/SciTools/iris-sample-data/archive/${IRIS_SAMPLE_DATA_REF}.zip
- ./.travis_no_output unzip -q iris-sample-data.zip
- ln -s $(pwd)/iris-sample-data-${IRIS_SAMPLE_DATA_SUFFIX} iris-sample-data
# iris
- ./.travis_no_output /usr/bin/python setup.py --with-unpack build_ext --inplace -I/usr/local/include -L/usr/local/lib -R/usr/local/lib
- ./.travis_no_output /usr/bin/python setup.py std_names
- echo "[Resources]" > lib/iris/etc/site.cfg
- echo "sample_data_dir = $(pwd)/iris-sample-data/sample_data" >> lib/iris/etc/site.cfg
- echo "test_data_dir = $(pwd)/iris-test-data/test_data" >> lib/iris/etc/site.cfg
- ln -s $(pwd)/lib/iris /home/travis/.local/lib/python2.7/site-packages/iris
- ./.travis_no_output /usr/bin/python setup.py pyke_rules
script:
- /usr/bin/python setup.py test
# - echo --- RUNNING DOCTESTS ---
# - cd $(pwd)/docs/iris
# - make doctest
# - echo --- RUNNING EXTESTS ---
# - make extest