Skip to content

docs: Update projects #43

docs: Update projects

docs: Update projects #43

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
#
# sqlglotc is the mypyc-compiled companion extension for sqlglot: cibuildwheel
# builds the `sqlglotc/` subdirectory of the tobymao/sqlglot monorepo, whose
# setup.py mypyc-compiles a subset of sqlglot's own modules and ships the
# resulting .so files under the `sqlglot.*` namespace (Requires-Dist pins the
# matching `sqlglot==<version>`, so importing `sqlglot` picks up the compiled
# extensions transparently). Upstream publishes wheels for cp310-cp314 (no
# cp314t - "mypyc doesn't have great support for free threaded builds", same
# as build-black.yml) on every platform except riscv64; sqlglotc/pyproject.toml
# carries no [tool.cibuildwheel] table, so CIBW_* here isn't overriding
# anything upstream committed (mirroring .github/workflows/package-publish.yml's
# build-wheels job instead). Testing runs upstream's own `make unitc` recipe
# (SKIP_INTEGRATION=1 python -m unittest) against the installed compiled
# wheel; duckdb and pandas (imported by tests/test_optimizer.py and
# tests/test_executor.py) come from our registry since neither ships riscv64
# wheels on public PyPI.
name: Build sqlglotc wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/sqlglotc.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-sqlglotc.yml'
- 'docs/packages/sqlglotc.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-sqlglotc.yml'
- 'docs/packages/sqlglotc.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
env:
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: sqlglotc
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build sqlglotc ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
# mypyc emits per-interpreter (non-abi3) wheels; upstream skips free-threaded, so no cp314t.
python: ["cp312", "cp313", "cp314"]
env:
SQLGLOTC_VERSION: ${{ matrix.version }}
steps:
# Full monorepo checkout: sqlglotc/setup.py compiles from the sibling
# ../sqlglot source tree, and tests/ (used below) lives at the repo root.
- name: Checkout sqlglot ${{ env.SQLGLOTC_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tobymao/sqlglot
ref: v${{ env.SQLGLOTC_VERSION }}
fetch-depth: 0
persist-credentials: false
- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
package-dir: sqlglotc
only: ${{ matrix.python }}-manylinux_riscv64
env:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
CIBW_TEST_REQUIRES: duckdb pandas python-dateutil pytz
CIBW_ENVIRONMENT_PASS_LINUX: PIP_EXTRA_INDEX_URL PIP_ONLY_BINARY
PIP_EXTRA_INDEX_URL: https://pypi.riseproject.dev/simple/
# PyPI's newest pandas (3.0.5) ships no riscv64 wheel anywhere yet;
# without this, pip resolves it over our registry's 3.0.3 (which
# does have one) and falls back to a from-source build that never
# finishes in CI's time budget.
PIP_ONLY_BINARY: pandas
CIBW_TEST_COMMAND: cd {project} && SKIP_INTEGRATION=1 python -m unittest
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: sqlglotc-${{ env.SQLGLOTC_VERSION }}-${{ matrix.python }}-manylinux_riscv64
path: wheelhouse/*.whl
if-no-files-found: error
publish:
name: Publish sqlglotc ${{ 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: sqlglotc-${{ matrix.version }}-*-manylinux_riscv64