forked from bethgelab/foolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (67 loc) · 3.46 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: required
dist: trusty
language: python
python:
- 2.7
- 3.5
- 3.6
env:
global:
- THEANO_FLAGS='floatX=float32'
matrix:
- KERAS_BACKEND=tensorflow
- KERAS_BACKEND=theano
matrix:
exclude:
- python: 3.6
env: KERAS_BACKEND=theano
before_install:
- pip install -U pip
- travis_wait travis_retry pip install --upgrade numpy
- travis_wait travis_retry pip install --upgrade scipy
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install cython; fi # install separately
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install -r requirements-dev-py2.txt; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then pip install -r requirements-dev-py3.txt; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install -r requirements-dev-py3.txt; fi
- travis_wait travis_retry pip install -r requirements-dev.txt
- travis_wait travis_retry pip install --upgrade tensorflow
- python -c 'import tensorflow; print(tensorflow.__version__)'
- travis_wait travis_retry pip install --upgrade theano
- python -c 'import theano; print(theano.__version__)'
- travis_wait travis_retry pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip
- python -c 'import lasagne; print(lasagne.__version__)'
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then travis_wait travis_retry pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp27-cp27mu-linux_x86_64.whl; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then travis_wait travis_retry pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp35-cp35m-linux_x86_64.whl; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then travis_wait travis_retry pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-linux_x86_64.whl; fi
- python -c 'import torch; print(torch.__version__)'
- travis_wait travis_retry pip install --upgrade keras>=2.1.5
- python -c 'import keras; print(keras.__version__)'
- travis_wait travis_retry pip install --upgrade mxnet>=1.1.0
- python -c 'import mxnet; print(mxnet.__version__)'
#install open mpi for cntk
- mkdir /tmp/mpi
- pushd /tmp/mpi
- wget http://cntk.ai/PythonWheel/ForKeras/depends/openmpi_1.10-3.zip
- unzip ./openmpi_1.10-3.zip
- sudo dpkg -i openmpi_1.10-3.deb
- popd
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then travis_wait travis_retry pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.3-cp27-cp27mu-linux_x86_64.whl; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then travis_wait travis_retry pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.3-cp35-cp35m-linux_x86_64.whl; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then travis_wait travis_retry pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.3-cp36-cp36m-linux_x86_64.whl; fi
- python -c 'import cntk; print(cntk.__version__)'
- python -c 'import tensorflow; import torch; print(tensorflow.__version__); print(torch.__version__)'
- python -c 'import torch; import tensorflow; print(tensorflow.__version__); print(torch.__version__)'
- pip install pytest-faulthandler
install:
- pip install -e .
script:
- pytest --collect-only
# tf eager cannot be run in the same process as standard tf
- pytest --ignore=foolbox/tests/test_models_tensorflow_eager.py
- pytest --cov-append foolbox/tests/test_models_tensorflow_eager.py
- flake8 --ignore E402,E741 .
after_success:
- coveralls
cache:
- pip
- apt