forked from Theano/Theano
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
138 lines (129 loc) · 6.27 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
# After changing this file, check it on:
# http://lint.travis-ci.org/
sudo: false
cache:
directories:
- $HOME/.cache/pip
- $HOME/.theano
- $HOME/download # Sufficient to add miniconda.sh to TRAVIS cache.
- $HOME/miniconda2 # Add the installation to TRAVIS cache.
language: python
# For now, Python versions have to be listed in the "jobs" matrix
# NB:
# In before_install and install sections below,
# some codes have been moved to separate files
# to better handle if-else shell syntax
# for multiple lines. New files are in
# new folder ".travis".
# command to install dependencies
before_install:
- ./.travis/travis_before_install.sh
- export PATH=/home/travis/miniconda2/bin:$PATH
addons:
apt_packages:
- texlive-latex-recommended
- texlive-latex-extra
- texlive-fonts-recommended
- dvipng
install:
- ./.travis/travis_install.sh
- source activate pyenv
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install pydot; else pip install pydot-ng; fi
- pip install . --no-deps --upgrade
- pip install flake8-future-import parameterized sphinx_rtd_theme
# nose-exclude plugin allow us to tell nosetests to exclude folder with --exclude-dir=path/to/directory.
- pip install nose-exclude nose-timer
- if [[ $NUMPY_VERSION == '1.13.1' ]]; then conda install --yes -q scipy=0.19.1; else conda install --yes -q scipy=0.14; fi # Try to reinstall it to fix the problem
jobs:
include:
# define prototype for doctest
- &doctest
stage: doc
python: "2.7"
env: NUMPY_VERSION=1.9.1 DOC=1 PART="theano/tests/test_flake8.py"
# re-use prototype, changing the Python version
- <<: *doctest
python: "2.7"
env: NUMPY_VERSION=1.13.1 DOC=1 PART="theano/tests/test_flake8.py"
- <<: *doctest
python: "3.4"
env: NUMPY_VERSION=1.9.1 DOC=1 PART="theano/tests/test_flake8.py"
- <<: *doctest
python: "3.6"
env: NUMPY_VERSION=1.13.1 DOC=1 PART="theano/tests/test_flake8.py"
- &normaltest
stage: test
python: "2.7"
env: NUMPY_VERSION=1.9.1 PART="theano/compat theano/compile theano/d3viz theano/gof theano/misc theano/sandbox theano/scalar theano/scan_module theano/tests -e test_flake8.py theano/typed_list"
- <<: *normaltest
python: "3.4"
env: NUMPY_VERSION=1.9.1 PART="theano/compat theano/compile theano/d3viz theano/gof theano/misc theano/sandbox theano/scalar theano/scan_module theano/tests -e test_flake8.py theano/typed_list"
- <<: *normaltest
env: NUMPY_VERSION=1.9.1 PART="theano/sparse theano/tensor --exclude-test=theano.tensor.tests.test_basic --exclude-test=theano.tensor.tests.test_elemwise --exclude-test=theano.tensor.tests.test_opt --exclude-dir=theano/tensor/nnet"
- <<: *normaltest
env: NUMPY_VERSION=1.13.1 PART="theano/sparse theano/tensor --exclude-test=theano.tensor.tests.test_basic --exclude-test=theano.tensor.tests.test_elemwise --exclude-test=theano.tensor.tests.test_opt --exclude-dir=theano/tensor/nnet"
- <<: *normaltest
python: "3.4"
env: NUMPY_VERSION=1.9.1 PART="theano/sparse theano/tensor --exclude-test=theano.tensor.tests.test_basic --exclude-test=theano.tensor.tests.test_elemwise --exclude-test=theano.tensor.tests.test_opt --exclude-dir=theano/tensor/nnet"
- <<: *normaltest
python: "3.6"
env: NUMPY_VERSION=1.13.1 PART="theano/sparse theano/tensor --exclude-test=theano.tensor.tests.test_basic --exclude-test=theano.tensor.tests.test_elemwise --exclude-test=theano.tensor.tests.test_opt --exclude-dir=theano/tensor/nnet"
- <<: *normaltest
env: NUMPY_VERSION=1.9.1 PART="theano/tensor/tests/test_basic.py"
- <<: *normaltest
python: "3.4"
env: NUMPY_VERSION=1.9.1 PART="theano/tensor/tests/test_basic.py"
- <<: *normaltest
env: NUMPY_VERSION=1.9.1 PART="theano/tensor/tests/test_elemwise.py theano/tensor/tests/test_opt.py"
- <<: *normaltest
python: "3.4"
env: NUMPY_VERSION=1.9.1 PART="theano/tensor/tests/test_elemwise.py theano/tensor/tests/test_opt.py"
- <<: *normaltest
env: NUMPY_VERSION=1.9.1 PART="theano/tensor/nnet -e test_abstract_conv.py"
- <<: *normaltest
python: "3.4"
env: NUMPY_VERSION=1.9.1 PART="theano/tensor/nnet -e test_abstract_conv.py"
- <<: *normaltest
env: NUMPY_VERSION=1.9.1 PART="theano/tensor/nnet/tests/test_abstract_conv.py"
- <<: *normaltest
python: "3.4"
env: NUMPY_VERSION=1.9.1 PART="theano/tensor/nnet/tests/test_abstract_conv.py"
- <<: *normaltest
env: NUMPY_VERSION=1.9.1 FAST_COMPILE=1 FLOAT32=1 PART="theano -e test_flake8.py --exclude-dir=theano/tensor/nnet --exclude-dir=theano/tensor/signal"
- <<: *normaltest
python: "3.4"
env: NUMPY_VERSION=1.9.1 FAST_COMPILE=1 PART="theano -e test_flake8.py --exclude-dir=theano/tensor/nnet --exclude-dir=theano/tensor/signal"
- <<: *normaltest
env: NUMPY_VERSION=1.9.1 FAST_COMPILE=1 FLOAT32=1 PART="theano/tensor/nnet"
- <<: *normaltest
python: "3.4"
env: NUMPY_VERSION=1.9.1 FAST_COMPILE=1 PART="theano/tensor/nnet"
- <<: *normaltest
env: NUMPY_VERSION=1.9.1 FAST_COMPILE=1 FLOAT32=1 PART="theano/tensor/signal"
- <<: *normaltest
python: "3.4"
env: NUMPY_VERSION=1.9.1 FAST_COMPILE=1 PART="theano/tensor/signal"
script:
- if [[ $FAST_COMPILE == "1" ]]; then export THEANO_FLAGS=$THEANO_FLAGS,mode=FAST_COMPILE; fi
- if [[ $FLOAT32 == "1" ]]; then export THEANO_FLAGS=$THEANO_FLAGS,floatX=float32; fi
- export THEANO_FLAGS=$THEANO_FLAGS,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,gcc.cxxflags=-pipe
- export MKL_THREADING_LAYER=GNU
- export MKL_NUM_THREADS=1
- export OMP_NUM_THREADS=1
- python --version
- uname -a
- free -m
- df -h
- ulimit -a
- echo "$PART"
# Print information to help debug problems
- python -c 'import numpy; print(numpy.__version__)'
- python -c 'import theano; print(theano.__version__)'
- python -c 'import theano; print(theano.config.__str__(print_doc=False))'
- python -c 'import theano; assert(theano.config.blas.ldflags != "")'
# Run tests for the given part
- theano-nose -v --with-timer --timer-top-n 10 $PART
- if [[ $DOC == "1" ]]; then python doc/scripts/docgen.py --nopdf --check; fi
- if [[ $DOC == "1" ]]; then python doc/scripts/docgen.py --test --check; fi
after_failure:
- cat /home/travis/.pip/pip.log