forked from tardis-sn/tardis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
78 lines (58 loc) · 2.64 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
language: python
python:
- 2.7
virtualenv:
system_site_packages: true
env:
global:
- COMPILER=gcc
- CYTHON_VERSION=0.21
- NUMPY_VERSION=1.8
- PANDAS_VERSION=0.12
- ASTROPY_VERSION=0.4.4
- ASTROPY_USE_SYSTEM_PYTEST=1
- SETUP_CMD='test'
- TEST_MODE='normal'
- ATOM_DATA_URL='http://www.mpa-garching.mpg.de/~michi/tardis/data/kurucz_cd23_chianti_H_He.zip'
matrix:
include:
- python: "2.7"
env: PANDAS_VERSION=0.12
- python: "2.7"
env: PANDAS_VERSION=latest
# - python: "2.7"
# env: ASTROPY_VERSION=development
- python: "2.7"
env: COMPILER=gcc SETUP_CMD='test --args="--atomic-dataset=$HOME/kurucz_cd23_chianti_H_He.h5"' TEST_MODE='spectrum'
- python: "2.7"
env: COMPILER=clang SETUP_CMD='test --args="--atomic-dataset=$HOME/kurucz_cd23_chianti_H_He.h5"' TEST_MODE='spectrum'
- python: "2.7"
env: SETUP_CMD='test --coverage'
before_install:
# We do this to make sure we get the dependencies so pip works below
- export PYTHONIOENCODING=UTF8
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda/bin:$PATH
- conda update --yes conda
- if [[ $COMPILER == 'clang' ]]; then sudo apt-get install -qq clang; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then wget $ATOM_DATA_URL; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then unzip kurucz_cd23_chianti_H_He.zip; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then mv kurucz_cd23_chianti_H_He.h5 $HOME/; fi
install:
- conda create --yes -n tardis-travis --file conda-requirements pip python=$TRAVIS_PYTHON_VERSION
- source activate tardis-travis
- if [[ $NUMPY_VERSION == 'latest' ]]; then conda install --yes numpy; else conda install --yes "numpy==$NUMPY_VERSION"; fi
- if [[ $PANDAS_VERSION == 'latest' ]]; then conda install --yes pandas; else conda install --yes "pandas=$PANDAS_VERSION"; fi
- if [[ $ASTROPY_VERSION == 'development' ]]; then pip install git+https://github.com/astropy/astropy; else conda install --yes "astropy=$ASTROPY_VERSION"; fi
- conda install --yes pytest
- if [[ $SETUP_CMD == 'test --coverage' ]]; then pip install -q coveralls; fi
- if [[ $SETUP_CMD == 'test --coverage' ]]; then pip install -q pytest-cov; fi
script:
- echo CC=$COMPILER python setup.py $SETUP_CMD
- CC=$COMPILER python setup.py $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls; fi
after_failure:
- cat /home/travis/.pip/pip.log