Update .travis.yml
* Update TensorFlow to 1.6.0
* Run pylint and sphinx with Python 2.7
* Freeze sphinx version for compatibility with
sphinxcontrib-versioning
* Only deploy documentation for master and tags
@@ -5,7 +5,7 @@ python:
- "3.5"
- "3.6"
env:
- - MAIN_PYTHON_VERSION="3.6"
+ - MAIN_PYTHON_VERSION="2.7"
addons:
apt:
sources:
@@ -18,13 +18,13 @@ addons:
- cmake-data
- libboost-python-dev
before_install:
- - pip install --upgrade numpy
- - pip install tensorflow==1.5.0
+ - pip install tensorflow==1.6.0
- pip install pyyaml
- pip install nose2
- |
if [ "$TRAVIS_PYTHON_VERSION" == "$MAIN_PYTHON_VERSION" ]; then
pip install pylint==1.8.2
+ pip install sphinx==1.6.7
pip install sphinxcontrib-versioning
pip install sphinx_rtd_theme
pip install recommonmark
@@ -41,7 +41,7 @@ script:
- if [ "$TRAVIS_PYTHON_VERSION" == "$MAIN_PYTHON_VERSION" ]; then pylint opennmt/ bin/; fi
after_success:
- |
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PYTHON_VERSION" == "$MAIN_PYTHON_VERSION" ]; then
+ if [[ "$TRAVIS_PYTHON_VERSION" == "$MAIN_PYTHON_VERSION" && ("$TRAVIS_BRANCH" == "master" || -n $TRAVIS_TAG) ]]; then
eval "$(ssh-agent -s)"; touch docs/key; chmod 0600 docs/key
openssl aes-256-cbc -K $encrypted_6389583f9019_key -iv $encrypted_6389583f9019_iv -in docs/key.enc -out docs/key -d && ssh-add docs/key
git config --global user.email "builds@travis-ci.com"
