From 992d4ebb435930a15764ea37c5548edae336543a Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Thu, 25 Nov 2021 14:04:21 +0800 Subject: [PATCH] Fix static-ci (#37504) * Fix static-ci --- paddle/scripts/paddle_build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index b55fce5bef..fba7c8a71d 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -797,7 +797,7 @@ function generate_api_spec() { mkdir -p ${PADDLE_ROOT}/build/.check_api_workspace cd ${PADDLE_ROOT}/build/.check_api_workspace - virtualenv .${spec_kind}_env + virtualenv -p `which python` .${spec_kind}_env source .${spec_kind}_env/bin/activate if [ "$spec_kind" == "DEV" ]; then @@ -2449,16 +2449,18 @@ function trt_convert_test() { function build_pr_and_develop() { cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number} + cmake_change=`git diff --name-only upstream/$BRANCH | grep "cmake/external" || true` + cp ${PADDLE_ROOT}/python/requirements.txt /tmp + generate_api_spec "$1" "PR" mkdir ${PADDLE_ROOT}/build/pr_whl && cp ${PADDLE_ROOT}/build/python/dist/*.whl ${PADDLE_ROOT}/build/pr_whl rm -f ${PADDLE_ROOT}/build/python/dist/*.whl && rm -f ${PADDLE_ROOT}/build/python/build/.timestamp - cmake_change=`git diff --name-only upstream/$BRANCH | grep "cmake/external" || true` if [[ ${cmake_change} ]];then rm -rf ${PADDLE_ROOT}/build/Makefile ${PADDLE_ROOT}/build/CMakeCache.txt rm -rf ${PADDLE_ROOT}/build/third_party fi - git checkout . git checkout -b develop_base_pr upstream/$BRANCH cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number} + generate_api_spec "$1" "DEV" mkdir ${PADDLE_ROOT}/build/dev_whl && cp ${PADDLE_ROOT}/build/python/dist/*.whl ${PADDLE_ROOT}/build/dev_whl } -- GitLab