Skip to content

Commit 278ca33

Browse files
authored
acquisition: add riscv64 wheel build (#2957)
Zope's Acquisition C extension (6.3). Mirrors the existing persistent/ zope-interface/extensionclass workflows: cibuildwheel on the manylinux_2_39 riscv64 image, pulling ExtensionClass and zope.interface from pypi.riseproject.dev since neither has a riscv64 wheel on public PyPI.
1 parent 173f124 commit 278ca33

2 files changed

Lines changed: 112 additions & 0 deletions

File tree

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on: https://github.com/zopefoundation/Acquisition/blob/6.3/.github/workflows/tests.yml
5+
name: Build acquisition 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/acquisition.yaml not released yet'
12+
required: false
13+
default: ''
14+
pull_request:
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/build-acquisition.yml'
18+
- 'docs/packages/acquisition.yaml'
19+
push:
20+
branches: [main]
21+
paths:
22+
- '.github/workflows/build-acquisition.yml'
23+
- 'docs/packages/acquisition.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: acquisition
40+
version: ${{ inputs.version }}
41+
42+
build_wheels:
43+
needs: [setup]
44+
if: needs.setup.outputs.versions != '[]'
45+
name: Build acquisition ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
46+
runs-on: ubuntu-24.04-riscv
47+
timeout-minutes: 60
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+
ACQUISITION_VERSION: ${{ matrix.version }}
60+
61+
steps:
62+
- name: Checkout Acquisition ${{ env.ACQUISITION_VERSION }}
63+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64+
with:
65+
repository: zopefoundation/Acquisition
66+
ref: ${{ env.ACQUISITION_VERSION }}
67+
persist-credentials: false
68+
69+
- name: Build wheels
70+
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
71+
with:
72+
output-dir: wheelhouse/
73+
only: ${{ matrix.python }}-manylinux_riscv64
74+
env:
75+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
76+
# ExtensionClass and zope.interface, Acquisition's two deps, have no
77+
# riscv64 wheel on public PyPI.
78+
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
79+
CIBW_TEST_EXTRAS: test
80+
CIBW_TEST_ENVIRONMENT: ZOPE_INTERFACE_STRICT_IRO=1
81+
# Upstream's two test steps: with and without the C extension.
82+
CIBW_TEST_COMMAND: >-
83+
PURE_PYTHON=0 python -m zope.testrunner --test-path={package}/src &&
84+
PURE_PYTHON=1 python -m zope.testrunner --test-path={package}/src
85+
86+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
87+
with:
88+
name: acquisition-${{ env.ACQUISITION_VERSION }}-${{ matrix.python }}-manylinux_riscv64
89+
path: wheelhouse/*.whl
90+
if-no-files-found: error
91+
92+
publish:
93+
name: Publish acquisition ${{ matrix.version }}
94+
needs: [setup, build_wheels]
95+
if: needs.setup.outputs.versions != '[]'
96+
strategy:
97+
fail-fast: false
98+
matrix:
99+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
100+
permissions:
101+
contents: write
102+
pull-requests: write
103+
uses: $/.github/workflows/_publish-wheel.yml
104+
secrets:
105+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
106+
with:
107+
artifact-pattern: acquisition-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/acquisition.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: acquisition
2+
source-code: https://github.com/zopefoundation/Acquisition
3+
license: ZPL-2.1
4+
versions:
5+
- version: '6.3'

0 commit comments

Comments
 (0)