From 3e1b1f99b232bb4a15a892b837324ef85b93a4b1 Mon Sep 17 00:00:00 2001 From: Zhou Wei <1183042833@qq.com> Date: Tue, 20 Sep 2022 20:11:58 +0800 Subject: [PATCH] fix CI sccache install dir (#46267) --- paddle/scripts/paddle_build.bat | 9 +++++---- paddle/scripts/paddle_build.sh | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/paddle/scripts/paddle_build.bat b/paddle/scripts/paddle_build.bat index 9f4c4fd15ef..27308622055 100644 --- a/paddle/scripts/paddle_build.bat +++ b/paddle/scripts/paddle_build.bat @@ -116,7 +116,6 @@ if "%WITH_PYTHON%" == "ON" ( rem -------Caching strategy 1: keep build directory for incremental compilation----------- rmdir %BUILD_DIR%\python /s/q rmdir %BUILD_DIR%\paddle\third_party\externalError /s/q -rem rmdir %BUILD_DIR%\paddle\fluid\pybind /s/q rmdir %BUILD_DIR%\paddle_install_dir /s/q rmdir %BUILD_DIR%\paddle_inference_install_dir /s/q rmdir %BUILD_DIR%\paddle_inference_c_install_dir /s/q @@ -172,14 +171,16 @@ echo ipipe_log_param_Windows_Build_Cache: %Windows_Build_Cache% cd /d %BUILD_DIR% dir . dir %cache_dir% -dir paddle\fluid\pybind\Release rem -------Caching strategy 1: End -------------------------------- rem -------Caching strategy 2: sccache decorate compiler----------- if not defined SCCACHE_ROOT set SCCACHE_ROOT=D:\sccache +set PATH=%SCCACHE_ROOT%;%PATH% if "%WITH_SCCACHE%"=="ON" ( cmd /C sccache -V || call :install_sccache + cmd /C sccache -V || echo install sccache failed! + sccache --stop-server 2> NUL del %SCCACHE_ROOT%\sccache_log.txt @@ -203,7 +204,7 @@ if "%WITH_SCCACHE%"=="ON" ( sccache -z goto :CASE_%1 ) else ( - del %PYTHON_ROOT%\sccache.exe 2> NUL + del %SCCACHE_ROOT%\sccache.exe 2> NUL goto :CASE_%1 ) @@ -211,7 +212,7 @@ if "%WITH_SCCACHE%"=="ON" ( echo There is not sccache in this PC, will install sccache. echo Download package from https://paddle-ci.gz.bcebos.com/window_requirement/sccache.exe %PYTHON_ROOT%\python.exe -c "import wget;wget.download('https://paddle-ci.gz.bcebos.com/window_requirement/sccache.exe')" -xcopy sccache.exe %PYTHON_ROOT%\ /Y +xcopy sccache.exe %SCCACHE_ROOT%\ /Y del sccache.exe goto:eof rem -------Caching strategy 2: End -------------------------------- diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 837e332ec92..271cdd23100 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -994,12 +994,13 @@ function generate_upstream_develop_api_spec() { mkdir -p ${PADDLE_ROOT}/build/pr_whl && mv ${PADDLE_ROOT}/build/python/dist/*.whl ${PADDLE_ROOT}/build/pr_whl/ echo "pr_whl_size: ${pr_whl_size}" - rm -rf ${PADDLE_ROOT}/build/Makefile ${PADDLE_ROOT}/build/CMakeCache.txt ${PADDLE_ROOT}/build/python/paddle + rm -rf ${PADDLE_ROOT}/build/Makefile ${PADDLE_ROOT}/build/CMakeCache.txt ${PADDLE_ROOT}/build/python cmake_change=`git diff --name-only upstream/$BRANCH | grep "cmake/external" || true` cd ${PADDLE_ROOT} - git checkout . - git checkout -b develop_base_pr upstream/$BRANCH + git fetch upstream $BRANCH + git checkout -b develop_base_pr -t upstream/$BRANCH + git log --pretty=oneline -10 dev_commit=`git log -1|head -1|awk '{print $2}'` dev_url="https://xly-devops.bj.bcebos.com/PR/build_whl/0/${dev_commit}/paddlepaddle_gpu-0.0.0-cp37-cp37m-linux_x86_64.whl" -- GitLab