mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 20:57:10 +00:00
Pin every external action used by the root GitHub workflow set to a full-length commit SHA and keep the selected release tag as a same-line comment. Update the root workflows to the latest stable tagged action versions found during the audit while preserving existing release guards, permissions, and reusable workflow wiring. closes https://github.com/official-stockfish/Stockfish/pull/6754 No functional change.
112 lines
5.1 KiB
YAML
112 lines
5.1 KiB
YAML
# This workflow will run matetrack on the PR
|
|
|
|
name: Matetrack
|
|
on:
|
|
workflow_call:
|
|
jobs:
|
|
Matetrack:
|
|
name: Matetrack
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout SF repo
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
path: Stockfish
|
|
persist-credentials: false
|
|
|
|
- name: build SF
|
|
working-directory: Stockfish/src
|
|
run: make -j profile-build
|
|
|
|
- name: Checkout matetrack repo
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
repository: vondele/matetrack
|
|
path: matetrack
|
|
ref: 6c8405fac9028ca66a077f5c96c918fec0ef8d1d
|
|
persist-credentials: false
|
|
|
|
- name: matetrack install deps
|
|
working-directory: matetrack
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: cache syzygy
|
|
id: cache-syzygy
|
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
with:
|
|
path: |
|
|
matetrack/3-4-5-wdl/
|
|
matetrack/3-4-5-dtz/
|
|
key: key-syzygy
|
|
|
|
- name: download syzygy 3-4-5 if needed
|
|
working-directory: matetrack
|
|
if: steps.cache-syzygy.outputs.cache-hit != 'true'
|
|
run: |
|
|
wget --no-verbose -r -nH --cut-dirs=2 --no-parent --reject="index.html*" -e robots=off https://tablebase.lichess.ovh/tables/standard/3-4-5-wdl/
|
|
wget --no-verbose -r -nH --cut-dirs=2 --no-parent --reject="index.html*" -e robots=off https://tablebase.lichess.ovh/tables/standard/3-4-5-dtz/
|
|
|
|
- name: Run matetrack th1
|
|
working-directory: matetrack
|
|
run: |
|
|
python matecheck.py --syzygyPath 3-4-5-wdl/:3-4-5-dtz/ --engine /home/runner/work/Stockfish/Stockfish/Stockfish/src/stockfish --epdFile mates2000.epd --nodes 100000 | tee matecheck1.out
|
|
! grep "issues were detected" matecheck1.out > /dev/null
|
|
|
|
- name: Run matetrack th4
|
|
working-directory: matetrack
|
|
run: |
|
|
python matecheck.py --syzygyPath 3-4-5-wdl/:3-4-5-dtz/ --engine /home/runner/work/Stockfish/Stockfish/Stockfish/src/stockfish --epdFile mates2000.epd --nodes 100000 --threads 4 | tee matecheck4.out
|
|
! grep "issues were detected" matecheck4.out > /dev/null
|
|
|
|
- name: Run matetrack th4 gameplay
|
|
working-directory: matetrack
|
|
run: |
|
|
python matecheck.py --engine /home/runner/work/Stockfish/Stockfish/Stockfish/src/stockfish --epdFile mates2000.epd --time 3 --timeinc 0.01 --threads 4 | tee matecheck4g.out
|
|
! grep "issues were detected" matecheck4g.out > /dev/null
|
|
|
|
- name: Run matetrack th4 go-mate
|
|
working-directory: matetrack
|
|
run: |
|
|
head -n 21 matetrack.epd > gomates.epd
|
|
head -n 44 matedtrack.epd >> gomates.epd
|
|
head -n 18 mates2000.epd >> gomates.epd
|
|
python matecheck.py --engine /home/runner/work/Stockfish/Stockfish/Stockfish/src/stockfish --epdFile gomates.epd --mate 0 --threads 4 | tee matecheck4gm.out
|
|
! grep "issues were detected" matecheck4gm.out > /dev/null
|
|
total=$(grep "Total FENs:" matecheck4gm.out | awk '{print $3}')
|
|
bmates=$(grep "Best mates:" matecheck4gm.out | awk '{print $3}')
|
|
if [ $bmates -ne $total ]; then
|
|
echo "At least one go-mate search did not yield expected mate, see matecheck4gm.out" >&2
|
|
exit 1
|
|
fi
|
|
|
|
- name: Run matetrack th1 with --syzygy50MoveRule false
|
|
working-directory: matetrack
|
|
run: |
|
|
grep 5men cursed.epd > cursed5.epd
|
|
python matecheck.py --syzygyPath 3-4-5-wdl/:3-4-5-dtz/ --engine /home/runner/work/Stockfish/Stockfish/Stockfish/src/stockfish --epdFile cursed5.epd --nodes 100000 --syzygy50MoveRule false | tee matecheckcursed1.out
|
|
! grep "issues were detected" matecheckcursed1.out > /dev/null
|
|
|
|
- name: Run matetrack th4 with --syzygy50MoveRule false
|
|
working-directory: matetrack
|
|
run: |
|
|
grep 5men cursed.epd > cursed5.epd
|
|
python matecheck.py --syzygyPath 3-4-5-wdl/:3-4-5-dtz/ --engine /home/runner/work/Stockfish/Stockfish/Stockfish/src/stockfish --epdFile cursed5.epd --nodes 100000 --threads 4 --syzygy50MoveRule false | tee matecheckcursed4.out
|
|
! grep "issues were detected" matecheckcursed4.out > /dev/null
|
|
|
|
- name: Verify mate and TB win count for matecheckcursed[14].out
|
|
working-directory: matetrack
|
|
run: |
|
|
mates=$(grep "Found mates:" matecheckcursed1.out | awk '{print $3}')
|
|
tbwins=$(grep "Found TB wins:" matecheckcursed1.out | awk '{print $4}')
|
|
if [ $(($mates + $tbwins)) -ne 32 ]; then
|
|
echo "Sum of mates and TB wins is not 32 in matecheckcursed1.out" >&2
|
|
exit 1
|
|
fi
|
|
mates=$(grep "Found mates:" matecheckcursed4.out | awk '{print $3}')
|
|
tbwins=$(grep "Found TB wins:" matecheckcursed4.out | awk '{print $4}')
|
|
if [ $(($mates + $tbwins)) -ne 32 ]; then
|
|
echo "Sum of mates and TB wins is not 32 in matecheckcursed4.out" >&2
|
|
exit 1
|
|
fi
|