Skip to content

Commit e8d6ff5

Browse files
fix reuse_so_cache (#33234)
1 parent 0f78ddb commit e8d6ff5

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

paddle/scripts/paddle_build.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,11 +2077,15 @@ function summary_check_problems() {
20772077

20782078
function reuse_so_cache() {
20792079
get_html="https://api.github.com/repos/PaddlePaddle/Paddle"
2080-
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)}'
2081-
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'
2082-
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'
2080+
curl -X GET ${get_html}/commits -H "authorization: token ${GITHUB_API_TOKEN}" >tmp.txt
2081+
merge_commit=`grep "sha" tmp.txt| awk -F \" 'NR==1{print $(NF-1)}'| sed 's# ##g'`
2082+
curl -X GET ${get_html}/commits/${merge_commit} -H "authorization: token ${GITHUB_API_TOKEN}" >tmp.txt
2083+
merge_pr=`grep -oP -m 1 '(#[0-9]*)' tmp.txt| sed 's/#//g'`
2084+
curl -X GET ${get_html}/pulls/${merge_pr}/commits -H "authorization: token ${GITHUB_API_TOKEN}" >tmp.txt
2085+
pr_commit=`grep "sha" tmp.txt |tail -3|head -1|awk -F : '{print $NF}'|sed 's#"##g'|sed 's#,##g'| sed 's# ##g'`
20832086
set +e
2084-
down_proto_so=`wget -q https://xly-devops.bj.bcebos.com/PR/Paddle/${merge_pr}/${pr_commit}/workspace/Paddle/build/proto_so.tar.gz`
2087+
wget -q https://xly-devops.bj.bcebos.com/PR/Paddle/${merge_pr}/${pr_commit}/workspace/Paddle/build/proto_so.tar.gz
2088+
down_proto_so=`echo $?`
20852089
set -e
20862090
if [ "${down_proto_so}" -eq 0 ];then
20872091
export CI_SKIP_CPP_TEST=ON

0 commit comments

Comments
 (0)