未验证 提交 cf08bab2 编写于 作者: T tianshuo78520a 提交者: GitHub

Put *.so and proto in the build directory into a tar package (#32993)

上级 5363dade
......@@ -2075,6 +2075,30 @@ function summary_check_problems() {
set -x
}
function reuse_so_cache() {
get_html="https://api.github.com/repos/PaddlePaddle/Paddle"
merge_commit=grep sha tmp.txt `curl -X GET ${get_html}/commits -H "authorization: token ${GITHUB_API_TOKEN}" >tmp.txt` |awk -F \" 'NR==1{print $(NF-1)}'
merge_pr=grep -oP -m 1 '(#[0-9]*)' tmp.txt `curl -X GET ${get_html}/commits/${merge_commit} -H "authorization: token ${GITHUB_API_TOKEN}" >tmp.txt` |sed 's/#//g'
pr_commit=grep "sha" tmp.txt `curl -X GET ${get_html}/pulls/${merge_pr}/commits -H "authorization: token ${GITHUB_API_TOKEN}"` |tail -3|head -1|awk -F : '{print $NF}'|sed 's#"##g'|sed 's#,##g'
set +e
down_proto_so=`wget -q https://xly-devops.bj.bcebos.com/PR/Paddle/${merge_pr}/${pr_commit}/workspace/Paddle/build/proto_so.tar.gz`
set -e
if [ "${down_proto_so}" -eq 0 ];then
export CI_SKIP_CPP_TEST=ON
cd build && mv ../proto_so.tar.gz .
tar --use-compress-program=pigz -xpf proto_so.tar.gz
cmake_gen ${PYTHON_ABI:-""} ${parallel_number}
cd python
touch stub.cc
alias cp=cp
cp -r ../../python/paddle .
python setup.py bdist_wheel
else
cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number}
fi
}
function main() {
local CMD=$1
local parallel_number=$2
......@@ -2218,6 +2242,10 @@ function main() {
parallel_test
check_coverage
;;
reuse_so_cicheck_py35)
reuse_so_cache
parallel_test
;;
cmake_gen)
cmake_gen ${PYTHON_ABI:-""}
;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册