Skip to content

Commit 967c349

Browse files
authored
texterrors: Add version 1.1.8 (#2324)
Build the nanobind extension (texterrors_align) from the upstream v1.1.8 tag with cibuildwheel and run upstream's pytest suite against the installed wheel. musllinux is dropped because numpy and Levenshtein have no musllinux riscv64 wheel.
1 parent 180d086 commit 967c349

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+
# Based on the build_wheels and test-wheels jobs of
5+
# https://github.com/RuABraun/texterrors/blob/v1.1.8/.github/workflows/publish-to-pypi.yaml
6+
name: Build texterrors wheels (riscv64)
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'Version glob to (re)build; empty builds every version of docs/packages/texterrors.yaml not released yet'
13+
required: false
14+
default: ''
15+
pull_request:
16+
branches: [main]
17+
paths:
18+
- '.github/workflows/build-texterrors.yml'
19+
- 'docs/packages/texterrors.yaml'
20+
push:
21+
branches: [main]
22+
paths:
23+
- '.github/workflows/build-texterrors.yml'
24+
- 'docs/packages/texterrors.yaml'
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
28+
cancel-in-progress: true
29+
30+
permissions:
31+
contents: read # to fetch code (actions/checkout)
32+
33+
env:
34+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
35+
36+
jobs:
37+
setup:
38+
uses: $/.github/workflows/_setup.yml
39+
with:
40+
package: texterrors
41+
version: ${{ inputs.version }}
42+
43+
build_wheels:
44+
needs: [setup]
45+
if: needs.setup.outputs.versions != '[]'
46+
name: Build texterrors ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
47+
runs-on: ubuntu-24.04-riscv
48+
timeout-minutes: 60
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
53+
# No musllinux: numpy and Levenshtein have no musllinux riscv64 wheel.
54+
python: ["cp312", "cp313", "cp314", "cp314t"]
55+
56+
env:
57+
TEXTERRORS_VERSION: ${{ matrix.version }}
58+
59+
steps:
60+
- name: Checkout texterrors v${{ env.TEXTERRORS_VERSION }}
61+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
62+
with:
63+
repository: RuABraun/texterrors
64+
ref: v${{ env.TEXTERRORS_VERSION }}
65+
persist-credentials: false
66+
67+
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
68+
with:
69+
output-dir: wheelhouse/
70+
only: ${{ matrix.python }}-manylinux_riscv64
71+
env:
72+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
73+
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
74+
# Upstream's test-wheels job runs `pytest -v .` from the checkout after installing the wheel.
75+
CIBW_TEST_REQUIRES: pytest
76+
CIBW_TEST_SOURCES: tests pytest.ini
77+
CIBW_TEST_COMMAND: pytest -v .
78+
79+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
80+
with:
81+
name: texterrors-${{ env.TEXTERRORS_VERSION }}-${{ matrix.python }}-manylinux_riscv64
82+
path: ./wheelhouse/*.whl
83+
if-no-files-found: error
84+
85+
publish:
86+
name: Publish texterrors ${{ 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: texterrors-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/texterrors.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: texterrors
2+
source-code: https://github.com/RuABraun/texterrors
3+
license: Apache-2.0
4+
versions:
5+
- version: 1.1.8

0 commit comments

Comments
 (0)