Skip to content

Commit 1487017

Browse files
authored
Merge pull request amitdev#54 from AndreMiras/feature/version_bump_and_apple_arm64_support
✨ Apple Silicon (arm64) support, fixes amitdev#36
2 parents 09ec066 + 863c94e commit 1487017

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,26 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [ubuntu-20.04, windows-2019, macOS-11]
11+
os: [ubuntu-22.04, windows-2022, macOS-11]
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- name: Set up QEMU
1616
if: runner.os == 'Linux'
1717
uses: docker/setup-qemu-action@v2
1818
with:
1919
platforms: all
2020
# Used to host cibuildwheel
2121
- name: Build wheels
22-
uses: pypa/cibuildwheel@v2.12.0
22+
uses: pypa/cibuildwheel@v2.16.2
2323
env:
2424
# configure cibuildwheel to build native archs ('auto'), and some emulated ones
2525
CIBW_ARCHS_LINUX: auto aarch64 ppc64le
26+
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
27+
CIBW_TEST_REQUIRES: .[test]
28+
CIBW_TEST_COMMAND: pytest {project}
29+
# arm64 cannot be tested on a x86_64 CI runner
30+
CIBW_TEST_SKIP: "*-macosx_arm64"
2631
- uses: actions/upload-artifact@v3
2732
with:
2833
path: ./wheelhouse/*.whl
@@ -31,7 +36,7 @@ jobs:
3136
name: Build source distribution
3237
runs-on: ubuntu-latest
3338
steps:
34-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
3540
- name: Build sdist
3641
run: pipx run build --sdist
3742
- uses: actions/upload-artifact@v3
@@ -44,13 +49,13 @@ jobs:
4449
runs-on: ubuntu-latest
4550
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
4651
steps:
47-
- uses: actions/setup-python@v2
52+
- uses: actions/setup-python@v4
4853
- uses: actions/download-artifact@v3
4954
with:
5055
name: artifact
5156
path: dist
5257
- name: Publish package
53-
uses: pypa/gh-action-pypi-publish@v1.5.0
58+
uses: pypa/gh-action-pypi-publish@release/v1
5459
with:
5560
verbose: true
5661
user: __token__

.github/workflows/tests.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
name: Tests
22

3-
on: [push]
3+
on: [push, pull_request]
4+
5+
env:
6+
PYTHON_VERSIONS: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8", "pypy-3.9", "pypy-3.10"]
47

58
jobs:
69
test:
710
runs-on: ubuntu-22.04
811
strategy:
912
matrix:
10-
python: ["3.7", "3.8", "3.9", "3.10", "3.11", pypy-3.7, pypy-3.8, pypy-3.9]
13+
python: ${{fromJson(env.PYTHON_VERSIONS)}}
1114

1215
steps:
13-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1417
- uses: actions/setup-python@v4
1518
with:
1619
python-version: ${{ matrix.python }}
@@ -21,10 +24,10 @@ jobs:
2124
runs-on: ubuntu-22.04
2225
strategy:
2326
matrix:
24-
python: ["3.7", "3.8", "3.9", "3.10", "3.11", pypy-3.7, pypy-3.8, pypy-3.9]
27+
python: ${{fromJson(env.PYTHON_VERSIONS)}}
2528

2629
steps:
27-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
2831
- uses: actions/setup-python@v4
2932
with:
3033
python-version: ${{ matrix.python }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
'Operating System :: POSIX',
2222
'Programming Language :: C',
2323
'Programming Language :: Python :: 3',
24-
'Programming Language :: Python :: 3.7',
2524
'Programming Language :: Python :: 3.8',
2625
'Programming Language :: Python :: 3.9',
2726
'Programming Language :: Python :: 3.10',
2827
'Programming Language :: Python :: 3.11',
28+
'Programming Language :: Python :: 3.12',
2929
'Programming Language :: Python :: Implementation :: CPython',
3030
'Topic :: Software Development :: Libraries :: Python Modules',
3131
],

0 commit comments

Comments
 (0)