forked from MDAnalysis/mdanalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
117 lines (103 loc) · 4.05 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
language: generic
group: travis_latest
# Only build for develop and master (and PRs)
branches:
only:
- master
- develop
os:
linux
env:
global:
- secure: "f8EMSWeYC38elhpB4B/ddxlklEvQoycaxnt90Xw2tH/+ThdP1qteQ2vdgNFy1KL7Am/xnbrRhavI5K+ayfxJ93NoE2adaJ9f9aljXK+Oeu+buv5MVo2E2HhN9mX9opSSxiqGmnHIVYcdLP+1soIsDD78SGL7hB/u5nQ1aTzkbaM="
- GH_DOC_BRANCH=develop
- GH_REPOSITORY=github.com/MDAnalysis/mdanalysis.git
- GIT_CI_USER=TravisCI
- MDA_DOCDIR=${TRAVIS_BUILD_DIR}/package/doc/html/html
# Set default python version to avoid repetition later
- PYTHON_VERSION=3.5
- BUILD_DOCS=false
- CODECOV=false
- PYTEST_FLAGS="--disable-pytest-warnings --durations=50"
- PYTEST_LIST="testsuite/MDAnalysisTests"
- MAIN_CMD="pytest ${PYTEST_LIST}"
- SETUP_CMD="${PYTEST_FLAGS}"
- BUILD_CMD="pip install -v package/ && (cd testsuite/ && python setup.py build)"
- CONDA_MIN_DEPENDENCIES="mmtf-python mock six biopython networkx cython joblib matplotlib scipy griddataformats hypothesis gsd codecov"
- CONDA_DEPENDENCIES="${CONDA_MIN_DEPENDENCIES} seaborn>=0.7.0 clustalw=2.1 netcdf4 scikit-learn"
- CONDA_CHANNELS='biobuilds conda-forge'
- CONDA_CHANNEL_PRIORITY=True
- PIP_DEPENDENCIES="duecredit"
- NUMPY_VERSION=stable
- INSTALL_HOLE="true"
matrix:
# Run a coverage test for most versions
- CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=3.7 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=3.6 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=2.7 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- NUMPY_VERSION=1.10.4
- NUMPY_VERSION=dev EVENT_TYPE="cron"
matrix:
fast_finish: true
include:
- env: NAME="Doc"
MAIN_CMD="cd package && python setup.py"
SETUP_CMD="build_sphinx"
PYTHON_VERSION=3.7
BUILD_DOCS=true
BUILD_CMD="cd ${TRAVIS_BUILD_DIR}/package && python setup.py build_ext --inplace"
INSTALL_HOLE="false"
PIP_DEPENDENCIES="${PIP_DEPENDENCIES} sphinx==1.8.5 sphinx-sitemap"
- env: NAME="Lint"
PYLINTRC="${TRAVIS_BUILD_DIR}/package/.pylintrc"
MAIN_CMD="pylint package/MDAnalysis && pylint testsuite/MDAnalysisTests"
SETUP_CMD=""
BUILD_CMD=""
CONDA_DEPENDENCIES=""
INSTALL_HOLE="false"
- os: osx
env: PYTHON_VERSION=3.6
- os: osx
env: PYTHON_VERSION=2.7
- env: NAME='minimal'
CONDA_DEPENDENCIES=${CONDA_MIN_DEPENDENCIES}
INSTALL_HOLE="false"
CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
allow_failures:
- env: NUMPY_VERSION=dev EVENT_TYPE="cron"
before_install:
# Workaround for Travis CI macOS bug (https://github.com/travis-ci/travis-ci/issues/6307)
# See https://github.com/searchivarius/nmslib/pull/259
- |
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
command curl -sSL https://rvm.io/mpapis.asc | gpg --import -;
rvm get head || true
fi
install:
# download hole first to use system curl
# additional external tools (Issue #898) -- HOLE
- |
if [[ $INSTALL_HOLE == 'true' ]]; then \
bash ./maintainer/install_hole.sh $TRAVIS_OS_NAME "${HOME}"; \
HOLE_BINDIR="${HOME}/hole2/exe"; \
export PATH=${PATH}:${HOLE_BINDIR}; \
fi
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
- eval $BUILD_CMD
script:
- cd ${TRAVIS_BUILD_DIR}
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ulimit -S -n 2048; fi
- echo $MAIN_CMD $SETUP_CMD
- eval $MAIN_CMD $SETUP_CMD
after_success:
- |
if [[ $CODECOV == 'true' ]]; then \
codecov; \
fi
# can't use test here since this leads to travis fails even though the build passes
- if [[ ${TRAVIS_PULL_REQUEST} == "false" ]] && [[ ${BUILD_DOCS} == "true" ]] && [[ ${TRAVIS_BRANCH} == ${GH_DOC_BRANCH} ]]; then
bash ${TRAVIS_BUILD_DIR}/maintainer/deploy_docs.sh;
fi