-
Notifications
You must be signed in to change notification settings - Fork 351
/
.travis.yml
86 lines (86 loc) · 2.83 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
sudo: false
cache:
directories:
- $TRAVIS_BUILD_DIR/data
branches:
only:
- master
- stable
language: python
matrix:
include:
- python: 2.7
env: TESTS=blocks FLOATX=float32
- python: 2.7
env: TESTS=blocks FLOATX=float32 DB=sqlite
- python: 3.5
env: TESTS=blocks FLOATX=float64
- python: 2.7
env: TESTS=blocks-examples FLOATX=float32
- python: 2.7
env: TESTS=blocks-examples FLOATX=float32 DB=sqlite
- python: 3.5
env: TESTS=blocks-examples FLOATX=float64
- python: 2.7
env: TESTS=documentation FLOATX=float32
- python: 3.5
env: TESTS=documentation FLOATX=float64
before_install:
- # Setup Python environment with BLAS libraries
- |
if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then
wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
else
wget -q http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda update -q --yes conda
- export FUEL_DATA_PATH=$TRAVIS_BUILD_DIR/data
- export MKL_THREADING_LAYER=GNU # For Theano
install:
# Install all Python dependencies
- conda install -q --yes python=$TRAVIS_PYTHON_VERSION --file req-travis-conda.txt
- |
if [[ $TESTS == 'documentation' ]]; then
conda install -q --yes python=$TRAVIS_PYTHON_VERSION graphviz==2.38.0
fi
- pip install -q -r req-travis-pip.txt
- |
if [[ $TESTS == 'documentation' ]]; then
pip install -q -r req-travis-docs-pip.txt
fi
script:
- pip install -e . -r requirements.txt # Tests setup.py
- curl https://raw.githubusercontent.com/mila-udem/fuel/master/.travis-data.sh | bash -s -- mnist
- # Must export environment variable so that the subprocess is aware of it
- export THEANO_FLAGS=floatX=$FLOATX,optimizer=fast_compile
- export FUEL_FLOATX=$FLOATX
- "if [[ $DB == 'sqlite' ]]; then echo 'log_backend: sqlite' > ~/.blocksrc; fi"
- # Running nose2 within coverage makes imports count towards coverage
- function fail { export FAILED=1; }
- |
if [[ $TESTS == 'blocks' ]]; then
coverage run -p --source=blocks -m nose2.__main__ -v doctests || fail
echo "[global]\ncxx =" > ~/.theanorc
coverage run -p --source=blocks -m nose2.__main__ -v tests || fail
return $FAILED
fi
- |
if [[ $TESTS == 'blocks-examples' ]]; then
cd $TRAVIS_BUILD_DIR
git clone https://github.com/mila-udem/blocks-examples.git
cd blocks-examples
nose2 -v tests
fi
- |
if [[ $TESTS == 'documentation' ]]; then
sphinx-build -vW docs html
fi
after_script:
- |
if [[ $TESTS == 'blocks' ]]; then
coverage combine
coveralls
fi