forked from desihub/desitarget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
206 lines (184 loc) · 8.54 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#
# IMPORTANT. OS X support is so experimental that you have to specifically
# request to have it enabled, on a per-repository basis. See
# http://docs.travis-ci.com/user/multi-os/#Manual-intervention-required
#
# This file will still work, without OS X enabled, it just won't run those
# tests.
#
# We set the language to c because python isn't supported on the MacOS X nodes
# on Travis. However, the language ends up being irrelevant anyway, since we
# install Python ourselves using conda.
# language: python
language: c
os:
- linux
# - osx
# Travis tech support recommended trying sudo true for more stable builds.
# Seems odd, but maybe they isolate us from other users more if we need sudo.
# sudo: true
# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false
# Use Ubuntu 14.04 LTS "trusty" instead of default 12.04
dist: trusty
# The apt packages below are needed for sphinx builds, which can no longer
# be installed with sudo apt-get.
addons:
apt:
packages:
- graphviz
- texlive-latex-extra
- dvipng
# python:
# - 2.6
# - 3.3
# - 3.4
# This is just for "egg_info". All other builds are explicitly given in the matrix
env:
global:
# The following versions are the 'default' for tests, unless
# overidden underneath. They are defined here in order to save having
# to repeat them for all configurations.
# - NUMPY_VERSION='<1.17'
- NUMPY_VERSION=1.16.5
# - SCIPY_VERSION=0.16
- ASTROPY_VERSION=2.0.16
# - SPHINX_VERSION=1.6.6
- DESIUTIL_VERSION=2.0.1
- SPECLITE_VERSION=0.8
# - SPECTER_VERSION=0.8.3
- DESIMODEL_VERSION=0.10.2
- DESIMODEL_DATA=branches/test-0.10
# - DESIMODEL_DATA=branches/test-0.9.6
- DESISIM_VERSION=0.31.1
# - SPECSIM_VERSION=v0.12
# - DESISURVEY_VERSION=0.12.1
- DESISPEC_VERSION=0.32.1
# - DESISPEC_VERSION=master
# - DESITARGET_VERSION=master
# - SIMQSO_VERSION=v1.2.3
# - DESI_LOGLEVEL=DEBUG
- PIP_VERSION=19.3.1
- MAIN_CMD='python setup.py'
# Additional conda channels to use.
- CONDA_CHANNELS="astropy"
# These packages will always be installed.
- CONDA_DEPENDENCIES=""
# These packages will only be installed for documentation builds.
# - CONDA_SPHINX_DEPENDENCIES="scipy pyyaml sphinx==1.5"
# These packages will only be installed if we really need them.
# - CONDA_ALL_DEPENDENCIES="scipy matplotlib=2.1.2 scikit-learn h5py coverage pyyaml photutils basemap=1.0.7"
- CONDA_ALL_DEPENDENCIES="scipy matplotlib scikit-learn h5py coverage pyyaml photutils numba"
# These packages will always be installed.
- PIP_DEPENDENCIES=""
# These packages will only be installed if we really need them.
- PIP_ALL_DEPENDENCIES="speclite==${SPECLITE_VERSION} coveralls fitsio"
#- PIP_ALL_DEPENDENCIES="speclite==${SPECLITE_VERSION} coveralls fitsio basemap==1.0.7 "
# - PIP_ALL_DEPENDENCIES="coveralls fitsio"
# These pip packages need to be installed in a certain order, so we
# do that separately from the astropy/ci-helpers scripts.
- DESIHUB_PIP_DEPENDENCIES="desiutil=${DESIUTIL_VERSION}"
- DESIHUB_PIP_ALL_DEPENDENCIES="desiutil=${DESIUTIL_VERSION} desispec=${DESISPEC_VERSION} desisim=${DESISIM_VERSION} desimodel=${DESIMODEL_VERSION}"
# Debug the Travis install process.
- DEBUG=False
matrix:
# - PYTHON_VERSION=3.5 NUMPY_VERSION=1.15.4 SETUP_CMD='egg_info'
# - PYTHON_VERSION=3.5 NUMPY_VERSION=1.15.4 SETUP_CMD='bdist_egg'
- PYTHON_VERSION=3.6 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.6 SETUP_CMD='bdist_egg'
matrix:
# Don't wait for allowed failures.
fast_finish: true
# OS X support is still experimental, so don't penalize failures.
allow_failures:
- os: osx
- os: linux
env: PYTHON_VERSION=3.6 SETUP_CMD='test'
ASTROPY_VERSION=stable NUMPY_VERSION=stable
CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
PIP_DEPENDENCIES=$PIP_ALL_DEPENDENCIES
DESIHUB_PIP_DEPENDENCIES=$DESIHUB_PIP_ALL_DEPENDENCIES
- os: linux
env: PYTHON_VERSION=3.6 MAIN_CMD='pycodestyle' SETUP_CMD='--count py/desitarget'
include:
# Check for sphinx doc build warnings.
# Note: this test is not a perfectly realistic test of ReadTheDocs
# builds, which operate in a much more bare-bones environment
- os: linux
env: PYTHON_VERSION=3.6 SETUP_CMD='build_sphinx --warning-is-error'
# Try multiple python versions with the latest numpy
# - os: linux
# env: PYTHON_VERSION=3.5 SETUP_CMD='test'
# NUMPY_VERSION=1.15.4
# CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
# PIP_DEPENDENCIES=$PIP_ALL_DEPENDENCIES
# DESIHUB_PIP_DEPENDENCIES=$DESIHUB_PIP_ALL_DEPENDENCIES
- os: linux
env: PYTHON_VERSION=3.6 SETUP_CMD='test --coverage'
CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
PIP_DEPENDENCIES=$PIP_ALL_DEPENDENCIES
DESIHUB_PIP_DEPENDENCIES=$DESIHUB_PIP_ALL_DEPENDENCIES
- os: linux
env: PYTHON_VERSION=3.6 SETUP_CMD='test'
ASTROPY_VERSION=stable NUMPY_VERSION=stable
CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
PIP_DEPENDENCIES=$PIP_ALL_DEPENDENCIES
DESIHUB_PIP_DEPENDENCIES=$DESIHUB_PIP_ALL_DEPENDENCIES
# Standard tests.
# - os: linux
# env: PYTHON_VERSION=2.7 SETUP_CMD='test'
# CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
# PIP_DEPENDENCIES=$PIP_ALL_DEPENDENCIES
# Redundant with the coverage test
# - os: linux
# env: PYTHON_VERSION=3.5 SETUP_CMD='test'
# CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
# PIP_DEPENDENCIES=$PIP_ALL_DEPENDENCIES
# - os: linux
# env: PYTHON_VERSION=3.6 SETUP_CMD='test'
# CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
# PIP_DEPENDENCIES=$PIP_ALL_DEPENDENCIES
# - os: linux
# env: PYTHON_VERSION=3.6 SETUP_CMD='test'
# ASTROPY_VERSION='<4.0'
# CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
# PIP_DEPENDENCIES=$PIP_ALL_DEPENDENCIES
# - os: osx
# env: PYTHON_VERSION=2.7 SETUP_CMD='test'
# - python: 3.3
# env: SETUP_CMD='test --open-files'
# - python: 3.4
# env: SETUP_CMD='test --open-files'
# Now try do scipy on 2.7 and an appropriate 3.x build (with latest numpy)
# We also note the code coverage on Python 2.7.
# - python: 2.7
# env: SETUP_CMD='test --coverage' OPTIONAL_DEPS=true LC_CTYPE=C.ascii LC_ALL=C.ascii
# - python: 3.4
# env: SETUP_CMD='test' OPTIONAL_DEPS=true LC_CTYPE=C.ascii LC_ALL=C.ascii
# Try older numpy versions
# - python: 2.7
# env: NUMPY_VERSION=1.8 SETUP_CMD='test'
# - python: 2.7
# env: NUMPY_VERSION=1.7 SETUP_CMD='test'
# - python: 2.7
# env: NUMPY_VERSION=1.6 SETUP_CMD='test'
# PEP 8 compliance.
- os: linux
env: PYTHON_VERSION=3.6 MAIN_CMD='pycodestyle' SETUP_CMD='--count py/desitarget'
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
# egg_info causes the astropy/ci-helpers script to exit before the pip
# packages are installed, thus desiutil is not installed in that script.
- "if [[ $SETUP_CMD == test* ]]; then pip install --no-binary :all: healpy; fi"
- for p in $DESIHUB_PIP_DEPENDENCIES; do r=$(echo $p | cut -d= -f1); v=$(echo $p | cut -d= -f2); pip install git+https://github.com/desihub/${r}.git@${v}#egg=${r}; done
- export DESIMODEL=${HOME}/desimodel/${DESIMODEL_VERSION}
- mkdir -p ${DESIMODEL}
- if [[ $SETUP_CMD == test* ]]; then svn export https://desi.lbl.gov/svn/code/desimodel/${DESIMODEL_DATA}/data ${DESIMODEL}/data ; fi
- if [[ $SETUP_CMD == test* ]]; then conda list; fi
- if [[ $SETUP_CMD == test* ]]; then python -c 'import numpy; import scipy; print(numpy.__version__); print(numpy.__path__); print(scipy.__version__); print(scipy.__path__)'; fi
- if [[ $MAIN_CMD == 'pycodestyle' ]]; then pip install pycodestyle; fi
script:
- $MAIN_CMD $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls; fi