forked from OpenNMT/OpenNMT-tf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (51 loc) · 1.64 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
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
env:
- MAIN_PYTHON_VERSION="2.7"
addons:
apt:
sources:
- george-edison55-precise-backports
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- cmake
- cmake-data
- libboost-python-dev
before_install:
- 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
fi
install:
- export CXX="g++-4.8" CC="gcc-4.8"
- mkdir build && cd build
- cmake ..
- make
- export PYTHONPATH="$PYTHONPATH:$PWD/third_party/OpenNMTTokenizer/bindings/python/"
- cd ..
script:
- nose2
- 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" && ("$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 "[email protected]"
git config --global user.name "Travis CI"
git remote set-url --push origin "[email protected]:$TRAVIS_REPO_SLUG"
sphinx-versioning push -e .nojekyll docs gh-pages .
fi