Skip to content

Commit e2c1d60

Browse files
committed
zope-index: Add version 8.2
Build zope.index 8.2 (okascore C extension) for riscv64 with cibuildwheel from the upstream tag, mirroring upstream's tests.yml: zope.testrunner with and without the C extension (PURE_PYTHON=0/1). BTrees, persistent and zope.interface come from pypi.riseproject.dev.
1 parent 8839237 commit e2c1d60

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/zope.index/blob/8.2/.github/workflows/tests.yml
5+
name: Build zope-index 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/zope-index.yaml not released yet'
12+
required: false
13+
default: ''
14+
pull_request:
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/build-zope-index.yml'
18+
- 'docs/packages/zope-index.yaml'
19+
push:
20+
branches: [main]
21+
paths:
22+
- '.github/workflows/build-zope-index.yml'
23+
- 'docs/packages/zope-index.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: zope-index
40+
version: ${{ inputs.version }}
41+
42+
build_wheels:
43+
needs: [setup]
44+
if: needs.setup.outputs.versions != '[]'
45+
name: Build zope-index ${{ 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+
ZOPE_INDEX_VERSION: ${{ matrix.version }}
60+
61+
steps:
62+
- name: Checkout zope.index ${{ env.ZOPE_INDEX_VERSION }}
63+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64+
with:
65+
repository: zopefoundation/zope.index
66+
ref: ${{ env.ZOPE_INDEX_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+
# BTrees, persistent and zope.interface have no riscv64 wheel on public PyPI.
77+
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
78+
CIBW_TEST_EXTRAS: test
79+
CIBW_TEST_ENVIRONMENT: ZOPE_INTERFACE_STRICT_IRO=1
80+
# Upstream's two test steps. setup.py swallows extension build failures
81+
# (optional_build_ext); under PURE_PYTHON=0 TestScore asserts okascore loaded.
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: zope-index-${{ env.ZOPE_INDEX_VERSION }}-${{ matrix.python }}-manylinux_riscv64
89+
path: wheelhouse/*.whl
90+
if-no-files-found: error
91+
92+
publish:
93+
name: Publish zope-index ${{ 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: zope-index-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/zope-index.yaml‎

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

0 commit comments

Comments
 (0)