未验证 提交 00279fdc 编写于 作者: W wopeizl 提交者: GitHub

modify the build script for new ci test=develop (#16732)

上级 fdb719a1
......@@ -291,8 +291,12 @@ function build() {
Building in /paddle/build ...
============================================
EOF
parallel_number=`nproc`
if [[ "$1" != "" ]]; then
parallel_number=$1
fi
make clean
make -j `nproc`
make -j ${parallel_number}
make install -j `nproc`
}
......@@ -737,9 +741,13 @@ function gen_fluid_lib() {
Generating fluid library for train and inference ...
========================================
EOF
parallel_number=`nproc`
if [[ "$1" != "" ]]; then
parallel_number=$1
fi
cmake .. -DWITH_DISTRIBUTE=OFF -DON_INFER=ON
make -j `nproc` fluid_lib_dist
make -j `nproc` inference_lib_dist
make -j ${parallel_number} fluid_lib_dist
make -j ${parallel_number} inference_lib_dist
}
function tar_fluid_lib() {
......@@ -770,11 +778,22 @@ EOF
function main() {
local CMD=$1
local parallel_number=$2
init
case $CMD in
build_only)
cmake_gen ${PYTHON_ABI:-""}
build ${parallel_number}
;;
build_and_check)
cmake_gen ${PYTHON_ABI:-""}
build ${parallel_number}
assert_api_not_changed ${PYTHON_ABI:-""}
assert_api_spec_approvals
;;
build)
cmake_gen ${PYTHON_ABI:-""}
build
build ${parallel_number}
gen_dockerfile ${PYTHON_ABI:-""}
;;
test)
......@@ -797,7 +816,7 @@ function main() {
;;
fluid_inference_lib)
cmake_gen ${PYTHON_ABI:-""}
gen_fluid_lib
gen_fluid_lib ${parallel_number}
tar_fluid_lib
test_fluid_lib
;;
......@@ -806,16 +825,16 @@ function main() {
;;
cicheck)
cmake_gen ${PYTHON_ABI:-""}
build
build ${parallel_number}
assert_api_not_changed ${PYTHON_ABI:-""}
run_test
gen_fluid_lib
gen_fluid_lib ${parallel_number}
test_fluid_lib
assert_api_spec_approvals
;;
cicheck_brpc)
cmake_gen ${PYTHON_ABI:-""}
build
build ${parallel_number}
run_brpc_test
;;
assert_api)
......@@ -823,7 +842,7 @@ function main() {
assert_api_spec_approvals
;;
test_inference)
gen_fluid_lib
gen_fluid_lib ${parallel_number}
test_fluid_lib
;;
assert_api_approvals)
......@@ -840,7 +859,7 @@ function main() {
;;
cicheck_py35)
cmake_gen ${PYTHON_ABI:-""}
build
build ${parallel_number}
run_test
assert_api_not_changed ${PYTHON_ABI:-""}
;;
......@@ -848,7 +867,7 @@ function main() {
cmake_gen ${PYTHON_ABI:-""}
;;
gen_fluid_lib)
gen_fluid_lib
gen_fluid_lib ${parallel_number}
;;
test_fluid_lib)
test_fluid_lib
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册