forked from healpy/healpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (81 loc) · 3.2 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
# 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:
- 3.7
- 3.6
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: 3.7
env: USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=false
- python: 3.7
env: USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=true
- python: 3.7
env: USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=false
- python: 3.7
env: USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=true
- python: 3.6
env: USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=false
- python: 3.6
env: USE_ANACONDA=false USE_PIP=false USE_EXTERNAL_CFITSIO=true
- python: 3.6
env: USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=false
- python: 3.6
env: USE_ANACONDA=false USE_PIP=true USE_EXTERNAL_CFITSIO=true
before_install:
- sudo apt-get -qq update
# Use Matplotlib backend appropriate for headless rendering
- |
mkdir -p $HOME/.config/matplotlib && \
echo 'backend: agg' > $HOME/.config/matplotlib/matplotlibrc
# Install python and dependencies via system or anaconda
- |
if $USE_ANACONDA; then
travis_retry wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
-O miniconda.sh && \
bash miniconda.sh -b -p ~/miniconda && \
~/miniconda/bin/conda create --yes -n anaconda_env \
python=$TRAVIS_PYTHON_VERSION \
setuptools pip numpy matplotlib astropy cython pytest scipy requests && \
source ~/miniconda/bin/activate anaconda_env
else
sudo apt-get -y install pkg-config && \
travis_retry pip install --upgrade setuptools && \
travis_retry pip install numpy matplotlib astropy cython pytest scipy requests
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
if $USE_ANACONDA; then
conda uninstall -y cython
else
pip uninstall -y cython
fi
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