Skip to content

Commit a2dd5a6

Browse files
ZMXJJclaude
andcommitted
fix(ci): skip --version check for cross-arch llama-server binaries
The x64 CI runner cannot execute ARM64 binaries, causing the fetch step to fail with "not a valid application for this OS platform". Detect host architecture at runtime and skip the verification for cross-arch targets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7094e62 commit a2dd5a6

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

minicpm-sidecar/scripts/fetch-llama-release.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,16 @@ try {
6969
}
7070

7171
Write-Host "==> OK -> $outServer" -ForegroundColor Green
72-
& $outServer --version
72+
# Only run --version when the binary matches the host architecture;
73+
# cross-arch binaries (e.g. arm64 on an x64 runner) can't execute.
74+
$hostArch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLower()
75+
$targetIsArm = $Target -match "arm64"
76+
$hostIsArm = $hostArch -eq "arm64"
77+
if ($targetIsArm -eq $hostIsArm) {
78+
& $outServer --version
79+
} else {
80+
Write-Host " (skipping --version: $Target binary on $hostArch host)" -ForegroundColor Yellow
81+
}
7382
} finally {
7483
Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue
7584
}

0 commit comments

Comments
 (0)