Skip to content

three wheels per platform, and a gate that counts them #1

three wheels per platform, and a gate that counts them

three wheels per platform, and a gate that counts them #1

Workflow file for this run

name: Wheels
on:
workflow_dispatch:
push:
tags: ["v*"]
# A change to how a wheel is built is exercised on the pull request
# that makes it. The alternative is finding out on the tag, which is
# the one moment a wheel cannot be rebuilt quietly.
pull_request:
paths:
- .github/workflows/wheels.yml
- Cargo.toml
- pyproject.toml
- rust-toolchain.toml
- tools/wheel_tags.py
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
# Three wheels per platform, and the reason is CPython's rather than
# ours: the free-threaded build had no stable ABI until 3.15 and PEP
# 803's `abi3t`, so 3.14t is a version-specific wheel of its own and
# will be for as long as 3.14 is supported.
wheel:
name: ${{ matrix.abi }} ${{ matrix.platform }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
abi: [abi3, ft314, abi3t]
platform:
- manylinux_2_28_x86_64
- manylinux_2_28_aarch64
- musllinux_1_2_x86_64
- musllinux_1_2_aarch64
- macosx_universal2
- win_amd64
- win_arm64
include:
# Which ABI, which is a Cargo feature and an interpreter.
# `abi3` is the default feature, so the first row asks for
# nothing; the other two turn it off, because a wheel built
# against the stable ABI cannot also be built against one
# version's.
- abi: abi3
tag: cp311-abi3
features: ""
interpreter: "3.11"
freethreaded: false
- abi: ft314
tag: cp314-cp314t
features: "--no-default-features"
interpreter: "3.14"
freethreaded: true
- abi: abi3t
tag: cp315-abi3t
features: "--no-default-features --features abi3t"
interpreter: "3.15-dev"
freethreaded: true
# Which platform, which is a runner and a target. Every row
# is built on its own architecture: an emulated build takes
# twenty minutes to produce the same bytes.
- platform: manylinux_2_28_x86_64
runner: ubuntu-latest
target: x86_64
container: "2_28"
installable: true
- platform: manylinux_2_28_aarch64
runner: ubuntu-24.04-arm
target: aarch64
container: "2_28"
installable: true
- platform: musllinux_1_2_x86_64
runner: ubuntu-latest
target: x86_64
container: musllinux_1_2
installable: false
- platform: musllinux_1_2_aarch64
runner: ubuntu-24.04-arm
target: aarch64
container: musllinux_1_2
installable: false
- platform: macosx_universal2
runner: macos-latest
target: universal2-apple-darwin
container: auto
installable: true
- platform: win_amd64
runner: windows-latest
target: x64
container: auto
installable: true
- platform: win_arm64
runner: windows-11-arm
target: aarch64-pc-windows-msvc
container: auto
installable: true
steps:
- uses: actions/checkout@v7
# The interpreter maturin names the wheel after on macOS and
# Windows, and the one that installs it below everywhere it can
# be installed. The Linux rows build inside the manylinux and
# musllinux images, which carry their own.
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.interpreter }}
freethreaded: ${{ matrix.freethreaded }}
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.container }}
# Named rather than left to the toolchain file, which the
# build container does not read.
rust-toolchain: 1.97.1
args: --release --out dist ${{ matrix.features }}
# The wheel is named by the interpreter that built it and by
# nothing that was checked, so this checks it: the tag has to be
# the one this row asked for. A build that fell back to a
# version-specific wheel produces a wheel that works and claims
# nothing about any version but its own.
- run: python tools/wheel_tags.py dist ${{ matrix.tag }} ${{ matrix.platform }}
- name: the wheel imports
if: matrix.installable
run: |
python -m pip install --no-index --find-links dist zudb
python -c "import zudb; print(zudb.__version__, zudb.__abi_version__)"
- uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.abi }}-${{ matrix.platform }}
path: dist/*.whl
# Every platform with no row above, and the one everybody who
# packages this for something else starts from. Built once, from the
# same checkout, and tested by building it back into a wheel.
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- run: pip install --no-binary zudb dist/*.tar.gz
- run: python -c "import zudb; print(zudb.__version__)"
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
# The grid, checked as a grid. Every cell filled and nothing outside
# it, which is the check a single row cannot do.
tags:
needs: [wheel, sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- run: python tools/wheel_tags.py dist