Skip to content

Add Windows ARM64 support to CI - #1846

Open
chinazhangchao wants to merge 2 commits into
psycopg:masterfrom
chinazhangchao:chao/winarm64
Open

Add Windows ARM64 support to CI#1846
chinazhangchao wants to merge 2 commits into
psycopg:masterfrom
chinazhangchao:chao/winarm64

Conversation

@chinazhangchao

@chinazhangchao chinazhangchao commented Aug 19, 2026

Copy link
Copy Markdown

Hi @dvarrazzo , I'm from Microsoft and recently I'm working on improving Python ecosystem support for Windows on Arm.
So I updates the CI workflows to add support for Windows ARM64 builds and tests. Could you please help to review? Thanks.

Test results:
https://github.com/chinazhangchao/psycopg2/actions/runs/32325062129

Windows ARM64 support and workflow updates:

  • Updated the windows job in .github/workflows/packages.yml to add win_arm64 to the build matrix, conditionally select the appropriate runner image, and exclude unsupported Python versions for ARM64.
  • Modified PostgreSQL setup in the workflow to install it only if not present, accommodating the lack of PostgreSQL on Windows ARM64 runners.
  • Adjusted environment variables and paths to use the correct vcpkg triplet (arm64-windows for ARM64, x64-windows-release for AMD64) and set CIBW_ARCHS_WINDOWS accordingly. [1] [2]

Build script improvements:

  • Updated scripts/build/wheel_win32_before_build.bat to set VCPKG_TARGET_TRIPLET based on architecture and install the correct libpq package for each triplet.

Stub script enhancements:

  • Enhanced pg_config_vcpkg_stub to support both AMD64 and ARM64, checking the platform and triplet, and constructing the vcpkg path dynamically. The documentation was also updated to reflect the new usage. [1] [2]

@chinazhangchao
chinazhangchao marked this pull request as ready for review August 19, 2026 08:10
@ndabas

ndabas commented Aug 19, 2026

Copy link
Copy Markdown

@chinazhangchao Skipping tests would be a bad idea. You can install PostgreSQL on the WoA runners like I have done in this PR: psycopg/psycopg#1385

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.

2 participants