Skip to content

Commit 762ea5d

Browse files
committed
Merge main to resolve conflict and pick up the current merge-base for the skills/ files this branch no longer touches
2 parents ca72af1 + ccfba75 commit 762ea5d

54 files changed

Lines changed: 2958 additions & 86 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on: https://github.com/jax-ml/ml_dtypes/blob/v0.6.0/.github/workflows/wheels.yml
5+
name: Build ml-dtypes 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/ml-dtypes.yaml not released yet'
12+
required: false
13+
default: ''
14+
pull_request:
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/build-ml-dtypes.yml'
18+
- 'docs/packages/ml-dtypes.yaml'
19+
push:
20+
branches: [main]
21+
paths:
22+
- '.github/workflows/build-ml-dtypes.yml'
23+
- 'docs/packages/ml-dtypes.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: ml-dtypes
40+
version: ${{ inputs.version }}
41+
42+
build_wheels:
43+
needs: [setup]
44+
if: needs.setup.outputs.versions != '[]'
45+
name: Build ml-dtypes ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
46+
runs-on: ubuntu-24.04-riscv
47+
timeout-minutes: 120
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+
ML_DTYPES_VERSION: ${{ matrix.version }}
60+
61+
steps:
62+
- name: Checkout ml_dtypes ${{ env.ML_DTYPES_VERSION }}
63+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64+
with:
65+
repository: jax-ml/ml_dtypes
66+
ref: v${{ env.ML_DTYPES_VERSION }}
67+
# third_party/eigen is a submodule and the extension compiles against it.
68+
submodules: recursive
69+
persist-credentials: false
70+
71+
- name: Build wheels
72+
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
73+
with:
74+
output-dir: wheelhouse/
75+
only: ${{ matrix.python }}-manylinux_riscv64
76+
env:
77+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
78+
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ PIP_ONLY_BINARY=numpy
79+
CIBW_TEST_REQUIRES: absl-py pytest pytest-xdist
80+
# riscv64's FP-invalid status flag diverges on casts between ml_dtypes'
81+
# non-IEEE custom float types (same class of divergence the project's own
82+
# CMakeLists.txt documents for Mac ARM); ml_dtypes' filterwarnings=error
83+
# promotes it to a hard failure even though the underlying assertions pass.
84+
CIBW_TEST_COMMAND: pytest -n auto -W "ignore:invalid value encountered in cast:RuntimeWarning" {project}
85+
86+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
87+
with:
88+
name: ml-dtypes-${{ env.ML_DTYPES_VERSION }}-${{ matrix.python }}-manylinux_riscv64
89+
path: wheelhouse/*.whl
90+
if-no-files-found: error
91+
92+
eigen_sources:
93+
needs: [setup]
94+
if: needs.setup.outputs.versions != '[]'
95+
name: Collect eigen sources
96+
runs-on: ubuntu-latest
97+
strategy:
98+
fail-fast: false
99+
matrix:
100+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
101+
102+
env:
103+
ML_DTYPES_VERSION: ${{ matrix.version }}
104+
105+
steps:
106+
- name: Checkout ml_dtypes ${{ env.ML_DTYPES_VERSION }}
107+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
108+
with:
109+
repository: jax-ml/ml_dtypes
110+
ref: v${{ env.ML_DTYPES_VERSION }}
111+
submodules: recursive
112+
persist-credentials: false
113+
114+
# The extension compiles MPL-2.0 eigen headers into the wheel, so the
115+
# matching sources are published next to it.
116+
- run: tar cf gpl-sources.tar third_party/eigen
117+
118+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
119+
with:
120+
name: ml-dtypes-${{ env.ML_DTYPES_VERSION }}-gpl-sources
121+
path: gpl-sources.tar
122+
if-no-files-found: error
123+
124+
publish:
125+
name: Publish ml-dtypes ${{ matrix.version }}
126+
needs: [setup, build_wheels, eigen_sources]
127+
if: needs.setup.outputs.versions != '[]'
128+
strategy:
129+
fail-fast: false
130+
matrix:
131+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
132+
permissions:
133+
contents: write
134+
pull-requests: write
135+
uses: $/.github/workflows/_publish-wheel.yml
136+
with:
137+
artifact-pattern: ml-dtypes-${{ matrix.version }}-*-manylinux_riscv64
138+
gpl-sources-artifact: ml-dtypes-${{ matrix.version }}-gpl-sources
139+
gpl-sources-description: eigen (MPL-2.0)

‎.github/workflows/build-numcodecs.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,24 @@ jobs:
8989
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
9090
# Repeats upstream's [tool.cibuildwheel] environment, which this replaces.
9191
# numpy resolves from our registry; the patch dirties the tree, so pin the
92-
# version setuptools_scm would otherwise derive from git.
92+
# version setuptools_scm would otherwise derive from git. numcodecs' own
93+
# meson.build calls setuptools_scm.get_version() without dist_name (see
94+
# src/numcodecs/_build_utils/gitversion.py), so only the unsuffixed
95+
# SETUPTOOLS_SCM_PRETEND_VERSION is honored, not the _FOR_NUMCODECS form.
9396
CIBW_ENVIRONMENT: >-
9497
DISABLE_NUMCODECS_AVX2=1
95-
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_NUMCODECS=${{ env.NUMCODECS_VERSION }}
98+
SETUPTOOLS_SCM_PRETEND_VERSION=${{ env.NUMCODECS_VERSION }}
9699
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
97100
PIP_ONLY_BINARY=numpy
98101
# test_zstd shells out to the zstd CLI, which the manylinux image lacks;
99102
# its availability check raises instead of skipping when it is missing.
100103
CIBW_BEFORE_TEST_LINUX: dnf -y install zstd
101104
CIBW_TEST_EXTRAS: test,test_extras,msgpack
102105
# Upstream's wheel job only imports numcodecs; run the bundled suite instead.
103-
CIBW_TEST_COMMAND: python -c "import importlib.metadata as md, numcodecs.blosc, numcodecs.zstd, numcodecs.lz4, numcodecs.vlen, numcodecs.compat_ext, numcodecs._shuffle, numcodecs.fletcher32, numcodecs.jenkins as j; assert j.__file__.endswith('.so'), j.__file__; assert any(str(p).endswith('.dist-info/licenses/LICENSE.zstd') for p in md.files('numcodecs'))" && python -m pytest --pyargs numcodecs -q
106+
# Since 0.17.0 the suite lives in a top-level tests/ dir, not inside the
107+
# package, so it must be staged and run directly rather than via --pyargs.
108+
CIBW_TEST_SOURCES: tests pyproject.toml
109+
CIBW_TEST_COMMAND: python -c "import importlib.metadata as md, numcodecs.blosc, numcodecs.zstd, numcodecs.lz4, numcodecs.vlen, numcodecs.compat_ext, numcodecs._shuffle, numcodecs.fletcher32, numcodecs.jenkins as j; assert j.__file__.endswith('.so'), j.__file__; assert any(str(p).endswith('.dist-info/licenses/LICENSE.zstd') for p in md.files('numcodecs'))" && python -m pytest tests -q
104110

105111
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
106112
with:

‎.github/workflows/build-nvtx.yml‎

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# Based on upstream's own wheel build:
5+
# https://github.com/NVIDIA/NVTX/blob/b7e56f42f85989f6df2839ec08f1666460f972ec/.github/workflows/cibw.yml
6+
name: Build nvtx 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/nvtx.yaml not released yet'
13+
required: false
14+
default: ''
15+
pull_request:
16+
branches: [main]
17+
paths:
18+
- '.github/workflows/build-nvtx.yml'
19+
- 'docs/packages/nvtx.yaml'
20+
push:
21+
branches: [main]
22+
paths:
23+
- '.github/workflows/build-nvtx.yml'
24+
- 'docs/packages/nvtx.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+
# The Python package is released from the NVIDIA/NVTX monorepo by a
35+
# workflow_dispatch-only job that never pushes a Python tag (gotcha 103); the
36+
# repo's v3.* tags are the C/C++ library. This commit's python/ and c/include
37+
# trees are byte-identical to the 0.2.16 PyPI sdist. Move with NVTX_VERSION.
38+
NVTX_REF: b7e56f42f85989f6df2839ec08f1666460f972ec
39+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
40+
41+
jobs:
42+
setup:
43+
uses: $/.github/workflows/_setup.yml
44+
with:
45+
package: nvtx
46+
version: ${{ inputs.version }}
47+
48+
build_wheels:
49+
needs: [setup]
50+
if: needs.setup.outputs.versions != '[]'
51+
name: Build nvtx ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
52+
runs-on: ubuntu-24.04-riscv
53+
timeout-minutes: 120
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
58+
python: [cp312, cp313, cp314, cp314t]
59+
60+
env:
61+
NVTX_VERSION: ${{ matrix.version }}
62+
63+
steps:
64+
- name: Checkout NVIDIA/NVTX ${{ env.NVTX_REF }}
65+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
66+
with:
67+
repository: NVIDIA/NVTX
68+
ref: ${{ env.NVTX_REF }}
69+
persist-credentials: false
70+
71+
- name: Build wheels
72+
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
73+
with:
74+
package-dir: python
75+
output-dir: wheelhouse/
76+
only: ${{ matrix.python }}-manylinux_riscv64
77+
env:
78+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
79+
# numpy, which upstream's test-command installs and uninstalls to
80+
# cover both paths, has riscv64 wheels only on our own registry.
81+
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
82+
83+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
84+
with:
85+
name: nvtx-${{ env.NVTX_VERSION }}-${{ matrix.python }}-manylinux_riscv64
86+
path: wheelhouse/*.whl
87+
if-no-files-found: error
88+
89+
publish:
90+
name: Publish nvtx ${{ matrix.version }}
91+
needs: [setup, build_wheels]
92+
if: needs.setup.outputs.versions != '[]'
93+
strategy:
94+
fail-fast: false
95+
matrix:
96+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
97+
permissions:
98+
contents: write
99+
pull-requests: write
100+
uses: $/.github/workflows/_publish-wheel.yml
101+
secrets:
102+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
103+
with:
104+
artifact-pattern: nvtx-${{ matrix.version }}-*-manylinux_riscv64

‎.github/workflows/build-onnxruntime.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ jobs:
5353
version: ${{ fromJSON(needs.setup.outputs.versions) }}
5454
# onnxruntime is not abi3: upstream publishes one wheel per interpreter.
5555
python: ["cp312", "cp313", "cp314", "cp314t"]
56+
exclude:
57+
# 1.30.0 aborts riscv64 cp314t in onnxruntime_test_python.py with a heap-corruption
58+
# SIGABRT ("malloc(): unaligned tcache chunk detected"); 1.29.0 built/tested clean
59+
# on cp314t riscv64, so this is a regression to re-check on the next version bump.
60+
- version: "1.30.0"
61+
python: cp314t
5662

5763
env:
5864
ONNXRUNTIME_VERSION: ${{ matrix.version }}

‎.github/workflows/build-pact-python-ffi.yml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,15 @@ jobs:
117117
curl --proto '=https' --tlsv1.2 -sSfL \
118118
-o {package}/src/pact_ffi/data/pact.h \
119119
https://github.com/pact-foundation/pact-reference/releases/download/${{ steps.pact-reference.outputs.tag }}/pact.h
120-
CIBW_BUILD_FRONTEND: build
120+
# hatch_build.py subclasses BuildHookInterface[Any] (a single-param
121+
# generic through hatchling 1.32.0); hatchling 1.32.1 made it take
122+
# two type params, so an unpinned isolated build env dies at
123+
# "Getting requirements to build wheel" with "TypeError: Too few
124+
# arguments for <class '...BuildHookInterface'>" (gotcha 23's
125+
# floating-build-tool shape, applied to hatchling). Preinstall the
126+
# last clean release and keep build isolation off so the pin holds.
127+
CIBW_BEFORE_BUILD: pip install cffi "hatchling<1.32.1" packaging setuptools
128+
CIBW_BUILD_FRONTEND: "build; args: --no-isolation"
121129
# pyproject.toml's [tool.pytest] addopts always enables coverage
122130
# (--cov=pact_ffi et al), which requires pytest-cov to be installed.
123131
CIBW_TEST_REQUIRES: pytest pytest-cov

‎.github/workflows/build-psygnal.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ jobs:
7373
# Upstream's uv frontend asserts a host `uv`, which the runner has not got.
7474
# --no-isolation makes the mypy pin below stick.
7575
CIBW_BUILD_FRONTEND: "build; args: --no-isolation"
76-
# mypy 1.20 mypyc miscompiles psygnal 0.15.1: importing the wheel segfaults.
76+
# Restates the mypyc hook's own [tool.hatch.build...hooks.mypyc] dependencies,
77+
# which --no-isolation needs preinstalled; psygnal 0.16 raised its mypy floor
78+
# to >=2.1.0 (was <1.20, pinned for a 0.15.1 mypyc miscompile since fixed).
7779
CIBW_BEFORE_BUILD: >-
7880
pip install "hatchling>=1.8.0" hatch-vcs "hatch-mypyc>=0.13.0"
79-
"mypy<1.20" "mypy_extensions>=0.4.2" "pydantic!=2.10.0" types-attrs
81+
"mypy>=2.1.0" "mypy_extensions>=0.4.2" "pydantic!=2.10.0" types-attrs
8082
"msgspec; python_version < '3.14'"
8183
# Restates upstream's [tool.cibuildwheel.environment], which this replaces.
8284
# only-binary keeps the compiled deps on the registry's riscv64 wheels.

‎.github/workflows/build-unicodedata2.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ jobs:
6565
ref: ${{ env.UNICODEDATA2_VERSION }}
6666
persist-credentials: false
6767

68+
- name: Download normalization test data
69+
run: python3 tests/download_test_data.py
70+
6871
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
6972
env:
7073
CIBW_ARCHS: riscv64

‎.github/workflows/build-usearch.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ jobs:
7878
yum install -y --disablerepo=extras glibc-devel wget python3-devel libstdc++-static
7979
# numpy has no riscv64 wheel on public PyPI yet; numkong and cmake
8080
# already publish one there, so only numpy needs our registry.
81-
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
81+
# PIP_PREFER_BINARY (gotcha 354) keeps an unpinned numpy build
82+
# requirement from racing a same-day PyPI release that our own
83+
# riscv64 wheel hasn't been published for yet, which otherwise
84+
# falls back to a from-source build that ICEs the manylinux gcc.
85+
CIBW_ENVIRONMENT: >-
86+
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
87+
PIP_PREFER_BINARY=1
8288
# Upstream disables cibuildwheel's own test step (pyproject.toml:
8389
# "everything is happening in a super slow container" / tests run in
8490
# prerelease.yml instead) - run that suite here since it's the only

0 commit comments

Comments
 (0)