Repository navigation
workflows: migrate canonical cibuildwheel builds #102
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`/`musllinux` jobs of | |
| # https://github.com/starlite-api/fast-query-parsers/blob/v1.0.3/.github/workflows/publish.yaml | |
| name: Build fast-query-parsers wheels (riscv64) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version glob to (re)build; empty builds every version of docs/packages/fast-query-parsers.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-fast-query-parsers.yml' | |
| - 'docs/packages/fast-query-parsers.yaml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-fast-query-parsers.yml' | |
| - 'docs/packages/fast-query-parsers.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 | |
| MUSLLINUX_RISCV64_IMAGE: quay.io/pypa/musllinux_1_2_riscv64 | |
| jobs: | |
| setup: | |
| uses: $/.github/workflows/_setup.yml | |
| with: | |
| package: fast-query-parsers | |
| version: ${{ inputs.version }} | |
| build_wheels: | |
| needs: [setup] | |
| if: needs.setup.outputs.versions != '[]' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.setup.outputs.versions) }} | |
| platform: [manylinux, musllinux] | |
| name: Build fast-query-parsers ${{ matrix.version }} cp38-abi3-${{ matrix.platform }}_riscv64 | |
| uses: $/.github/workflows/_build-cibuildwheel.yml | |
| with: | |
| package: "fast-query-parsers" | |
| version: "${{ matrix.version }}" | |
| repository: "starlite-api/fast-query-parsers" | |
| ref: "v${{ matrix.version }}" | |
| artifact-tag: "cp38-abi3-${{ matrix.platform }}_riscv64" | |
| timeout-minutes: 120 | |
| # pyo3's abi3-py38 feature is on unconditionally; the image has no | |
| # cp38, so the wheel is built on cp39 and re-tested on the rest. | |
| cibw-build: > | |
| cp39-${{ matrix.platform }}_riscv64 cp310-${{ matrix.platform }}_riscv64 | |
| cp311-${{ matrix.platform }}_riscv64 cp312-${{ matrix.platform }}_riscv64 | |
| cp313-${{ matrix.platform }}_riscv64 cp314-${{ matrix.platform }}_riscv64 | |
| cibw-musllinux-riscv64-image: "quay.io/pypa/musllinux_1_2_riscv64" | |
| 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\"" | |
| # pyproject.toml pins maturin<0.15 (2023), which has no riscv64 wheel | |
| # and no riscv64 auditwheel policy; a current maturin builds this tree | |
| # unmodified, so install one and skip isolation to bypass the pin. | |
| cibw-before-build: "pip install maturin" | |
| cibw-build-frontend: "pip; args: --no-build-isolation" | |
| cibw-test-requires: "pytest" | |
| cibw-test-sources: "tests" | |
| cibw-test-command: "python -m pytest -v tests" | |
| publish: | |
| name: Publish fast-query-parsers ${{ 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: fast-query-parsers-${{ matrix.version }}-*_riscv64 |