.travis.yml 1.3 KB
Newer Older
1
language: cpp
2 3 4
cache:
  directories:
    - $HOME/.ccache
Y
Yu Yang 已提交
5
    - $HOME/.cache/pip
6
    - $TRAVIS_BUILD_DIR/build/third_party
7
    - $TRAVIS_BUILD_DIR/build_android/third_party
8 9
sudo: required
dist: trusty
10 11
services:
  - docker
Y
Yu Yang 已提交
12 13
os:
  - linux
14
env:
15
  - JOB=doc
16
  - JOB=check_style
17
  - JOB=build_android
18
addons:
19
  ssh_known_hosts: 13.229.163.131
20
before_install:
21 22
  # For pylint dockstring checker
  - sudo pip install pylint pytest astroid isort
23 24
  - |
    function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
25
script:
26
  - |
27
    # 43min timeout
28
    paddle/scripts/paddle_docker_build.sh ${JOB}
29
    if [ $? -eq 0 ] || [ $? -eq 142 ]; then true; else exit 1; fi;
30
  - |
31 32
    if [[ "$JOB" != "doc" ]]; then exit 0; fi;
    # For document only
33
    if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi;
34
    if [[ "$TRAVIS_BRANCH" != "develop"  && ! "$TRAVIS_BRANCH" =~ ^v|release/[[:digit:]]+\.[[:digit:]]+(\.[[:digit:]]+)?(-\S*)?$ ]]; then exit 0; fi;
35 36 37
    export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
    export DOCS_DIR=`pwd`
    cd ..
L
Luo Tao 已提交
38
    curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $DOCS_DIR $DOCS_DIR/build/doc/
39 40 41 42
notifications:
  email:
    on_success: change
    on_failure: always