Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions .github/workflows/build-openlineage-sql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on the `build-integration-sql-python` job of
# https://github.com/OpenLineage/OpenLineage/blob/1.53.0/.circleci/continue_config.yml
name: Build openlineage-sql wheels (riscv64)

on:
workflow_dispatch:
inputs:
version:
description: 'openlineage-sql version to build (git tag, e.g. 1.53.0)'
required: true
default: '1.53.0'
pull_request:
paths:
- '.github/workflows/build-openlineage-sql.yml'

concurrency:
group: ${{ github.workflow }}-${{ inputs.version || '1.53.0' }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

env:
OPENLINEAGE_SQL_VERSION: ${{ inputs.version || '1.53.0' }}
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64

jobs:
setup:
uses: $/.github/workflows/_setup.yml

test_impl:
needs: [setup]
name: Test openlineage-sql ${{ inputs.version || '1.53.0' }} impl crate
runs-on: ubuntu-24.04-riscv
timeout-minutes: 30
steps:
- name: Checkout OpenLineage ${{ env.OPENLINEAGE_SQL_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: OpenLineage/OpenLineage
ref: ${{ env.OPENLINEAGE_SQL_VERSION }}
persist-credentials: false

- uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master
with:
toolchain: stable

# Same test upstream's own release job runs (run_tests: true in
# continue_config.yml), scoped to the impl crate: iface-java (the
# sibling JNI binding, also in this workspace) is unrelated to the
# Python wheel.
- run: cd integration/sql && cargo test --no-default-features -p openlineage_sql

build_wheels:
needs: [setup]
name: Build openlineage-sql ${{ inputs.version || '1.53.0' }} ${{ matrix.tag }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
# pyo3's abi3-py310 feature is on unconditionally, so one abi3 wheel
# serves every GIL-ful interpreter; pyo3 disables abi3 under
# Py_GIL_DISABLED, giving the free-threaded build its own wheel.
- tag: cp310-abi3
build: >-
cp310-manylinux_riscv64 cp311-manylinux_riscv64
cp312-manylinux_riscv64 cp313-manylinux_riscv64
cp314-manylinux_riscv64
- tag: cp314t
build: cp314t-manylinux_riscv64

steps:
- name: Checkout OpenLineage ${{ env.OPENLINEAGE_SQL_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: OpenLineage/OpenLineage
ref: ${{ env.OPENLINEAGE_SQL_VERSION }}
persist-credentials: false

- name: Stage LICENSE and NOTICE beside iface-py's pyproject.toml
# maturin globs LICEN[CS]E*/NOTICE* relative to the pyproject
# directory, which is integration/sql/iface-py -- so upstream's
# published wheel carries no licence text at all.
run: cp LICENSE NOTICE.txt integration/sql/iface-py/

- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
package-dir: integration/sql/iface-py
output-dir: wheelhouse/
env:
# musllinux is dropped: rustup.rs ships no riscv64 musl toolchain.
CIBW_BUILD: ${{ matrix.build }}
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
# openlineage-sql ships no [tool.cibuildwheel], so the Rust
# toolchain its maturin backend needs is installed in-container
# here, matching iface-py/script/build.sh.
CIBW_BEFORE_ALL_LINUX: >-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
CIBW_ENVIRONMENT_LINUX: >-
PATH="$PATH:$HOME/.cargo/bin"
CARGO_INCREMENTAL=0
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_SOURCES: >-
integration/sql/iface-py/tests
integration/sql/iface-py/pyproject.toml
CIBW_TEST_COMMAND: >-
cd integration/sql/iface-py &&
python -c "import openlineage_sql.openlineage_sql as m, importlib.metadata as md;
assert m.__file__.endswith('.so'), m.__file__;
assert {p.name for p in md.files('openlineage_sql') if 'licenses' in str(p)} == {'LICENSE', 'NOTICE.txt'}" &&
python -m pytest -v tests/python

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: openlineage-sql-${{ env.OPENLINEAGE_SQL_VERSION }}-${{ matrix.tag }}-manylinux_riscv64
path: wheelhouse/*.whl
if-no-files-found: error

publish:
name: Publish openlineage-sql ${{ inputs.version || '1.53.0' }}
needs: [setup, test_impl, build_wheels]
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
with:
artifact-pattern: openlineage-sql-${{ inputs.version || '1.53.0' }}-*-manylinux_riscv64