Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .github/workflows/build-bermuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on the `build_wheels` job of
# https://github.com/napari/bermuda/blob/v0.1.7/.github/workflows/wheels.yml
name: Build bermuda wheels (riscv64)

on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/bermuda.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-bermuda.yml'
- 'docs/packages/bermuda.yaml'
- 'patches/bermuda/**'
push:
branches: [main]
paths:
- '.github/workflows/build-bermuda.yml'
- 'docs/packages/bermuda.yaml'
- 'patches/bermuda/**'

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: bermuda
version: ${{ inputs.version }}

build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build bermuda ${{ 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) }}
# Per-interpreter (not abi3): pyo3's extension-module binding has no
# abi3 feature enabled here.
python: ["cp312", "cp313", "cp314", "cp314t"]

env:
BERMUDA_VERSION: ${{ matrix.version }}

steps:
- name: Checkout bermuda v${{ env.BERMUDA_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: napari/bermuda
ref: v${{ env.BERMUDA_VERSION }}
persist-credentials: false

- name: Checkout python-wheels
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: python-wheels
persist-credentials: false

- name: Patch bermuda source
run: git apply python-wheels/patches/bermuda/${{ env.BERMUDA_VERSION }}/*.patch

- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
output-dir: wheelhouse/
only: ${{ matrix.python }}-manylinux_riscv64
env:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
# setuptools_scm can't derive the version from this tag-less checkout.
CIBW_ENVIRONMENT: >-
PATH=$HOME/.cargo/bin:$PATH
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BERMUDA=${{ env.BERMUDA_VERSION }}

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: bermuda-${{ env.BERMUDA_VERSION }}-${{ matrix.python }}-manylinux_riscv64
path: wheelhouse/*.whl
if-no-files-found: error

publish:
name: Publish bermuda ${{ 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: bermuda-${{ matrix.version }}-*-manylinux_riscv64
5 changes: 5 additions & 0 deletions docs/packages/bermuda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package-name: bermuda
source-code: https://github.com/napari/bermuda
license: BSD-3-Clause
versions:
- version: 0.1.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Thu, 14 Oct 2026 12:00:00 +0000
Subject: [PATCH] pyproject: drop the removed cpython-freethreading enable
group

cibuildwheel 4.2.0 (the version this repo pins for riscv64 builds) no
longer recognises "cpython-freethreading" as an enable group -- it
errors "Failed to parse enable group" before any build starts, on
every interpreter, since the whole [tool.cibuildwheel] table is parsed
up front and `--only <id>` does not narrow around it. Free-threaded
builds (cp314t) no longer need an opt-in on this cibuildwheel version.

Upstream-Status: Backport [https://github.com/napari/bermuda/commit/a73b76c35aabc693cd7996dfe66d8ead7dbb759f]
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 7f24c3b..7a8f083 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -163,7 +163,7 @@ combine-as-imports = true
[tool.cibuildwheel]
test-command = "pytest {project}/tests"
test-groups = ["test"]
-enable = ["pypy", "cpython-freethreading"]
+enable = ["pypy"]
build = "*64"

[tool.cibuildwheel.linux]
Loading