Skip to content

packages: Update versions and status #9

packages: Update versions and status

packages: Update versions and status #9

Workflow file for this run

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on the `linux` job of
# https://github.com/y-crdt/pycrdt/blob/0.14.4/.github/workflows/publish.yml
name: Build pycrdt wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/pycrdt.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-pycrdt.yml'
- 'docs/packages/pycrdt.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-pycrdt.yml'
- 'docs/packages/pycrdt.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: pycrdt
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build pycrdt ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
# pyo3 has no abi3 feature enabled here, so upstream builds and
# publishes one wheel per interpreter (-i 3.10 3.11 3.12 3.13 3.14
# pypy3.11); pypy is dropped (this repo doesn't build PyPy wheels)
# and musllinux with it (rustup.rs ships no riscv64 musl toolchain).
python: ["cp310", "cp311", "cp312", "cp313", "cp314"]
env:
PYCRDT_VERSION: ${{ matrix.version }}
steps:
- name: Checkout pycrdt ${{ env.PYCRDT_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: y-crdt/pycrdt
ref: ${{ env.PYCRDT_VERSION }}
persist-credentials: false
- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
only: ${{ matrix.python }}-manylinux_riscv64
output-dir: wheelhouse/
env:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
# pycrdt 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"
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=pydantic-core
CIBW_TEST_REQUIRES: "pytest>=8.3.5,<10 trio>=0.25.1,<0.35 pydantic>=2.5.2,<3"
CIBW_TEST_SOURCES: tests
CIBW_TEST_COMMAND: >-
python -c "import pycrdt._pycrdt as m; assert m.__file__.endswith('.so'), m.__file__"
&& python -m pytest -v tests --ignore tests/test_types.py
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pycrdt-${{ env.PYCRDT_VERSION }}-${{ matrix.python }}-manylinux_riscv64
path: wheelhouse/*.whl
if-no-files-found: error
publish:
name: Publish pycrdt ${{ 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
with:
artifact-pattern: pycrdt-${{ matrix.version }}-*-manylinux_riscv64