mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-14 19:27:04 -04:00
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 <[email protected]>
This commit is contained in:
1 parent
07d7fbfa07
commit
3feea57cd7
1 file changed
+8
-1
@@ -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
|
||||
Reference in new issue
Block a user