Skip to content
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
eda0b6f
Allow building on arm64 Windows
chalcolith Jun 5, 2025
6d7c015
Update CI files
chalcolith Jun 5, 2025
5a2aed1
Release notes
chalcolith Jun 5, 2025
e9a048e
Remove setting PONYUP_PLATFORM
chalcolith Jun 6, 2025
2fe1998
Update .release-notes/325.md
chalcolith Jun 6, 2025
9f5c0bf
Verbose output for corral fetch
chalcolith Jun 10, 2025
aaa34d3
Update ponyup-init.ps1 for windows arm
chalcolith Jun 11, 2025
38edd92
Fix typo
chalcolith Jun 11, 2025
4cd8166
See what is in directories
SeanTAllen Jun 12, 2025
62e3c7a
Try building and testing in debug mode in ci for arm windows
chalcolith Jun 18, 2025
0c7f2a1
Try running on self-hosted arm64 machine
chalcolith Jun 19, 2025
c81d15f
Allow self-hosted runner in actionlint
chalcolith Jun 19, 2025
d3a6571
Runner name
chalcolith Jun 19, 2025
e35ad44
Back to release mode
chalcolith Jun 19, 2025
0f2a1e3
Script change
chalcolith Jun 19, 2025
0eb4d37
Go back to github runner
chalcolith Jun 19, 2025
b787c50
Verbose test output
chalcolith Jun 20, 2025
dda10f4
System information
chalcolith Jun 20, 2025
84c29df
Increase test timeouts
chalcolith Jun 21, 2025
97dbe58
Try out a crypto version that doesn't build LibreSSL
SeanTAllen Jun 22, 2025
1c2e9ca
Print out binary types
SeanTAllen Jun 22, 2025
4fbd58f
No verbose
SeanTAllen Jun 22, 2025
27bf301
Add missing "needs" in release flow
SeanTAllen Jul 17, 2025
6536245
Remove stray "machine type" commands in pr.yml
SeanTAllen Jul 17, 2025
2886461
Fix up issue joe found
SeanTAllen Jul 25, 2025
f064891
Fix up
SeanTAllen Jul 25, 2025
250ea6f
Fix
SeanTAllen Jul 25, 2025
f80e67f
Fix
SeanTAllen Jul 25, 2025
6d97be2
Fix
SeanTAllen Jul 25, 2025
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
4 changes: 4 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Configuration related to self-hosted runner.
self-hosted-runner:
labels:
- windows-11-arm
32 changes: 32 additions & 0 deletions .github/workflows/nightlies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,38 @@ jobs:
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.

arm64-pc-windows-msvc-nightly:
name: Build and upload arm64-pc-windows-msvc-nightly to Cloudsmith
runs-on: windows-11-arm
steps:
- uses: actions/checkout@v4.1.1
- name: Build and upload
run: |
python.exe -m pip install --upgrade cloudsmith-cli
Invoke-WebRequest https://dl.cloudsmith.io/public/ponylang/nightlies/raw/versions/latest/ponyc-arm64-pc-windows-msvc.zip -OutFile C:\ponyc.zip;
Expand-Archive -Force -Path C:\ponyc.zip -DestinationPath C:\ponyc;
Invoke-WebRequest https://dl.cloudsmith.io/public/ponylang/nightlies/raw/versions/latest/corral-arm64-pc-windows-msvc.zip -OutFile C:\corral.zip;
Expand-Archive -Force -Path C:\corral.zip -DestinationPath C:\ponyc;
$env:PATH = 'C:\ponyc\bin;' + $env:PATH;
.\make.ps1 -Command fetch;
.\make.ps1 -Command build;
.\make.ps1 -Command install;
.\make.ps1 -Command package;
$version = (Get-Date).ToString("yyyyMMdd"); cloudsmith push raw --version $version --api-key $env:CLOUDSMITH_API_KEY --summary "The Pony toolchain multiplexer" --description "https://github.com/ponylang/ponyup" ponylang/nightlies build\ponyup-arm64-pc-windows-msvc.zip
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- name: Send alert on failure
if: ${{ failure() }}
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5
with:
api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }}
email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }}
organization-url: 'https://ponylang.zulipchat.com/'
to: notifications
type: stream
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.

x86-64-apple-darwin-nightly:
name: Build and upload x86-64-apple-darwin-nightly to Cloudsmith
runs-on: macos-13
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,19 @@ jobs:
.\make.ps1 -Command fetch 2>&1
.\make.ps1 -Command build 2>&1
.\make.ps1 -Command test 2>&1

