-
Notifications
You must be signed in to change notification settings - Fork 268
/
.travis.yml
74 lines (74 loc) · 2.68 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
sudo: false
cache:
directories:
- $TRAVIS_BUILD_DIR/data
branches:
only:
- master
- stable
language: python
python:
- "2.7"
- "3.5"
env:
- TESTS=fuel
- TESTS=blocks
before_install:
# Setup Python environment with BLAS libraries
- |
if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then
# "./.travis-data.sh: line 8: fuel-download: command not found" with minocnda 4.4.10
wget -q http://repo.continuum.io/miniconda/Miniconda2-4.3.31-Linux-x86_64.sh -O miniconda.sh
else
wget -q http://repo.continuum.io/miniconda/Miniconda3-4.3.31-Linux-x86_64.sh -O miniconda.sh
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- python --version
- pip --version
- conda --version
- export FUEL_DATA_PATH=$TRAVIS_BUILD_DIR/data
- export FUEL_LOCAL_DATA_PATH=$TRAVIS_BUILD_DIR/data_local
- export FUEL_FLOATX=float64
install:
# Install all Python dependencies
- |
if [[ $TESTS == 'blocks' ]]; then
curl -O https://raw.githubusercontent.com/mila-udem/blocks/$TRAVIS_BRANCH/req-travis-conda.txt
conda install -q --yes python=$TRAVIS_PYTHON_VERSION --file req-travis-conda.txt
pip install -r https://raw.githubusercontent.com/mila-udem/blocks/$TRAVIS_BRANCH/req-travis-pip.txt
pip install -e git+git://github.com/mila-udem/blocks.git@$TRAVIS_BRANCH#egg=blocks --src=$HOME -r https://raw.githubusercontent.com/mila-udem/blocks/$TRAVIS_BRANCH/requirements.txt
fi
- |
if [[ $TESTS == 'fuel' ]]; then
conda install -q --yes python=$TRAVIS_PYTHON_VERSION --file req-travis-conda.txt
pip install -r req-travis-pip.txt
pip install . -r requirements.txt # Installs the fuel-download command needed by .travis-data.sh
python setup.py build_ext --inplace
fi
script:
- ./.travis-data.sh adult mnist binarized_mnist "caltech101_silhouettes 16" cifar10 cifar100 iris ilsvrc2010
- function fail { export FAILED=1; }
- |
if [[ $TESTS == 'blocks' ]]; then
export MKL_THREADING_LAYER=GNU # For Theano
bokeh-server &> /dev/null &
export PYTHONPATH=$HOME/blocks
nose2 tests --start-dir $HOME/blocks || fail
nose2 doctests --start-dir $HOME/blocks || fail
return $FAILED
fi
- |
if [[ $TESTS == 'fuel' ]]; then
# Running nose2 within coverage makes imports count towards coverage
coverage run -p --source=fuel -m nose2.__main__ -v tests || fail
coverage run -p --source=fuel -m nose2.__main__ -v doctests || fail
return $FAILED
fi
after_script:
- |
if [[ $TESTS == 'fuel' ]]; then
coverage combine
coveralls
fi