Skip to content

Commit a3874d5

Browse files
committed
Fix conditional to check for difference
1 parent 07f2966 commit a3874d5

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

devops/actions/benchmarking/aggregate/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ runs:
7070
git config user.name "SYCL Benchmarking Bot"
7171
git config user.email "[email protected]"
7272
git pull
73-
if [ -n "$(git diff)" ]; then
73+
# Make sure changes have been made
74+
if git diff --quiet && git diff --cached --quiet; then
75+
echo "No changes to median, skipping push."
76+
else
7477
git add .
7578
git commit -m "[GHA] Aggregate median data from $SANITIZED_TIMESTAMP to $(date +%Y%m%d_%H%M%S)"
7679
git push "https://[email protected]/$SANITIZED_PERF_RES_GIT_REPO.git" "$SANITIZED_PERF_RES_GIT_BRANCH"
77-
else
78-
echo "No changes to median, skipping push."
7980
fi
8081
- name: Find aggregated average results artifact here
8182
if: always()

devops/actions/run-tests/benchmark/action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,13 @@ runs:
8181
git config user.name "SYCL Benchmarking Bot"
8282
git config user.email "[email protected]"
8383
git pull
84-
if [ -n "$(git diff)" ]; then
85-
git add .
84+
git add .
85+
# Make sure changes have been made
86+
if git diff --quiet && git diff --cached --quiet; then
87+
echo "No new results added, skipping push."
88+
else
8689
git commit -m "[GHA] Upload compute-benchmarks results from https://github.com/intel/llvm/actions/runs/${{ github.run_id }}"
8790
git push "https://[email protected]/$SANITIZED_PERF_RES_GIT_REPO.git" "$SANITIZED_PERF_RES_GIT_BRANCH"
88-
else
89-
echo "No new results added, skipping push."
9091
fi
9192
- name: Find benchmark result artifact here
9293
if: always()

0 commit comments

Comments
 (0)