From 21941c7446731906ad82f9fa56a12bc3b01591a8 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 13 Oct 2026 07:08:56 +0000 Subject: [PATCH 1/2] Port ormar-utils 0.2.1 to riscv64 ormar-utils is a pyo3/maturin Rust extension (ormar_rust_utils), not pure Python -- the abi3-py310 Cargo feature is what explains the cp310-abi3 wheel tags despite being a thin utility layer. Builds from the git checkout (maturin, no sdist floating-deps risk since Cargo.lock is committed); one cp312 build covers every non-free-threaded interpreter via abi3, cp314t needs its own build since pyo3 disables abi3 under free-threading. Mirrors upstream's own build matrix (manylinux + musllinux) narrowed to riscv64. --- .github/workflows/build-ormar-utils.yml | 103 ++++++++++++++++++++++++ docs/packages/ormar-utils.yaml | 5 ++ 2 files changed, 108 insertions(+) create mode 100644 .github/workflows/build-ormar-utils.yml create mode 100644 docs/packages/ormar-utils.yaml diff --git a/.github/workflows/build-ormar-utils.yml b/.github/workflows/build-ormar-utils.yml new file mode 100644 index 000000000000..bd5cb96f861d --- /dev/null +++ b/.github/workflows/build-ormar-utils.yml @@ -0,0 +1,103 @@ +# SPDX-FileCopyrightText: 2026 The RISE Project +# SPDX-License-Identifier: MIT +--- +# This workflow is based on: https://github.com/ormar-orm/ormar-utils/blob/v0.2.1/.github/workflows/ci.yml +name: Build ormar-utils wheels (riscv64) + +on: + workflow_dispatch: + inputs: + version: + description: 'Version glob to (re)build; empty builds every version of docs/packages/ormar-utils.yaml not released yet' + required: false + default: '' + pull_request: + branches: [main] + paths: + - '.github/workflows/build-ormar-utils.yml' + - 'docs/packages/ormar-utils.yaml' + push: + branches: [main] + paths: + - '.github/workflows/build-ormar-utils.yml' + - 'docs/packages/ormar-utils.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 + MUSLLINUX_RISCV64_IMAGE: quay.io/pypa/musllinux_1_2_riscv64 + +jobs: + setup: + uses: $/.github/workflows/_setup.yml + with: + package: ormar-utils + version: ${{ inputs.version }} + + build_wheels: + needs: [setup] + if: needs.setup.outputs.versions != '[]' + name: Build ormar-utils ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.libc }}_riscv64 + runs-on: ubuntu-24.04-riscv + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(needs.setup.outputs.versions) }} + # pyo3 carries abi3-py310 unconditionally (Cargo.toml), so one cp312 + # build (our floor) serves every non-free-threaded CPython; cp314t + # needs its own build since pyo3 disables abi3 under Py_GIL_DISABLED. + python: ["cp312", "cp314t"] + libc: [manylinux, musllinux] + + env: + ORMAR_UTILS_VERSION: ${{ matrix.version }} + + steps: + - name: Checkout ormar-utils v${{ env.ORMAR_UTILS_VERSION }} + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: ormar-orm/ormar-utils + ref: v${{ env.ORMAR_UTILS_VERSION }} + persist-credentials: false + + - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 + env: + CIBW_ARCHS: riscv64 + CIBW_BUILD: ${{ matrix.python }}-${{ matrix.libc }}_riscv64 + CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} + CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} + 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"' + CIBW_TEST_REQUIRES: pytest + CIBW_TEST_COMMAND: pytest {project}/tests -v + + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: ormar-utils-${{ env.ORMAR_UTILS_VERSION }}-${{ matrix.python }}-${{ matrix.libc }}_riscv64 + path: ./wheelhouse/*.whl + if-no-files-found: error + + publish: + name: Publish ormar-utils ${{ 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: ormar-utils-${{ matrix.version }}-*riscv64 diff --git a/docs/packages/ormar-utils.yaml b/docs/packages/ormar-utils.yaml new file mode 100644 index 000000000000..dc33251ac6af --- /dev/null +++ b/docs/packages/ormar-utils.yaml @@ -0,0 +1,5 @@ +package-name: ormar-utils +source-code: https://github.com/ormar-orm/ormar-utils +license: MIT +versions: +- version: 0.2.1 From 8207167c7086b5b62152212033db39abc0f1e05e Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 16 Oct 2026 00:37:46 +0000 Subject: [PATCH 2/2] ormar-utils: drop cp314t from riscv64 matrix, pyo3 0.23.5 ceiling CI failed both cp314t legs (manylinux and musllinux) in maturin's pyo3-ffi build script: "The configured Python interpreter version (3.14) is newer than PyO3's maximum supported version (3.13)". Read directly from pyo3-ffi 0.23.5's build.rs: for a free-threaded interpreter this check is unconditional and has no env var escape hatch (unlike a non-free-threaded cp314 build, where PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 would clear it). ormar-utils v0.2.1 pins pyo3 = "0.23.5" in Cargo.toml/Cargo.lock, so this reproduces identically on every architecture, not just riscv64; upstream's own ci.yml never builds or tests a free-threaded interpreter for this package either. pyo3 0.30.1 raises the ceiling to 3.15 and would fix this (cargo's dependency resolution for this crate's small, direct dependency set bumps clean with no cascading pins), but the sandbox here can't run the crate's build script to confirm the actual compile still succeeds across its pyo3 API usage, so that bump stays a real source change to verify and send upstream rather than a CI knob to flip here. Drop cp314t from the matrix instead, matching upstream's own tested scope. The remaining cp312 leg (pyo3's abi3-py310 is unconditional) still covers every non-free-threaded interpreter down to 3.10 and up through 3.14 via abi3 forward compatibility. --- .github/workflows/build-ormar-utils.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-ormar-utils.yml b/.github/workflows/build-ormar-utils.yml index bd5cb96f861d..463d1cf741f8 100644 --- a/.github/workflows/build-ormar-utils.yml +++ b/.github/workflows/build-ormar-utils.yml @@ -51,9 +51,25 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} # pyo3 carries abi3-py310 unconditionally (Cargo.toml), so one cp312 - # build (our floor) serves every non-free-threaded CPython; cp314t - # needs its own build since pyo3 disables abi3 under Py_GIL_DISABLED. - python: ["cp312", "cp314t"] + # build (our floor) serves every non-free-threaded CPython, cp314 + # included, via abi3 forward compatibility. + # + # cp314t is dropped (gotcha 322/326): v0.2.1's Cargo.lock pins pyo3 + # 0.23.5, whose pyo3-ffi build script hard-errors "The configured + # Python interpreter version (3.14) is newer than PyO3's maximum + # supported version (3.13)" for any free-threaded interpreter. Unlike + # a non-free-threaded cp314 build (where PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 + # would clear the same check), this specific check is unconditional + # for Py_GIL_DISABLED builds and cannot be suppressed by any env var + # (confirmed by reading pyo3-ffi 0.23.5's build.rs directly). It + # reproduces identically on every architecture, not just riscv64: + # upstream's own CI (ci.yml) never builds or tests a free-threaded + # interpreter for this package either. pyo3 0.30.1 raises the + # ceiling to 3.15 and would fix this, but bumping a pinned + # dependency without being able to empirically verify the resulting + # compile is a real source change, not a CI knob - so cp314t is + # dropped here to match upstream's own tested scope instead. + python: ["cp312"] libc: [manylinux, musllinux] env: