未验证 提交 0fb65651 编写于 作者: Y Yan Chunwei 提交者: GitHub

refine build.sh for server CI (#17717)

上级 73f6056b
...@@ -19,10 +19,10 @@ endif() ...@@ -19,10 +19,10 @@ endif()
proto_library(framework_proto_lite SRCS framework.proto) proto_library(framework_proto_lite SRCS framework.proto)
cc_library(kernel_lite SRCS kernel.cc DEPS type_system target_wrapper_lite any_lite) cc_library(kernel_lite SRCS kernel.cc DEPS type_system target_wrapper_lite any_lite op_params_lite)
cc_library(variable_lite SRCS variable.cc) cc_library(variable_lite SRCS variable.cc)
cc_library(op_registry_lite SRCS op_registry.cc DEPS framework_proto_lite) cc_library(op_registry_lite SRCS op_registry.cc DEPS framework_proto_lite)
cc_library(scope_lite SRCS scope.cc) cc_library(scope_lite SRCS scope.cc DEPS ${tensor_lite})
cc_library(cpu_info_lite SRCS cpu_info.cc) cc_library(cpu_info_lite SRCS cpu_info.cc)
cc_library(context_lite SRCS context.cc DEPS ${tensor_lite} any_lite cpu_info_lite) cc_library(context_lite SRCS context.cc DEPS ${tensor_lite} any_lite cpu_info_lite)
cc_library(op_lite SRCS op_lite.cc DEPS scope_lite op_registry_lite compatible_pb_lite target_wrapper_lite ${tensor_lite}) cc_library(op_lite SRCS op_lite.cc DEPS scope_lite op_registry_lite compatible_pb_lite target_wrapper_lite ${tensor_lite})
......
#!/bin/bash #!/bin/bash
set -e set -ex
TESTS_FILE="" TESTS_FILE="./lite_tests.txt"
readonly common_flags="-DWITH_LITE=ON -DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=OFF -DWITH_PYTHON=OFF -DWITH_TESTING=ON -DLITE_WITH_ARM=OFF" readonly common_flags="-DWITH_LITE=ON -DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=OFF -DWITH_PYTHON=OFF -DWITH_TESTING=ON -DLITE_WITH_ARM=OFF"
function cmake_x86 { function cmake_x86 {
cmake .. -DWITH_GPU=OFF -DLITE_WITH_X86=ON ${common_flags} cmake .. -DWITH_GPU=OFF -DWITH_MKLDNN=OFF -DLITE_WITH_X86=ON ${common_flags}
make test_cxx_api_lite -j8
} }
function cmake_gpu { function cmake_gpu {
cmake .. " -DWITH_GPU=ON {common_flags} -DLITE_WITH_GPU=ON" cmake .. " -DWITH_GPU=ON {common_flags} -DLITE_WITH_GPU=ON"
make test_cxx_api_lite -j8
} }
function cmake_arm { function cmake_arm {
...@@ -48,6 +46,16 @@ function test_mobile { ...@@ -48,6 +46,16 @@ function test_mobile {
local file=$1 local file=$1
} }
# Build the code and run lite server tests. This is executed in the CI system.
function build_test_server {
mkdir -p ./build
cd ./build
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/paddle/build/third_party/install/mklml/lib"
cmake_x86
build $TESTS_FILE
test_lite $TESTS_FILE
}
############################# MAIN ################################# ############################# MAIN #################################
function print_usage { function print_usage {
echo -e "\nUSAGE:" echo -e "\nUSAGE:"
...@@ -97,6 +105,10 @@ function main { ...@@ -97,6 +105,10 @@ function main {
test_lite $TESTS_FILE test_lite $TESTS_FILE
shift shift
;; ;;
build_test_server)
build_test_server
shift
;;
*) *)
# unknown option # unknown option
print_usage print_usage
......
...@@ -72,7 +72,7 @@ ENDIF() ...@@ -72,7 +72,7 @@ ENDIF()
# avoiding cycle dependencies # avoiding cycle dependencies
cc_library(device_context SRCS device_context.cc init.cc DEPS simple_threadpool malloc ${STREAM_CALLBACK_DEPS} cc_library(device_context SRCS device_context.cc init.cc DEPS simple_threadpool malloc ${STREAM_CALLBACK_DEPS}
place eigen3 stringpiece cpu_helper cpu_info framework_proto ${GPU_CTX_DEPS} ${MKLDNN_CTX_DEPS} place eigen3 stringpiece cpu_helper cpu_info framework_proto ${GPU_CTX_DEPS} ${MKLDNN_CTX_DEPS}
temp_allocator ${dgc_deps}) temp_allocator ${dgc_deps} xxhash)
if(WIN32) if(WIN32)
if(WITH_GPU AND NOT WITH_DSO) if(WITH_GPU AND NOT WITH_DSO)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册