Skip to content

Commit a9c6d87

Browse files
committed
oxbow: Add version 0.8.2
1 parent 64e3b54 commit a9c6d87

2 files changed

Lines changed: 135 additions & 0 deletions

File tree

‎.github/workflows/build-oxbow.yml‎

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on the `linux` job of
5+
# https://github.com/abdenlab/oxbow/blob/py-oxbow@v0.8.2/.github/workflows/release-python.yml
6+
name: Build oxbow 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/oxbow.yaml not released yet'
13+
required: false
14+
default: ''
15+
pull_request:
16+
branches: [main]
17+
paths:
18+
- '.github/workflows/build-oxbow.yml'
19+
- 'docs/packages/oxbow.yaml'
20+
push:
21+
branches: [main]
22+
paths:
23+
- '.github/workflows/build-oxbow.yml'
24+
- 'docs/packages/oxbow.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: oxbow
41+
version: ${{ inputs.version }}
42+
43+
build_wheels:
44+
needs: [setup]
45+
if: needs.setup.outputs.versions != '[]'
46+
name: Build oxbow ${{ matrix.version }} cp312-abi3-manylinux_riscv64
47+
runs-on: ubuntu-24.04-riscv
48+
timeout-minutes: 120
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
53+
54+
env:
55+
OXBOW_VERSION: ${{ matrix.version }}
56+
57+
steps:
58+
- name: Checkout oxbow py-oxbow@v${{ env.OXBOW_VERSION }}
59+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
60+
with:
61+
repository: abdenlab/oxbow
62+
ref: py-oxbow@v${{ env.OXBOW_VERSION }}
63+
persist-credentials: false
64+
65+
- name: Stage the licences beside oxbow's pyproject.toml
66+
# maturin globs LICEN[CS]E* relative to the pyproject directory, which
67+
# in this monorepo is py-oxbow/ -- so upstream's published wheels
68+
# carry no licence text at all (gotcha 146).
69+
run: cp LICENSE-MIT LICENSE-APACHE py-oxbow/
70+
71+
- name: Build wheels
72+
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
73+
with:
74+
package-dir: py-oxbow
75+
output-dir: wheelhouse/
76+
env:
77+
# abi3-py39 is fixed in py-oxbow/Cargo.toml, so one build serves
78+
# every interpreter; built on cp312 (the oldest in our matrix) and
79+
# re-tested on the newer ones via find_compatible_wheel. No
80+
# cp314t: pyo3's abi3 feature predates PEP 703 free-threading.
81+
CIBW_BUILD: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64
82+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
83+
# oxbow ships no [tool.cibuildwheel], so the Rust toolchain its
84+
# maturin backend needs is installed in-container here.
85+
CIBW_BEFORE_ALL_LINUX: >-
86+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
87+
CIBW_ENVIRONMENT_LINUX: >-
88+
PATH="$PATH:$HOME/.cargo/bin"
89+
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
90+
CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=numpy
91+
CIBW_TEST_REQUIRES: pytest pytest-manifest cloudpickle
92+
CIBW_TEST_SOURCES: tests
93+
CIBW_TEST_COMMAND: cd {project} && python -m pytest -v tests
94+
95+
- name: Verify the wheel ships the compiled extension and licences
96+
run: |
97+
python3 - wheelhouse/*.whl <<'EOF'
98+
import sys, zipfile
99+
names = zipfile.ZipFile(sys.argv[1]).namelist()
100+
sos = sorted(n for n in names if n.endswith(".so"))
101+
print("\n".join(sos))
102+
assert any("oxbow" in n for n in sos), sos
103+
104+
lic = sorted(n.rsplit("/", 1)[-1] for n in names if ".dist-info/licenses/" in n and not n.endswith("/"))
105+
print("\n".join(lic))
106+
assert {"LICENSE-MIT", "LICENSE-APACHE"} <= set(lic), lic
107+
EOF
108+
109+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
110+
with:
111+
name: oxbow-${{ env.OXBOW_VERSION }}-cp312-abi3-manylinux_riscv64
112+
path: wheelhouse/*.whl
113+
if-no-files-found: error
114+
115+
publish:
116+
name: Publish oxbow ${{ matrix.version }}
117+
needs: [setup, build_wheels]
118+
if: needs.setup.outputs.versions != '[]'
119+
strategy:
120+
fail-fast: false
121+
matrix:
122+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
123+
permissions:
124+
contents: write
125+
pull-requests: write
126+
uses: $/.github/workflows/_publish-wheel.yml
127+
secrets:
128+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
129+
with:
130+
artifact-pattern: oxbow-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/oxbow.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: oxbow
2+
source-code: https://github.com/abdenlab/oxbow
3+
license: MIT OR Apache-2.0
4+
versions:
5+
- version: 0.8.2

0 commit comments

Comments
 (0)