Skip to content

Commit 20b027b

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 20b027b

File tree

2 files changed

+66
-55
lines changed

2 files changed

+66
-55
lines changed

.github/workflows/ci.yml

Lines changed: 62 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ jobs:
1818
strategy:
1919
matrix:
2020
os:
21-
- ubuntu-22.04
22-
- ubuntu-24.04
23-
- macos-13
24-
- macos-14
25-
- macos-15
26-
- windows-2022
27-
- windows-2025
21+
# - ubuntu-22.04
22+
# - ubuntu-22.04-arm
23+
# - ubuntu-24.04
24+
# - ubuntu-24.04-arm
25+
# - macos-13
26+
# - macos-14
27+
# - macos-15
28+
- windows-11-arm
29+
# - windows-2022
30+
# - windows-2025
2831
steps:
2932
- uses: actions/checkout@v4
3033

@@ -35,7 +38,8 @@ 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+
architecture: "x64"
3943

4044
- name: Run tests
4145
run: |
@@ -50,50 +54,53 @@ jobs:
5054
EXPECTED_SERVER_VERSION: "17"
5155
EXPECTED_SSL: false
5256

53-
parametrized:
54-
runs-on: ${{ matrix.os }}
55-
strategy:
56-
matrix:
57-
os:
58-
- ubuntu-22.04
59-
- ubuntu-24.04
60-
- macos-13
61-
- macos-14
62-
- macos-15
63-
- windows-2022
64-
- windows-2025
65-
postgres-version:
66-
- "14"
67-
- "15"
68-
- "16"
69-
steps:
70-
- uses: actions/checkout@v4
71-
72-
- name: Run setup-postgres
73-
uses: ./
74-
with:
75-
username: yoda
76-
password: GrandMaster
77-
database: jedi_order
78-
port: 34837
79-
postgres-version: ${{ matrix.postgres-version }}
80-
ssl: true
81-
id: postgres
82-
83-
- name: Run setup-python
84-
uses: actions/setup-python@v5
85-
with:
86-
python-version: "3.10"
87-
88-
- name: Run tests
89-
run: |
90-
python3 -m pip install -r tests/requirements.txt
91-
python3 -m pytest -vv tests/test_action.py
92-
env:
93-
CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }}
94-
SERVICE_NAME: ${{ steps.postgres.outputs.service-name }}
95-
CERTIFICATE_PATH: ${{ steps.postgres.outputs.certificate-path }}
96-
EXPECTED_CONNECTION_URI: postgresql://yoda:GrandMaster@localhost:34837/jedi_order?sslmode=verify-ca&sslrootcert=${{ steps.postgres.outputs.certificate-path }}
97-
EXPECTED_SERVICE_NAME: yoda
98-
EXPECTED_SERVER_VERSION: ${{ matrix.postgres-version }}
99-
EXPECTED_SSL: true
57+
# parametrized:
58+
# runs-on: ${{ matrix.os }}
59+
# strategy:
60+
# matrix:
61+
# os:
62+
# - ubuntu-22.04
63+
# - ubuntu-22.04-arm
64+
# - ubuntu-24.04
65+
# - ubuntu-24.04-arm
66+
# - macos-13
67+
# - macos-14
68+
# - macos-15
69+
# - windows-11-arm
70+
# - windows-2022
71+
# - windows-2025
72+
# postgres-version:
73+
# - "14"
74+
# - "15"
75+
# - "16"
76+
# steps:
77+
# - uses: actions/checkout@v4
78+
#
79+
# - name: Run setup-postgres
80+
# uses: ./
81+
# with:
82+
# username: yoda
83+
# password: GrandMaster
84+
# database: jedi_order
85+
# port: 34837
86+
# postgres-version: ${{ matrix.postgres-version }}
87+
# ssl: true
88+
# id: postgres
89+
#
90+
# - name: Run setup-python
91+
# uses: actions/setup-python@v5
92+
# with:
93+
# python-version: "3.13"
94+
#
95+
# - name: Run tests
96+
# run: |
97+
# python3 -m pip install -r tests/requirements.txt
98+
# python3 -m pytest -vv tests/test_action.py
99+
# env:
100+
# CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }}
101+
# SERVICE_NAME: ${{ steps.postgres.outputs.service-name }}
102+
# CERTIFICATE_PATH: ${{ steps.postgres.outputs.certificate-path }}
103+
# EXPECTED_CONNECTION_URI: postgresql://yoda:GrandMaster@localhost:34837/jedi_order?sslmode=verify-ca&sslrootcert=${{ steps.postgres.outputs.certificate-path }}
104+
# EXPECTED_SERVICE_NAME: yoda
105+
# EXPECTED_SERVER_VERSION: ${{ matrix.postgres-version }}
106+
# EXPECTED_SSL: true

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)