Skip to content

ci: open the nightly PRs as the riseproject-dev github app #8

ci: open the nightly PRs as the riseproject-dev github app

ci: open the nightly PRs as the riseproject-dev github app #8

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
#
# This workflow is based on: https://github.com/sfu-db/connector-x/blob/main/.github/workflows/release.yml
name: Build connectorx wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/connectorx.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-connectorx.yml'
- 'docs/packages/connectorx.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-connectorx.yml'
- 'docs/packages/connectorx.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
env:
CARGO_BUILD_JOBS: '2'
jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: connectorx
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build connectorx ${{ matrix.version }} ${{ matrix.python-version }}-riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 1440
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
python-version: ['3.12', '3.13', '3.14']
env:
CONNECTORX_VERSION: ${{ matrix.version }}
steps:
- name: Checkout connector-x v${{ env.CONNECTORX_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: sfu-db/connector-x
ref: v${{ env.CONNECTORX_VERSION }}
persist-credentials: false
- name: Install Python
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: ${{ matrix.python-version }}
activate-environment: true
enable-cache: false
- name: Build wheel
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
command: build
target: riscv64gc-unknown-linux-gnu
args: >-
--manifest-path connectorx-python/Cargo.toml
-i ${{ matrix.python-version }}
--release
--features integrated-auth-gssapi
--out dist
manylinux: '2_39'
before-script-linux: |
# gotcha 46: Rocky 10 is missing FindBin/Time::Piece even with
# perl-core, so openssl-sys's vendored Configure needs full perl.
# libgssapi-sys's build.rs needs gssapi.h, which krb5-libs (runtime
# only) doesn't ship -- krb5-devel has the headers.
dnf -y install perl krb5-libs krb5-devel clang-devel libffi-devel
git config --global --add safe.directory "*"
env:
SQLITE3_STATIC: '1'
- name: Test wheel
run: |
uv pip install --force-reinstall dist/*.whl
python -c "import connectorx"
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: connectorx-${{ env.CONNECTORX_VERSION }}-${{ matrix.python-version }}-riscv64
path: dist/*.whl
if-no-files-found: error
publish:
name: Publish connectorx ${{ 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: connectorx-${{ matrix.version }}-*-riscv64