Skip to content

Commit 7622cd5

Browse files
committed
Add arm64 mac and linux wheels
1 parent 9825bbb commit 7622cd5

File tree

4 files changed

+47
-17
lines changed

4 files changed

+47
-17
lines changed

.github/workflows/install-postgres.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ if [ "${ID}" = "debian" -o "${ID}" = "ubuntu" ]; then
2727
apt-get install -y --no-install-recommends \
2828
"postgresql-${PGVERSION}" \
2929
"postgresql-contrib-${PGVERSION}"
30+
elif [ "${ID}" = "almalinux" ]; then
31+
yum install -y \
32+
"postgresql-server" \
33+
"postgresql-devel" \
34+
"postgresql-contrib"
3035
elif [ "${ID}" = "centos" ]; then
31-
el="EL-${VERSION_ID}-$(arch)"
36+
el="EL-${VERSION_ID%.*}-$(arch)"
3237
baseurl="https://download.postgresql.org/pub/repos/yum/reporpms"
3338
yum install -y "${baseurl}/${el}/pgdg-redhat-repo-latest.noarch.rpm"
34-
if [ ${VERSION_ID} -ge 8 ]; then
39+
if [ ${VERSION_ID%.*} -ge 8 ]; then
3540
dnf -qy module disable postgresql
3641
fi
3742
yum install -y \

.github/workflows/release.yml

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ on:
1010
- "asyncpg/_version.py"
1111

1212
jobs:
13+
autocancel:
14+
if: github.event_name == 'pull_request'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: n1hility/cancel-previous-runs@v2
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
1321
validate-release-request:
1422
runs-on: ubuntu-latest
1523
steps:
@@ -69,18 +77,28 @@ jobs:
6977
path: dist/*.tar.*
7078

7179
build-wheels:
72-
needs: validate-release-request
80+
if: always()
81+
# needs: validate-release-request
7382
runs-on: ${{ matrix.os }}
83+
continue-on-error: true
7484
strategy:
7585
matrix:
76-
os: [ubuntu-latest, macos-latest, windows-latest]
77-
cibw_python: ["cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*"]
78-
cibw_arch: ["auto64", "auto32"]
79-
exclude:
80-
- os: macos-latest
81-
cibw_arch: "auto32"
82-
- os: ubuntu-latest
83-
cibw_arch: "auto32"
86+
include:
87+
- {os: macos-latest, arch: x86_64, build: "*"}
88+
- {os: macos-latest, arch: arm64, build: "*"}
89+
- {os: windows-latest, arch: AMD64, build: "*"}
90+
- {os: windows-latest, arch: x86, build: "*"}
91+
- {os: ubuntu-latest, arch: x86_64, build: "*"}
92+
- {os: ubuntu-latest, arch: aarch64, build: "*[61]-manylinux*"}
93+
- {os: ubuntu-latest, arch: aarch64, build: "*[72]-manylinux*"}
94+
- {os: ubuntu-latest, arch: aarch64, build: "*[83]-manylinux*"}
95+
- {os: ubuntu-latest, arch: aarch64, build: "*[94]-manylinux*"}
96+
- {os: ubuntu-latest, arch: aarch64, build: "*[05]-manylinux*"}
97+
- {os: ubuntu-latest, arch: aarch64, build: "*[61]-musllinux*"}
98+
- {os: ubuntu-latest, arch: aarch64, build: "*[72]-musllinux*"}
99+
- {os: ubuntu-latest, arch: aarch64, build: "*[83]-musllinux*"}
100+
- {os: ubuntu-latest, arch: aarch64, build: "*[94]-musllinux*"}
101+
- {os: ubuntu-latest, arch: aarch64, build: "*[05]-musllinux*"}
84102

85103
defaults:
86104
run:
@@ -94,20 +112,27 @@ jobs:
94112
with:
95113
fetch-depth: 50
96114
submodules: true
115+
116+
- name: Set up QEMU
117+
if: runner.os == 'Linux'
118+
uses: docker/setup-qemu-action@v2
97119

98-
- uses: pypa/cibuildwheel@v2.8.0
120+
- uses: pypa/cibuildwheel@v2.10.0
99121
env:
100122
CIBW_BUILD_VERBOSITY: 1
101-
CIBW_BUILD: ${{ matrix.cibw_python }}
102-
CIBW_ARCHS: ${{ matrix.cibw_arch }}
123+
CIBW_ARCHS: ${{ matrix.arch }}
124+
CIBW_BUILD: ${{ matrix.build }} # py versions from setup.py -> python_requires
125+
CIBW_SKIP: pp*
126+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
127+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
103128

104129
- uses: actions/upload-artifact@v2
105130
with:
106131
name: dist
107132
path: wheelhouse/*.whl
108133

109134
publish-docs:
110-
needs: validate-release-request
135+
needs: [build-sdist, build-wheels]
111136
runs-on: ubuntu-latest
112137

113138
env:

asyncpg/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
# supported platforms, publish the packages on PyPI, merge the PR
1111
# to the target branch, create a Git tag pointing to the commit.
1212

13-
__version__ = '0.26.0'
13+
__version__ = '0.26.1b1'

tests/test_introspection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from asyncpg import connection as apg_con
1313

1414

15-
MAX_RUNTIME = 0.1
15+
MAX_RUNTIME = 0.25
1616

1717

1818
class SlowIntrospectionConnection(apg_con.Connection):

0 commit comments

Comments
 (0)