Skip to content

Commit 6d1b7e4

Browse files
committed
feat(google-crc32c): add riscv64 manylinux wheel builds
Add riscv64 to the manylinux wheel build matrix using the manylinux_2_39_riscv64 image (the correct tag for riscv64; manylinux2014 has no riscv64 variant). Changes: - scripts/manylinux/build.sh: add riscv64 docker run block - .github/workflows/riscv64-wheels.yml: CI workflow to build and upload riscv64 wheels on pull_request/push to main The build uses QEMU emulation on ubuntu-latest, matching the approach used for the existing aarch64 builds. Follows up on googleapis/python-crc32c#337 (closed when repo was archived; maintainer asked to re-open here). Signed-off-by: Bruno Verachten <gounthar@gmail.com>
1 parent 614a3d0 commit 6d1b7e4

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Build riscv64 wheels"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- 'packages/google-crc32c/**'
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- 'packages/google-crc32c/**'
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
build-riscv64:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 120
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: recursive
26+
27+
- name: Set up QEMU
28+
# v4.0.0
29+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a
30+
with:
31+
platforms: riscv64
32+
33+
- name: Build riscv64 wheels
34+
env:
35+
WORKSPACE: ${{ github.workspace }}
36+
run: |
37+
IMAGE=quay.io/pypa/manylinux_2_39_riscv64
38+
VOLUME="${WORKSPACE}/packages/google-crc32c:/var/code/python-crc32c/"
39+
docker pull "${IMAGE}"
40+
docker run --rm --volume "${VOLUME}" "${IMAGE}" \
41+
/var/code/python-crc32c/scripts/manylinux/build_on_centos.sh
42+
43+
- name: Upload wheels
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: riscv64-wheels
47+
path: packages/google-crc32c/wheels/

packages/google-crc32c/scripts/manylinux/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ docker run \
5252
quay.io/pypa/manylinux2014_aarch64 \
5353
/var/code/python-crc32c/scripts/manylinux/build_on_centos.sh
5454

55+
docker pull quay.io/pypa/manylinux_2_39_riscv64
56+
docker run \
57+
--rm \
58+
--interactive \
59+
--volume ${REPO_ROOT}:/var/code/python-crc32c/ \
60+
--env BUILD_PYTHON=${BUILD_PYTHON} \
61+
quay.io/pypa/manylinux_2_39_riscv64 \
62+
/var/code/python-crc32c/scripts/manylinux/build_on_centos.sh
63+
5564
if [[ "${PUBLISH_WHEELS}" == "true" ]]; then
5665
. /${MANYLINUX_DIR}/publish_python_wheel.sh
5766
fi

0 commit comments

Comments
 (0)