This repository has been archived by the owner on Jul 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 302
/
Copy path.travis.yml
72 lines (67 loc) · 2.31 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
dist: trusty
language: python
python:
- "2.7"
- "3.6"
cache:
directories:
- $HOME/download
- $HOME/miniconda
env:
- CHAINER_VERSION=">=5.0" OPTIONAL_MODULES=0
- CHAINER_VERSION=">=5.0" OPTIONAL_MODULES=1
- CHAINER_VERSION="==6.0.0a1" OPTIONAL_MODULES=0
- CHAINER_VERSION="==6.0.0a1" OPTIONAL_MODULES=1
notifications:
email: false
before_cache:
- rm -rf $HOME/miniconda/locks $HOME/miniconda/pkgs $HOME/miniconda/var
- rm -rf $HOME/miniconda/conda-bld $HOME/miniconda/conda-meda/history
before_install:
# We use the older version of conda because there is a bug in version 4.3.27.
- if [[ ! -d "$HOME/miniconda/bin" ]]; then
rm -rf $HOME/miniconda;
mkdir -p $HOME/download;
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-4.3.21-Linux-x86_64.sh -O $HOME/download/miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-4.3.21-Linux-x86_64.sh -O $HOME/download/miniconda.sh;
fi;
bash $HOME/download/miniconda.sh -b -p $HOME/miniconda;
fi
install:
- source $HOME/miniconda/bin/activate
- 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
- if [[ "$OPTIONAL_MODULES" == "1" ]]; then
export LIBRARY_PATH="$HOME/miniconda/lib:$LIBRARY_PATH";
export LD_LIBRARY_PATH="$HOME/miniconda/envs/chainercv/lib:$LD_LIBRARY_PATH";
conda env create -f environment.yml;
source activate chainercv;
(cd ..; pip install cython==0.28 'git+https://github.com/cocodataset/coco.git#egg=pycocotools&subdirectory=PythonAPI')
else
conda env create -f environment_minimum.yml;
source activate chainercv_minimum;
fi
- pip install -e .
- pip install "chainer$CHAINER_VERSION"
script:
- pwd
- pip install flake8
- pip install hacking==1.0.0
- pip install autopep8
- pip install mock
- pip install pytest
- flake8 .
- autopep8 -r . | tee check_autopep8
- test ! -s check_autopep8
- python style_checker.py --exclude caffe_pb2.py -- .
- if [[ "$OPTIONAL_MODULES" == "1" ]]; then
MPLBACKEND="agg" mpiexec -n 2 pytest -m 'not gpu and not slow' tests;
else
MPLBACKEND="agg" pytest -m 'not gpu and not slow' tests;
fi