Skip to content

workflows: add build-pyarrow.yml for riscv64 manywheel builds - #292

Closed
luhenry wants to merge 2 commits into
mainfrom
worktree-pyarrow
Closed

workflows: add build-pyarrow.yml for riscv64 manywheel builds#292
luhenry wants to merge 2 commits into
mainfrom
worktree-pyarrow

Conversation

@luhenry

@luhenry luhenry commented Aug 20, 2026

Copy link
Copy Markdown
Member

What

Adds .github/workflows/build-pyarrow.yml to build riscv64 pyarrow wheels (25.0.1) and publish them to pypi.riseproject.dev.

pyarrow is Cython bindings over the Apache Arrow C++ libraries, so this is a heavy build: the Arrow C++ libs are built once from source with bundled third-party deps (ARROW_DEPENDENCY_SOURCE=BUNDLED — the manylinux riscv64 image has no vcpkg binary cache, unlike upstream's x86/arm images), then a wheel is built per Python against that shared C++ build. This mirrors apache/arrow's own ci/scripts/python_wheel_xlinux_build.sh (minus vcpkg) and tests like ci/scripts/python_wheel_unix_test.sh.

Shape

  • Host-driven docker run (not cibuildwheel): pyarrow's C++ sources are a sibling of the Python package, which cibuildwheel's copy-package-dir model can't handle, and the manylinux riscv64 image ships no Node (so a container: job can't run JS actions). Checkout/upload run on the riscv host; the heavy build runs in docker run inside quay.io/pypa/manylinux_2_39_riscv64 on the native riscv64 runner.
  • Build C++ once, then loop cp312 / cp313 / cp314 / cp314t building wheels (scikit-build-core, PYARROW_BUNDLE_ARROW_CPP=ON), then auditwheel repair --strip.
  • Test like upstream: import smoke test for enabled modules + pytest -r s --pyargs pyarrow, feature-gated via PYARROW_TEST_*.

Feature set (workflow env, single source of truth)

ON: Parquet, Dataset, Acero, Compute, CSV, JSON, Filesystem, HDFS, ORC, Substrait, Flight, Parquet-encryption + all compression (snappy/zlib/zstd/lz4/brotli/bz2), mimalloc.

OFF (enabled incrementally later): S3, GCS, Azure, Gandiva, jemalloc, OpenTelemetry, TensorFlow. The network-storage stacks (aws-sdk / google-cloud-cpp / azure-sdk) and LLVM-based Gandiva have dep trees unverified on riscv64; enabling them is a one-line flip in the env block per feature.

Validation done locally

  • YAML parses; actionlint clean (only the expected ubuntu-24.04-riscv unknown-label warning).
  • Both in-container scripts extracted from their heredocs via real bash and shellcheck-clean; heredoc terminators verified at column 0.
  • Under riscv64 (qemu): confirmed dnf install ninja-build openssl-devel works and OpenSSL dev headers land (the image ships neither by default) — the prerequisites for the Flight/encryption features.

Notes for review

  • The parallel upstream effort (apache/arrow PR #49556, same RISE initiative) targets the identical image + runner but via vcpkg, whose full dep tree its own notes flag as unverified on riscv64. This PR sidesteps that with BUNDLED.
  • numpy/libcst/pandas are pulled from pypi.riseproject.dev (no public-PyPI riscv64 wheels); pandas is optional in the test step and gates the pandas-dependent tests (matters for cp314t, which may lack a free-threaded pandas wheel).

🤖 Generated with Claude Code

pyarrow is Cython bindings over the Apache Arrow C++ libraries. Build the
Arrow C++ libs once from source with bundled third-party deps
(ARROW_DEPENDENCY_SOURCE=BUNDLED — the manylinux riscv64 image has no vcpkg
binary cache, unlike upstream's x86/arm images), then build a wheel per
Python (cp312/313/314/314t) against that shared C++ build. Mirrors
apache/arrow's ci/scripts/python_wheel_xlinux_build.sh, minus vcpkg, and
tests like ci/scripts/python_wheel_unix_test.sh (pytest --pyargs pyarrow,
feature-gated via PYARROW_TEST_*).

Feature set (workflow env, single source of truth): Parquet, Dataset, Acero,
Compute, CSV, JSON, Filesystem, HDFS, ORC, Substrait, Flight,
Parquet-encryption + all compression. S3/GCS/Azure/Gandiva off for now —
their dep trees (aws-sdk/google-cloud-cpp/azure-sdk/LLVM) are unverified on
riscv64 and will be enabled incrementally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@luhenry luhenry changed the title pyarrow: build wheels for riscv64 workflows: add build-pyarrow.yml for riscv64 manywheel builds Aug 20, 2026
The Arrow C++ build failed at CMake generate with "OpenSSL::SSL / OpenSSL::Crypto
... target was not found", cascading into the bundled gRPC, arrow_util and
parquet link targets. Root cause: -DARROW_DEPENDENCY_USE_SHARED=OFF (all bundled
deps static, as upstream's vcpkg build does) cascades into
ARROW_OPENSSL_USE_SHARED=OFF, which makes FindOpenSSLAlt set
OPENSSL_USE_STATIC_LIBS=ON. OpenSSL is the one dep Arrow can't bundle — it comes
from the OS — and the manylinux_2_39_riscv64 image (Rocky 10) ships only shared
libssl/libcrypto, no static .a. So the static lookup returned
OPENSSL_CRYPTO_LIBRARY-NOTFOUND and the imported targets were never created.

Upstream's images don't hit this because their vcpkg cache provides static
OpenSSL. Pin -DARROW_OPENSSL_USE_SHARED=ON so Arrow links the shared OpenSSL that
exists in the image; everything else stays static/bundled. Verified under riscv64
qemu: CMake now reports "Found OpenSSL Crypto Library: /usr/lib64/libcrypto.so"
and configure proceeds past the previous generate-step failure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@luhenry luhenry closed this Aug 20, 2026
@luhenry
luhenry deleted the worktree-pyarrow branch August 20, 2026 18:44
@luhenry

luhenry commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

Superseded by #294 — branch renamed from worktree-pyarrow to pyarrow (rebased on latest main). Same work, including the OpenSSL-shared build fix, continues there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant