From 2713a2cf2d7c235b226102372f575ee5451ffb3e Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 2 Nov 2026 22:12:59 +0000 Subject: [PATCH 1/3] alienplatform: add riscv64 build Ports alienplatform (Typed Python resource bindings for Alien workloads) to riscv64. PyO3/maturin extension-module tagged cp310-abi3; no riscv64 wheel exists on PyPI (4 wheels: macOS x86_64/arm64, manylinux2014_x86_64, manylinux_2_28_aarch64) or on pypi.riseproject.dev. Real upstream source lives in github.com/alienplatform/alien (crates/alien-bindings-python), not discoverable from PyPI metadata alone (no home_page/project_urls on any of its 26 releases) - found via web search. License is FSL-1.1-Apache-2.0 (Functional Source License), already handled by this repo for test-results-parser and sentry-cli; its redistribution clause permits what this port does (recompile + redistribute, same LICENSE.md/notices kept). Build mirrors upstream's own python-bindings.yml `wheels` job: --no-default-features --features all-platforms,platform-sdk (which are also the crate's own feature defaults) via pypa/cibuildwheel+maturin, nightly-2026-10-03 rust toolchain installed in-container (matches rust-toolchain.toml at the pinned commit). No architecture blocker found: the heavier native deps (aws-lc-rs/ring crypto, used elsewhere in this registry's published icechunk; turso's simsimd dependency, whose build.rs only tries SIMD backends on x86_64/arm/aarch64 and falls through to its portable scalar path on every other target_arch) already have a riscv64-safe path. No vendored binaries, no GPU/CUDA dependency. No git tags upstream (continuous, trunk-based release via release-plz); pinned to the commit whose Cargo.toml version matches the 3.3.49 PyPI release exactly. --- .github/workflows/build-alienplatform.yml | 138 ++++++++++++++++++++++ docs/packages/alienplatform.yaml | 5 + 2 files changed, 143 insertions(+) create mode 100644 .github/workflows/build-alienplatform.yml create mode 100644 docs/packages/alienplatform.yaml diff --git a/.github/workflows/build-alienplatform.yml b/.github/workflows/build-alienplatform.yml new file mode 100644 index 000000000000..aaf8dc7a0191 --- /dev/null +++ b/.github/workflows/build-alienplatform.yml @@ -0,0 +1,138 @@ +# SPDX-FileCopyrightText: 2026 The RISE Project +# SPDX-License-Identifier: MIT +--- +# This workflow is based on: https://github.com/alienplatform/alien/blob/b33b2c81540e1faeee91ef682f3e022039420bac/.github/workflows/python-bindings.yml +# (the `wheels` job's `--no-default-features --features all-platforms,platform-sdk` +# build; those two features are also the crate's own [features] default in +# crates/alien-bindings-python/Cargo.toml, so plain cibuildwheel/maturin needs +# no extra feature flags to match it). +name: Build alienplatform wheels (riscv64) + +on: + workflow_dispatch: + inputs: + version: + description: 'Version glob to (re)build; empty builds every version of docs/packages/alienplatform.yaml not released yet' + required: false + default: '' + pull_request: + branches: [main] + paths: + - '.github/workflows/build-alienplatform.yml' + - 'docs/packages/alienplatform.yaml' + push: + branches: [main] + paths: + - '.github/workflows/build-alienplatform.yml' + - 'docs/packages/alienplatform.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 + # alienplatform publishes no git tags (continuous, trunk-based releases via + # release-plz); this is the commit whose root Cargo.toml carries + # `version = "3.3.49"`, matching the PyPI release exactly. A future version + # bump needs this updated by hand the same way (gotcha 103's shape). + ALIENPLATFORM_REF: b33b2c81540e1faeee91ef682f3e022039420bac + # Matches rust-toolchain.toml at that commit. + RUST_TOOLCHAIN: "nightly-2026-10-03" + +jobs: + setup: + uses: $/.github/workflows/_setup.yml + with: + package: alienplatform + version: ${{ inputs.version }} + + build_wheels: + needs: [setup] + if: needs.setup.outputs.versions != '[]' + name: Build alienplatform ${{ 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) }} + # pyo3 carries an explicit abi3-py310 feature (Cargo.toml), so maturin + # always tags the wheel cp310-abi3 regardless of which interpreter + # compiles it - matching the one Linux wheel upstream publishes per + # arch. cp313/cp314 reuse+retest the cp312-built wheel + # (cibuildwheel's find_compatible_wheel). No cp314t: abi3 wheels + # aren't compatible with the free-threaded ABI, and upstream ships no + # free-threaded build either. + python: ["cp312", "cp313", "cp314"] + + env: + ALIENPLATFORM_VERSION: ${{ matrix.version }} + + steps: + - name: Checkout alienplatform ${{ env.ALIENPLATFORM_REF }} + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: alienplatform/alien + ref: ${{ env.ALIENPLATFORM_REF }} + persist-credentials: false + + - name: Build wheels + uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 + with: + package-dir: crates/alien-bindings-python + output-dir: wheelhouse/ + only: ${{ matrix.python }}-manylinux_riscv64 + env: + CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} + # alien-bindings-python ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + # package-dir is the crate subdirectory, but Cargo still resolves + # the enclosing workspace root (Cargo.lock) by walking up from + # there, so no extra workspace checkout step is needed. + CIBW_BEFORE_ALL_LINUX: >- + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | + sh -s -- -y --profile minimal --default-toolchain ${{ env.RUST_TOOLCHAIN }} + CIBW_ENVIRONMENT: >- + PATH="$PATH:$HOME/.cargo/bin" + RUSTUP_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ + # Base `import alienplatform` only loads the compiled extension: + # grpcio/protobuf are the optional [worker] extra, imported lazily + # inside worker_runtime.py's functions, never at module load. + # storage()/kv()/etc. build a lazy handle synchronously with no + # network or credential access, so this is a safe smoke test - + # matching upstream's own wheels job, which runs no test command at + # all against this feature set (its pytest suite only covers a + # separate --features local build, see python-bindings.yml's `test` + # job). + CIBW_TEST_COMMAND: >- + python -c "import alienplatform; + s = alienplatform.storage('files'); + print('alienplatform OK:', type(s).__name__)" + + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: alienplatform-${{ env.ALIENPLATFORM_VERSION }}-${{ matrix.python }}-manylinux_riscv64 + path: wheelhouse/*.whl + if-no-files-found: error + + publish: + name: Publish alienplatform ${{ 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: alienplatform-${{ matrix.version }}-*-manylinux_riscv64 diff --git a/docs/packages/alienplatform.yaml b/docs/packages/alienplatform.yaml new file mode 100644 index 000000000000..01fc16e5f917 --- /dev/null +++ b/docs/packages/alienplatform.yaml @@ -0,0 +1,5 @@ +package-name: alienplatform +source-code: https://github.com/alienplatform/alien +license: FSL-1.1-Apache-2.0 +versions: +- version: 3.3.49 From 74d0ce9e3f461c3b5cbf6d7b265326c3d5b1b4ab Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 5 Nov 2026 08:26:33 -0800 Subject: [PATCH 2/3] alienplatform: Record target Python versions --- .github/workflows/build-alienplatform.yml | 11 +---------- docs/packages/alienplatform.yaml | 1 + 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-alienplatform.yml b/.github/workflows/build-alienplatform.yml index aaf8dc7a0191..cee62e50a5f0 100644 --- a/.github/workflows/build-alienplatform.yml +++ b/.github/workflows/build-alienplatform.yml @@ -59,16 +59,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - # pyo3 carries an explicit abi3-py310 feature (Cargo.toml), so maturin - # always tags the wheel cp310-abi3 regardless of which interpreter - # compiles it - matching the one Linux wheel upstream publishes per - # arch. cp313/cp314 reuse+retest the cp312-built wheel - # (cibuildwheel's find_compatible_wheel). No cp314t: abi3 wheels - # aren't compatible with the free-threaded ABI, and upstream ships no - # free-threaded build either. - python: ["cp312", "cp313", "cp314"] - + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: ALIENPLATFORM_VERSION: ${{ matrix.version }} diff --git a/docs/packages/alienplatform.yaml b/docs/packages/alienplatform.yaml index 01fc16e5f917..094da6b0ff64 100644 --- a/docs/packages/alienplatform.yaml +++ b/docs/packages/alienplatform.yaml @@ -3,3 +3,4 @@ source-code: https://github.com/alienplatform/alien license: FSL-1.1-Apache-2.0 versions: - version: 3.3.49 + python-versions: ['3.10'] From 919f300c945c3fdcf0bfbe0e1ff007b3f5a6a844 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 6 Nov 2026 09:27:06 -0800 Subject: [PATCH 3/3] alienplatform: Use target file metadata --- docs/packages/alienplatform.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/packages/alienplatform.yaml b/docs/packages/alienplatform.yaml index 094da6b0ff64..73ccbbbb0ddd 100644 --- a/docs/packages/alienplatform.yaml +++ b/docs/packages/alienplatform.yaml @@ -3,4 +3,5 @@ source-code: https://github.com/alienplatform/alien license: FSL-1.1-Apache-2.0 versions: - version: 3.3.49 - python-versions: ['3.10'] + files: + - python: 3.10-abi3:manylinux