forked from astropy/astropy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (88 loc) · 4.44 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
language: python
python:
- 2.6
- 2.7
- 3.2
- 3.3
# This is just for "egg_info". All other builds are explicitly given in the matrix
env:
global:
- PIP_WHEEL_COMMAND="pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel --use-mirrors"
matrix:
- SETUP_CMD='egg_info' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
matrix:
include:
# Do a coverage test in Python 2
- python: 2.7
env: NUMPY_VERSION=1.7.1 SETUP_CMD='test --coverage' OPTIONAL_DEPS=true
# Check for sphinx doc build warnings - we do this first because it
# runs for a long time
- python: 2.7
env: SETUP_CMD='build_sphinx -w -n' NUMPY_VERSION=1.8.0 OPTIONAL_DEPS=true
# OPTIONAL_DEPS needed because the plot_directive in sphinx needs them
# Try all python versions with the latest numpy
- python: 2.6
env: SETUP_CMD='test --parallel=8' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
- python: 2.7
env: SETUP_CMD='test --parallel=8' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
# There is a bug in pytest-xdist that prevents it from working
# on Python 3.x. See:
# https://bitbucket.org/hpk42/pytest/issue/301/internal-error-during-test-collecting
- python: 3.2
env: SETUP_CMD='test' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
- python: 3.3
env: SETUP_CMD='test' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
# Now try do scipy on 2.7 and an appropriate 3.x build (with latest numpy)
- python: 2.7
env: SETUP_CMD='test --parallel=8' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=true LC_CTYPE=C.ascii
- python: 3.2
env: SETUP_CMD='test' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=true LC_CTYPE=C.ascii
# Try alternate numpy versions
- python: 2.7
env: NUMPY_VERSION=1.6.2 SETUP_CMD='test --parallel=8' OPTIONAL_DEPS=false
- python: 3.2
env: NUMPY_VERSION=1.6.2 SETUP_CMD='test' OPTIONAL_DEPS=false
- python: 2.7
env: NUMPY_VERSION=1.5.1 SETUP_CMD='test --parallel=8' OPTIONAL_DEPS=false
before_install:
# Use utf8 encoding. Should be default, but this is insurance against
# future changes
- export PYTHONIOENCODING=UTF8
# Install the pip that supports wheel
- pip install setuptools --upgrade
- pip install pip --upgrade
- pip install wheel
# We do this to make sure we get dependencies so pip works below
# Note that travis does *not* use python packages installed via apt - it
# does all the building in an isolated virtualenv
- sudo apt-get update
# CORE DEPENDENCIES
- if [[ $SETUP_CMD != egg_info ]]; then sudo apt-get install python-numpy cython libatlas-dev liblapack-dev gfortran; fi
# OPTIONAL DEPENDENCIES
- if $OPTIONAL_DEPS; then sudo apt-get install python-scipy libhdf5-serial-1.8.4 libhdf5-serial-dev; fi
# DOCUMENTATION DEPENDENCIES
- if [[ $SETUP_CMD == build_sphinx* ]]; then sudo apt-get install python-sphinx graphviz texlive-latex-extra dvipng python-matplotlib; fi
install:
# CORE DEPENDENCIES
# These command run pip first trying a wheel, and then falling back on
# source build
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_WHEEL_COMMAND --upgrade "numpy==$NUMPY_VERSION"; fi
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_WHEEL_COMMAND "Cython>=0.18"; fi
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_WHEEL_COMMAND "pytest==2.4.0"; fi
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_WHEEL_COMMAND "pytest-xdist==1.8"; fi
# OPTIONAL DEPENDENCIES
- if $OPTIONAL_DEPS; then $PIP_WHEEL_COMMAND "scipy==0.12.0"; fi
- if $OPTIONAL_DEPS; then $PIP_WHEEL_COMMAND "h5py==2.1.3"; fi
# DOCUMENTATION DEPENDENCIES
# build_sphinx needs sphinx and matplotlib (for plot_directive). Note that
# this matplotlib will *not* work with py 3.x, but our sphinx build is
# currently 2.7, so that's fine
- if [[ $SETUP_CMD == build_sphinx* ]]; then $PIP_WHEEL_COMMAND "Sphinx==1.2b3"; fi
- if [[ $SETUP_CMD == build_sphinx* ]]; then $PIP_WHEEL_COMMAND "matplotlib>=1.3.0"; fi
# COVERAGE DEPENDENCIES
- if [[ $SETUP_CMD == 'test --coverage' ]]; then $PIP_WHEEL_COMMAND "pytest-cov" ; fi
- if [[ $SETUP_CMD == 'test --coverage' ]]; then $PIP_WHEEL_COMMAND "coveralls"; fi
script:
- python setup.py $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls; fi