forked from gammapy/gammapy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
178 lines (152 loc) · 7.08 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
#
# This travis-ci build matrix config is a modified copy of the one from Astropy
#
# We can't use `language: python` here because it's not supported on Mac.
# But that's OK ... the language here is irrelevant because we use conda
# to install our own Python.
language: c
os:
- linux
# This is a signal to travis-ci to use the new build infrastructure
sudo: false
addons:
apt:
packages: &default_apt
- graphviz
- texlive-latex-extra
- dvipng
- gfortran
env:
global:
- NUMPY_VERSION=1.10
- ASTROPY_VERSION=1.1
- LIBGFORTRAN_VERSION=1.0
- CONDA_DEPENDENCIES='Cython click scipy h5py matplotlib pyyaml scikit-image scikit-learn pandas pyregion naima photutils wcsaxes sherpa libgfortran=$LIBGFORTRAN_VERSION'
- CONDA_DEPENDENCIES_OSX='Cython click scipy h5py matplotlib pyyaml scikit-image scikit-learn pandas pyregion naima photutils wcsaxes sherpa'
- CONDA_DEPENDENCIES_WO_SHERPA='Cython click scipy h5py matplotlib pyyaml scikit-image scikit-learn pandas pyregion naima photutils wcsaxes'
- CONDA_DOCS_DEPENDENCIES='Cython click scipy h5py matplotlib pyyaml scikit-image scikit-learn pandas pyregion naima photutils wcsaxes pygments aplpy sherpa libgfortran=$LIBGFORTRAN_VERSION'
- CONDA_DOCS_DEPENDENCIES_WO_SHERPA='Cython click scipy h5py matplotlib pyyaml scikit-image scikit-learn pandas pyregion naima photutils wcsaxes pygments aplpy'
- PIP_DEPENDENCIES='uncertainties reproject'
- CONDA_CHANNELS='astropy sherpa'
- FETCH_GAMMAPY_EXTRA=true
- MAIN_CMD='python setup.py'
matrix:
- PYTHON_VERSION=2.7 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.4 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.5 SETUP_CMD='egg_info'
matrix:
# Don't wait for allowed failures
fast_finish: true
include:
# Try MacOS X
- os: osx
env: PYTHON_VERSION=2.7 SETUP_CMD='test'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_OSX
- os: osx
env: PYTHON_VERSION=3.5 SETUP_CMD='test'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_WO_SHERPA
# Temporarily disabled because of this issue:
# https://travis-ci.org/gammapy/gammapy/jobs/115820975
# https://github.com/gammapy/gammapy/pull/483
# Test the dev version of Sherpa, this may take a longer time
#- os: linux
# env: PYTHON_VERSION=2.7 SETUP_CMD='test -V'
# CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_WO_SHERPA DEBUG=True
# PIP_DEPENDENCIES='uncertainties reproject git+http://github.com/sherpa/sherpa.git#egg=sherpa'
# Run tests
# Coverage is measured on Python 2 (where Sherpa is available)
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='test -V --coverage'
- os: linux
env: PYTHON_VERSION=3.4 SETUP_CMD='test -V'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_WO_SHERPA
- os: linux
env: PYTHON_VERSION=3.5 SETUP_CMD='test -V'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_WO_SHERPA
# Build docs
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='build_sphinx -w'
CONDA_DEPENDENCIES=$CONDA_DOCS_DEPENDENCIES
- os: linux
env: PYTHON_VERSION=3.5 SETUP_CMD='build_sphinx -w'
CONDA_DEPENDENCIES=$CONDA_DOCS_DEPENDENCIES_WO_SHERPA
# Run tests without GAMMAPY_EXTRA available
- os: linux
env: FETCH_GAMMAPY_EXTRA=false PYTHON_VERSION=3.5 SETUP_CMD='test -V'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_WO_SHERPA
# Test with Astropy dev and LTS versions
# - os: linux
# env: PYTHON_VERSION=2.7 ASTROPY_VERSION=lts SETUP_CMD='test -V'
# - os: linux
# env: PYTHON_VERSION=3.5 ASTROPY_VERSION=lts SETUP_CMD='test -V'
# CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_WO_SHERPA
- os: linux
env: PYTHON_VERSION=2.7 ASTROPY_VERSION=dev SETUP_CMD='test -V'
- os: linux
env: PYTHON_VERSION=3.5 ASTROPY_VERSION=dev SETUP_CMD='test -V'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_WO_SHERPA
- os: linux
env: PYTHON_VERSION=2.7 ASTROPY_VERSION=dev SETUP_CMD='build_sphinx -w'
CONDA_DEPENDENCIES=$CONDA_DOCS_DEPENDENCIES
- os: linux
env: PYTHON_VERSION=3.5 ASTROPY_VERSION=dev SETUP_CMD='build_sphinx -w'
CONDA_DEPENDENCIES=$CONDA_DOCS_DEPENDENCIES_WO_SHERPA
# Test with with optional dependencies disabled
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='test -V'
CONDA_DEPENDENCIES='Cython click'
PIP_DEPENDENCIES=''
- os: linux
env: PYTHON_VERSION=3.5 SETUP_CMD='test -V'
CONDA_DEPENDENCIES='Cython click'
PIP_DEPENDENCIES=''
# Test with other numpy versions. Not all of the packages are
# available with these on conda, thus moving some of them to pip
# install. Latest astropy stable (1.1) is also not available for
# older numpies, but using lts version should be good enough for
# these tests (so we can avoid building it from source).
- os: linux
env: PYTHON_VERSION=3.5 NUMPY_VERSION=dev SETUP_CMD='test -V'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_WO_SHERPA
- os: linux
env: PYTHON_VERSION=2.7 NUMPY_VERSION=prerelease SETUP_CMD='test -V'
# - os: linux
# env: PYTHON_VERSION=2.7 NUMPY_VERSION=1.9 SETUP_CMD='test -V'
# ASTROPY_VERSION=lts
# - os: linux
# env: PYTHON_VERSION=2.7 NUMPY_VERSION=1.8 SETUP_CMD='test -V'
# ASTROPY_VERSION=lts
# CONDA_CHANNELS='astropy-ci-extras astropy'
# CONDA_DEPENDENCIES='Cython click matplotlib'
# PIP_DEPENDENCIES=''
# You can move builds that temporarily fail because of some non-Gammapy
# issue here
# Please add a link to a GH issue that tracks the upstream issue.
allow_failures:
# see https://github.com/gammapy/gammapy/issues/439
- os: linux
env: PYTHON_VERSION=3.5 NUMPY_VERSION=dev SETUP_CMD='test -V'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_WO_SHERPA
# this halts at the moment and thus allowing it to fail, to be able to go
# ahead with the release
- os: linux
env: PYTHON_VERSION=2.7 NUMPY_VERSION=prerelease SETUP_CMD='test -V'
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
- if $FETCH_GAMMAPY_EXTRA; then
git clone https://github.com/gammapy/gammapy-extra.git $HOME/gammapy-extra;
export GAMMAPY_EXTRA=${HOME}/gammapy-extra;
fi
# This is needed to make matplotlib plot testing work
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
export QT_API=pyqt;
fi
script:
- $MAIN_CMD $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == 'test -V --coverage' ]]; then
coveralls --rcfile='gammapy/tests/coveragerc';
fi