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
120 changes: 78 additions & 42 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,67 +139,81 @@ jobs:
jobs: ${{ toJSON(needs) }}

build:
name: build on ${{ matrix.platform || matrix.os }} (${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }})
name: build on ${{ matrix.os }} (${{ matrix.target }} - ${{ matrix.interpreter || 'all' }}${{ matrix.os == 'linux' && format(' - {0}', matrix.manylinux == 'auto' && 'manylinux' || matrix.manylinux) || '' }})
if: success()
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
target: [x86_64, aarch64]
os: [linux, macos, windows]
target: [undefined]
manylinux: [auto]
include:
- os: ubuntu
platform: linux
- os: windows
ls: dir
# manylinux for various platforms
- os: linux
manylinux: auto
target: x86_64
interpreter: 3.10 3.11 3.12 3.13 3.13t
- os: windows
ls: dir
target: i686
python-architecture: x86
interpreter: 3.10 3.11 3.12 3.13 3.13t
- os: windows
ls: dir
- os: linux
manylinux: auto
target: aarch64
interpreter: 3.11 3.12 3.13 3.13t
- os: ubuntu
platform: linux
- os: linux
manylinux: auto
target: i686
- os: ubuntu
platform: linux
target: aarch64
- os: ubuntu
platform: linux
- os: linux
manylinux: auto
target: armv7
interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11
# musllinux
- os: ubuntu
platform: linux
interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t
- os: linux
manylinux: auto
target: ppc64le
interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t
- os: linux
manylinux: auto
target: s390x
interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t

# musllinux
- os: linux
manylinux: musllinux_1_1
target: x86_64
- os: linux
manylinux: musllinux_1_1
- os: ubuntu
platform: linux
target: aarch64
- os: linux
manylinux: musllinux_1_1
- os: ubuntu
platform: linux
target: ppc64le
interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11
- os: ubuntu
platform: linux
target: s390x
interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11
target: armv7

# macos
- os: macos
target: x86_64
- os: macos
target: aarch64

# windows
- os: windows
target: x86_64
- os: windows
target: i686
interpreter: 3.10 3.11 3.12 3.13 3.14
- os: windows
target: aarch64
runs-on: windows-11-arm
interpreter: 3.11 3.12 3.13 3.13t 3.14 3.14t

runs-on: ${{ matrix.os }}-latest
exclude:
# was just a dummy variable to set a default value for target
- target: undefined

runs-on: ${{ matrix.runs-on || format('{0}-latest', (matrix.os == 'linux' && 'ubuntu') || matrix.os) }}
steps:
- uses: actions/checkout@v5

- name: set up python
uses: actions/setup-python@v6
with:
python-version: "3.14"
architecture: ${{ matrix.python-architecture || 'x64' }}

- name: install rust stable
uses: dtolnay/rust-toolchain@stable

- run: pip install -U twine

Expand All @@ -216,16 +230,16 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux || 'auto' }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11' }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.10 pypy3.11' }}
rust-toolchain: stable

- run: ${{ matrix.ls || 'ls -lh' }} dist/
- run: ${{ (matrix.os == 'windows' && 'dir') || 'ls -lh' }} dist/

- run: twine check --strict dist/*

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.platform || matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux || 'auto' }}
name: wheels-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux || 'auto' }}
path: dist

release:
Expand All @@ -251,3 +265,25 @@ jobs:

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

gh-release:
needs: [build, check]
if: success() && startsWith(github.ref, 'refs/tags/')

runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Download All Artifacts
uses: actions/download-artifact@v5
with:
path: dist
pattern: wheels-*
merge-multiple: true

- name: Upload to GitHub
uses: softprops/action-gh-release@v2
with:
files: ./*
Loading