提交 367e1231 编写于 作者: C Cao Ying 提交者: GitHub

Merge pull request #20 from lcy-seso/add_travis_config

add travis config.
language: cpp
cache: ccache
sudo: required
dist: trusty
os:
- linux
env:
- JOB=PRE_COMMIT
addons:
apt:
packages:
- git
- python
- python-pip
- python2.7-dev
before_install:
- pip install -U virtualenv pre-commit pip
script:
- .travis/precommit.sh
notifications:
email:
on_success: change
on_failure: always
#!/bin/bash
function abort(){
echo "Your commit not fit PaddlePaddle code style" 1>&2
echo "Please use pre-commit scripts to auto-format your code" 1>&2
exit 1
}
trap 'abort' 0
set -e
cd `dirname $0`
cd ..
export PATH=/usr/bin:$PATH
pre-commit install
if ! pre-commit run -a ; then
ls -lh
git diff --exit-code
exit 1
fi
trap : 0
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册