Skip to content

Commit 027ab7a

Browse files
authored
cbitstruct: Add version 1.2.0 (#2942)
1 parent 5247b62 commit 027ab7a

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# Based on the `build_wheels` job of
5+
# https://github.com/qchateau/cbitstruct/blob/1.2.0/.github/workflows/build_and_publish.yml
6+
name: Build cbitstruct 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/cbitstruct.yaml not released yet'
13+
required: false
14+
default: ''
15+
pull_request:
16+
branches: [main]
17+
paths:
18+
- '.github/workflows/build-cbitstruct.yml'
19+
- 'docs/packages/cbitstruct.yaml'
20+
push:
21+
branches: [main]
22+
paths:
23+
- '.github/workflows/build-cbitstruct.yml'
24+
- 'docs/packages/cbitstruct.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: cbitstruct
41+
version: ${{ inputs.version }}
42+
43+
build_wheels:
44+
needs: [setup]
45+
if: needs.setup.outputs.versions != '[]'
46+
name: Build cbitstruct ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
47+
runs-on: ubuntu-24.04-riscv
48+
timeout-minutes: 60
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
53+
# Upstream's [tool.cibuildwheel] build list ships no free-threaded wheel.
54+
python: ["cp312", "cp313", "cp314"]
55+
56+
env:
57+
CBITSTRUCT_VERSION: ${{ matrix.version }}
58+
59+
steps:
60+
- name: Checkout cbitstruct ${{ env.CBITSTRUCT_VERSION }}
61+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
62+
with:
63+
repository: qchateau/cbitstruct
64+
ref: ${{ env.CBITSTRUCT_VERSION }}
65+
persist-credentials: false
66+
67+
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
68+
env:
69+
CIBW_ARCHS: riscv64
70+
CIBW_BUILD: ${{ matrix.python }}-manylinux_riscv64
71+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
72+
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
73+
74+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
75+
with:
76+
name: cbitstruct-${{ env.CBITSTRUCT_VERSION }}-${{ matrix.python }}-manylinux_riscv64
77+
path: ./wheelhouse/*.whl
78+
if-no-files-found: error
79+
80+
publish:
81+
name: Publish cbitstruct ${{ matrix.version }}
82+
needs: [setup, build_wheels]
83+
if: needs.setup.outputs.versions != '[]'
84+
strategy:
85+
fail-fast: false
86+
matrix:
87+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
88+
permissions:
89+
contents: write
90+
pull-requests: write
91+
uses: $/.github/workflows/_publish-wheel.yml
92+
secrets:
93+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
94+
with:
95+
artifact-pattern: cbitstruct-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/cbitstruct.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: cbitstruct
2+
source-code: https://github.com/qchateau/cbitstruct
3+
license: MPL-2.0
4+
versions:
5+
- version: 1.2.0

0 commit comments

Comments
 (0)