arm64-windows:
name: arm64 Windows tests
runs-on: windows-11-arm
steps:
- uses: actions/checkout@v4.1.1
- name: Test with most recent ponyc release
run: |
Invoke-WebRequest https://dl.cloudsmith.io/public/ponylang/nightlies/raw/versions/latest/ponyc-arm64-pc-windows-msvc.zip -OutFile C:\ponyc.zip;
Expand-Archive -Force -Path C:\ponyc.zip -DestinationPath C:\ponyc;
Invoke-WebRequest https://dl.cloudsmith.io/public/ponylang/nightlies/raw/versions/latest/corral-arm64-pc-windows-msvc.zip -OutFile C:\corral.zip;
Expand-Archive -Force -Path C:\corral.zip -DestinationPath C:\ponyc;
$env:PATH = 'C:\ponyc\bin;' + $env:PATH;
.\make.ps1 -Command fetch 2>&1
.\make.ps1 -Command build 2>&1
.\make.ps1 -Command test 2>&1
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,29 @@ jobs:
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}

arm64-pc-windows-msvc-release:
name: Build and upload arm64-pc-windows-msvc-release to Cloudsmith
runs-on: windows-11-arm
needs:
- pre-artefact-creation
steps:
- uses: actions/checkout@v4.1.1
- name: Build and upload
run: |
python.exe -m pip install --upgrade cloudsmith-cli
Invoke-WebRequest https://dl.cloudsmith.io/public/ponylang/nightlies/raw/versions/latest/ponyc-arm64-pc-windows-msvc.zip -OutFile C:\ponyc.zip;
Expand-Archive -Force -Path C:\ponyc.zip -DestinationPath C:\ponyc;
Invoke-WebRequest https://dl.cloudsmith.io/public/ponylang/nightlies/raw/versions/latest/corral-arm64-pc-windows-msvc.zip -OutFile C:\corral.zip;
Expand-Archive -Force -Path C:\corral.zip -DestinationPath C:\ponyc;
$env:PATH = 'C:\ponyc\bin;' + $env:PATH;
.\make.ps1 -Command fetch;
.\make.ps1 -Command build;
.\make.ps1 -Command install;
.\make.ps1 -Command package;
$version = (Get-Content .\VERSION); cloudsmith push raw --version $version --api-key $env:CLOUDSMITH_API_KEY --summary "The Pony toolchain multiplexer" --description "https://github.com/ponylang/ponyup" ponylang/releases build\ponyup-arm64-pc-windows-msvc.zip
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}

build-release-docker-images:
name: Build and push release Docker images
runs-on: ubuntu-latest
Expand Down Expand Up @@ -157,6 +180,7 @@ jobs:
name: Trigger release announcement
runs-on: ubuntu-latest
needs:
- arm64-pc-windows-msvc-release
- arm64-unknown-linux-release
- x86-64-unknown-linux-release
- x86-64-pc-windows-msvc-release
Expand Down
3 changes: 3 additions & 0 deletions .release-notes/325.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Add Support for Windows on arm64

