forked from astropy/astropy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
109 lines (91 loc) · 3.87 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
# 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: c
os:
- linux
# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false
# 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
env:
global:
# Set defaults to avoid repeating in most cases
- NUMPY_VERSION=1.9
- MAIN_CMD='python setup.py'
- CONDA_DEPENDENCIES='Cython jinja2'
- CONDA_ALL_DEPENDENCIES='Cython jinja2 scipy h5py matplotlib pyyaml scikit-image pandas pytz beautiful-soup ipython'
- PIP_DEPENDENCIES=''
matrix:
- PYTHON_VERSION=2.7 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.3 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_ALL_DEPENDENCIES
# Check for sphinx doc build warnings - we do this first because it
# runs for a long time. WCSAxes is a dependency for the docs.
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='build_sphinx -w'
CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
PIP_DEPENDENCIES='wcsaxes --no-deps'
# Try all python versions with the latest numpy, but without the
# optional dependencies
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='test --open-files'
- os: linux
env: PYTHON_VERSION=3.3 SETUP_CMD='test --open-files'
- os: linux
env: PYTHON_VERSION=3.4 SETUP_CMD='test --open-files'
- os: linux
env: PYTHON_VERSION=3.5 SETUP_CMD='test --open-files'
# Now try with all optional dependencies on 2.7 and an appropriate 3.x
# build (with latest numpy). We also note the code coverage on Python
# 2.7.
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='test --coverage'
CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
PIP_DEPENDENCIES='cpp-coveralls'
LC_CTYPE=C.ascii LC_ALL=C.ascii
CFLAGS='-ftest-coverage -fprofile-arcs -fno-inline-functions -O0'
- os: linux
env: PYTHON_VERSION=3.4 SETUP_CMD='test'
CONDA_DEPENDENCIES=$CONDA_ALL_DEPENDENCIES
LC_CTYPE=C.ascii LC_ALL=C.ascii
# Try older numpy versions without optional dependencies
- os: linux
env: PYTHON_VERSION=2.7 NUMPY_VERSION=1.8 SETUP_CMD='test'
- os: linux
env: PYTHON_VERSION=2.7 NUMPY_VERSION=1.7 SETUP_CMD='test'
- os: linux
env: PYTHON_VERSION=2.7 NUMPY_VERSION=1.6 SETUP_CMD='test'
# Try developer version of Numpy without optional dependencies
- os: linux
env: PYTHON_VERSION=2.7 NUMPY_VERSION=dev SETUP_CMD='test'
# Do a PEP8 test
- os: linux
env: PYTHON_VERSION=2.7 MAIN_CMD='pep8 astropy --count' SETUP_CMD=''
allow_failures:
- env: PYTHON_VERSION=2.7 NUMPY_VERSION=dev SETUP_CMD='test'
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
script:
- $MAIN_CMD $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == 'test --coverage' ]]; then
cpp-coveralls -E ".*convolution.*" -E ".*_erfa.*" -E ".*\.l" -E ".*\.y" -E ".*flexed.*" -E ".*cextern.*" -E ".*_np_utils.*" -E ".*cparser.*" --dump c-coveralls.json;
coveralls --merge=c-coveralls.json --rcfile='astropy/tests/coveragerc';
fi