Skip to content

Commit c34d2f2

Browse files
authored
cmeel-console-bridge: Add version 1.0.2.3 (#2152)
1 parent ed776b4 commit c34d2f2

2 files changed

Lines changed: 133 additions & 0 deletions

File tree

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on: https://github.com/cmake-wheel/cmeel-console-bridge/blob/v1.0.2.3.c0/.github/workflows/release.yml
5+
name: Build cmeel-console-bridge wheels (riscv64)
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: 'Version glob to (re)build; empty builds every version of docs/packages/cmeel-console-bridge.yaml not released yet'
12+
required: false
13+
default: ''
14+
pull_request:
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/build-cmeel-console-bridge.yml'
18+
- 'docs/packages/cmeel-console-bridge.yaml'
19+
push:
20+
branches: [main]
21+
paths:
22+
- '.github/workflows/build-cmeel-console-bridge.yml'
23+
- 'docs/packages/cmeel-console-bridge.yaml'
24+
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
27+
cancel-in-progress: true
28+
29+
permissions:
30+
contents: read # to fetch code (actions/checkout)
31+
32+
env:
33+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
34+
35+
jobs:
36+
setup:
37+
uses: $/.github/workflows/_setup.yml
38+
with:
39+
package: cmeel-console-bridge
40+
version: ${{ inputs.version }}
41+
42+
build_wheels:
43+
needs: [setup]
44+
if: needs.setup.outputs.versions != '[]'
45+
name: Build cmeel-console-bridge ${{ matrix.version }} manylinux_riscv64
46+
runs-on: ubuntu-24.04-riscv
47+
timeout-minutes: 120
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
52+
53+
env:
54+
CMEEL_CONSOLE_BRIDGE_VERSION: ${{ matrix.version }}
55+
56+
steps:
57+
# The wheel holds no Python extension ([tool.cmeel] has-sitelib = false), so one
58+
# py3-none-manylinux_riscv64 wheel covers every interpreter.
59+
- name: Checkout cmeel-console-bridge v${{ env.CMEEL_CONSOLE_BRIDGE_VERSION }}.c0
60+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
61+
with:
62+
repository: cmake-wheel/cmeel-console-bridge
63+
ref: v${{ env.CMEEL_CONSOLE_BRIDGE_VERSION }}.c0
64+
submodules: true
65+
persist-credentials: false
66+
67+
- name: Build wheels
68+
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
69+
with:
70+
output-dir: wheelhouse/
71+
only: cp312-manylinux_riscv64
72+
env:
73+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
74+
# console_bridge declares cmake_minimum_required(VERSION 3.0.2) and cmeel[build]
75+
# resolves CMake >= 4, which refuses it; the cmeel backend owns the configure
76+
# line, so the floor goes in the environment (gotcha 257).
77+
CIBW_ENVIRONMENT: CMEEL_LOG_LEVEL=DEBUG CMAKE_POLICY_VERSION_MINIMUM=3.5
78+
# cmeel installs into a shared prefix with an $ORIGIN RPATH it sets itself.
79+
CIBW_REPAIR_WHEEL_COMMAND: ""
80+
81+
- name: Check wheel contents
82+
run: |
83+
python3 - wheelhouse/*.whl <<'EOF'
84+
import sys, zipfile
85+
names = zipfile.ZipFile(sys.argv[1]).namelist()
86+
assert "cmeel.prefix/lib/libconsole_bridge.so.1.0" in names, names
87+
assert "cmeel.prefix/include/console_bridge/console.h" in names, names
88+
EOF
89+
90+
- name: Smoke-test the built library
91+
run: |
92+
sudo apt-get update -qq
93+
sudo apt-get install -y -qq --no-install-recommends python3-venv
94+
python3 -m venv .venv
95+
. .venv/bin/activate
96+
# gotcha 234: stock Ubuntu 24.04 apt pip (24.0) has zero manylinux_*_riscv64
97+
# tags, so it rejects the riscv64 wheel outright without upgrading first.
98+
pip install -q --upgrade pip
99+
pip install -q wheelhouse/*.whl
100+
python3 -c "
101+
import ctypes, pathlib, sysconfig
102+
lib = pathlib.Path(sysconfig.get_paths()['purelib']) / 'cmeel.prefix/lib/libconsole_bridge.so'
103+
ctypes.CDLL(str(lib))
104+
print(lib)
105+
"
106+
107+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
108+
with:
109+
name: cmeel-console-bridge-${{ env.CMEEL_CONSOLE_BRIDGE_VERSION }}-py3-manylinux_riscv64
110+
path: wheelhouse/*.whl
111+
if-no-files-found: error
112+
113+
publish:
114+
name: Publish cmeel-console-bridge ${{ matrix.version }}
115+
needs: [setup, build_wheels]
116+
if: needs.setup.outputs.versions != '[]'
117+
strategy:
118+
fail-fast: false
119+
matrix:
120+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
121+
permissions:
122+
contents: write
123+
pull-requests: write
124+
uses: $/.github/workflows/_publish-wheel.yml
125+
secrets:
126+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
127+
with:
128+
artifact-pattern: cmeel-console-bridge-${{ 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: cmeel-console-bridge
2+
source-code: https://github.com/cmake-wheel/cmeel-console-bridge.git
3+
license: Zlib
4+
versions:
5+
- version: 1.0.2.3

0 commit comments

Comments
 (0)