Skip to content

ci: migrate 4 maturin workflows to needs.setup.outputs.matrix (maturin batch 3/3) - #4932

Open
luhenry wants to merge 1 commit into
mainfrom
fix/matrix-maturin-3
Open

luhenry wants to merge 1 commit into
mainfrom
fix/matrix-maturin-3

Conversation

@luhenry

@luhenry luhenry commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Part of the repo-wide migration off hard-coded build_wheels matrices onto needs.setup.outputs.matrix. This batch covers the 4 remaining maturin/PyO3 workflows.

Packages touched

theine-core — straight swap. matrix.python/matrix.platform are already the field names the generated matrix uses (the Determine target interpreter step, the IMAGE/target/manylinux platform branching, and the docker-based musllinux test all already key off those exact names), so only the strategy.matrix block changes: version/python/platform arrays → include: ${{ fromJSON(needs.setup.outputs.matrix) }}.

sudachipy — straight swap, same mapping. The hard-coded python: ["cp310", "cp314t"] plus its include: block assumed the 0.7.0 abi3-py310 shape (one cp310 wheel covering every non-free-threaded interpreter + a separate cp314t). But the version actually pending right now (pending_versions.py sudachipy → 0.6.11) declares no abi3 target at all, so it needs one plain wheel per interpreter (cp310, cp311, cp312, cp313, cp314, cp314t). The generated matrix handles both shapes correctly per version (it collapses abi3 targets automatically), so this is a real fix, not just a sourcing change — the old hard-coded workflow would have built only 2 of the 6 wheels this pending version needs. The per-interpreter drop_pretokenizer_test/test_requires overrides for cp314t, previously carried as extra include: keys, became inline matrix.python == 'cp314t' && ... || ... expressions in CIBW_TEST_REQUIRES/CIBW_TEST_COMMAND (a generated include:-only matrix can't carry extra per-entry keys).

rs1090 and wolfxl — swap plus one new job. Both packages' docs/packages/*.yaml declare musllinux targets, but:

  • pending_versions.py --python-matrix confirms the generated matrix includes musllinux rows for the currently pending version of each (rs1090 0.7.0, wolfxl 2.0.36).
  • Neither job's test step can actually exercise a musllinux wheel: rs1090's test step needs pandas, wolfxl's needs Pillow — checked pypi.riseproject.dev's Simple API directly, and neither has any musllinux_riscv64 wheel there (manylinux only). Building a musllinux wheel with nothing to test it with isn't something I was confident forcing through blind, so those rows are dropped rather than attempted (matches this repo's own documented "dropping musllinux is an accepted outcome" policy).
  • Passing the full needs.setup.outputs.matrix straight to publish would have made update_doc.py's completeness check demand a musllinux wheel that build_wheels never uploads (release is incomplete; no wheel was built for: ...) — this isn't hypothetical, it already happens today in both files' unconverted form, once a push-triggered publish runs for the currently pending version, since publish already consumes needs.setup.outputs.matrix directly. So each file gets a small new manylinux_matrix job (runs-on: ubuntu-latest) that filters the setup job's matrix down to platform == 'manylinux' rows; both build_wheels and publish now consume that filtered output instead of needs.setup.outputs.matrix directly.
  • Field mapping for the interpreter axis is otherwise the same as theine-core/sudachipy: matrix.python (cp-tag) drives a Determine target interpreter step (already present in wolfxl, added to rs1090, replacing its old static python → interpreter/python-version include: table) producing a pythonX.Y[t] string used for maturin's -i flag and setup-uv's python-version input.
  • wolfxl's per-interpreter test_deselect override for cp314t became an inline matrix.python == 'cp314t' && ... || '' expression, same reasoning as sudachipy.

Verification

Ran uv run --quiet ci_scripts/pending_versions.py --python-matrix <pkg> (and with --python-exclude cp39 to match _setup.yml's default) for all four packages' real package-name: and compared against what each old hard-coded matrix built:

  • theine-core / rs1090 / wolfxl: new matrix is a strict superset of the old one for the interpreters each old file already built (it additionally picks up cp310/cp311, and cp315/cp315t where declared) — same build/test code path, no behavior change to the legs that already ran.
  • sudachipy: confirmed the mismatch above (old matrix wrong for the actually-pending 0.6.11; new matrix matches its declared non-abi3 targets).

Not done

musllinux for rs1090/wolfxl is deliberately left unbuilt (see above) — a real follow-up would need to either get musllinux_riscv64 wheels for pandas/Pillow onto the registry, or edit docs/packages/{rs1090,wolfxl}.yaml to stop declaring those targets (both out of scope for this PR, which only touches .github/workflows/*).

build-rs1090.yml, build-sudachipy.yml, build-theine-core.yml and
build-wolfxl.yml still hard-coded their build_wheels interpreter/platform
matrix instead of sourcing it from the setup job's generated matrix.

- theine-core: straight swap, matrix.python/matrix.platform already named
  the way the generated matrix does.
- sudachipy: straight swap; the hard-coded cp310/cp314t pair assumed the
  0.7.0 abi3 shape, but the actually-pending version (0.6.11) has no abi3
  target and needs one wheel per interpreter instead. The per-interpreter
  CIBW_TEST_REQUIRES/CIBW_TEST_COMMAND overrides for cp314t move from a
  matrix `include:` key (not representable once include: is the sole,
  generated matrix key) to inline matrix.python == 'cp314t' expressions.
- rs1090 and wolfxl: swap plus a new matrix-filtering job, because
  docs/packages/{rs1090,wolfxl}.yaml also declare musllinux targets that
  these jobs cannot actually build+test: their test steps need pandas
  (rs1090) / Pillow (wolfxl), and pypi.riseproject.dev has no
  musllinux_riscv64 wheel for either (checked against the Simple API).
  Passing needs.setup.outputs.matrix straight through to `publish` would
  make its completeness check demand those untested wheels, so a small
  ubuntu-latest job filters the generated matrix down to manylinux rows
  before both build_wheels and publish consume it.

Verified each new matrix against `pending_versions.py --python-matrix
<pkg>` for the currently pending version of all four packages.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant