From e95c807fd544a5f186e59f8fd69bdd9709c8eed5 Mon Sep 17 00:00:00 2001 From: Bruno Verachten Date: Thu, 19 Mar 2026 15:24:06 +0100 Subject: [PATCH 1/2] ci: add riscv64 manylinux wheel builds to Crossbow Add riscv64 to the Linux wheel build pipeline using manylinux_2_39 (first manylinux with riscv64 support) and RISE native runners (ubuntu-24.04-riscv). Changes: - dev/tasks/tasks.yml: add ("manylinux", "riscv64", "2-39", "manylinux_2_39_riscv64") entry to the wheel matrix - dev/tasks/python-wheels/github.linux.yml: add riscv64 runner selection (ubuntu-24.04-riscv) and ARCH mapping Arrow C++ and PyArrow both build successfully on native riscv64 hardware (BananaPi F3, SpacemiT K1, rv64gc). Note: Docker image for riscv64 wheel builds still needs to be created (following the aarch64 pattern). This PR enables the CI pipeline; Docker image creation is tracked separately. Signed-off-by: Bruno Verachten --- dev/tasks/python-wheels/github.linux.yml | 4 ++++ dev/tasks/tasks.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index df5648f9e9ef..2fc8b268548c 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -27,6 +27,8 @@ jobs: name: "Build wheel for {{ linux_wheel_kind }} {{ linux_wheel_version }}" {% if arch == "amd64" %} runs-on: ubuntu-latest + {% elif arch == "riscv64" %} + runs-on: ubuntu-24.04-riscv {% else %} runs-on: ubuntu-24.04-arm {% endif %} @@ -37,6 +39,8 @@ jobs: # archery uses these environment variables {% if arch == "amd64" %} ARCH: amd64 + {% elif arch == "riscv64" %} + ARCH: riscv64 {% else %} ARCH: arm64v8 {% endif %} diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 97843d2ef0cb..4799042a2925 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -183,6 +183,7 @@ tasks: {% for wheel_kind, arch, version, platform_tag in [("manylinux", "amd64", "2-28", "manylinux_2_28_x86_64"), ("manylinux", "arm64", "2-28", "manylinux_2_28_aarch64"), + ("manylinux", "riscv64", "2-39", "manylinux_2_39_riscv64"), ("musllinux", "amd64", "1-2", "musllinux_1_2_x86_64"), ("musllinux", "arm64", "1-2", "musllinux_1_2_aarch64")] %} wheel-{{ wheel_kind }}-{{ version }}-{{ python_tag }}-{{ abi_tag }}-{{ arch }}: From 27bd0ff161b47aa81bca92333414dc238940a6bc Mon Sep 17 00:00:00 2001 From: Bruno Verachten Date: Thu, 19 Mar 2026 15:36:29 +0100 Subject: [PATCH 2/2] ci: add riscv64 Docker infrastructure for wheel builds - ci/vcpkg/riscv64-linux-static-{release,debug}.cmake: vcpkg triplets for riscv64 (following arm64 pattern) - compose.yaml: add python-wheel-manylinux-2-39 service and ccache volume for riscv64 wheel builds (using quay.io/pypa/manylinux_2_39_riscv64) Signed-off-by: Bruno Verachten --- ci/vcpkg/riscv64-linux-static-debug.cmake | 28 +++++++++++++++++++++ ci/vcpkg/riscv64-linux-static-release.cmake | 28 +++++++++++++++++++++ compose.yaml | 27 ++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 ci/vcpkg/riscv64-linux-static-debug.cmake create mode 100644 ci/vcpkg/riscv64-linux-static-release.cmake diff --git a/ci/vcpkg/riscv64-linux-static-debug.cmake b/ci/vcpkg/riscv64-linux-static-debug.cmake new file mode 100644 index 000000000000..16f64e6173c2 --- /dev/null +++ b/ci/vcpkg/riscv64-linux-static-debug.cmake @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set(VCPKG_TARGET_ARCHITECTURE riscv64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_BUILD_TYPE debug) + +if(NOT CMAKE_HOST_SYSTEM_PROCESSOR) + execute_process(COMMAND "uname" "-m" + OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() diff --git a/ci/vcpkg/riscv64-linux-static-release.cmake b/ci/vcpkg/riscv64-linux-static-release.cmake new file mode 100644 index 000000000000..968ddfde9f78 --- /dev/null +++ b/ci/vcpkg/riscv64-linux-static-release.cmake @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set(VCPKG_TARGET_ARCHITECTURE riscv64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_BUILD_TYPE release) + +if(NOT CMAKE_HOST_SYSTEM_PROCESSOR) + execute_process(COMMAND "uname" "-m" + OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() diff --git a/compose.yaml b/compose.yaml index c799059fe254..37bdb28f1584 100644 --- a/compose.yaml +++ b/compose.yaml @@ -199,6 +199,8 @@ volumes: name: maven-cache python-wheel-manylinux-2-28-ccache: name: python-wheel-manylinux-2-28-ccache + python-wheel-manylinux-2-39-ccache: + name: python-wheel-manylinux-2-39-ccache python-wheel-musllinux-1-2-ccache: name: python-wheel-musllinux-1-2-ccache ubuntu-ccache: @@ -1182,6 +1184,31 @@ services: - ${DOCKER_VOLUME_PREFIX}python-wheel-manylinux-2-28-ccache:/ccache:delegated command: /arrow/ci/scripts/python_wheel_xlinux_build.sh + # See available versions at: + # https://quay.io/repository/pypa/manylinux_2_39_riscv64?tab=tags + python-wheel-manylinux-2-39: + image: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2-39-vcpkg-${VCPKG} + build: + args: + arch: ${ARCH} + arch_short: ${ARCH_SHORT} + base: quay.io/pypa/manylinux_2_39_riscv64:2026.03.01-1 + manylinux: 2_39 + python: ${PYTHON} + python_abi_tag: ${PYTHON_ABI_TAG} + vcpkg: ${VCPKG} + context: . + dockerfile: ci/docker/python-wheel-manylinux.dockerfile + cache_from: + - ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2-39-vcpkg-${VCPKG} + secrets: *vcpkg-build-secrets + environment: + <<: [*common, *ccache] + volumes: + - .:/arrow:delegated + - ${DOCKER_VOLUME_PREFIX}python-wheel-manylinux-2-39-ccache:/ccache:delegated + command: /arrow/ci/scripts/python_wheel_xlinux_build.sh + # See available versions at: # https://quay.io/repository/pypa/musllinux_1_2_x86_64?tab=tags python-wheel-musllinux-1-2: