Skip to content

Commit 3a293e9

Browse files
committed
Make: Drop RISC-V wheels until Clang 23
1 parent eea2ffb commit 3a293e9

3 files changed

Lines changed: 65 additions & 31 deletions

File tree

.github/workflows/_wheels.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ jobs:
228228

229229
build_wheels_linux_riscv:
230230
name: Build Python Wheels (Linux RISC-V)
231+
# Temporarily disabled until the official PyPA riscv64 images expose a
232+
# packaged LLVM 23 toolchain, or until we switch to custom images.
233+
if: ${{ false }}
231234
runs-on: ubuntu-24.04
232235
strategy:
233236
matrix:

.github/workflows/test-c.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,31 @@ jobs:
9191
9292
- name: Build via Cargo
9393
run: cargo ndk -t arm64-v8a build --release
94+
95+
test_riscv_llvm23:
96+
name: Test RISC-V LLVM 23
97+
runs-on: ubuntu-24.04
98+
99+
steps:
100+
- name: Checkout
101+
uses: actions/checkout@v6
102+
103+
- name: Install dependencies
104+
run: |
105+
sudo apt-get update
106+
sudo apt-get install -y cmake clang-23 lld-23 llvm-23 qemu-user gcc-riscv64-linux-gnu libc6-dev-riscv64-cross
107+
108+
- name: Configure portable RISC-V build
109+
shell: bash
110+
run: |
111+
set -euo pipefail
112+
SYSROOT="$(riscv64-linux-gnu-gcc -print-sysroot)"
113+
cmake -B build_riscv \
114+
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-riscv64-llvm.cmake \
115+
-DLLVM_ROOT=/usr/lib/llvm-23 \
116+
-DRISCV_SYSROOT="${SYSROOT}" \
117+
-DRISCV_MARCH=rv64gcv \
118+
-DNK_BUILD_TEST=ON
119+
120+
- name: Build portable RISC-V targets
121+
run: cmake --build build_riscv --parallel

pyproject.toml

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file configures wheels compilation for `cibuilwheel` for NumKong CPython bindings.
22
# On a good day it will produce:
3-
# - `manylinux` and `musllinux` vectorized wheels for Linux on x86_64, aarch64, riscv64;
3+
# - `manylinux` and `musllinux` vectorized wheels for Linux on x86_64, aarch64;
44
# - `manylinux` and `musllinux` wheels for Linux on i686, ppc64le, s390x;
55
# - `macos` wheels for x86_64, arm64;
66
# - `windows` wheels for AMD64, ARM64.
@@ -77,11 +77,16 @@ repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
7777
# - for `manylinux`: https://quay.io/search?q=manylinux
7878
# - for `musllinux`: https://quay.io/search?q=musllinux
7979
manylinux-aarch64-image = "manylinux_2_28"
80-
manylinux-riscv64-image = "manylinux_2_39"
8180
manylinux-x86_64-image = "manylinux_2_28"
8281
musllinux-aarch64-image = "musllinux_1_2"
83-
musllinux-riscv64-image = "musllinux_1_2"
8482
musllinux-x86_64-image = "musllinux_1_2"
83+
# RISC-V wheel uploads are temporarily disabled.
84+
# The official PyPA riscv64 images currently provide LLVM 20 packages, while the
85+
# portable `rv64gcv` baseline plus richer RISC-V kernels now requires Clang 23.
86+
# Keep the image names here as comments until we have either custom images or a
87+
# packaged LLVM 23 path for both manylinux and musllinux.
88+
# manylinux-riscv64-image = "manylinux_2_39"
89+
# musllinux-riscv64-image = "musllinux_1_2"
8590

8691
# On CentOS we have to use `yum`.
8792
# The healthy version would be: `apt-get update && apt-get install -y libc6-dev wget python3-dev`.
@@ -172,34 +177,32 @@ environment.NK_TARGET_X86_ = "0"
172177
inherit.environment = "append"
173178
select = "*-macos*_arm64"
174179

175-
# RISC-V 64-bit builds
176-
# The `manylinux_2_39` riscv64 image uses `dnf` instead of `yum`.
177-
# GCC/binutils in this image don't support all requested RISC-V vector extensions.
178-
# Install LLVM and build with clang + lld for full `rv64gcv_zvfh_zvfbfwma_zvbb`.
179-
[[tool.cibuildwheel.overrides]]
180-
before-all = "dnf update -y && dnf install -y glibc-devel wget python3-devel clang lld"
181-
environment.CC = "clang"
182-
environment.CXX = "clang++"
183-
environment.LDFLAGS = "-fuse-ld=lld"
184-
environment.NK_TARGET_ARM_ = "0"
185-
environment.NK_TARGET_RISCV_ = "1"
186-
environment.NK_TARGET_X86_ = "0"
187-
inherit.environment = "append"
188-
select = "*-manylinux*_riscv64"
189-
190-
# The default `musllinux_1_2` riscv64 image ships GCC which doesn't support
191-
# all requested RISC-V vector extensions (zvfbfwma, zvbb).
192-
# Install LLVM and build with clang + lld, mirroring the manylinux override.
193-
[[tool.cibuildwheel.overrides]]
194-
before-all = "apk add --update wget python3-dev clang lld"
195-
environment.CC = "clang"
196-
environment.CXX = "clang++"
197-
environment.LDFLAGS = "-fuse-ld=lld"
198-
environment.NK_TARGET_ARM_ = "0"
199-
environment.NK_TARGET_RISCV_ = "1"
200-
environment.NK_TARGET_X86_ = "0"
201-
inherit.environment = "append"
202-
select = "*-musllinux*_riscv64"
180+
# RISC-V 64-bit wheels are temporarily disabled.
181+
# Keep the old overrides commented out as a breadcrumb for re-enabling the
182+
# release path once an official LLVM 23 package source is available inside the
183+
# PyPA riscv64 images, or once we switch to custom images with LLVM 23 baked in.
184+
#
185+
# [[tool.cibuildwheel.overrides]]
186+
# before-all = "dnf update -y && dnf install -y glibc-devel wget python3-devel clang lld"
187+
# environment.CC = "clang"
188+
# environment.CXX = "clang++"
189+
# environment.LDFLAGS = "-fuse-ld=lld"
190+
# environment.NK_TARGET_ARM_ = "0"
191+
# environment.NK_TARGET_RISCV_ = "1"
192+
# environment.NK_TARGET_X86_ = "0"
193+
# inherit.environment = "append"
194+
# select = "*-manylinux*_riscv64"
195+
#
196+
# [[tool.cibuildwheel.overrides]]
197+
# before-all = "apk add --update wget python3-dev clang lld"
198+
# environment.CC = "clang"
199+
# environment.CXX = "clang++"
200+
# environment.LDFLAGS = "-fuse-ld=lld"
201+
# environment.NK_TARGET_ARM_ = "0"
202+
# environment.NK_TARGET_RISCV_ = "1"
203+
# environment.NK_TARGET_X86_ = "0"
204+
# inherit.environment = "append"
205+
# select = "*-musllinux*_riscv64"
203206

204207
# Pyodide / Emscripten WASM builds
205208
# The Pyodide venv creates Python-script entry points (like `pytest`) that can't

0 commit comments

Comments
 (0)