forked from chainer/chainer
/
.travis.yml
89 lines (79 loc) · 2.37 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
87
88
89
language: python
cache:
- pip
- ccache
matrix:
include:
- os: linux
python: "2.7"
- os: linux
python: "3.4"
- os: linux
python: "3.5"
- os: osx
language: generic
env:
- PYTHON_VERSION=2.7.10
- PYENV_ROOT=~/.pyenv
- PATH=$PYENV_ROOT/shims:$PATH:$PYENV_ROOT/bin
if: (branch = master OR branch = v4) AND (NOT type in (pull_request))
- os: osx
language: generic
env:
- PYTHON_VERSION=3.4.4
- PYENV_ROOT=~/.pyenv
- PATH=$PYENV_ROOT/shims:$PATH:$PYENV_ROOT/bin
if: (branch = master OR branch = v4) AND (NOT type in (pull_request))
- os: osx
language: generic
env:
- PYTHON_VERSION=3.5.1
- PYENV_ROOT=~/.pyenv
- PATH=$PYENV_ROOT/shims:$PATH:$PYENV_ROOT/bin
if: (branch = master OR branch = v4) AND (NOT type in (pull_request))
before_install:
# Remove oclint as it conflicts with GCC (indirect dependency of hdf5)
- if [[ $TRAVIS_OS_NAME = "osx" ]]; then
brew update >/dev/null;
brew outdated pyenv || brew upgrade --quiet pyenv;
PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs2" pyenv install -ks $PYTHON_VERSION;
pyenv global $PYTHON_VERSION;
python --version;
brew cask uninstall oclint;
brew install hdf5;
brew install open-mpi;
fi
install:
- pip install -U pip wheel
- pip install mpi4py
- python setup.py sdist
- pip install dist/*.tar.gz
- travis_wait pip install -U -e .[travis]
script:
- flake8
- autopep8 -r . --diff | tee check_autopep8
- test ! -s check_autopep8
# To workaround Travis issue (https://github.com/travis-ci/travis-ci/issues/7261),
# ignore DeprecationWarning raised in `site.py`.
- python -Werror::DeprecationWarning -Wignore::DeprecationWarning:site -m compileall -f -q chainer chainermn examples tests docs
- pushd tests
- pytest -m "not slow and not gpu and not cudnn and not ideep" chainer_tests
- export OMP_NUM_THREADS=1
- (for NP in 1 2; do mpiexec -n ${NP} pytest -s -v -m 'not gpu and not slow' chainermn_tests || exit $?; done)
- popd
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
READTHEDOCS=True python setup.py develop;
fi
- pushd docs
- make html
- popd
sudo: false
addons:
apt:
packages:
- gfortran
- libhdf5-serial-dev
- liblapack-dev
- openmpi-bin
- openmpi-common
- libopenmpi-dev