forked from tardis-sn/tardis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (53 loc) · 2.04 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
language: python
python:
- 2.7
virtualenv:
system_site_packages: true
cache:
apt: true
sudo: false
env:
global:
- COMPILER=gcc
- PANDAS_VERSION=0.16
- 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: 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'
addons:
apt:
packages:
- clang
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
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- hash -r
- conda update --yes conda
- 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 [[ $SETUP_CMD == 'test --coverage' ]]; then pip install -q coveralls; fi
- if [[ $SETUP_CMD == 'test --coverage' ]]; then conda install --yes coverage=3.7; 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