Skip to content

Add Windows on Arm (arm64) CI: build + regression-test the driver, ... - #196

Merged
davecramer merged 4 commits into
postgresql-interfaces:mainfrom
LWOpenSource:main
Jul 31, 2026
Merged

Add Windows on Arm (arm64) CI: build + regression-test the driver, ...#196
davecramer merged 4 commits into
postgresql-interfaces:mainfrom
LWOpenSource:main

Conversation

@jraiford1

Copy link
Copy Markdown
Contributor

MSM and MSI natively on windows-11-arm, with libpq and OpenSSL built from source

…M and MSI natively on windows-11-arm, with libpq and OpenSSL built from source
@jraiford1

Copy link
Copy Markdown
Contributor Author

Hi. This PR adds Windows on Arm (arm64) support. I've extended the Windows CI action to also compile and regression-test the driver natively on arm64, and it builds the arm64 installers (MSM/MSI) alongside the existing x86/x64 ones. I've also updated the release action to require the arm build to pass. I believe I have matched the style and organization already being used. Please let me know if you require any changes.

By the way, mimalloc isn't available for arm64 the same way it is for x86/x64: its vs2022 project (which winbuild uses) has no ARM64 platform configuration — see microsoft/mimalloc#941. Only mimalloc's CMake build supports arm64, which would diverge from the x86/x64 winbuild scripts, so I've left mimalloc out of the arm64 build for now. Happy to add it via CMake as a follow-up if you'd prefer.

@Sir-J-AU

Copy link
Copy Markdown

In case no one else makes the time to say it, you’re a legend :)

@davecramer

Copy link
Copy Markdown
Contributor

FYI, there is a download for OpenSSL on Arm https://slproweb.com/download/Win64ARMOpenSSL-3_5_7.exe alternatively, we could add a build for it in the project and just pull from there instead of building it every time

@jraiford1

Copy link
Copy Markdown
Contributor Author

Sure, no problem. I'll update it to pull from there.

@jraiford1

Copy link
Copy Markdown
Contributor Author

Done. The arm64 job now pulls the prebuilt Win64ARM OpenSSL from slproweb (silent install, cached) instead of building from source. This matches the same pattern used by the x86/x64 jobs. I also brought the rest of the arm64 section in line with x64 (cache-key components, step ids, MSVC-setup placement), so they're easier to compare now.

@davecramer

Copy link
Copy Markdown
Contributor

Sorry, I've been on vacation, I'll put this in my queue

@jraiford1

Copy link
Copy Markdown
Contributor Author

Sorry, the CI job was green when I submitted my previous changes but I see they failed here. I'm investigating. Please ignore the current update. I synced my fork and It updated this PR but I haven't investigated yet. I'll post again here when it's ready again.

@jraiford1

Copy link
Copy Markdown
Contributor Author

I confirmed that my changes look clean. They should not have affected those failed jobs. I reran on my fork even with the recent upstream commit and everything ran green. The x64 failures point to an issue with the Postgres password not being accepted, and there was also a descrec test failure on arm64, but I'm not sure what would have caused either. I did look back at old CI builds and I didn't see similar failures so it may have just been a weird one-off? Maybe let the updated PR workflow run and see what happens?

@jraiford1

Copy link
Copy Markdown
Contributor Author

I see that failed exactly the same way 🙁. I'm looking into it.

…space/cworkspace) to avoid cross-runner cache collisions
@jraiford1

Copy link
Copy Markdown
Contributor Author

I think I finally understand what happened. This was a cache issue related to the fact the x64 runners use the D: drive for quicker build performance but the Arm runners don't have it. Because the cache is tied to the workspace drive, a cache saved on one runner won't restore correctly on the other. I never saw the issue because I didn't have the cache populated when my jobs ran, so they all downloaded fresh. I changed the cache keys so each runner uses its own. Please have a look and let me know what you think.

@davecramer
davecramer merged commit 61f852b into postgresql-interfaces:main Jul 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants