Skip to content

Commit 9cdc6b9

Browse files
Build Python 3.13 wheels
1 parent 658afe4 commit 9cdc6b9

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

.github/workflows/packages.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Build packages
33
on:
4+
- push
45
- workflow_dispatch
56

67

@@ -27,6 +28,7 @@ jobs:
2728
- name: Upload artifacts
2829
uses: actions/upload-artifact@v4
2930
with:
31+
name: sdist-${{ matrix.package_name }}
3032
path: |
3133
dist/*.tar.gz
3234
@@ -64,7 +66,7 @@ jobs:
6466
matrix:
6567
platform: [manylinux, musllinux]
6668
arch: [x86_64, i686, aarch64, ppc64le]
67-
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
69+
pyver: [cp37, cp38, cp39, cp310, cp311, cp312, cp313]
6870

6971
runs-on: ubuntu-latest
7072
steps:
@@ -81,7 +83,7 @@ jobs:
8183
key: libpq-${{ env.LIBPQ_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}
8284

8385
- name: Build wheels
84-
uses: pypa/cibuildwheel@v2.16.2
86+
uses: pypa/cibuildwheel@v2.21.0
8587
env:
8688
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
8789
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
@@ -110,6 +112,7 @@ jobs:
110112
111113
- uses: actions/upload-artifact@v4
112114
with:
115+
name: linux-${{matrix.pyver}}-${{matrix.platform}}_${{matrix.arch}}
113116
path: ./wheelhouse/*.whl
114117

115118
services:
@@ -128,30 +131,48 @@ jobs:
128131
129132
130133
build-macos:
131-
runs-on: macos-latest
134+
runs-on: ${{ matrix.platform }}
132135
if: true
133136

134137
strategy:
135138
fail-fast: false
136139
matrix:
137140
# These archs require an Apple M1 runner: [arm64, universal2]
138141
arch: [x86_64]
139-
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
142+
pyver: [cp38, cp39, cp310, cp311, cp312, cp313]
143+
platform: [macos-12]
144+
include:
145+
- arch: x86_64
146+
pyver: cp37
147+
platform: macos-11
148+
- arch: arm64
149+
pyver: cp310
150+
platform: macos-14
151+
- arch: arm64
152+
pyver: cp311
153+
platform: macos-14
154+
- arch: arm64
155+
pyver: cp312
156+
platform: macos-14
157+
- arch: arm64
158+
pyver: cp313
159+
platform: macos-14
140160

141161
steps:
142162
- name: Checkout repos
143163
uses: actions/checkout@v4
144164

145165
- name: Build wheels
146-
uses: pypa/cibuildwheel@v2.16.2
166+
uses: pypa/cibuildwheel@v2.21.0
147167
env:
148168
CIBW_BUILD: ${{matrix.pyver}}-macosx_${{matrix.arch}}
149-
CIBW_ARCHS_MACOS: x86_64
169+
CIBW_ARCHS_MACOS: ${{matrix.arch}}
150170
CIBW_BEFORE_ALL_MACOS: ./scripts/build/wheel_macos_before_all.sh
151171
CIBW_TEST_COMMAND: >-
152172
export PYTHONPATH={project} &&
153173
python -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')"
154174
CIBW_ENVIRONMENT: >-
175+
MACOSX_DEPLOYMENT_TARGET=12.0
155176
PG_VERSION=16
156177
PACKAGE_NAME=psycopg2-binary
157178
PSYCOPG2_TESTDB=postgres
@@ -161,4 +182,5 @@ jobs:
161182
- name: Upload artifacts
162183
uses: actions/upload-artifact@v4
163184
with:
185+
name: macos-${{matrix.pyver}}-${{matrix.platform}}_${{matrix.arch}}
164186
path: ./wheelhouse/*.whl

scripts/build/build_libpq.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ case "$ID" in
3535

3636
alpine)
3737
apk upgrade
38-
apk add --no-cache zlib-dev krb5-dev linux-pam-dev openldap-dev
38+
apk add --no-cache zlib-dev krb5-dev linux-pam-dev openldap-dev libcrypto3
3939
;;
4040

4141
*)

scripts/build/wheel_macos_before_all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ prjdir="$( cd "${dir}/../.." && pwd )"
1414
brew install gnu-sed postgresql@${PG_VERSION}
1515

1616
# Start the database for testing
17-
brew services start postgresql
17+
brew services start postgresql@${PG_VERSION}
1818

1919
# Wait for postgres to come up
2020
for i in $(seq 10 -1 0); do

0 commit comments

Comments
 (0)