forked from mila-iqia/fuel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (62 loc) · 2.11 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
sudo: false
cache:
directories:
- $TRAVIS_BUILD_DIR/data
branches:
only:
- master
- stable
language: python
python:
- "2.7"
- "3.4"
env:
- TESTS=fuel
- TESTS=blocks
before_install:
# Setup Python environment with BLAS libraries
- wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=$HOME/miniconda/bin:$PATH
- conda update -q --yes conda
- export FUEL_DATA_PATH=$TRAVIS_BUILD_DIR/data
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 mkl --file req-travis-conda.txt
pip install -r https://raw.githubusercontent.com/mila-udem/blocks/$TRAVIS_BRANCH/req-travis-pip.txt
pip install . -r requirements.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 mkl --file req-travis-conda.txt
pip install -r req-travis-pip.txt
pip install . -r requirements.txt
fi
script:
- ./.travis-data.sh mnist binarized_mnist "caltech101_silhouettes 16" cifar10 cifar100
- function fail { export FAILED=1; }
- |
if [[ $TESTS == 'blocks' ]]; then
bokeh-server &> /dev/null &
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