Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arm64 mac and linux wheels #954

Merged
merged 2 commits into from Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/install-postgres.sh
Expand Up @@ -27,11 +27,16 @@ if [ "${ID}" = "debian" -o "${ID}" = "ubuntu" ]; then
apt-get install -y --no-install-recommends \
"postgresql-${PGVERSION}" \
"postgresql-contrib-${PGVERSION}"
elif [ "${ID}" = "almalinux" ]; then
yum install -y \
"postgresql-server" \
"postgresql-devel" \
"postgresql-contrib"
ddelange marked this conversation as resolved.
Show resolved Hide resolved
elif [ "${ID}" = "centos" ]; then
el="EL-${VERSION_ID}-$(arch)"
el="EL-${VERSION_ID%.*}-$(arch)"
baseurl="https://download.postgresql.org/pub/repos/yum/reporpms"
yum install -y "${baseurl}/${el}/pgdg-redhat-repo-latest.noarch.rpm"
if [ ${VERSION_ID} -ge 8 ]; then
if [ ${VERSION_ID%.*} -ge 8 ]; then
dnf -qy module disable postgresql
fi
yum install -y \
Expand Down
40 changes: 28 additions & 12 deletions .github/workflows/release.yml
Expand Up @@ -71,16 +71,25 @@ jobs:
build-wheels:
needs: validate-release-request
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
cibw_python: ["cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*"]
cibw_arch: ["auto64", "auto32"]
exclude:
- os: macos-latest
cibw_arch: "auto32"
- os: ubuntu-latest
cibw_arch: "auto32"
include:
- {os: macos-latest, arch: x86_64, build: "*"}
ddelange marked this conversation as resolved.
Show resolved Hide resolved
- {os: macos-latest, arch: arm64, build: "*"}
- {os: windows-latest, arch: AMD64, build: "*"}
- {os: windows-latest, arch: x86, build: "*"}
- {os: ubuntu-latest, arch: x86_64, build: "*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[61]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[72]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[83]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[94]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[05]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[61]-musllinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[72]-musllinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[83]-musllinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[94]-musllinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[05]-musllinux*"}

defaults:
run:
Expand All @@ -94,20 +103,27 @@ jobs:
with:
fetch-depth: 50
submodules: true

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2

- uses: pypa/cibuildwheel@v2.8.0
- uses: pypa/cibuildwheel@v2.10.0
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: ${{ matrix.cibw_python }}
CIBW_ARCHS: ${{ matrix.cibw_arch }}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.build }} # py versions from setup.py -> python_requires
CIBW_SKIP: pp*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could remove these two completely, defaulting to manylinux_2_21 (which is built on centos RHEL7), also wrt backward compatibility ref giampaolo/psutil#2103 (comment)

Though on centos, CI also has postgres installation script issues (I started out with it), something about a bad GPG key also mentioned on the developer's 3rd party yum repo's issue tracker. Thought about doing a yum search (or smth) to download the exact URL for the respective postgres versions on the official repo.

In the end, I happily accepted gg when I saw the green ticks on CI as it is now.

Martin.Obiols.-.Can.t.stop.laughing.at.this.1255206061159714819.mp4

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should try and keep compatibility with 2_21 at least.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

Copy link
Contributor Author

@ddelange ddelange Sep 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I think this thread is irrelevant, the current state of this PR (so building on almalinux8) already produces wheels that are backward compatible all the way to 2_17 ref https://github.com/ddelange/asyncpg/actions/runs/3121931647/jobs/5063553875#step:4:950

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elprans I think in this respect we're good to go 👍


- uses: actions/upload-artifact@v2
with:
name: dist
path: wheelhouse/*.whl

publish-docs:
needs: validate-release-request
needs: [build-sdist, build-wheels]
runs-on: ubuntu-latest

env:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_introspection.py
Expand Up @@ -12,7 +12,7 @@
from asyncpg import connection as apg_con


MAX_RUNTIME = 0.1
MAX_RUNTIME = 0.25


class SlowIntrospectionConnection(apg_con.Connection):
Expand Down