Skip to content

Commit 15e2539

Browse files
authored
loudness: Add version 0.2.0 (#3171)
Build the scikit-build-core/pybind11 extension for manylinux_riscv64 from the upstream 0.2.0 tag with cibuildwheel, mirroring upstream's CI.yml, and run upstream's pytest suite against each wheel. musllinux is not built: the registry has no musllinux numpy, which is both a build and a test requirement. The licences of the compiled-in gcem and thread-pool headers and of libebur128 are shipped in the wheel.
1 parent 4457dba commit 15e2539

2 files changed

Lines changed: 107 additions & 0 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on: https://github.com/iver56/loudness/blob/0.2.0/.github/workflows/CI.yml
5+
name: Build loudness 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/loudness.yaml not released yet'
12+
required: false
13+
default: ''
14+
pull_request:
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/build-loudness.yml'
18+
- 'docs/packages/loudness.yaml'
19+
push:
20+
branches: [main]
21+
paths:
22+
- '.github/workflows/build-loudness.yml'
23+
- 'docs/packages/loudness.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: loudness
40+
version: ${{ inputs.version }}
41+
42+
build_wheels:
43+
needs: [setup]
44+
if: needs.setup.outputs.versions != '[]'
45+
name: Build loudness ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
46+
runs-on: ubuntu-24.04-riscv
47+
timeout-minutes: 60
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
52+
python: ["cp312", "cp313", "cp314", "cp314t"]
53+
54+
env:
55+
LOUDNESS_VERSION: ${{ matrix.version }}
56+
57+
steps:
58+
- name: Checkout loudness ${{ env.LOUDNESS_VERSION }}
59+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
60+
with:
61+
repository: iver56/loudness
62+
ref: ${{ env.LOUDNESS_VERSION }}
63+
submodules: recursive
64+
persist-credentials: false
65+
66+
- name: Build wheels
67+
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
68+
with:
69+
output-dir: wheelhouse/
70+
only: ${{ matrix.python }}-manylinux_riscv64
71+
env:
72+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
73+
# Ship the licences of the compiled-in gcem/thread-pool headers and the libebur128 code libloudness derives from.
74+
CIBW_ENVIRONMENT: >-
75+
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
76+
PIP_ONLY_BINARY=numpy
77+
SKBUILD_WHEEL_LICENSE_FILES="LICENSE;vendor/gcem/LICENSE;vendor/gcem/NOTICE.txt;vendor/thread-pool/LICENSE.txt;doc/license/libebur128.txt"
78+
CIBW_TEST_REQUIRES: numpy pytest soundfile
79+
CIBW_TEST_COMMAND: pytest {project}/tests
80+
81+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
82+
with:
83+
name: loudness-${{ env.LOUDNESS_VERSION }}-${{ matrix.python }}-manylinux_riscv64
84+
path: wheelhouse/*.whl
85+
if-no-files-found: error
86+
87+
publish:
88+
name: Publish loudness ${{ matrix.version }}
89+
needs: [setup, build_wheels]
90+
if: needs.setup.outputs.versions != '[]'
91+
strategy:
92+
fail-fast: false
93+
matrix:
94+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
95+
permissions:
96+
contents: write
97+
pull-requests: write
98+
uses: $/.github/workflows/_publish-wheel.yml
99+
secrets:
100+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
101+
with:
102+
artifact-pattern: loudness-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/loudness.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: loudness
2+
source-code: https://github.com/iver56/loudness
3+
license: MIT
4+
versions:
5+
- version: 0.2.0

0 commit comments

Comments
 (0)