From 3feea57cd7754bef6a5eec5a1fae88d051c59835 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 6 Oct 2026 07:41:47 -0400 Subject: [PATCH] package.ps1: skip the CLI smoke test for an ARM64 build on an x64 machine The cross-compiled ARM64 binary can't run on the x64 packaging runner; the windows-arm64 workflow installs and runs it on ARM64 instead. (x86 builds still run there: x64 Windows runs them.) Co-Authored-By: Claude Opus 5.5 --- packaging/windows/package.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packaging/windows/package.ps1 b/packaging/windows/package.ps1 index 014363f6..d75f8a4c 100644 --- a/packaging/windows/package.ps1 +++ b/packaging/windows/package.ps1 @@ -114,5 +114,12 @@ $Zip = Join-Path $Dist "printcraft-$Version-windows-$Arch-portable.zip" Remove-Item -Force $Zip -ErrorAction SilentlyContinue Compress-Archive -Path $Portable -DestinationPath $Zip -Invoke-Native 'printcraft-cli --version' { & (Join-Path $Stage 'printcraft-cli.exe') --version } +# Smoke-test the CLI when this machine can run it. An ARM64 build made on an x64 runner can't run +# here; .github/workflows/windows-arm64.yml installs and runs it on ARM64 instead. +$HostArch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant() +if ($Arch -ne 'arm64' -or $HostArch -eq 'arm64') { + Invoke-Native 'printcraft-cli --version' { & (Join-Path $Stage 'printcraft-cli.exe') --version } +} else { + Write-Output "skipping printcraft-cli --version: an $Arch build doesn't run on this $HostArch machine" +} Get-Item $Msi, $Zip | Format-Table Name, Length