We've added support for Windowes on arm64. This means that if you are using `ponyup` on an arm64 system with Windows, it will now recognize it as a supported platform and allow you to install `ponyc` and other related packages.
2 changes: 1 addition & 1 deletion cmd/http_handlers.pony
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use "collections"
use "crypto"
use "ssl/crypto"
use "files"
use "http"
use "json"
Expand Down
6 changes: 3 additions & 3 deletions corral.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"deps": [
{
"locator": "github.com/ponylang/crypto.git",
"version": "1.2.3"
"locator": "github.com/ponylang/ssl.git",
"version": "1.0.0"
},
{
"locator": "github.com/ponylang/appdirs.git",
"version": "0.1.5"
},
{
"locator": "github.com/ponylang/http.git",
"version": "0.6.2"
"version": "0.6.4"
},
{
"locator": "github.com/ponylang/json.git",
Expand Down
30 changes: 17 additions & 13 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Param(

[Parameter(HelpMessage="Architecture (native, x64).")]
[string]
$Arch = "x86-64",
$ZipArch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture,

[Parameter(HelpMessage="Directory to install to.")]
[string]
Expand All @@ -22,6 +22,15 @@ Param(

$ErrorActionPreference = "Stop"

if ($ZipArch -ieq 'x64')
{
$ZipArch = 'x86-64'
}
elseif ($ZipArch -ieq 'arm64')
{
$ZipArch = 'arm64'
}

$target = "ponyup" # The name of the target executable.
$targetPath = "cmd" # The source package directory.
$testPath = "../test" # The path of the tests package relative to $targetPath.
Expand Down Expand Up @@ -59,6 +68,8 @@ Write-Host "Version: $Version"
Write-Host "Root directory: $rootDir"
Write-Host "Source directory: $srcDir"
Write-Host "Build directory: $buildDir"
Write-Host "Processors: $((Get-CimInstance –ClassName Win32_Processor).NumberOfLogicalProcessors)"
Write-Host "Memory Capacity: $((Get-CimInstance -ClassName Win32_PhysicalMemory).Capacity)"

# generate pony templated files if necessary
if (($Command -ne "clean") -and (Test-Path -Path "$rootDir\VERSION"))
Expand Down Expand Up @@ -93,8 +104,8 @@ function BuildTarget
{
if ($binaryTimestamp -lt $file.LastWriteTimeUtc)
{
Write-Host "corral run -- ponyc $configFlag $ponyArgs --cpu `"$Arch`" --output `"$buildDir`" --bin-name `"$target`" `"$srcDir`""
$output = (corral run -- ponyc $configFlag $ponyArgs --cpu "$Arch" --output "$buildDir" --bin-name "$target" "$srcDir")
Write-Host "corral run -- ponyc $configFlag $ponyArgs --output `"$buildDir`" --bin-name `"$target`" `"$srcDir`""
$output = (corral run -- ponyc $configFlag $ponyArgs --output "$buildDir" --bin-name "$target" "$srcDir")
$output | ForEach-Object { Write-Host $_ }
if ($LastExitCode -ne 0) { throw "Error" }
break buildFiles
Expand All @@ -118,8 +129,8 @@ function BuildTest
if ($testTimestamp -lt $file.LastWriteTimeUtc)
{
$testDir = Join-Path -Path $srcDir -ChildPath $testPath
Write-Host "corral run -- ponyc $configFlag $ponyArgs --cpu `"$Arch`" --output `"$buildDir`" --bin-name `"test`" `"$testDir`""
$output = (corral run -- ponyc $configFlag $ponyArgs --cpu "$Arch" --output "$buildDir" --bin-name test "$testDir")
Write-Host "corral run -- ponyc $configFlag $ponyArgs --output `"$buildDir`" --bin-name `"test`" `"$testDir`""
$output = (corral run -- ponyc $configFlag $ponyArgs --output "$buildDir" --bin-name test "$testDir")
$output | ForEach-Object { Write-Host $_ }
if ($LastExitCode -ne 0) { throw "Error" }
break testFiles
Expand Down Expand Up @@ -162,13 +173,6 @@ switch ($Command.ToLower())

"test"
{
if ([Environment]::Is64BitOperatingSystem) {
$env:PONYUP_PLATFORM = 'x86_64-pc-windows-msvc'
}
else {
$env:PONYUP_PLATFORM = 'x86-pc-windows-msvc'
}

$testFile = (BuildTest)[-1]
Write-Host "$testFile --sequential"
& "$testFile" --sequential
Expand Down Expand Up @@ -212,7 +216,7 @@ switch ($Command.ToLower())
if (-not $isLibrary)
{
$binDir = Join-Path -Path $Destdir -ChildPath "bin"
$package = "$target-x86-64-pc-windows-msvc.zip"
$package = "$target-$ZipArch-pc-windows-msvc.zip"
Write-Host "Creating $package..."

Compress-Archive -Path $binDir -DestinationPath "$buildDir\..\$package" -Force
Expand Down
18 changes: 15 additions & 3 deletions ponyup-init.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
Param([string] $Prefix = "$env:LOCALAPPDATA\ponyup", [bool] $SetPath = $true)
$ErrorActionPreference = 'Stop'

$Arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
if ($Arch -ieq 'x64')
{
$Arch = 'x86_64'
$ZipArch = 'x86-64'
}
elseif ($Arch -ieq 'arm64')
{
$Arch = 'arm64'
$ZipArch = 'arm64'
}

$tempParent = [System.IO.Path]::GetTempPath()
$tempName = [System.Guid]::NewGuid()
$tempPath = (Join-Path $tempParent $tempName)
New-Item -ItemType Directory -Path $tempPath

$downloadUrl = 'https://dl.cloudsmith.io/public/ponylang/releases/raw/versions/latest'

$zipName = 'ponyup-x86-64-pc-windows-msvc.zip'
$zipName = "ponyup-$ZipArch-pc-windows-msvc.zip"
$zipUrl = "$downloadUrl/$zipName"
$zipPath = "$tempPath\$zipName"

Expand All @@ -23,13 +35,13 @@ if (-not (Test-Path $ponyupPath)) {
Write-Host "Unzipping to $ponyupPath..."
Expand-Archive -Force -Path $zipPath -DestinationPath $ponyupPath

$platform = 'x86_64-pc-windows-msvc'
$platform = "$Arch-pc-windows-msvc"
Write-Host "Setting platform to $platform..."
Set-Content -Path "$ponyupPath\.platform" -Value $platform

$version = & "$ponyupPath\bin\ponyup" version
if ($version -match 'ponyup (\d+\.\d+\.\d+)') {
$lockStr = "ponyup-release-$($Matches[1])-x86_64-windows"
$lockStr = "ponyup-release-$($Matches[1])-$Arch-windows"
Write-Host "Locking ponyup version to $lockStr..."
$lockPath = "$ponyupPath\.lock"

Expand Down
Loading