forked from nigroup/nideep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
87 lines (77 loc) · 3.06 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
84
85
86
# Travis CI configuration file
sudo: false
language: cpp
compiler:
#- clang
- gcc
addons:
apt:
packages:
- protobuf-compiler
# blacklist
branches:
except:
- experimental
- /^appveyor.*$/
env:
global:
# Dependencies
- DEPS_DIR="`readlink -f $TRAVIS_BUILD_DIR/..`"
- CONDA_ENV=test-environment
- CONDA_ENV_PREFIX=$HOME/miniconda/envs/$CONDA_ENV
# since we've set language to cpp we have to define python vars ourselves
- TRAVIS_PYTHON_VERSION="2.7"
- WITH_COVERAGE=ON
- CAFFE_ROOT=$DEPS_DIR/caffe # created during install
before_install:
- echo "Package root:"
- ls -1 $TRAVIS_BUILD_DIR
- echo "modules:"
- ls -1 $TRAVIS_BUILD_DIR/nideep
- which python
- python --version
# Setup anaconda for python bindings
- echo "Python $TRAVIS_PYTHON_VERSION"
# CREDIT: https://github.com/SmokinCaterpillar/pypet/blob/master/.travis.yml
- |
if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then
travis_retry wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
travis_retry wget http://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
# miniconda is not always updated with conda
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda create -q -n $CONDA_ENV python=$TRAVIS_PYTHON_VERSION pip numpy scipy nose mock h5py opencv PIL protobuf scikit-learn
- source activate $CONDA_ENV
# Download caffe protobuf message definitions
- mkdir -p $CAFFE_ROOT/src/caffe/proto
- travis_retry wget -P $CAFFE_ROOT/src/caffe/proto https://raw.githubusercontent.com/BVLC/caffe/master/src/caffe/proto/caffe.proto
# Download caffe log parser from caffe repo
- mkdir -p $CAFFE_ROOT/tools/extra
- travis_retry wget -P $CAFFE_ROOT/tools/extra https://raw.githubusercontent.com/BVLC/caffe/master/tools/extra/extract_seconds.py
- travis_retry wget -P $CAFFE_ROOT/tools/extra https://raw.githubusercontent.com/BVLC/caffe/master/tools/extra/parse_log.py
install:
- echo "Installing Coveralls if coverage enabled:"
- if [[ $WITH_COVERAGE == ON ]]; then travis_retry pip install coveralls; fi
- travis_retry pip install lmdb
- export LD_LIBRARY_PATH="$CONDA_ENV_PREFIX/lib:$LD_LIBRARY_PATH"
- export C_INCLUDE_PATH="$CONDA_ENV_PREFIX/include:$C_INCLUDE_PATH"
- export CPLUS_INCLUDE_PATH="$CONDA_ENV_PREFIX/include:$CPLUS_INCLUDE_PATH"
# list installed python packages
#- pip freeze
- chmod +x $TRAVIS_BUILD_DIR/.ci/travis/setup_caffe_mock.sh; $TRAVIS_BUILD_DIR/.ci/travis/setup_caffe_mock.sh $TRAVIS_BUILD_DIR $CAFFE_ROOT
- ls $CAFFE_ROOT/python/caffe/
- ls $CAFFE_ROOT/python/caffe/proto
script:
- export PYTHONPATH="$TRAVIS_BUILD_DIR:$CAFFE_ROOT/python:$CAFFE_ROOT/tools/extra:$PYTHONPATH"
- nosetests --with-coverage --logging-level=INFO --nocapture
- ls -a
after_success:
# report test coverage
- coveralls --verbose