Skip to content

upstreaming: recover controller post-commit steps #106

upstreaming: recover controller post-commit steps

upstreaming: recover controller post-commit steps #106

# SPDX-FileCopyrightText: 2026 The RISE Project

Check failure on line 1 in .github/workflows/build-alienplatform.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-alienplatform.yml

Invalid workflow file

(Line: 82, Col: 30): Unrecognized named-value: 'env'. Located at position 1 within expression: env.RUST_TOOLCHAIN
# 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: ''
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-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.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
# 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
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.setup.outputs.matrix) }}
# riscv64 builds run several times slower than x86_64; raised from 120 after jobs were killed mid-build by the timeout, not a dead runner.
uses: $/.github/workflows/_build-cibuildwheel.yml
with:
package: "alienplatform"
version: "${{ matrix.version }}"
repository: "alienplatform/alien"
ref: "b33b2c81540e1faeee91ef682f3e022039420bac"
artifact-tag: "${{ matrix.python }}-manylinux_riscv64"
timeout-minutes: 360
cibw-package-dir: "crates/alien-bindings-python"
cibw-build: "${{ matrix.python }}-manylinux_riscv64"
# 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-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" RUSTUP_TOOLCHAIN=nightly-2026-10-03"
# 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__)"
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:
matrix: ${{ needs.setup.outputs.matrix }}
artifact-pattern: alienplatform-${{ matrix.version }}-*-manylinux_riscv64