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

Build PyPy wheels #612

Merged
merged 2 commits into from
Mar 16, 2024
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
27 changes: 18 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
strategy:
matrix:
target: [x86_64, aarch64]
python: ['3.11', 'pypy3.10']
steps:
- name: Check out
uses: actions/checkout@v4
Expand All @@ -43,21 +44,21 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python }}
architecture: 'x64'

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
args: --release --out dist --interpreter ${{ startsWith(matrix.python, 'pypy') && matrix.python || format('python{0}', matrix.python) }}
sccache: 'true'
manylinux: auto

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.target }}
name: wheels-linux-${{ matrix.target }}-${{ matrix.python }}
path: dist

windows:
Expand All @@ -66,6 +67,7 @@ jobs:
strategy:
matrix:
target: [x64]
python: ['3.11', 'pypy3.10']
steps:
- name: Check out
uses: actions/checkout@v4
Expand All @@ -76,21 +78,22 @@ jobs:
name: pyproject-toml

- uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.11'
python-version: ${{ matrix.python }}
architecture: ${{ matrix.target }}

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
args: --release --out dist --interpreter ${{ steps.setup-python.outputs.python-path }}
sccache: 'true'

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.target }}
name: wheels-windows-${{ matrix.target }}-${{ matrix.python }}
path: dist

macos:
Expand All @@ -99,6 +102,11 @@ jobs:
strategy:
matrix:
target: [x86_64, aarch64]
python: ['3.11']
include:
# It seems PyPy3.10 is not available on macOS arm64 yet
- target: x86_64
python: pypy3.10
steps:
- name: Check out
uses: actions/checkout@v4
Expand All @@ -109,21 +117,22 @@ jobs:
name: pyproject-toml

- uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.11'
python-version: ${{ matrix.python }}
architecture: ${{ matrix.target == 'aarch64' && 'arm64' || 'x64' }}

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
args: --release --out dist --interpreter ${{ steps.setup-python.outputs.python-path }}
sccache: 'true'

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.target }}
name: wheels-macos-${{ matrix.target }}-${{ matrix.python }}
path: dist

sdist:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"chardet>=4.0.0",
Expand Down