Refactor benchmark report download step to improve error handling and add directory listing

This commit is contained in:
Palash Tyagi 2025-05-05 22:33:25 +01:00
parent f0de677b69
commit 33fea1d126

View File

@ -115,8 +115,13 @@ jobs:
exit 1 exit 1
fi fi
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "$artifact_url"
-o benchmark-report.zip "$artifact_url"
# Print all files in the current directory
echo "Files in the current directory:"
ls -al
# check if the zip file is valid # check if the zip file is valid
if ! unzip -tq benchmark-report.zip; then if ! unzip -tq benchmark-report.zip; then
@ -124,10 +129,6 @@ jobs:
exit 1 exit 1
fi fi
# Print all files in the current directory
echo "Files in the current directory:"
ls -al
unzip benchmark-report.zip -d benchmark-report unzip benchmark-report.zip -d benchmark-report
# there will be a tar file in the benchmark-report directory # there will be a tar file in the benchmark-report directory
# called artifact.tar. unzip it into the benchmark-report # called artifact.tar. unzip it into the benchmark-report