forked from kastnerkyle/fuel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (72 loc) · 2.61 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
sudo: false
cache:
directories:
- $TRAVIS_BUILD_DIR/data
branches:
only:
- master
language: python
python:
- "2.7"
- "3.4"
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
# Download MNIST for tests if not loaded from cache
- |
if [ ! -d $TRAVIS_BUILD_DIR/data/mnist ]; then
mkdir $TRAVIS_BUILD_DIR/data/mnist
fi
- |
if find $TRAVIS_BUILD_DIR/data/mnist -empty | read; then
cd $TRAVIS_BUILD_DIR/data/mnist
curl -O http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz \
-O http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz \
-O http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz \
-O http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
gunzip *-ubyte.gz
cd -
fi
# Download CIFAR10 for tests if not loaded from cache
- |
if [ ! -d $TRAVIS_BUILD_DIR/data/cifar10 ]; then
mkdir $TRAVIS_BUILD_DIR/data/cifar10
fi
- |
if find $TRAVIS_BUILD_DIR/data/cifar10 -empty | read; then
cd $TRAVIS_BUILD_DIR/data/cifar10
curl http://www.cs.utoronto.ca/~kriz/cifar-10-python.tar.gz | tar xzf -
cd -
fi
- export FUEL_DATA_PATH=$TRAVIS_BUILD_DIR/data
install:
# Install all Python dependencies
- conda install -q --yes python=$TRAVIS_PYTHON_VERSION mkl bokeh nose numpy pip coverage six toolz pytables h5py
- pip install -q coveralls
script:
- pip install . -r requirements.txt
# Download and process binarized MNIST for tests if not loaded from cache
- |
if [ ! -f $FUEL_DATA_PATH/binarized_mnist.hdf5 ]; then
cd $FUEL_DATA_PATH
fuel-download binarized_mnist
fuel-convert binarized_mnist
fuel-download --clear binarized_mnist
cd -
fi
# With Fuel installed we can install Blocks
- pip install -e git+git://github.com/bartvm/blocks.git#egg=blocks[test,plot] --src=$HOME -r https://raw.githubusercontent.com/bartvm/blocks/master/requirements.txt
# Run the Blocks test to make sure we didn't break anything
- bokeh-server &> /dev/null &
- nose2 tests --start-dir $HOME/blocks
- nose2 doctests --start-dir $HOME/blocks
# Running nose2 within coverage makes imports count towards coverage
- coverage run -p --source=fuel -m nose2.__main__ -v tests
- coverage run -p --source=fuel -m nose2.__main__ -v doctests
after_script:
- coverage combine
- coveralls