Repository navigation
workflows: migrate canonical cibuildwheel builds #16
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2026 The RISE Project | |
| # SPDX-License-Identifier: MIT | |
| --- | |
| # This workflow is based on the `linux` job of | |
| # https://github.com/py-econometrics/pyfixest/blob/v0.60.0/.github/workflows/build-and-release.yaml | |
| name: Build pyfixest wheels (riscv64) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version glob to (re)build; empty builds every version of docs/packages/pyfixest.yaml not released yet' | |
| required: false | |
| default: '' | |
| cancel-in-progress: | |
| description: Cancel an in-progress run in the same concurrency group. | |
| required: false | |
| type: boolean | |
| default: true | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-pyfixest.yml' | |
| - 'docs/packages/pyfixest.yaml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-pyfixest.yml' | |
| - 'docs/packages/pyfixest.yaml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ case(github.event_name == 'pull_request', true, github.event_name == 'workflow_dispatch', inputs['cancel-in-progress'], false) }} | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| env: | |
| MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64 | |
| jobs: | |
| setup: | |
| uses: $/.github/workflows/_setup.yml | |
| with: | |
| package: pyfixest | |
| version: ${{ inputs.version }} | |
| build_wheels: | |
| needs: [setup] | |
| if: needs.setup.outputs.versions != '[]' | |
| name: Build pyfixest ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJSON(needs.setup.outputs.matrix) }} | |
| uses: $/.github/workflows/_build-cibuildwheel.yml | |
| with: | |
| package: "pyfixest" | |
| version: "${{ matrix.version }}" | |
| repository: "py-econometrics/pyfixest" | |
| ref: "v${{ matrix.version }}" | |
| artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" | |
| timeout-minutes: 180 | |
| cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" | |
| # pyfixest ships no [tool.cibuildwheel], so the Rust toolchain its | |
| # maturin backend needs is installed in-container here. | |
| cibw-before-all-linux: > | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" PIP_ONLY_BINARY=numpy,scipy,pandas,matplotlib,duckdb,pillow,polars-runtime-32,pyarrow" | |
| cibw-test-requires: "pytest pytest-xdist pytest-benchmark duckdb matplotlib polars pyarrow" | |
| cibw-test-sources: "tests benchmarks pyfixest/did/data" | |
| # test_collinearity.py, test_count_fixef_fully_nested.py, | |
| # test_demean.py and test_detect_singletons.py import pyfixest's | |
| # numba/jax backends at module scope, and the jax-named tests and | |
| # test_wildboottest.py/test_rwolf_error (wildboottest needs numba) | |
| # call them; neither has a riscv64 wheel anywhere, nor a port in | |
| # this repo. test_batched_lsmr.py and test_lsmr_compiled.py import | |
| # torch, which has no riscv64 wheel either. test_quantreg.py needs | |
| # statsmodels, which has no riscv64 wheel for cp314 (CLAUDE.md | |
| # gotcha 84). test_check_version.py tests upstream's release script | |
| # under .github/, not the wheel. test_errors_etable expects the | |
| # AssertionError of upstream's locked maketables 0.1.8; 0.2.0 | |
| # raises ValueError. | |
| cibw-test-command: > | |
| python -c "import pyfixest.core._core_impl as m; assert m.__file__.endswith('.so'), m.__file__" | |
| && python -m pytest -v tests -n auto | |
| -m "not (extended or against_r_core or against_r_extended or plots or hac)" | |
| -k "not (jax or test_rwolf_error or test_errors_etable)" | |
| --ignore tests/test_batched_lsmr.py | |
| --ignore tests/test_check_version.py | |
| --ignore tests/test_collinearity.py | |
| --ignore tests/test_count_fixef_fully_nested.py | |
| --ignore tests/test_demean.py | |
| --ignore tests/test_detect_singletons.py | |
| --ignore tests/test_lsmr_compiled.py | |
| --ignore tests/test_quantreg.py | |
| --ignore tests/test_wildboottest.py | |
| publish: | |
| name: Publish pyfixest ${{ matrix.version }} | |
| needs: [setup, build_wheels] | |
| if: needs.setup.outputs.versions != '[]' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.setup.outputs.versions) }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| uses: $/.github/workflows/_publish-wheel.yml | |
| secrets: | |
| app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }} | |
| with: | |
| matrix: ${{ needs.setup.outputs.matrix }} | |
| artifact-pattern: pyfixest-${{ matrix.version }}-*-manylinux_riscv64 |