Skip to content
Draft
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
121 changes: 121 additions & 0 deletions .github/workflows/build-eflips-schedule-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on the `linux` job of
# https://github.com/mpm-tu-berlin/eflips-schedule-rust/blob/v3.0.2/.github/workflows/CI.yml
name: Build eflips-schedule-rust wheels (riscv64)

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

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: eflips-schedule-rust
version: ${{ inputs.version }}

build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build eflips-schedule-rust ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
# PyO3 extension built per interpreter (no abi3 feature, no
# gil_used(false) declaration), matching upstream's own non-abi3
# release matrix; cp314t is excluded like build-py-rust-stemmers.yml.
python: ["cp312", "cp313", "cp314"]

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

steps:
- name: Checkout eflips-schedule-rust v${{ env.EFLIPS_SCHEDULE_RUST_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: mpm-tu-berlin/eflips-schedule-rust
ref: v${{ env.EFLIPS_SCHEDULE_RUST_VERSION }}
persist-credentials: false

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

- name: Apply patches
run: git apply python-wheels/patches/eflips-schedule-rust/${{ env.EFLIPS_SCHEDULE_RUST_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 }}
# eflips-schedule-rust ships no [tool.cibuildwheel], so the Rust
# toolchain its maturin backend needs is installed in-container.
CIBW_BEFORE_ALL_LINUX: >-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |
sh -s -- -y --profile minimal
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"'
CIBW_TEST_REQUIRES: networkx
CIBW_TEST_SOURCES: test
CIBW_TEST_COMMAND: >-
python -c "import eflips_schedule_rust as m;
assert m.__file__.endswith('.so'), m.__file__" &&
python -m unittest discover -s test

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

publish:
name: Publish eflips-schedule-rust ${{ 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: eflips_schedule_rust-${{ matrix.version }}-*-manylinux_riscv64
5 changes: 5 additions & 0 deletions docs/packages/eflips-schedule-rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package-name: eflips-schedule-rust
source-code: https://github.com/mpm-tu-berlin/eflips-schedule-rust
license: AGPL-3.0-or-later
versions:
- version: 3.0.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Thu, 15 Oct 2026 23:50:17 +0000
Subject: [PATCH] Ship AGPLv3.md in wheel metadata

pyproject.toml declares license = "AGPL-3.0-or-later" but the
repository's licence text lives at AGPLv3.md, a name the default
LICEN[CS]E*/COPYING*/NOTICE*/AUTHORS* glob does not match, so maturin
ships no licence file in the wheel at all (verified against the real
PyPI 3.0.2 release: no dist-info/licenses/ entry). Add an explicit
license-files entry so it is bundled.

Upstream-Status: To upstream [not submitted from this automated port run]
---
pyproject.toml | 1 +
1 file changed, 1 insertion(+)

diff --git a/pyproject.toml b/pyproject.toml
index 12ead2a..d6c8365 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -17,6 +17,7 @@ authors = [
]
readme = "README.md"
license = "AGPL-3.0-or-later"
+license-files = ["AGPLv3.md"]


[project.urls]
Loading