Skip to content

scylla-driver: Add version 3.29.11 #3

scylla-driver: Add version 3.29.11

scylla-driver: Add version 3.29.11 #3

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on: https://github.com/scylladb/python-driver/blob/master/.github/workflows/lib-build.yml
name: Build scylla-driver wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/scylla-driver.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-scylla-driver.yml'
- 'docs/packages/scylla-driver.yaml'
- 'patches/scylla-driver/**'
push:
branches: [main]
paths:
- '.github/workflows/build-scylla-driver.yml'
- 'docs/packages/scylla-driver.yaml'
- 'patches/scylla-driver/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
env:
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: scylla-driver
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build scylla-driver ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 240
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
python:
- "cp312"
- "cp313"
- "cp314"
- "cp314t"
env:
SCYLLA_DRIVER_VERSION: ${{ matrix.version }}
steps:
- name: Checkout scylla-driver ${{ env.SCYLLA_DRIVER_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: scylladb/python-driver
ref: ${{ env.SCYLLA_DRIVER_VERSION }}-scylla
persist-credentials: false
- name: Checkout python-wheels
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: python-wheels
persist-credentials: false
# auditwheel bundles the image's libev, whose notice the wheel would otherwise drop.
- name: Patch scylla-driver source
run: git apply python-wheels/patches/scylla-driver/${{ env.SCYLLA_DRIVER_VERSION }}/00*.patch
- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
output-dir: wheelhouse/
only: ${{ matrix.python }}-manylinux_riscv64
env:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
CIBW_BUILD_FRONTEND: build # upstream's build[uv] needs a host uv the runner has none of (gotcha 13)
# Upstream's before-build, minus the AlmaLinux key and the packages Rocky 10 preinstalls.
CIBW_BEFORE_BUILD: rm -rf ~/.pyxbld && yum install -y libev libev-devel
# The three CASS_DRIVER/CFLAGS values are upstream's [tool.cibuildwheel] environment,
# which this replaces; EXTENSIONS_ARE_MUST is what fails a degraded pure-Python build.
CIBW_ENVIRONMENT: >-
CASS_DRIVER_BUILD_CONCURRENCY=2
CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST=yes
CFLAGS='-g0 -O3'
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
# Upstream's dev group, minus ccm (a git dependency only the integration tests use)
# and minus gevent on cp314t, which it has no build for. setuptools is what gives
# pyximport a distutils on 3.12+ (gotcha 211).
CIBW_TEST_GROUPS: ''
CIBW_TEST_REQUIRES: >-
pytest~=8.0 PyYAML pure-sasl twisted[tls] eventlet>=0.33.3 cython>=3.2
packaging>=25.0 futurist numpy objgraph setuptools
${{ matrix.python == 'cp314t' && '' || 'gevent' }}
# PIP_PREFER_BINARY keeps pip on our registry's gevent instead of compiling
# PyPI's newer release.
CIBW_TEST_ENVIRONMENT: PIP_PREFER_BINARY=1
# cassandra/ would shadow the installed wheel, so only the two .pyx files
# tests/unit/cython/types_testhelper.pyx includes by relative path are staged.
CIBW_TEST_SOURCES: tests cassandra/ioutils.pyx cassandra/cython_marshal.pyx
CIBW_TEST_COMMAND: >-
python -c "import importlib.metadata as m; f=[str(p) for p in m.files('scylla-driver')]; assert any(s.endswith('licenses/LICENSE.libev') for s in f), f" &&
python -m pytest tests/unit
${{ matrix.python == 'cp314t' && '' || '&& EVENT_LOOP_MANAGER=gevent python -m pytest tests/unit/io/test_geventreactor.py' }}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: scylla-driver-${{ env.SCYLLA_DRIVER_VERSION }}-${{ matrix.python }}-manylinux_riscv64
path: wheelhouse/*.whl
if-no-files-found: error
publish:
name: Publish scylla-driver ${{ matrix.version }}
needs: [setup, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
secrets:
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
with:
artifact-pattern: scylla-driver-${{ matrix.version }}-*-manylinux_riscv64