1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Revise extract bench from git log in CI

order commits differently

closes https://github.com/official-stockfish/Stockfish/pull/4668

No functional change
This commit is contained in:
Joost VandeVondele 2023-07-06 18:30:51 +02:00
parent e87e103ca9
commit 19e2a88504

View file

@ -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"