Skip to content

Commit 23e5479

Browse files
committed
Print out binary types
1 parent 97dbe58 commit 23e5479

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.ci-scripts/machine-type.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Param(
2+
[Parameter(HelpMessage="Architecture (native, x64).")]
3+
[string]
4+
$Binary = ""
5+
)
6+
7+
$bytes = Get-Content $Binary -Encoding Byte
8+
$peOffset = [BitConverter]::ToInt32($bytes, 0x3C)
9+
$machine = [BitConverter]::ToUInt16($bytes, $peOffset + 4)
10+
switch ($machine) {
11+
0x014c { Write-Output "x86" }
12+
0x8664 { Write-Output "x64" }
13+
0xAA64 { Write-Output "ARM64" }
14+
default { Write-Output "Unknown: $machine" }
15+
}

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ jobs:
263263
Expand-Archive -Force -Path C:\corral.zip -DestinationPath C:\ponyc;
264264
$env:PATH = 'C:\ponyc\bin;' + $env:PATH;
265265
.\make.ps1 -Command fetch 2>&1
266-
Get-ChildItem -Path "C:\a\ponyup\ponyup\_corral\github_com_ponylang_net_ssl" -Recurse
267-
Get-ChildItem -Path "C:\a\ponyup\ponyup\_corral\github_com_ponylang_crypto" -Recurse
268266
.\make.ps1 -Command build 2>&1
267+
.\ci-scripts\machine-type.ps1 -Binary C:\a\ponyup\ponyup\build\release\ponyup.exe 2>&1
269268
.\make.ps1 -Command test 2>&1
269+
.\ci-scripts\machine-type.ps1 -Binary C:\a\ponyup\ponyup\build\release\test.exe 2>&1

0 commit comments

Comments
 (0)