.travis.yml 1.8 KB
Newer Older
Y
Yu Yang 已提交
1
language: cpp
2 3 4
cache:
  directories:
    - $HOME/.ccache
Y
Yu Yang 已提交
5
    - $HOME/.cache/pip
Y
Yu Yang 已提交
6
    - $TRAVIS_BUILD_DIR/build/third_party
Y
Yu Yang 已提交
7 8
sudo: required
dist: trusty
Y
Yu Yang 已提交
9 10
os:
  - linux
Y
Yu Yang 已提交
11
env:
Y
Yi Wang 已提交
12 13
  - JOB=build_doc
  - JOB=check_style
Y
Yu Yang 已提交
14 15 16 17 18 19 20
addons:
  apt:
    packages:
      - gcc-4.8
      - g++-4.8
      - git
      - build-essential
21
      - python
Y
Yu Yang 已提交
22
      - python-pip
23
      - python2.7-dev
24
      - python-wheel
L
liaogang 已提交
25
      - libboost-dev
G
gangliao 已提交
26
      - curl
L
liaogang 已提交
27
      - swig
Y
Yu Yang 已提交
28
      - graphviz
Y
Yu Yang 已提交
29
      - clang-format-3.8
30 31
      - automake
      - libtool
32
      - ccache
D
daming-lu 已提交
33
  ssh_known_hosts: 52.76.173.135
Y
Yu Yang 已提交
34
before_install:
Y
Yi Wang 已提交
35
  - if [[ "$JOB" == "check_style" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
W
wuyi05 已提交
36
  # Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python
Y
Yu Yang 已提交
37
  # protobuf version.
38 39
  - sudo pip install -r $TRAVIS_BUILD_DIR/python/requirements.txt
  - sudo pip install wheel sphinx==1.5.6 recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit LinkChecker
Y
Yu Yang 已提交
40 41
  - |
    function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
Y
Yu Yang 已提交
42
script:
43
  - |
W
wuyi05 已提交
44
    timeout 2580 paddle/scripts/travis/${JOB}.sh # 43min timeout
45
    RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi;
D
daming-lu 已提交
46 47 48 49 50 51 52 53
  - |
    if [[ "$JOB" != "build_doc" ]]; then exit 0; fi;
    if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi;
    if [[ "$TRAVIS_BRANCH" != "develop"  && ! "$TRAVIS_BRANCH" =~ ^v[[:digit:]]+\.[[:digit:]]+(\.[[:digit:]]+)?(-\S*)?$ ]]; then exit 0; fi;
    export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
    export DOCS_DIR=`pwd`
    cd ..
    curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $DOCS_DIR $DOCS_DIR/build/doc   
Y
Yu Yang 已提交
54 55 56 57
notifications:
  email:
    on_success: change
    on_failure: always