-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
130 lines (126 loc) · 3.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
language: python
dist: trusty
python:
- 2.7
- 3.5
notifications:
email: false
addons:
apt:
packages:
- libblas-dev
- liblapack-dev
env:
global:
# Maximal dependencies
- DEPENDS="cython numpy scipy matplotlib pandas"
matrix:
include:
- python: 3.5
env:
- RUN_R_TESTS=1
- DEPENDS="cython numpy scipy statsmodels pandas"
- python: 2.7
env:
- RUN_R_TESTS=1
- DEPENDS="cython numpy scipy statsmodels pandas"
# Testing without matplotlib
- python: 3.5
env:
- DEPENDS="cython numpy scipy pandas"
# Setup.py install
- python: 3.5
env:
- INSTALL_TYPE=setup
- python: 2.7
env:
# Sdist install should collect all dependencies
- INSTALL_TYPE=sdist
- DEPENDS="cython numpy scipy pandas"
- python: 2.7
env:
# Wheel install should collect all dependencies
- INSTALL_TYPE=wheel
- DEPENDS="cython numpy scipy pandas"
- python: 2.7
env:
- INSTALL_TYPE=requirements
- DEPENDS=
# Testing without matplotlib
- python: 3.5
env:
- DEPENDS="cython numpy scipy pandas"
# Documentation doctests
- python: 3.5
env:
- DOC_DOC_TEST=1
# Setup.py install
- python: 3.5
env:
# Sdist install should collect all dependencies
- INSTALL_TYPE=sdist
- DEPENDS="cython numpy scipy pandas"
- python: 3.5
env:
# Wheel install should collect all dependencies
- INSTALL_TYPE=wheel
- DEPENDS="cython numpy scipy pandas"
- python: 3.5
env:
- INSTALL_TYPE=requirements
- DEPENDS=
before_install:
- source travis-tools/utils.sh
- travis_before_install
- sudo apt-get install software-properties-common
- sudo add-apt-repository -y ppa:marutter/c2d4u
- sudo add-apt-repository -y ppa:marutter/rrutter
- sudo apt-get update
# would like to have this stably installed by pip but without DEPENDS it fails
- git clone https://github.com/jonathan-taylor/regreg.git
- cd regreg
- pip install -e .
- cd ..
install:
# Install selectinf
- if [ "$RUN_R_TESTS" ]; then
sudo apt-get install -y r-base r-base-dev r-cran-devtools r-cran-rcpp;
pip install rpy2 statsmodels -c constraints.txt ;
Rscript -e "library(Rcpp); Rcpp::compileAttributes('selectiveInference')";
sudo Rscript -e "install.packages(c('glmnet', 'intervals', 'adaptMCMC', 'SLOPE', 'knockoff'), repos='http://cloud.r-project.org')";
git clone https://github.com/jonathan-taylor/R-selective.git;
cd R-selective;
git submodule init;
git submodule update;
sudo make install;
cd ..;
fi ;
- git submodule init
- git submodule update
- travis_install $INSTALL_TYPE
# command to run tests, e.g. python setup.py test
script:
- pip install nose
# No figure windows for mpl; quote to hide : from travis-ci yaml parsing
- pip install -r requirements.txt -c constraints.txt; # older rpy2
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
- 'echo "backend : agg" > matplotlibrc'
# Doctests only on platforms that have compatible fp output
- if [ `uname` == "Darwin" ] ||
[ "${TRAVIS_PYTHON_VERSION:0:1}" == "3" ]; then
DOCTEST_ARGS="--with-doctest";
fi
- if [ "${COVERAGE}" == "1" ]; then
cp ../.coveragerc .;
COVER_ARGS="--with-coverage --cover-package selectinf";
fi
- |
if [ "$RUN_R_TESTS" ]; then
nosetests -v ../selectinf/algorithms/tests/test_compareR.py
else
env USE_SMALL_SAMPLES=1 USE_TEST_SEED=1 nosetests $DOCTEST_ARGS --verbose $COVER_ARGS selectinf
fi
after_success:
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi