forked from PaddlePaddle/Mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (37 loc) · 1.19 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
language: cpp
cache: ccache
sudo: required
dist: trusty
os:
- linux
env:
- JOB=pre_commit
addons:
apt:
packages:
- git
- python
- python-pip
- python2.7-dev
- clang-format-3.8
ssh_known_hosts: 13.229.163.131
before_install:
- sudo pip install -U virtualenv pre-commit
script:
- if [[ "$JOB" == "pre_commit" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
- |
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
- |
timeout 600 .travis/${JOB}.sh # 10min timeout
RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else exit 1; fi;
- |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi;
if [[ "$TRAVIS_BRANCH" != "develop" && ! "$TRAVIS_BRANCH" =~ ^v[[:digit:]]+\.[[:digit:]]+(\.[[:digit:]]+)?(-\S*)?$ ]]; then echo "not develop branch, no deploy"; exit 0; fi;
export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
export MOBILE_DIR=`pwd`
cd ..
curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $MOBILE_DIR
notifications:
email:
on_success: change
on_failure: always