forked from gitter-badger/Skater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
84 lines (80 loc) · 2.78 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
language: python
dist: trusty
cache: pip
python:
- "2.7"
- '3.5'
- '3.6'
os:
- linux
before_install:
- sudo apt-get update
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
# - conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda install gxx_linux-64
- conda install libgcc
- export LD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH
install:
# https://github.com/tensorflow/tensorflow/issues/6968 (reason for including libtcmalloc-minimal4)
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy cython scipy h5py flake8 coverage
- source activate test-environment
- conda install -c conda-forge matplotlib
- pip install codecov # not on conda
- pip install coveralls
- if [[ "$TRAVIS_PYTHON_VERSION" > "3.0" ]]; then
python setup.py install --ostype=linux-ubuntu --rl=True;
else
python setup.py install;
fi
- if [[ "$TRAVIS_PYTHON_VERSION" > "3.0" ]]; then
python -m pip install --upgrade --force-reinstall tensorflow==1.4.0;
python -W ignore -c "import tensorflow as tf";
else
sudo apt-get install libtcmalloc-minimal4;
export LD_PRELOAD="/usr/lib/libtcmalloc_minimal.so.4";
python -m pip install --upgrade --force-reinstall tensorflow==1.4.0;
python -W ignore -c "import tensorflow as tf";
fi
- if [[ "$TRAVIS_PYTHON_VERSION" > "3.0" ]]; then
python -m pip install --upgrade --force-reinstall keras==2.0.8;
else
python -m pip install --upgrade --force-reinstall keras==2.0.8;
fi
- python -W ignore -c "import keras as k"
- python -c "import scipy"
- python -c "import numpy"
- python -c "import lime"
before_script: # configure a headless display to test plot generation
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
- coverage run skater/tests/all_tests.py
- flake8 skater
after_success:
- coveralls
branches:
only:
- master
- compute_relevance_dev2
notifications:
#slack:
#secure:
webhooks:
urls:
- https://webhooks.gitter.im/e/56c0942cb2d87bf25ce9
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always