Skip to content

ci: migrate 6 workflows (with per-leg overrides) to needs.setup.outputs.matrix (extra-include batch 1/4) - #4929

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

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

Conversation

@luhenry

@luhenry luhenry commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Part of the repo-wide migration off hardcoded matrix.python/matrix.libc arrays
onto needs.setup.outputs.matrix (the bug class fixed in #4914/#4915). This batch
covers the 6 workflows whose build_wheels job layers an extra include: block on
top of the hardcoded array to override one field (test_skip/test_requires) for
specific python legs, which the plain mechanical fix doesn't by itself handle.

Packages touched: aplr, biom-format, boost-histogram, coreforecast, correctionlib, dimod.

What changed, per file

For each file: strategy.matrix is now include: ${{ fromJSON(needs.setup.outputs.matrix) }}
(dropping the hardcoded version/python/include: keys), every ${{ matrix.libc }} /
hardcoded manylinux_riscv64 literal (job name:, only:/CIBW_BUILD, artifact name:)
is now ${{ matrix.platform }}, and the extra include: override becomes an inline
ternary at its point of use, preserving exactly which matrix.python value triggers it:

  • build-aplr.yml — test_skip: "*" for cp314t → CIBW_TEST_SKIP: ${{ matrix.python == 'cp314t' && '*' || '' }}.
  • build-biom-format.yml — same cp314t → test_skip: "*" pattern, same conversion.
  • build-coreforecast.yml — same cp314t → test_skip: "*" pattern, same conversion.
  • build-dimod.yml — same cp314t → test_skip: "*" pattern, same conversion. The
    cp313/cp314 omission (upstream's cp312-abi3 wheel covers them from 0.12.23) no longer
    needs a comment on the hardcoded list — needs.setup.outputs.matrix already collapses
    those onto the cp312-abi3 leg itself.
  • build-correctionlib.yml — same cp314t → test_skip: "*" pattern, same conversion.
    CIBW_BUILD goes from ${{ matrix.python }}-* to ${{ matrix.python }}-${{ matrix.platform }}_riscv64.
  • build-boost-histogram.yml — test_requires: "hypothesis==6.165.10" for cp314t →
    CIBW_TEST_REQUIRES: ${{ matrix.python == 'cp314t' && 'hypothesis==6.165.10' || '' }}.
    CIBW_BUILD goes from ${{ matrix.python }}-* to ${{ matrix.python }}-${{ matrix.platform }}_riscv64.

No file needed an added python-exclude: on the setup: job (rule 6) — see the real
mismatches below, none of which were accompanied by a documented reason for the gap, so
they're left for the structural fix to resolve rather than pinned in place.

Verification (uv run --quiet ci_scripts/pending_versions.py --python-matrix --python-exclude cp39 <pkg>)

Comparing the real output against what each old hardcoded python: [...] list produced:

  • aplr / biom-format / coreforecast: genuine mismatch. The old hardcoded list
    (cp312/cp313/cp314/cp314t) never built cp310/cp311, even though
    docs/packages/*.yaml already declares them as pending targets (and, for biom-format
    and coreforecast, cp314t isn't even declared in the YAML at all — that override is now
    dead code, kept only for forward compatibility). The structural fix starts building the
    previously-missing cp310/cp311 legs; no action taken beyond the migration itself.
  • dimod: same shape — the old [cp312, cp314t] list never built the cp311 leg that
    docs/packages/dimod.yaml 0.12.23 declares (pending, requires-python: '>=3.11'), nor
    the pending cp315t leg. Both now get picked up structurally.
  • boost-histogram / correctionlib: same missing-cp310/cp311 mismatch as above, plus
    a second, more serious one: both packages' docs/packages/*.yaml still carry pending
    musllinux file entries (because numpy ships no musllinux riscv64 wheel, per the existing
    CIBW_SKIP: '*-musllinux_*' and its comment). needs.setup.outputs.matrix has no
    --python-exclude-equivalent for dropping a platform, so it now emits those musllinux
    legs as real matrix entries. With CIBW_BUILD pinned to that one leg's platform and
    CIBW_SKIP still cancelling it out, each musllinux job will have nothing left to build
    (cibuildwheel errors on an empty build-identifier selection rather than silently
    succeeding as before, when the python-only matrix always had a surviving manylinux
    build in the same job). This is a real, pre-existing data issue in
    docs/packages/boost-histogram.yaml/correctionlib.yaml (out of scope for this
    workflow-only PR — workflow-anatomy.md's documented fix is to strip the pending
    musllinux entries from the package YAML, same as build-scipp.yml already does), not
    something introduced by this refactor; flagging it here rather than silently "fixing" it
    by touching docs/packages/*.yaml.

No files were skipped.

…ts.matrix

aplr, biom-format, boost-histogram, coreforecast, correctionlib and dimod
each hardcoded their own python/libc matrix array plus an extra include:
block layering a per-leg override (test_skip/test_requires) on top, the
same stale-matrix bug class fixed in #4914/#4915 but compounded by that
second override axis.

Switch build_wheels in each file to
matrix: { include: ${{ fromJSON(needs.setup.outputs.matrix) }} }, rename
every remaining ${{ matrix.libc }}/hardcoded 'manylinux_riscv64' to
${{ matrix.platform }}, and convert each override into an inline ternary
at its point of use (CIBW_TEST_SKIP/CIBW_TEST_REQUIRES), keyed on
matrix.python exactly as the old include: block was.

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