diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0002041b..9ee892c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,13 @@ jobs: matrix: os: - ubuntu-22.04 + - ubuntu-22.04-arm - ubuntu-24.04 + - ubuntu-24.04-arm - macos-13 - macos-14 - macos-15 + - windows-11-arm - windows-2022 - windows-2025 steps: @@ -35,7 +38,11 @@ jobs: - name: Run setup-python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.13" + # PostgreSQL has no native ARM64 build for Windows, so the x64 + # version is installed instead. This means CPython for x64 must be + # used, so psycopg can properly link to PostgreSQL's libpq. + architecture: ${{ matrix.os == 'windows-11-arm' && 'x64' || '' }} - name: Run tests run: | @@ -56,10 +63,13 @@ jobs: matrix: os: - ubuntu-22.04 + - ubuntu-22.04-arm - ubuntu-24.04 + - ubuntu-24.04-arm - macos-13 - macos-14 - macos-15 + - windows-11-arm - windows-2022 - windows-2025 postgres-version: @@ -83,7 +93,11 @@ jobs: - name: Run setup-python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.13" + # PostgreSQL has no native ARM64 build for Windows, so the x64 + # version is installed instead. This means CPython for x64 must be + # used, so psycopg can properly link to PostgreSQL's libpq. + architecture: ${{ matrix.os == 'windows-11-arm' && 'x64' || '' }} - name: Run tests run: | diff --git a/action.yml b/action.yml index d6bcb7cd..e90fad2f 100644 --- a/action.yml +++ b/action.yml @@ -57,6 +57,10 @@ runs: sudo apt-get update sudo apt-get -y install postgresql-${{ inputs.postgres-version }} + # The PostgreSQL 17 package for ARM64 automatically starts the + # PostgreSQL service, occupying the default PostgreSQL port. + sudo systemctl stop postgresql.service + PG_BINDIR=$("/usr/lib/postgresql/${{ inputs.postgres-version }}/bin/pg_config" --bindir) echo "$PG_BINDIR" >> $GITHUB_PATH