.travis.yml 1.3 KB
Newer Older
C
caoying03 已提交
1 2 3 4
language: cpp
cache: ccache
sudo: required
dist: trusty
5 6
services:
  - docker
C
caoying03 已提交
7 8 9 10 11 12 13 14 15 16 17 18
os:
  - linux
env:
  - JOB=PRE_COMMIT

addons:
  apt:
    packages:
      - git
      - python
      - python-pip
      - python2.7-dev
Y
fix ci.  
ying 已提交
19
      - clang-format-3.9
D
daming-lu 已提交
20
  ssh_known_hosts: 52.76.173.135
C
caoying03 已提交
21
before_install:
Y
fix ci.  
ying 已提交
22 23 24
  - if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.9 /usr/bin/clang-format; fi
  - sudo pip install -U virtualenv pre-commit pip
  - docker pull paddlepaddle/paddle:latest
Y
yangyaming 已提交
25

C
caoying03 已提交
26
script:
Y
Fix ci.  
yangyaming 已提交
27 28 29 30
  - exit_code=0
  - .travis/precommit.sh || exit_code=$(( exit_code | $? ))
  - docker run -i --rm -v "$PWD:/py_unittest" paddlepaddle/paddle:latest /bin/bash -c
    'cd /py_unittest; sh .travis/unittest.sh' || exit_code=$(( exit_code | $? ))
D
daming-lu 已提交
31
  - |
Y
Fix ci.  
yangyaming 已提交
32 33
    if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit $exit_code; fi;
    if [[ "$TRAVIS_BRANCH" != "develop"  && ! "$TRAVIS_BRANCH" =~ ^v[[:digit:]]+\.[[:digit:]]+(\.[[:digit:]]+)?(-\S*)?$ ]]; then echo "not develop branch, no deploy"; exit $exit_code; fi;
D
daming-lu 已提交
34 35 36 37
    export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
    export MODELS_DIR=`pwd`
    cd ..
    curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $MODELS_DIR
Y
Fix ci.  
yangyaming 已提交
38 39
    exit_code=$(( exit_code | $? ))
    exit $exit_code
Y
yangyaming 已提交
40

C
caoying03 已提交
41 42 43 44
notifications:
  email:
    on_success: change
    on_failure: always