Skip to content

Commit a061983

Browse files
authored
lilcom: add build-lilcom.yml for riscv64 wheels (#1229)
* **Package**: `lilcom` * **Version**: `1.8.2` * **Source**: https://github.com/danpovey/lilcom * **Docs**: https://github.com/danpovey/lilcom pybind11/CMake C++ extension for lossless compression of numpy audio-feature data, used across the Kaldi/lhotse speech-processing ecosystem. Upstream publishes no riscv64 wheel. Mirrors [upstream's `build-wheels.yaml`](https://github.com/danpovey/lilcom/blob/v1.8.2/.github/workflows/build-wheels.yaml). **Differs from upstream** - Dropped cp314t - vendored pybind11 2.12.0 predates free-threaded CPython support; upstream ships no cp314t wheel for lilcom anywhere. **Matrix**: cp312, cp313, cp314 only (see above). **Testing** - same as upstream (`test/test_header.py`, `test/test_lilcom.py`, `test/test_speed.py`) **License**: OK Built locally on macOS (`pip wheel`, no isolation issues); all three upstream test scripts passed against the resulting wheel.
1 parent 612eec9 commit a061983

1 file changed

Lines changed: 82 additions & 0 deletions

File tree

.github/workflows/build-lilcom.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# Based on upstream's wheel builder:
5+
# https://github.com/danpovey/lilcom/blob/master/.github/workflows/build-wheels.yaml
6+
name: Build lilcom wheels (riscv64)
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'lilcom version to build (git tag without leading v, e.g. 1.8.2)'
13+
required: true
14+
default: '1.8.2'
15+
pull_request:
16+
paths:
17+
- '.github/workflows/build-lilcom.yml'
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ inputs.version || '1.8.2' }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read # to fetch code (actions/checkout)
25+
26+
env:
27+
LILCOM_VERSION: ${{ inputs.version || '1.8.2' }}
28+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
29+
30+
jobs:
31+
setup:
32+
uses: $/.github/workflows/_setup.yml
33+
34+
build_wheels:
35+
needs: [setup]
36+
name: Build lilcom ${{ inputs.version || '1.8.2' }} ${{ matrix.python }}-manylinux_riscv64
37+
runs-on: ubuntu-24.04-riscv
38+
timeout-minutes: 60
39+
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
# CMakeLists.txt FetchContent-pulls pybind11 v2.12.0, which predates
44+
# free-threaded CPython support (added in pybind11 2.13); upstream itself
45+
# ships no cp314t wheel for lilcom on any platform.
46+
python: ["cp312", "cp313", "cp314"]
47+
48+
steps:
49+
- name: Checkout lilcom v${{ env.LILCOM_VERSION }}
50+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
51+
with:
52+
repository: danpovey/lilcom
53+
ref: v${{ env.LILCOM_VERSION }}
54+
persist-credentials: false
55+
56+
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
57+
with:
58+
only: ${{ matrix.python }}-manylinux_riscv64
59+
env:
60+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
61+
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
62+
CIBW_TEST_COMMAND: >-
63+
python3 -c "import lilcom_extension; assert lilcom_extension.__file__.endswith('.so'), lilcom_extension.__file__" &&
64+
python3 {package}/test/test_header.py &&
65+
python3 {package}/test/test_lilcom.py &&
66+
python3 {package}/test/test_speed.py
67+
68+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
69+
with:
70+
name: lilcom-${{ env.LILCOM_VERSION }}-${{ matrix.python }}-manylinux_riscv64
71+
path: ./wheelhouse/*.whl
72+
if-no-files-found: error
73+
74+
publish:
75+
name: Publish lilcom ${{ inputs.version || '1.8.2' }}
76+
needs: [setup, build_wheels]
77+
permissions:
78+
contents: write
79+
pull-requests: write
80+
uses: $/.github/workflows/_publish-wheel.yml
81+
with:
82+
artifact-pattern: lilcom-${{ inputs.version || '1.8.2' }}-*-manylinux_riscv64

0 commit comments

Comments
 (0)