.travis.yml 1.4 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
19
      - clang-format-3.8
D
daming-lu 已提交
20
  ssh_known_hosts: 13.229.163.131
C
caoying03 已提交
21
before_install:
22
  - if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
Y
fix ci.  
ying 已提交
23 24
  - 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 | $? ))
31 32 33 34 35 36 37 38 39 40
#  Need to fix the deploy script
#  - |
#    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;
#    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
#    exit_code=$(( exit_code | $? ))
#    exit $exit_code
Y
yangyaming 已提交
41

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