Skip to content

Commit a6f3405

Browse files
committed
Add riscv64 build for tmtools 0.3.0
pybind11/C++ extension wrapping TM-align; builds per-interpreter (cp312/cp313/cp314/cp314t), no native deps, tested with upstream's own unittest discovery.
1 parent 942d20c commit a6f3405

2 files changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on: https://github.com/jvkersch/tmtools/blob/v0.3.0/.github/workflows/build-wheels.yml
5+
name: Build tmtools wheels (riscv64)
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: 'Version glob to (re)build; empty builds every version of docs/packages/tmtools.yaml not released yet'
12+
required: false
13+
default: ''
14+
pull_request:
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/build-tmtools.yml'
18+
- 'docs/packages/tmtools.yaml'
19+
push:
20+
branches: [main]
21+
paths:
22+
- '.github/workflows/build-tmtools.yml'
23+
- 'docs/packages/tmtools.yaml'
24+
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
27+
cancel-in-progress: true
28+
29+
permissions:
30+
contents: read # to fetch code (actions/checkout)
31+
32+
env:
33+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
34+
35+
jobs:
36+
setup:
37+
uses: $/.github/workflows/_setup.yml
38+
with:
39+
package: tmtools
40+
version: ${{ inputs.version }}
41+
42+
build_wheels:
43+
needs: [setup]
44+
if: needs.setup.outputs.versions != '[]'
45+
name: Build tmtools ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
46+
runs-on: ubuntu-24.04-riscv
47+
timeout-minutes: 60
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
52+
python:
53+
- "cp312"
54+
- "cp313"
55+
- "cp314"
56+
- "cp314t"
57+
58+
env:
59+
TMTOOLS_VERSION: ${{ matrix.version }}
60+
61+
steps:
62+
- name: Checkout tmtools v${{ env.TMTOOLS_VERSION }}
63+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64+
with:
65+
repository: jvkersch/tmtools
66+
ref: v${{ env.TMTOOLS_VERSION }}
67+
persist-credentials: false
68+
69+
- name: Build wheels
70+
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
71+
with:
72+
output-dir: wheelhouse/
73+
only: ${{ matrix.python }}-manylinux_riscv64
74+
env:
75+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
76+
CIBW_TEST_REQUIRES: biopython
77+
CIBW_TEST_COMMAND: "python -m unittest discover -v tmtools"
78+
79+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
80+
with:
81+
name: tmtools-${{ env.TMTOOLS_VERSION }}-${{ matrix.python }}-manylinux_riscv64
82+
path: wheelhouse/*.whl
83+
if-no-files-found: error
84+
85+
publish:
86+
name: Publish tmtools ${{ matrix.version }}
87+
needs: [setup, build_wheels]
88+
if: needs.setup.outputs.versions != '[]'
89+
strategy:
90+
fail-fast: false
91+
matrix:
92+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
93+
permissions:
94+
contents: write
95+
pull-requests: write
96+
uses: $/.github/workflows/_publish-wheel.yml
97+
secrets:
98+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
99+
with:
100+
artifact-pattern: tmtools-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/tmtools.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: tmtools
2+
source-code: https://github.com/jvkersch/tmtools
3+
license: GPL-3.0-only AND MIT
4+
versions:
5+
- version: 0.3.0

0 commit comments

Comments
 (0)