Skip to content
Open
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
177 changes: 125 additions & 52 deletions .github/workflows/maturin_upload_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is autogenerated by maturin v1.2.3
# This file is autogenerated by maturin v1.9.6
# To update, run
#
# maturin generate-ci github
Expand All @@ -15,96 +15,167 @@ permissions:

jobs:
linux:
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
fail-fast: false
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-22.04
target: armv7
- runner: ubuntu-22.04
target: s390x
- runner: ubuntu-22.04
target: ppc64le
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
- uses: actions/checkout@main
- uses: actions/setup-python@v6
with:
python-version: '3.9 - 3.13'
python-version: |
3.8 - 3.14
3.x
pypy3.8
pypy3.9
pypy3.10
pypy3.11
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
with:
target: ${{ matrix.target }}
target: ${{ matrix.platform.target }}
args: --release --out ../dist --find-interpreter
sccache: 'true'
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
working-directory: lib/
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@main
with:
name: wheels-linux-${{ matrix.target }}
name: wheels-linux-${{ matrix.platform.target }}
path: dist
if-no-files-found: error

musllinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-22.04
target: armv7
steps:
- uses: actions/checkout@main
- uses: actions/setup-python@v6
with:
python-version: |
3.8 - 3.14
3.x
pypy3.8
pypy3.9
pypy3.10
pypy3.11
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
with:
target: ${{ matrix.platform.target }}
args: --release --out ../dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
working-directory: lib/
- name: Upload wheels
uses: actions/upload-artifact@main
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist
if-no-files-found: error

windows:
runs-on: windows-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [x64, x86]
fail-fast: false
platform:
- runner: windows-latest
target: x64
- runner: windows-latest
target: x86
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
- uses: actions/checkout@main
- uses: actions/setup-python@v6
with:
python-version: '3.13'
architecture: ${{ matrix.target }}
# We can't use pypy3.8 nor pypy3.11 in CI
python-version: |
3.8 - 3.14
3.x
pypy3.9
pypy3.10
architecture: ${{ matrix.platform.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
with:
target: ${{ matrix.target }}
target: ${{ matrix.platform.target }}
args: --release --out ../dist --find-interpreter
sccache: 'true'
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
working-directory: lib/
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@main
with:
name: wheels-windows-${{ matrix.target }}
name: wheels-windows-${{ matrix.platform.target }}
path: dist
if-no-files-found: error

macos:
runs-on: macos-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [x86_64, aarch64]
fail-fast: false
platform:
- runner: macos-13
target: x86_64
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
- uses: actions/checkout@main
- uses: actions/setup-python@v6
with:
python-version: '3.13'
# We can't use pypy3.8 in CI
python-version: |
3.8 - 3.14
3.x
pypy3.9
pypy3.10
pypy3.11
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
with:
target: ${{ matrix.target }}
target: ${{ matrix.platform.target }}
args: --release --out ../dist --find-interpreter
sccache: 'true'
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
working-directory: lib/
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@main
with:
name: wheels-macos-${{ matrix.target }}
name: wheels-macos-${{ matrix.platform.target }}
path: dist
if-no-files-found: error

sdist:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repo
uses: actions/checkout@v5

- uses: actions/checkout@main
- name: Build sdist
uses: PyO3/maturin-action@v1
env:
Expand All @@ -113,11 +184,10 @@ jobs:
command: sdist
args: --out ../dist
working-directory: lib/

- name: Upload sdist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@main
with:
name: sdist
name: wheels-sdist
path: dist
if-no-files-found: error

Expand All @@ -127,7 +197,7 @@ jobs:

steps:
- name: Checkout reposistory
uses: actions/checkout@v5
uses: actions/checkout@main

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -143,24 +213,27 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [linux, windows, macos, sdist]
strategy:
fail-fast: false
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, sdist, check_clippy_python_bindings]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
pattern: wheels-*
merge-multiple: true
- uses: actions/download-artifact@v4
with:
name: sdist
merge-multiple: true
subject-path: 'wheels-*/*'
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1
env:
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_PASSWORD }}
with:
command: upload
args: --non-interactive --skip-existing *
args: --non-interactive --skip-existing wheels-*/*
21 changes: 17 additions & 4 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,28 @@ on: [push, pull_request]

jobs:
checks:
name: mypy Python ${{ matrix.py_version }}
runs-on: ubuntu-latest
name: mypy
strategy:
fail-fast: false
matrix:
py_version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
- '3.x' # Explicit latest

steps:
- uses: actions/checkout@v5

- name: Set up Python 3.9
uses: actions/setup-python@v5
- name: Set up Python ${{ matrix.py_version }}
uses: actions/setup-python@v6
with:
python-version: 3.9
python-version: ${{ matrix.py_version }}

- name: Install Dependencies
run: |
Expand Down
36 changes: 26 additions & 10 deletions .github/workflows/python_bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,37 @@ on: [push, pull_request]

jobs:
tests_cases:
name: Tests cases
name: Test for Python ${{ matrix.py_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py_version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
- '3.x' # Explicit latest

steps:
- name: Checkout repo
uses: actions/checkout@v5
- name: Checkout repo
uses: actions/checkout@v5

- name: Setup requirements
run: |
python3 -m pip install -U maturin
- name: Setup Python ${{ matrix.py_version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.py_version }}

- name: Install local crunch64
run: python3 -m pip install ./lib
- name: Setup requirements
run: |
python3 --version
python3 -m pip install -U maturin

- name: Run tests
run: python3 ./python_bindings/tests.py
- name: Install local crunch64
run: python3 -m pip install ./lib

- name: Run tests
run: python3 ./python_bindings/tests.py
14 changes: 14 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,17 @@ jobs:
# To find current MSRV use `cargo msrv find`. Install it with `cargo install cargo-msrv --locked`
- name: Run MSRV checker
run: cargo hack check --rust-version --workspace --all-targets --ignore-private

msrv_no_default:
name: Check MSRV
runs-on: ubuntu-latest
steps:
- name: Checkout reposistory
uses: actions/checkout@v5

- name: Setup MSRV checker
uses: taiki-e/install-action@cargo-hack

# To find current MSRV use `cargo msrv find`. Install it with `cargo install cargo-msrv --locked`
- name: Run MSRV checker
run: cargo hack check --rust-version --workspace --all-targets --ignore-private --no-default-features
Loading
Loading