forked from fermiPy/fermipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
147 lines (128 loc) · 4.78 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
language: python
dist: trusty
services:
- docker
#cache:
# directories:
# - $HOME/ScienceTools
notifications:
email: false
env:
global:
- FERMI_DIR=$HOME/ScienceTools/x86_64-unknown-linux-gnu-libc2.19-10
- SLAC_ST_BUILD=false
- PIP_DEPS='coverage pytest-cov coveralls'
- CONDA2='conda install -y -c conda-forge healpy wcsaxes'
- INSTALL_CMD='python setup.py install'
matrix:
include:
# The main build:
# Python 2, Fermi ST, all dependencies
- os: linux
env: NAME=main
PYTHON_VERSION=2.7
CONDA_DOWNLOAD=Miniconda-latest-Linux-x86_64.sh
ST_INSTALL='bash stinstall.sh force'
DOCKER_INSTALL=''
CONDA_DEPS='scipy matplotlib pytest pyyaml'
# The Sphinx docs build
# Python 3, no Fermi ST, all other dependencies
- os: linux
env: NAME=docs
PYTHON_VERSION=3.5
ST_INSTALL=''
DOCKER_INSTALL=''
CONDA_DOWNLOAD=Miniconda3-latest-Linux-x86_64.sh
CONDA_DEPS='scipy matplotlib pytest pyyaml sphinx sphinx_rtd_theme'
# Python 3, no Fermi ST, all other dependencies
- os: linux
env: NAME=py3_st-no_dep-yes
PYTHON_VERSION=3.5
ST_INSTALL=''
DOCKER_INSTALL=''
CONDA_DOWNLOAD=Miniconda3-latest-Linux-x86_64.sh
CONDA_DEPS='scipy matplotlib pytest pyyaml'
# Python 2, no Fermi ST, all other dependencies
- os: linux
env: NAME=py2_st-no_dep-yes
PYTHON_VERSION=2.7
ST_INSTALL=''
DOCKER_INSTALL=''
CONDA_DOWNLOAD=Miniconda-latest-Linux-x86_64.sh
CONDA_DEPS='scipy matplotlib pytest pyyaml'
# Python 2, SLAC ST 11-04-00, all other dependencies
- os: linux
sudo: required
env: NAME=py2_slac-st-11-04-00
PYTHON_VERSION=2.7
ST_INSTALL=''
DOCKER_INSTALL='bash dockerinstall.sh docker/centos6-11-04-00-python'
CONDA_DOWNLOAD=Miniconda-latest-Linux-x86_64.sh
CONDA_DEPS='scipy matplotlib pytest pyyaml'
FERMI_DIR='/home'
SLAC_ST_BUILD=true
# Python 2, SLAC ST 11-05-00, all other dependencies
- os: linux
sudo: required
env: NAME=py2_slac-st-11-05-00
PYTHON_VERSION=2.7
ST_INSTALL=''
DOCKER_INSTALL='bash dockerinstall.sh docker/centos6-11-05-00-python'
CONDA_DOWNLOAD=Miniconda-latest-Linux-x86_64.sh
CONDA_DEPS='scipy matplotlib pytest pyyaml'
FERMI_DIR='/home'
SLAC_ST_BUILD=true
# # Python 3, no Fermi ST, only the required dependencies
# # TODO: This isn't working yet, need to handle imports for opt deps more carefully
# - os: linux
# env: PYTHON_VERSION=3.5
# ST_INSTALL=''
# CONDA_DOWNLOAD=Miniconda3-latest-Linux-x86_64.sh
# CONDA_DEPS=''
# CONDA2=''
#before_install:
# - cat Dockerfile
# - $DOCKER_SETUP
# - ls
# Setup anaconda and install packages
install:
# Download and install the ST binaries
- if [[ $DOCKER_INSTALL == '' ]]; then
$ST_INSTALL;
source condainstall.sh;
else
$DOCKER_INSTALL;
docker exec fermipy-testing /bin/bash --login -c "cd /home/fermipy && python setup.py install";
fi
#docker exec fermipy-testing /bin/bash -c "cd /home/fermipy;source /home/fermipy/condainstall.sh";
# - wget http://repo.continuum.io/miniconda/$CONDA_DOWNLOAD -O miniconda.sh
# - bash miniconda.sh -b -p $HOME/miniconda
# - export PATH="$HOME/miniconda/bin:$PATH"
# - conda config --set always_yes yes --set changeps1 no
# - conda update -q conda
# - conda info -a
# - conda create -q -n fermi-env python=$PYTHON_VERSION pip numpy astropy pytest $CONDA_DEPS
# - source activate fermi-env
# - python -m pip install coverage pytest-cov coveralls
# - $CONDA2
# - python setup.py install
# - $ST_INSTALL
# Run test
script:
- if [[ $DOCKER_INSTALL == '' ]]; then
bash travistests.sh;
else
docker exec fermipy-testing /bin/bash --login -c "cd /home/fermipy;/bin/bash /home/fermipy/travistests.sh";
fi
after_success:
- if [[ $NAME == 'main' ]]; then
coveralls --rcfile='fermipy/tests/coveragerc';
elif [[ $SLAC_ST_BUILD == 'true' ]]; then
docker exec fermipy-testing /bin/bash --login -c "cd /home/fermipy;source condasetup.sh;coveralls --rcfile='fermipy/tests/coveragerc'";
fi
#after_script:
# - if [[ $DOCKER_INSTALL != '' ]]; then
# echo stopping docker;
# docker stop test0;
# docker rm test0;
# fi