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

✨ Apple Silicon (arm64) support, fixes #36 #54

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,26 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macOS-11]
os: [ubuntu-22.04, windows-2022, macOS-11]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all
# Used to host cibuildwheel
- name: Build wheels
uses: pypa/cibuildwheel@v2.12.0
uses: pypa/cibuildwheel@v2.16.2
env:
# configure cibuildwheel to build native archs ('auto'), and some emulated ones
CIBW_ARCHS_LINUX: auto aarch64 ppc64le
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_TEST_REQUIRES: .[test]
CIBW_TEST_COMMAND: pytest {project}
# arm64 cannot be tested on a x86_64 CI runner
CIBW_TEST_SKIP: "*-macosx_arm64"
Comment on lines +26 to +30
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the macOS arm64 support part, all the rest of the PR is just chore

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
Expand All @@ -31,7 +36,7 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
Expand All @@ -44,13 +49,13 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: __token__
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: Tests

on: [push]
on: [push, pull_request]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also sneaked that change in so we would have caught that issue earlier:
#49 (comment)


env:
PYTHON_VERSIONS: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8", "pypy-3.9", "pypy-3.10"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

DRY fix, but also removed 3.7, and added 3.12 as well as pypy-3.10.
But if we prefer I can address these changes in another dedicated PR


jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11", pypy-3.7, pypy-3.8, pypy-3.9]
python: ${{fromJson(env.PYTHON_VERSIONS)}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
Expand All @@ -21,10 +24,10 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11", pypy-3.7, pypy-3.8, pypy-3.9]
python: ${{fromJson(env.PYTHON_VERSIONS)}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
'Operating System :: POSIX',
'Programming Language :: C',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Software Development :: Libraries :: Python Modules',
],
Expand Down
Loading