Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/tournament-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 15 additions & 6 deletions tournament/setup_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down