Repository navigation
docs: Update projects #56
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/kylebarron/arro3/blob/py-v0.8.2/.github/workflows/wheels.yml | |
| name: Build arro3-io wheels (riscv64) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version glob to (re)build; empty builds every version of docs/packages/arro3-io.yaml not released yet' | |
| required: false | |
| default: '' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-arro3-io.yml' | |
| - 'docs/packages/arro3-io.yaml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-arro3-io.yml' | |
| - 'docs/packages/arro3-io.yaml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| 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: arro3-io | |
| version: ${{ inputs.version }} | |
| build_wheels: | |
| needs: [setup] | |
| if: needs.setup.outputs.versions != '[]' | |
| name: Build arro3-io ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 | |
| runs-on: ubuntu-24.04-riscv | |
| timeout-minutes: 360 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.setup.outputs.versions) }} | |
| # `tag` is a real matrix dimension (not an include-only key): two | |
| # `include:` entries that only add new keys collapse to one job | |
| # (gotcha 402), as happened to build-arro3-core.yml. | |
| tag: [cp311-abi3, cp314t] | |
| include: | |
| # Upstream builds one abi3 wheel with `-i 3.11 --features abi3-py311` | |
| # plus per-interpreter wheels for the free-threaded builds. cp313t is | |
| # dropped: the riscv64 manylinux image ships no cp313t. | |
| - tag: cp311-abi3 | |
| # Built on cp311 -- the oldest interpreter the abi3 tag claims -- | |
| # and re-tested on the newer ones via find_compatible_wheel. | |
| build: >- | |
| cp311-manylinux_riscv64 cp312-manylinux_riscv64 | |
| cp313-manylinux_riscv64 cp314-manylinux_riscv64 | |
| features: --features abi3-py311 --features extension-module | |
| - tag: cp314t | |
| build: cp314t-manylinux_riscv64 | |
| features: --features extension-module | |
| env: | |
| ARRO3_IO_VERSION: ${{ matrix.version }} | |
| steps: | |
| - name: Checkout arro3 py-v${{ env.ARRO3_IO_VERSION }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: kylebarron/arro3 | |
| ref: py-v${{ env.ARRO3_IO_VERSION }} | |
| persist-credentials: false | |
| - name: Stage the licences beside arro3-io's pyproject.toml | |
| # maturin globs LICEN[CS]E* relative to the pyproject directory, which | |
| # in this monorepo is arro3-io/ -- so upstream's published wheels | |
| # carry no licence text at all, only the License-Expression metadata. | |
| run: cp LICENSE_MIT LICENSE_APACHE arro3-io/ | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 | |
| with: | |
| package-dir: arro3-io | |
| output-dir: wheelhouse/ | |
| env: | |
| # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. | |
| CIBW_BUILD: ${{ matrix.build }} | |
| CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} | |
| # arro3 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" | |
| MATURIN_PEP517_ARGS="${{ matrix.features }}" | |
| PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ | |
| # Without it pip prefers PyPI's newer numpy/pyarrow, neither of | |
| # which has a riscv64 wheel, and source-builds them in the | |
| # container. | |
| CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=numpy,pyarrow | |
| CIBW_TEST_REQUIRES: pytest pyarrow | |
| # cp311 has no riscv64 pyarrow wheel on our registry (pyarrow's | |
| # own riscv64 builds start at cp312), so the wheel still builds | |
| # on cp311 for the abi3 tag but isn't test-exercised there. | |
| CIBW_TEST_SKIP: cp311-* | |
| CIBW_TEST_SOURCES: tests | |
| CIBW_TEST_COMMAND: >- | |
| python -m pytest -v | |
| tests/io/test_ipc.py | |
| tests/io/test_json.py | |
| tests/io/test_parquet.py | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: arro3-io-${{ env.ARRO3_IO_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 | |
| path: wheelhouse/*.whl | |
| if-no-files-found: error | |
| publish: | |
| name: Publish arro3-io ${{ 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: | |
| artifact-pattern: arro3-io-${{ matrix.version }}-*-manylinux_riscv64 |