Skip to content
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
102 changes: 67 additions & 35 deletions .github/workflows/maturin_ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is autogenerated by maturin v1.9.4
# This file is autogenerated by maturin v1.12.6
# To update, run
#
# maturin generate-ci github --pytest --skip-attestation --output .github/workflows/maturin_ci.yml
Expand Down Expand Up @@ -37,8 +37,8 @@ jobs:
# - runner: ubuntu-22.04
# target: ppc64le
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
Expand All @@ -48,8 +48,15 @@ jobs:
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.14t
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist
Expand Down Expand Up @@ -93,36 +100,41 @@ jobs:
- runner: ubuntu-22.04
target: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
args: --release --out dist
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.14t
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist
- name: pytest
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
uses: maus007/docker-run-action-fork@v1
with:
image: alpine:latest
options: -v ${{ github.workspace }}:/io -w /io
run: |
set -e
run: |
set -e
docker run --rm -v ${{ github.workspace }}:/io -w /io alpine:latest sh -c '
apk add py3-pip py3-virtualenv
python3 -m virtualenv .venv
source .venv/bin/activate
pip install math-core --no-index --find-links dist --force-reinstall
pip install pytest
pytest
'
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'x86') }}
uses: uraimo/run-on-arch-action@v2
Expand All @@ -147,27 +159,41 @@ jobs:
platform:
- runner: windows-latest
target: x64
python_arch: x64
# - runner: windows-latest
# target: x86
# python_arch: x86
- runner: windows-11-arm
target: aarch64
python_arch: arm64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
architecture: ${{ matrix.platform.target }}
python-version: 3.13
architecture: ${{ matrix.platform.python_arch }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
args: --release --out dist
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- uses: actions/setup-python@v6
with:
python-version: 3.14t
architecture: ${{ matrix.platform.python_arch }}
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.14t
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash
run: |
set -e
Expand All @@ -182,23 +208,29 @@ jobs:
strategy:
matrix:
platform:
# - runner: macos-13
# target: x86_64
- runner: macos-14
- runner: macos-15-intel
target: x86_64
- runner: macos-latest
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
args: --release --out dist
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.14t
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist
Expand All @@ -215,14 +247,14 @@ jobs:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: wheels-sdist
path: dist
Expand All @@ -239,10 +271,10 @@ jobs:
# Used to upload release artifacts
contents: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
- name: Install uv
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: astral-sh/setup-uv@v7
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
run: uv publish --trusted-publishing always 'wheels-*/*'
2 changes: 1 addition & 1 deletion crates/math-core-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ crate-type = ["cdylib"]
[dependencies]
math-core = { path = "../math-core", features = ["ariadne"] }
ariadne = { workspace = true }
pyo3 = "0.28.2"
pyo3 = { version = "0.28.2", features = ["abi3-py310"] }
rustc-hash = { workspace = true }
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ python-source = "python"
python-packages = ["math_core"]
include = ["python/math_core/py.typed", "python/math_core/_math_core_rust.pyi"]
module-name = "math_core._math_core_rust"
features = ["pyo3/extension-module"]
bindings = "pyo3"
# compatibility = "pypi"

Expand Down
Loading