Skip to content

Commit 56fc9de

Browse files
committed
unicodedata2: add build-unicodedata2.yml for riscv64 wheels
Backport of CPython's unicodedata module with a newer Unicode database; builds from generated C tables, no native dependencies, both manylinux and musllinux riscv64.
1 parent e84e693 commit 56fc9de

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# Based on the `build_wheels` job of
5+
# https://github.com/fonttools/unicodedata2/blob/17.0.1/.github/workflows/ci.yml
6+
name: Build unicodedata2 wheels (riscv64)
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'unicodedata2 version to build (git tag, e.g. 17.0.1)'
13+
required: true
14+
default: '17.0.1'
15+
pull_request:
16+
paths:
17+
- '.github/workflows/build-unicodedata2.yml'
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ inputs.version || '17.0.1' }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read # to fetch code (actions/checkout)
25+
26+
env:
27+
UNICODEDATA2_VERSION: ${{ inputs.version || '17.0.1' }}
28+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
29+
MUSLLINUX_RISCV64_IMAGE: quay.io/pypa/musllinux_1_2_riscv64
30+
31+
jobs:
32+
setup:
33+
uses: $/.github/workflows/_setup.yml
34+
35+
build_wheels:
36+
needs: [setup]
37+
name: Build unicodedata2 ${{ inputs.version || '17.0.1' }} ${{ matrix.python }}-${{ matrix.libc }}_riscv64
38+
runs-on: ubuntu-24.04-riscv
39+
timeout-minutes: 60
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
python: ["cp312", "cp313", "cp314", "cp314t"]
44+
libc: [manylinux, musllinux]
45+
46+
steps:
47+
- name: Checkout unicodedata2 ${{ env.UNICODEDATA2_VERSION }}
48+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
49+
with:
50+
repository: fonttools/unicodedata2
51+
ref: ${{ env.UNICODEDATA2_VERSION }}
52+
persist-credentials: false
53+
54+
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
55+
env:
56+
CIBW_ARCHS: riscv64
57+
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.libc }}_riscv64
58+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
59+
CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }}
60+
CIBW_TEST_EXTRAS: testing
61+
CIBW_TEST_COMMAND: pytest {project}/tests
62+
63+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
64+
with:
65+
name: unicodedata2-${{ env.UNICODEDATA2_VERSION }}-${{ matrix.python }}-${{ matrix.libc }}_riscv64
66+
path: ./wheelhouse/*.whl
67+
if-no-files-found: error
68+
69+
publish:
70+
name: Publish unicodedata2 ${{ inputs.version || '17.0.1' }}
71+
needs: [setup, build_wheels]
72+
permissions:
73+
contents: write
74+
pull-requests: write
75+
uses: $/.github/workflows/_publish-wheel.yml
76+
with:
77+
artifact-pattern: unicodedata2-${{ inputs.version || '17.0.1' }}-*riscv64

0 commit comments

Comments
 (0)