[CI] Improve Code Prepare stability and cleanup logic (#7198)

This commit is contained in:
YuBaoku
2026-04-07 10:31:36 +08:00
committed by GitHub
parent da3dfe1c80
commit 8cb417e8fb
8 changed files with 140 additions and 23 deletions
+19 -3
View File
@@ -78,11 +78,27 @@ jobs:
if ls /workspace/* >/dev/null 2>&1; then
echo "ERROR: Failed to clean /workspace/* after multiple attempts"
ls -ld /workspace/*
exit 1
echo "Attempting force cleanup with find..."
find /workspace -mindepth 1 -maxdepth 1 -type d -exec chmod -R u+rwx {} \; -exec rm -rf {} + 2>/dev/null || true
if ls /workspace/* >/dev/null 2>&1; then
echo "ERROR: Force cleanup failed. Exiting..."
exit 1
else
echo "Force cleanup succeeded."
fi
fi
'
wget -q --no-proxy ${paddletest_archive_url}
tar -xf PaddleTest.tar.gz
wget -q --no-proxy ${paddletest_archive_url} || {
echo "ERROR: Failed to download archive from ${paddletest_archive_url}"
exit 1
}
tar --no-same-owner -xf PaddleTest.tar.gz || {
echo "ERROR: Failed to extract archive"
exit 1
}
rm -rf PaddleTest.tar.gz
cd PaddleTest
git config --global user.name "FastDeployCI"