forked from OpenNMT/OpenNMT-tf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
52 lines (52 loc) · 1.75 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
language: python
python:
- "2.7"
- "3.6"
env:
global:
- MAIN_PYTHON_VERSION="2.7"
- MAIN_TF_VERSION="1.6.*"
matrix:
- TF_VERSION="1.4.*"
- TF_VERSION="1.5.*"
- TF_VERSION="1.6.*"
- TF_VERSION="1.7.*"
- TF_VERSION="1.8.*"
- TF_VERSION="1.9.*"
matrix:
exclude:
- python: "3.6"
env: TF_VERSION="1.4.*"
- python: "3.6"
env: TF_VERSION="1.5.*"
- python: "3.6"
env: TF_VERSION="1.6.*"
- python: "3.6"
env: TF_VERSION="1.7.*"
- python: "3.6"
env: TF_VERSION="1.8.*"
before_install:
- pip install tensorflow==$TF_VERSION
- pip install -e .[tests]
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "$MAIN_PYTHON_VERSION" && "$TF_VERSION" == "$MAIN_TF_VERSION" ]]; then
pip install pylint==1.8.2
pip install -r docs/requirements.txt
pip install wheel
pip install twine
fi
script:
- nose2
- if [[ "$TRAVIS_PYTHON_VERSION" == "$MAIN_PYTHON_VERSION" && "$TF_VERSION" == "$MAIN_TF_VERSION" ]]; then pylint opennmt/; fi
after_success:
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "$MAIN_PYTHON_VERSION" && "$TF_VERSION" == "$MAIN_TF_VERSION" && -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"
git config --global user.name "Travis CI"
git remote set-url --push origin "git@github.com:$TRAVIS_REPO_SLUG"
sphinx-versioning push -e .nojekyll docs gh-pages .
python setup.py sdist bdist_wheel --universal
twine upload dist/*
fi