From 2917aabd382795ade5a9fe588bb0f0964e290ac8 Mon Sep 17 00:00:00 2001 From: barrierye Date: Fri, 27 Mar 2020 20:58:16 +0800 Subject: [PATCH] add app compile CI --- tools/serving_build.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tools/serving_build.sh b/tools/serving_build.sh index ebc52bc5..7e8e1aa9 100644 --- a/tools/serving_build.sh +++ b/tools/serving_build.sh @@ -48,6 +48,29 @@ function rerun() { exit 1 } +function build_app() { + local TYPE=$1 + local DIRNAME=build-app-$TYPE + mkdir $DIRNAME # pwd: /Serving + cd $DIRNAME # pwd: /Serving/build-app-$TYPE + case $TYPE in + CPU|GPU) + cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ \ + -DPYTHON_LIBRARIES=$PYTHONROOT/lib/libpython2.7.so \ + -DPYTHON_EXECUTABLE=$PYTHONROOT/bin/python \ + -DAPP=ON .. + rerun "make -j2 >/dev/null" 3 # due to some network reasons, compilation may fail + pip install -U python/dist/paddle_serving_app* >/dev/null + ;; + *) + echo "error type" + exit 1 + ;; + esac + echo "build app $TYPE part finished as expected." + cd .. # pwd: /Serving +} + function build_client() { local TYPE=$1 local DIRNAME=build-client-$TYPE @@ -230,6 +253,7 @@ function main() { init # pwd: /Serving build_client $TYPE # pwd: /Serving build_server $TYPE # pwd: /Serving + build_app $TYPE # pwd: /Serving python_run_test $TYPE # pwd: /Serving echo "serving $TYPE part finished as expected." } -- GitLab