forked from healpy/healpy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
96 lines (86 loc) · 3.43 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
# Based on http://conda.pydata.org/docs/travis.html,
# but modified so that we can test with Ubuntu's Python interpreter
# as well as Anaconda's.
language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
env:
- USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=false
- USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=true
- USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=false
- USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=true
- USE_ANACONDA=true USE_PIP=false USE_EXTERNAL_CFITSIO=false
- USE_ANACONDA=true USE_PIP=false USE_EXTERNAL_CFITSIO=true
- USE_ANACONDA=true USE_PIP=true USE_EXTERNAL_CFITSIO=false
- USE_ANACONDA=true USE_PIP=true USE_EXTERNAL_CFITSIO=true
# FIXME: The Ubuntu Python 3.4 package may use different default compiler flags.
# I think that Healpy needs to be built with the C compiler in C99 mode.
#
# For speed, only test internal cfitsio on certain versions of Python.
matrix:
exclude:
- python: 2.6
env: USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=false
- python: 2.6
env: USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=false
- python: 2.6
env: USE_ANACONDA=true USE_PIP=false USE_EXTERNAL_CFITSIO=false
- python: 2.6
env: USE_ANACONDA=true USE_PIP=true USE_EXTERNAL_CFITSIO=false
- python: 3.3
env: USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=false
- python: 3.3
env: USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=false
- python: 3.3
env: USE_ANACONDA=true USE_PIP=false USE_EXTERNAL_CFITSIO=false
- python: 3.3
env: USE_ANACONDA=true USE_PIP=true USE_EXTERNAL_CFITSIO=false
- python: 3.4
env: USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=false
- python: 3.4
env: USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=true
- python: 3.4
env: USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=false
- python: 3.4
env: USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=true
before_install:
# Use Matplotlib backend appropriate for headless rendering
- mkdir -p $HOME/.matplotlib
- "echo 'backend: agg' > $HOME/.matplotlib/matplotlibrc"
# Install python and dependencies via system or anaconda
- |
if $USE_ANACONDA; then
travis_retry wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh \
-O miniconda.sh && \
bash miniconda.sh -b && \
~/miniconda/bin/conda create --yes -n anaconda_env \
python=$TRAVIS_PYTHON_VERSION \
setuptools pip numpy matplotlib && \
source ~/miniconda/bin/activate anaconda_env && \
travis_retry pip install pyfits cython pytest
else
sudo apt-get -y install pkg-config && \
travis_retry pip install --upgrade setuptools && \
travis_retry pip install numpy matplotlib pyfits cython pytest
fi
# Install cfitsio if necessary
- if $USE_EXTERNAL_CFITSIO; then sudo apt-get -y install libcfitsio3-dev; fi
install:
# Build first to create Cython sources
# Then make source distribution
# Uninstall things that are only needed when building from git
# Finally, install from the source distribution using pip
- |
if $USE_PIP; then
python setup.py build && \
python setup.py sdist && \
pip uninstall -y cython && \
sudo apt-get -y remove autoconf automake pkg-config && \
pip install dist/*.tar.gz
else
python setup.py install
fi
script: python setup.py test