From e21c86316f932caa75826dd535d3a17a00a4e62e Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Wed, 18 Nov 2026 00:13:44 +0000 Subject: [PATCH] ci: migrate 6 workflows (with per-leg overrides) to needs.setup.outputs.matrix Replace the hardcoded python/libc matrix in build_wheels (and freeze-core's test_wheels) with needs.setup.outputs.matrix for fastparquet, freeze-core, geventhttpclient, gmpy2, gseapy and hierarchicalforecast, converting each file's extra include: override into an inline matrix-field ternary at its point of use: - fastparquet, geventhttpclient, gmpy2, gseapy: cp314t -> CIBW_TEST_SKIP: '*' - hierarchicalforecast: cp312/cp313 -> CIBW_TEST_REQUIRES statsforecast, cp314 -> CIBW_TEST_COMMAND --ignore flags, cp314t -> CIBW_TEST_SKIP: '*' - freeze-core test_wheels: the python -> python-version include block is dropped outright, since needs.setup.outputs.matrix already carries python-version matrix.libc is renamed to matrix.platform throughout freeze-core (the only one of the six with a libc axis); its build_wheels job already builds both platforms from matrix.platform, unchanged. Every build_wheels job here hardcodes a manylinux-only cibuildwheel `only:` (or, for freeze-core, iterates both platforms already), so a job-level `matrix.platform == 'manylinux'` filter is added wherever the package's docs/packages/.yaml carries musllinux file entries, to stop musllinux matrix rows from silently re-running (and artifact-colliding with) the same manylinux-only build. freeze-core's test_wheels gets the same filter, since it only ever exercised the manylinux wheel. python-exclude is added to each setup job to preserve the prior workflow's narrower python coverage (all six previously built only cp312-cp314t): - fastparquet, gseapy, hierarchicalforecast: 'cp39 cp310 cp311' - geventhttpclient, gmpy2: 'cp39 cp310 cp311 cp315*' - freeze-core: 'cp39 cp311 cp315*' Verified against `ci_scripts/pending_versions.py --python-matrix` for each package: with the exclude lists above, every one now reproduces exactly the old hardcoded python x platform set, except hierarchicalforecast, whose old list also carried a cp314t leg that docs/packages/hierarchicalforecast.yaml has never declared a 3.14t file entry for -- a pre-existing stale-matrix mismatch (same class as #4914/#4915) that this structural change resolves by simply dropping the dead leg. --- .github/workflows/build-fastparquet.yml | 19 ++++---- .github/workflows/build-freeze-core.yml | 29 +++++-------- .github/workflows/build-geventhttpclient.yml | 21 +++++---- .github/workflows/build-gmpy2.yml | 29 ++++++------- .github/workflows/build-gseapy.yml | 18 ++++---- .../workflows/build-hierarchicalforecast.yml | 43 +++++++++++-------- 6 files changed, 78 insertions(+), 81 deletions(-) diff --git a/.github/workflows/build-fastparquet.yml b/.github/workflows/build-fastparquet.yml index 0da943deed7..16287190c77 100644 --- a/.github/workflows/build-fastparquet.yml +++ b/.github/workflows/build-fastparquet.yml @@ -46,23 +46,22 @@ jobs: with: package: fastparquet version: ${{ inputs.version }} + # Matches the python list this replaces, which only ever built + # cp312-cp314t; preserved rather than silently widened to cp310/cp311. + python-exclude: 'cp39 cp310 cp311' build_wheels: needs: [setup] - if: needs.setup.outputs.versions != '[]' + # Our registry carries numpy and pandas for manylinux riscv64 only, so a + # musllinux leg could be neither built nor tested. + if: needs.setup.outputs.versions != '[]' && matrix.platform == 'manylinux' name: Build fastparquet ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 180 strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - include: - # pandas, a hard runtime requirement, publishes no free-threaded wheel on - # any architecture, so the suite cannot run under cp314t. - - python: "cp314t" - test_skip: "*" + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: FASTPARQUET_VERSION: ${{ matrix.version }} @@ -100,7 +99,9 @@ jobs: # pandas and cramjam are newer on PyPI than the riscv64 wheels we ship; # refusing sdists makes pip resolve back to the versions we have. CIBW_TEST_ENVIRONMENT: 'PIP_ONLY_BINARY=:all:' - CIBW_TEST_SKIP: ${{ matrix.test_skip }} + # pandas, a hard runtime requirement, publishes no free-threaded wheel on + # any architecture, so the suite cannot run under cp314t. + CIBW_TEST_SKIP: ${{ matrix.python == 'cp314t' && '*' || '' }} CIBW_TEST_REQUIRES: pytest "pandas<3" CIBW_TEST_SOURCES: fastparquet/test test-data pyproject.toml # test/util.py resolves test-data relative to the working directory, and diff --git a/.github/workflows/build-freeze-core.yml b/.github/workflows/build-freeze-core.yml index 5794a585ec6..c21de55abc4 100644 --- a/.github/workflows/build-freeze-core.yml +++ b/.github/workflows/build-freeze-core.yml @@ -47,6 +47,9 @@ jobs: with: package: freeze-core version: ${{ inputs.version }} + # Matches the python list this replaces, which only ever built + # cp312-cp314t; preserved rather than silently widened to cp311/cp315*. + python-exclude: 'cp39 cp311 cp315*' build_sdist: needs: [setup] @@ -86,15 +89,13 @@ jobs: build_wheels: needs: [setup, build_sdist] if: needs.setup.outputs.versions != '[]' - name: Build freeze-core ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.libc }}_riscv64 + name: Build freeze-core ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 60 strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - libc: [manylinux, musllinux] + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: FREEZE_CORE_VERSION: ${{ matrix.version }} @@ -115,13 +116,13 @@ jobs: package-dir: ${{ steps.sdist_path.outputs.path }} env: CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.libc }}_riscv64 + CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: freeze-core-${{ env.FREEZE_CORE_VERSION }}-${{ matrix.python }}-${{ matrix.libc }}_riscv64 + name: freeze-core-${{ env.FREEZE_CORE_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 path: ./wheelhouse/*.whl if-no-files-found: error @@ -133,24 +134,14 @@ jobs: # musl/alpine riscv64 image this repo does not otherwise exercise. test_wheels: needs: [setup, build_wheels] - if: needs.setup.outputs.versions != '[]' + if: needs.setup.outputs.versions != '[]' && matrix.platform == 'manylinux' name: Test freeze-core ${{ matrix.version }} on Python ${{ matrix.python-version }} runs-on: ubuntu-24.04-riscv timeout-minutes: 30 strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - include: - - python: cp312 - python-version: '3.12' - - python: cp313 - python-version: '3.13' - - python: cp314 - python-version: '3.14' - - python: cp314t - python-version: '3.14t' + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: FREEZE_CORE_VERSION: ${{ matrix.version }} @@ -170,7 +161,7 @@ jobs: - name: Download wheel uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: - name: freeze-core-${{ env.FREEZE_CORE_VERSION }}-${{ matrix.python }}-manylinux_riscv64 + name: freeze-core-${{ env.FREEZE_CORE_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 path: src/wheelhouse - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-geventhttpclient.yml b/.github/workflows/build-geventhttpclient.yml index 2716311129a..cca14c22be5 100644 --- a/.github/workflows/build-geventhttpclient.yml +++ b/.github/workflows/build-geventhttpclient.yml @@ -45,23 +45,22 @@ jobs: with: package: geventhttpclient version: ${{ inputs.version }} + # Matches the python list this replaces, which only ever built + # cp312-cp314t; preserved rather than silently widened to cp310/cp311/cp315*. + python-exclude: 'cp39 cp310 cp311 cp315*' build_wheels: needs: [setup] - if: needs.setup.outputs.versions != '[]' + # musllinux is skipped: our registry carries gevent and brotli for + # manylinux riscv64 only, so a musl wheel could be neither installed nor tested. + if: needs.setup.outputs.versions != '[]' && matrix.platform == 'manylinux' name: Build geventhttpclient ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 60 strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - include: - # gevent, a hard runtime dependency, publishes no free-threaded wheel on - # any platform, so the cp314t wheel cannot be installed to be tested. - - python: "cp314t" - test_skip: "*" + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: GEVENTHTTPCLIENT_VERSION: ${{ matrix.version }} @@ -91,8 +90,6 @@ jobs: git apply -v "$patches"/*.patch fi - # musllinux is skipped: our registry carries gevent and brotli for - # manylinux riscv64 only, so a musl wheel could be neither installed nor tested. - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 env: CIBW_ARCHS: riscv64 @@ -100,7 +97,9 @@ jobs: CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} # gevent and brotli have no riscv64 wheel on public PyPI. CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_SKIP: ${{ matrix.test_skip }} + # gevent, a hard runtime dependency, publishes no free-threaded wheel on + # any platform, so the cp314t wheel cannot be installed to be tested. + CIBW_TEST_SKIP: ${{ matrix.python == 'cp314t' && '*' || '' }} # pyproject.toml registers the `network` marker. CIBW_TEST_SOURCES: tests pyproject.toml # Up to 2.5.1 the test tools are the `dev` extra; from 2.6.0 they are the `dev` diff --git a/.github/workflows/build-gmpy2.yml b/.github/workflows/build-gmpy2.yml index 6cad28fb5ed..421ca07c67c 100644 --- a/.github/workflows/build-gmpy2.yml +++ b/.github/workflows/build-gmpy2.yml @@ -45,29 +45,24 @@ jobs: with: package: gmpy2 version: ${{ inputs.version }} + # Matches the python list this replaces, which only ever built + # cp312-cp314t; preserved rather than silently widened to cp310/cp311/cp315*. + python-exclude: 'cp39 cp310 cp311 cp315*' build_wheels: needs: [setup] - if: needs.setup.outputs.versions != '[]' + # musllinux dropped: test-extras' numpy and cython both have no + # musllinux riscv64 wheel on PyPI or our registry, so CIBW_TEST_EXTRAS + # cannot resolve in a musl venv (same reasoning as the tree-sitter-* + # family dropping musllinux for its own test dependency). + if: needs.setup.outputs.versions != '[]' && matrix.platform == 'manylinux' name: Build gmpy2 ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 90 strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - include: - # Cython, a hard test-only requirement (test-extras builds and imports - # a Cython extension against gmpy2's headers), publishes no - # free-threaded wheel on any architecture, so the suite cannot run - # under cp314t. - - python: "cp314t" - test_skip: "*" - # musllinux dropped: test-extras' numpy and cython both have no - # musllinux riscv64 wheel on PyPI or our registry, so CIBW_TEST_EXTRAS - # cannot resolve in a musl venv (same reasoning as the tree-sitter-* - # family dropping musllinux for its own test dependency). + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: GMPY2_VERSION: ${{ matrix.version }} @@ -108,7 +103,11 @@ jobs: PYTEST_ADDOPTS=--verbose SETUPTOOLS_SCM_PRETEND_VERSION_FOR_GMPY2=${{ env.GMPY2_VERSION }} PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_SKIP: ${{ matrix.test_skip }} + # Cython, a hard test-only requirement (test-extras builds and imports + # a Cython extension against gmpy2's headers), publishes no + # free-threaded wheel on any architecture, so the suite cannot run + # under cp314t. + CIBW_TEST_SKIP: ${{ matrix.python == 'cp314t' && '*' || '' }} - name: Check the extension made it into the wheel run: | diff --git a/.github/workflows/build-gseapy.yml b/.github/workflows/build-gseapy.yml index f26cc030e69..95d6e27a437 100644 --- a/.github/workflows/build-gseapy.yml +++ b/.github/workflows/build-gseapy.yml @@ -45,22 +45,23 @@ jobs: with: package: gseapy version: ${{ inputs.version }} + # Matches the python list this replaces, which only ever built + # cp312-cp314t; preserved rather than silently widened to cp310/cp311. + python-exclude: 'cp39 cp310 cp311' build_wheels: needs: [setup] - if: needs.setup.outputs.versions != '[]' + # docs/packages/gseapy.yaml declares manylinux-only files, so this filter + # is a no-op today; kept so a future musllinux entry does not silently + # duplicate the (hardcoded-manylinux) build below under another name. + if: needs.setup.outputs.versions != '[]' && matrix.platform == 'manylinux' name: Build gseapy ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 120 strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - include: - # pandas, a hard runtime dependency, has no cp314t riscv64 wheel on pypi.riseproject.dev. - - python: "cp314t" - test_skip: "*" + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: GSEAPY_VERSION: ${{ matrix.version }} @@ -92,7 +93,8 @@ jobs: CIBW_TEST_EXTRAS: test CIBW_TEST_SOURCES: tests pyproject.toml CIBW_TEST_COMMAND: pytest tests - CIBW_TEST_SKIP: ${{ matrix.test_skip }} + # pandas, a hard runtime dependency, has no cp314t riscv64 wheel on pypi.riseproject.dev. + CIBW_TEST_SKIP: ${{ matrix.python == 'cp314t' && '*' || '' }} - name: Check the Rust extension is in the wheel run: python3 -m zipfile -l wheelhouse/*.whl | grep -E 'gseapy/gse\..*\.so' diff --git a/.github/workflows/build-hierarchicalforecast.yml b/.github/workflows/build-hierarchicalforecast.yml index ee19dd7f77e..5da07716e75 100644 --- a/.github/workflows/build-hierarchicalforecast.yml +++ b/.github/workflows/build-hierarchicalforecast.yml @@ -44,31 +44,28 @@ jobs: with: package: hierarchicalforecast version: ${{ inputs.version }} + # Matches the python list this replaces, which only ever built + # cp312-cp314t; preserved rather than silently widened to cp310/cp311. + # (That list also carried a cp314t leg, but + # docs/packages/hierarchicalforecast.yaml has no 3.14t entry at all, so + # that leg never actually matched a pending wheel -- a stale-matrix + # mismatch the structural fix below now resolves on its own.) + python-exclude: 'cp39 cp310 cp311' build_wheels: needs: [setup] - if: needs.setup.outputs.versions != '[]' + # docs/packages/hierarchicalforecast.yaml declares manylinux-only files, + # so this filter is a no-op today; kept so a future musllinux entry does + # not silently duplicate the (hardcoded-manylinux) build below under + # another name. + if: needs.setup.outputs.versions != '[]' && matrix.platform == 'manylinux' name: Build hierarchicalforecast ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 90 strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - include: - - python: "cp312" - test_requires: statsforecast - - python: "cp313" - test_requires: statsforecast - # statsforecast needs statsmodels, which has no cp314 riscv64 wheel on - # pypi.riseproject.dev yet; these two modules import it at the top. - - python: "cp314" - pytest_args: --ignore=tests/test_evaluation.py --ignore=tests/test_utils.py - # utilsforecast (a hard runtime dep) requires pandas<3, which has no - # cp314t riscv64 wheel on pypi.riseproject.dev. - - python: "cp314t" - test_skip: "*" + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: HIERARCHICALFORECAST_VERSION: ${{ matrix.version }} @@ -96,16 +93,24 @@ jobs: CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ CIBW_TEST_ENVIRONMENT: >- PIP_ONLY_BINARY=numpy,pandas,scipy,scikit-learn,matplotlib,polars-runtime-32,statsmodels,statsforecast,coreforecast,pyarrow - CIBW_TEST_SKIP: ${{ matrix.test_skip }} + # utilsforecast (a hard runtime dep) requires pandas<3, which has no + # cp314t riscv64 wheel on pypi.riseproject.dev. + CIBW_TEST_SKIP: ${{ matrix.python == 'cp314t' && '*' || '' }} # polars is pinned to a version pypi.riseproject.dev has built for # riscv64; upstream's polars<=1.32.0 predates the polars-runtime split. # pyarrow is listed explicitly (not left to come in transitively via # statsforecast, which cp314 skips): polars.DataFrame.to_pandas() needs # it directly and cp314's test_diagnostics_negative_counting[polars] # hit a bare ModuleNotFoundError without it. - CIBW_TEST_REQUIRES: pytest pytest-benchmark scipy polars==1.44.2 pyarrow ${{ matrix.test_requires }} + CIBW_TEST_REQUIRES: >- + pytest pytest-benchmark scipy polars==1.44.2 pyarrow + ${{ contains(fromJSON('["cp312","cp313"]'), matrix.python) && 'statsforecast' || '' }} CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -m pytest tests --import-mode=importlib ${{ matrix.pytest_args }} + # statsforecast needs statsmodels, which has no cp314 riscv64 wheel on + # pypi.riseproject.dev yet; these two modules import it at the top. + CIBW_TEST_COMMAND: >- + python -m pytest tests --import-mode=importlib + ${{ matrix.python == 'cp314' && '--ignore=tests/test_evaluation.py --ignore=tests/test_utils.py' || '' }} - name: Check wheel contents run: |