Skip to content

Commit

Permalink
Revise extract bench from git log in CI
Browse files Browse the repository at this point in the history
order commits differently

closes #4668

No functional change
  • Loading branch information
vondele committed Jul 6, 2023
1 parent e87e103 commit 19e2a88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/stockfish_test.yml
Expand Up @@ -119,8 +119,8 @@ jobs:

- name: Extract the bench number from the commit history
run: |
for ((n=0; n<100; n++)); do
benchref=$(git log HEAD~$n -1 | tac | grep -m 1 -o -x '[[:space:]]*\b[Bb]ench[ :]\+[1-9][0-9]\{5,7\}\b[[:space:]]*' | sed 's/[^0-9]//g') && break || true
for hash in $(git rev-list -100 HEAD); do
benchref=$(git show -s $hash | tac | grep -m 1 -o -x '[[:space:]]*\b[Bb]ench[ :]\+[1-9][0-9]\{5,7\}\b[[:space:]]*' | sed 's/[^0-9]//g') && break || true
done
[[ -n "$benchref" ]] && echo "benchref=$benchref" >> $GITHUB_ENV && echo "From commit: $(git rev-parse HEAD~$n)" && echo "Reference bench: $benchref" || echo "No bench found"
Expand Down

0 comments on commit 19e2a88

Please sign in to comment.