未验证 提交 19235e85 编写于 作者: T tianshuo78520a 提交者: GitHub

add cpu ci job check_style (#23617)

上级 6bd200db
......@@ -270,20 +270,21 @@ function check_style() {
eval "$(GIMME_GO_VERSION=1.8.3 gimme)"
fi
pip install cpplint
pip install cpplint pylint pytest astroid isort
# set up go environment for running gometalinter
mkdir -p $GOPATH/src/github.com/PaddlePaddle/
ln -sf ${PADDLE_ROOT} $GOPATH/src/github.com/PaddlePaddle/Paddle
export PATH=/usr/bin:$PATH
pre-commit install
clang-format --version
if ! pre-commit run -a ; then
for file_name in `git diff --numstat upstream/$BRANCH |awk '{print $NF}'`;do
if ! pre-commit run --files $file_name ; then
git diff
exit 1
fi
done
trap : 0
}
......@@ -1133,6 +1134,7 @@ function main() {
build ${parallel_number}
;;
build_and_check)
check_style
generate_upstream_develop_api_spec ${PYTHON_ABI:-""} ${parallel_number}
cmake_gen ${PYTHON_ABI:-""}
build ${parallel_number}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册