Skip external test benchmark diff instead of failing when previous run of the job did not succeed

This commit is contained in:
Kamil Śliwak
2022-06-07 13:24:55 +02:00
parent 3948391ca8
commit 2cea70c04f
3 changed files with 66 additions and 21 deletions
+7 -2
View File
@@ -1257,12 +1257,17 @@ jobs:
pr_id=$(echo "$CIRCLE_PULL_REQUEST" | sed 's|\(.*\)\/||')
scripts_dir=../../../scripts
"${scripts_dir}/externalTests/download_benchmarks.py" --base-of-pr "$pr_id"
# Our main goal here is to provide new benchmarks, the diff is optional. When benchmarks from
# the previous run are not available for whatever reason, we still succeed and just skip the diff.
# download_benchmarks.py exits with status 2 in that case.
if "${scripts_dir}/externalTests/download_benchmarks.py" --base-of-pr "$pr_id" || [[ $? == 2 ]]; then
echo 'export SKIP_BENCHMARK_DIFF=true' >> $BASH_ENV
fi
fi
- run:
name: Diff benchmarks
command: |
if [[ $CIRCLE_PULL_REQUEST != "" ]]; then
if [[ $CIRCLE_PULL_REQUEST != "" && $SKIP_BENCHMARK_DIFF != "true" ]]; then
cd reports/externalTests/
mkdir diff/
scripts_dir=../../scripts