From 267d108eaf309d0c18f7a80f8de608fa9c0eff6b Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Wed, 14 Oct 2026 03:44:55 +0000 Subject: [PATCH 1/2] asyncdb: Add version 2.16.3 --- .github/workflows/build-asyncdb.yml | 118 ++++++++++++++++++++++++++++ docs/packages/asyncdb.yaml | 5 ++ 2 files changed, 123 insertions(+) create mode 100644 .github/workflows/build-asyncdb.yml create mode 100644 docs/packages/asyncdb.yaml diff --git a/.github/workflows/build-asyncdb.yml b/.github/workflows/build-asyncdb.yml new file mode 100644 index 000000000000..5e653a1781e8 --- /dev/null +++ b/.github/workflows/build-asyncdb.yml @@ -0,0 +1,118 @@ +# SPDX-FileCopyrightText: 2026 The RISE Project +# SPDX-License-Identifier: MIT +--- +# This workflow is based on the `build` job of +# https://github.com/phenobarbital/asyncdb/blob/2.16.3/.github/workflows/release.yml +name: Build asyncdb wheels (riscv64) + +on: + workflow_dispatch: + inputs: + version: + description: 'Version glob to (re)build; empty builds every version of docs/packages/asyncdb.yaml not released yet' + required: false + default: '' + pull_request: + branches: [main] + paths: + - '.github/workflows/build-asyncdb.yml' + - 'docs/packages/asyncdb.yaml' + push: + branches: [main] + paths: + - '.github/workflows/build-asyncdb.yml' + - 'docs/packages/asyncdb.yaml' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + setup: + uses: $/.github/workflows/_setup.yml + with: + package: asyncdb + version: ${{ inputs.version }} + + build_wheels: + needs: [setup] + if: needs.setup.outputs.versions != '[]' + name: Build asyncdb ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 + runs-on: ubuntu-24.04-riscv + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(needs.setup.outputs.versions) }} + # No cp314t: upstream pins Cython==3.0.11, which cannot compile for free-threaded CPython. + python: ["cp312", "cp313", "cp314"] + + env: + ASYNCDB_VERSION: ${{ matrix.version }} + + steps: + - name: Checkout asyncdb ${{ env.ASYNCDB_VERSION }} + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: phenobarbital/asyncdb + ref: ${{ env.ASYNCDB_VERSION }} + persist-credentials: false + + - name: Build wheels + uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 + with: + output-dir: dist + only: ${{ matrix.python }}-manylinux_riscv64 + + - name: Verify wheel tags and compiled Cython extension + env: + EXPECTED_CPYTHON_TAG: ${{ matrix.python }} + run: | + python3 - <<'EOF' + import glob, os, zipfile + + wheels = glob.glob("dist/*.whl") + assert wheels, "no wheels were produced in dist/" + + found_cpython_tags = set() + for whl in wheels: + filename = whl.rsplit("/", 1)[-1] + python_tag, _abi_tag, platform_tag = filename[:-4].split("-")[-3:] + found_cpython_tags.add(python_tag) + assert platform_tag.endswith("_riscv64"), ( + f"unexpected platform tag for {whl}: {platform_tag}" + ) + names = zipfile.ZipFile(whl).namelist() + ext = [n for n in names + if n.startswith("asyncdb/utils/types.") and n.endswith(".so")] + assert ext, f"compiled Cython extension (.so) missing in {whl}" + print(f"OK {whl}: {ext[0]} [{python_tag}-{platform_tag}]") + + assert found_cpython_tags == {os.environ["EXPECTED_CPYTHON_TAG"]}, found_cpython_tags + EOF + + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: asyncdb-${{ env.ASYNCDB_VERSION }}-${{ matrix.python }}-manylinux_riscv64 + path: dist/*.whl + if-no-files-found: error + + publish: + name: Publish asyncdb ${{ 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: asyncdb-${{ matrix.version }}-*-manylinux_riscv64 diff --git a/docs/packages/asyncdb.yaml b/docs/packages/asyncdb.yaml new file mode 100644 index 000000000000..1ec6e20e8d77 --- /dev/null +++ b/docs/packages/asyncdb.yaml @@ -0,0 +1,5 @@ +package-name: asyncdb +source-code: https://github.com/phenobarbital/asyncdb +license: BSD-3-Clause +versions: +- version: 2.16.3 From e1c1faffbeab533bed7599d539a24844a34b1230 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 15 Oct 2026 12:17:02 +0000 Subject: [PATCH 2/2] build-asyncdb: use plain git to check out upstream The 2.16.3 tree carries a gitlink (libraries/python-driver) with no corresponding .gitmodules entry; actions/checkout's own persist-credentials cleanup runs `git submodule foreach` unconditionally and dies on it with "No url found for submodule path ... in .gitmodules" right after the real checkout succeeds. Same fix as build-espeakng-loader.yml: a plain git init/remote/fetch/checkout never runs that cleanup routine. --- .github/workflows/build-asyncdb.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-asyncdb.yml b/.github/workflows/build-asyncdb.yml index 5e653a1781e8..d30cc113e0d2 100644 --- a/.github/workflows/build-asyncdb.yml +++ b/.github/workflows/build-asyncdb.yml @@ -54,12 +54,19 @@ jobs: ASYNCDB_VERSION: ${{ matrix.version }} steps: + # Upstream's tree carries a gitlink with no corresponding .gitmodules entry + # (libraries/python-driver), which makes actions/checkout's own + # persist-credentials cleanup (`git submodule foreach`) fail with "No url + # found for submodule path"; plain git sidesteps that internal routine. - name: Checkout asyncdb ${{ env.ASYNCDB_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: phenobarbital/asyncdb - ref: ${{ env.ASYNCDB_VERSION }} - persist-credentials: false + run: | + set -euo pipefail + shopt -s dotglob + rm -rf ./* + git init -q . + git remote add origin https://github.com/phenobarbital/asyncdb + git fetch -q --depth=1 origin "$ASYNCDB_VERSION" + git checkout -q FETCH_HEAD - name: Build wheels uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0