Skip to content

Commit b9eada2

Browse files
committed
Add support of Linux/Windows arm64 runners
Starting Aug 07, 2025, Linux and Windows `arm64` standard hosted runners in public repositories are generally available[^1]. This patch makes these runners part of the test matrix, fixing necessary things along the way to make it happen. [^1]: https://github.blog/changelog/2025-08-07-arm64-hosted-runners-for-public-repositories-are-now-generally-available/
1 parent ec26547 commit b9eada2

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ jobs:
1919
matrix:
2020
os:
2121
- ubuntu-22.04
22+
- ubuntu-22.04-arm
2223
- ubuntu-24.04
24+
- ubuntu-24.04-arm
2325
- macos-13
2426
- macos-14
2527
- macos-15
28+
- windows-11-arm
2629
- windows-2022
2730
- windows-2025
2831
steps:
@@ -35,7 +38,11 @@ jobs:
3538
- name: Run setup-python
3639
uses: actions/setup-python@v5
3740
with:
38-
python-version: "3.10"
41+
python-version: "3.13"
42+
# PostgreSQL has no native ARM64 build for Windows, so the x64
43+
# version is installed instead. This means CPython for x64 must be
44+
# used, so psycopg can properly link to PostgreSQL's libpq.
45+
architecture: ${{ matrix.os == 'windows-11-arm' && 'x64' || '' }}
3946

4047
- name: Run tests
4148
run: |
@@ -56,10 +63,13 @@ jobs:
5663
matrix:
5764
os:
5865
- ubuntu-22.04
66+
- ubuntu-22.04-arm
5967
- ubuntu-24.04
68+
- ubuntu-24.04-arm
6069
- macos-13
6170
- macos-14
6271
- macos-15
72+
- windows-11-arm
6373
- windows-2022
6474
- windows-2025
6575
postgres-version:
@@ -83,7 +93,11 @@ jobs:
8393
- name: Run setup-python
8494
uses: actions/setup-python@v5
8595
with:
86-
python-version: "3.10"
96+
python-version: "3.13"
97+
# PostgreSQL has no native ARM64 build for Windows, so the x64
98+
# version is installed instead. This means CPython for x64 must be
99+
# used, so psycopg can properly link to PostgreSQL's libpq.
100+
architecture: ${{ matrix.os == 'windows-11-arm' && 'x64' || '' }}
87101

88102
- name: Run tests
89103
run: |

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ runs:
5757
sudo apt-get update
5858
sudo apt-get -y install postgresql-${{ inputs.postgres-version }}
5959
60+
# The PostgreSQL 17 package for ARM64 automatically starts the
61+
# PostgreSQL service, occupying the default PostgreSQL port.
62+
sudo systemctl stop postgresql.service
63+
6064
PG_BINDIR=$("/usr/lib/postgresql/${{ inputs.postgres-version }}/bin/pg_config" --bindir)
6165
echo "$PG_BINDIR" >> $GITHUB_PATH
6266

0 commit comments

Comments
 (0)