Skip to content

Commit 059e90b

Browse files
committed
arize-phoenix-sqlean: add build-arize-phoenix-sqlean.yml for riscv64 wheels
1 parent a4c371c commit 059e90b

2 files changed

Lines changed: 118 additions & 0 deletions

File tree

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# Based on the `build` job of
5+
# https://github.com/Arize-ai/phoenix/blob/arize-phoenix-sqlean-v0.1.1/.github/workflows/phoenix-sqlean-build.yml
6+
name: Build arize-phoenix-sqlean wheels (riscv64)
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'Version glob to (re)build; empty builds every version of docs/packages/arize-phoenix-sqlean.yaml not released yet'
13+
required: false
14+
default: ''
15+
pull_request:
16+
branches: [main]
17+
paths:
18+
- '.github/workflows/build-arize-phoenix-sqlean.yml'
19+
- 'docs/packages/arize-phoenix-sqlean.yaml'
20+
push:
21+
branches: [main]
22+
paths:
23+
- '.github/workflows/build-arize-phoenix-sqlean.yml'
24+
- 'docs/packages/arize-phoenix-sqlean.yaml'
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
28+
cancel-in-progress: true
29+
30+
permissions:
31+
contents: read # to fetch code (actions/checkout)
32+
33+
env:
34+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
35+
36+
jobs:
37+
setup:
38+
uses: $/.github/workflows/_setup.yml
39+
with:
40+
package: arize-phoenix-sqlean
41+
version: ${{ inputs.version }}
42+
43+
build_wheels:
44+
needs: [setup]
45+
if: needs.setup.outputs.versions != '[]'
46+
name: Build arize-phoenix-sqlean ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
47+
runs-on: ubuntu-24.04-riscv
48+
timeout-minutes: 30
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
53+
# Matches upstream's cibuildwheel.toml build list, which has no
54+
# cp314t entry (free-threaded builds aren't produced for this
55+
# package at all, on any platform).
56+
python: ["cp310", "cp311", "cp312", "cp313", "cp314"]
57+
58+
env:
59+
ARIZE_PHOENIX_SQLEAN_VERSION: ${{ matrix.version }}
60+
61+
steps:
62+
- name: Checkout Arize-ai/phoenix arize-phoenix-sqlean-v${{ env.ARIZE_PHOENIX_SQLEAN_VERSION }}
63+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64+
with:
65+
repository: Arize-ai/phoenix
66+
ref: arize-phoenix-sqlean-v${{ env.ARIZE_PHOENIX_SQLEAN_VERSION }}
67+
persist-credentials: false
68+
69+
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
70+
with:
71+
package-dir: packages/phoenix-sqlean
72+
output-dir: wheelhouse/
73+
env:
74+
CIBW_ARCHS: riscv64
75+
CIBW_BUILD: ${{ matrix.python }}-manylinux_riscv64
76+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
77+
# Mirrors upstream's own download-sources step: the SQLite
78+
# amalgamation and sqlean extension sources aren't checked in,
79+
# they're fetched at build time (Makefile).
80+
CIBW_BEFORE_BUILD: >-
81+
dnf install -y unzip patch &&
82+
cd {package} && make prepare-src download-sqlite download-sqlean
83+
CIBW_TEST_SOURCES: >-
84+
packages/phoenix-sqlean/tests
85+
packages/phoenix-sqlean/setup.py
86+
packages/phoenix-sqlean/README.md
87+
# tests/extensions.py imports setup.py (for SQLEAN_VERSION), which
88+
# imports setuptools; the test venv doesn't have it otherwise.
89+
CIBW_TEST_REQUIRES: setuptools
90+
CIBW_TEST_COMMAND: cd packages/phoenix-sqlean && python -m tests
91+
92+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
93+
with:
94+
name: arize-phoenix-sqlean-${{ env.ARIZE_PHOENIX_SQLEAN_VERSION }}-${{ matrix.python }}-manylinux_riscv64
95+
path: ./wheelhouse/*.whl
96+
if-no-files-found: error
97+
98+
publish:
99+
name: Publish arize-phoenix-sqlean ${{ matrix.version }}
100+
needs: [setup, build_wheels]
101+
if: needs.setup.outputs.versions != '[]'
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
106+
permissions:
107+
contents: write
108+
pull-requests: write
109+
uses: $/.github/workflows/_publish-wheel.yml
110+
secrets:
111+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
112+
with:
113+
artifact-pattern: arize-phoenix-sqlean-${{ matrix.version }}-*-manylinux_riscv64
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: arize-phoenix-sqlean
2+
source-code: https://github.com/Arize-ai/phoenix/tree/main/packages/phoenix-sqlean
3+
license: Zlib AND MIT AND BSD-2-Clause AND BSD-3-Clause AND PSF-2.0
4+
versions:
5+
- version: 0.1.1

0 commit comments

Comments
 (0)