From ad171bb83bd6ece486052910ebbcc54e9a09f524 Mon Sep 17 00:00:00 2001 From: Dylan Tague <161772172+DMDTague@users.noreply.github.com> Date: Wed, 16 Sep 2026 21:20:52 -0400 Subject: [PATCH 1/2] Handle Stockfish 19 x86-64 asset naming --- tournament/setup_windows.ps1 | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tournament/setup_windows.ps1 b/tournament/setup_windows.ps1 index 2cece8f..8ec5455 100644 --- a/tournament/setup_windows.ps1 +++ b/tournament/setup_windows.ps1 @@ -78,14 +78,23 @@ Copy-Item $fastExe.FullName (Join-Path $BinDir 'fastchess.exe') -Force Write-Host 'Fetching latest official Stockfish release...' $sfRelease = Get-LatestRelease 'official-stockfish/Stockfish' $sfAssets = @($sfRelease.assets) -$sfAsset = $sfAssets | Where-Object { $_.name -match '(?i)windows.*x64.*sse41.*\.zip$' } | Select-Object -First 1 -if (-not $sfAsset) { - $sfAsset = $sfAssets | Where-Object { $_.name -match '(?i)windows.*x64.*avx2.*\.zip$' } | Select-Object -First 1 -} + +# Stockfish 19 names its 64-bit Intel/AMD package +# stockfish-windows-x86-64-universal.zip. Older releases have also used x64 and +# feature-specific package names, so accept either spelling while rejecting ARM64. +$sfAsset = $sfAssets | Where-Object { + $_.name -match '(?i)^stockfish-windows-(x86[-_]?64|x64).*\.zip$' -and + $_.name -notmatch '(?i)arm64' +} | Sort-Object { + if ($_.name -match '(?i)sse41') { 0 } + elseif ($_.name -match '(?i)universal') { 1 } + elseif ($_.name -match '(?i)avx2') { 2 } + else { 3 } +} | Select-Object -First 1 + if (-not $sfAsset) { - $sfAsset = $sfAssets | Where-Object { $_.name -match '(?i)windows.*x64.*\.zip$' } | Select-Object -First 1 + throw "Could not find a compatible Windows x86-64 Stockfish ZIP in release $($sfRelease.tag_name). Assets: $((@($sfAssets.name) -join ', '))" } -if (-not $sfAsset) { throw "Could not find a compatible Windows x64 Stockfish ZIP in release $($sfRelease.tag_name)." } $sfZip = Join-Path $DownloadDir $sfAsset.name Invoke-DownloadFile $sfAsset.browser_download_url $sfZip $sfExtract = Join-Path $DownloadDir 'stockfish' From 42e64625cfe7247bb3b6712972260644392e2498 Mon Sep 17 00:00:00 2001 From: Dylan Tague <161772172+DMDTague@users.noreply.github.com> Date: Wed, 16 Sep 2026 21:21:07 -0400 Subject: [PATCH 2/2] Test current Stockfish Windows asset discovery --- .github/workflows/tournament-tools.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/tournament-tools.yml b/.github/workflows/tournament-tools.yml index cb8c98d..b385d09 100644 --- a/.github/workflows/tournament-tools.yml +++ b/.github/workflows/tournament-tools.yml @@ -84,6 +84,24 @@ jobs: Write-Host "Parsing $($_.Name)" [void][ScriptBlock]::Create((Get-Content $_.FullName -Raw)) } + - name: Verify current Stockfish Windows x86-64 asset is discoverable + shell: pwsh + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + $headers = @{ + 'User-Agent' = 'Pickle-Elo-Harness-CI' + 'Authorization' = "Bearer $env:GITHUB_TOKEN" + } + $release = Invoke-RestMethod -Uri 'https://api.github.com/repos/official-stockfish/Stockfish/releases/latest' -Headers $headers + $asset = @($release.assets) | Where-Object { + $_.name -match '(?i)^stockfish-windows-(x86[-_]?64|x64).*\.zip$' -and + $_.name -notmatch '(?i)arm64' + } | Select-Object -First 1 + if (-not $asset) { + throw "No compatible Windows x86-64 Stockfish ZIP found in $($release.tag_name)." + } + Write-Host "Resolved $($release.tag_name): $($asset.name)" windows-native-build: runs-on: windows-latest