Skip to content

Commit db908bb

Browse files
authored
epaper-dithering: Add version 6.1.1 (#3169)
1 parent e1f199f commit db908bb

2 files changed

Lines changed: 126 additions & 0 deletions

File tree

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on: https://github.com/OpenDisplay-org/epaper-dithering/blob/epaper-dithering-v6.1.1/.github/workflows/release.yml
5+
# and https://github.com/OpenDisplay-org/epaper-dithering/blob/epaper-dithering-v6.1.1/.github/workflows/python-test.yml
6+
name: Build epaper-dithering 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/epaper-dithering.yaml not released yet'
13+
required: false
14+
default: ''
15+
pull_request:
16+
branches: [main]
17+
paths:
18+
- '.github/workflows/build-epaper-dithering.yml'
19+
- 'docs/packages/epaper-dithering.yaml'
20+
push:
21+
branches: [main]
22+
paths:
23+
- '.github/workflows/build-epaper-dithering.yml'
24+
- 'docs/packages/epaper-dithering.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: epaper-dithering
41+
version: ${{ inputs.version }}
42+
43+
build_wheels:
44+
needs: [setup]
45+
if: needs.setup.outputs.versions != '[]'
46+
name: Build epaper-dithering ${{ 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+
python: ["cp312", "cp313", "cp314", "cp314t"]
54+
55+
env:
56+
EPAPER_DITHERING_VERSION: ${{ matrix.version }}
57+
58+
steps:
59+
- name: Checkout epaper-dithering v${{ env.EPAPER_DITHERING_VERSION }}
60+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
61+
with:
62+
repository: OpenDisplay-org/epaper-dithering
63+
ref: epaper-dithering-v${{ env.EPAPER_DITHERING_VERSION }}
64+
persist-credentials: false
65+
66+
# maturin only globs licence files next to pyproject.toml; both live at the repo root.
67+
- name: Stage licence files
68+
run: |
69+
cp LICENSE packages/python/LICENSE
70+
cp THIRD_PARTY_NOTICES.md packages/python/NOTICE.THIRD_PARTY_NOTICES.md
71+
72+
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
73+
with:
74+
package-dir: packages/python
75+
output-dir: wheelhouse/
76+
# musllinux is dropped: rustup.rs ships no riscv64 musl toolchain.
77+
only: ${{ matrix.python }}-manylinux_riscv64
78+
env:
79+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
80+
CIBW_BEFORE_ALL_LINUX: >-
81+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
82+
CIBW_ENVIRONMENT_LINUX: >-
83+
PATH="$PATH:$HOME/.cargo/bin"
84+
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
85+
PIP_ONLY_BINARY=pillow,numpy
86+
CIBW_TEST_EXTRAS: test
87+
CIBW_TEST_SOURCES: packages/python/tests
88+
CIBW_TEST_COMMAND: python -m pytest packages/python/tests -v --tb=short
89+
90+
- name: Check wheel contents
91+
run: |
92+
python3 - wheelhouse/*.whl <<'EOF'
93+
import sys, zipfile
94+
names = zipfile.ZipFile(sys.argv[1]).namelist()
95+
assert any(n.startswith("epaper_dithering/_rs.") and n.endswith(".so") for n in names), names
96+
licences = {n.rsplit("/", 1)[-1] for n in names if ".dist-info/licenses/" in n} - {""}
97+
assert licences == {"LICENSE", "NOTICE.THIRD_PARTY_NOTICES.md"}, licences
98+
EOF
99+
100+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
101+
with:
102+
name: epaper-dithering-${{ env.EPAPER_DITHERING_VERSION }}-${{ matrix.python }}-manylinux_riscv64
103+
path: wheelhouse/*.whl
104+
if-no-files-found: error
105+
106+
publish:
107+
name: Publish epaper-dithering ${{ matrix.version }}
108+
needs: [setup, build_wheels]
109+
if: needs.setup.outputs.versions != '[]'
110+
strategy:
111+
fail-fast: false
112+
matrix:
113+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
114+
permissions:
115+
contents: write
116+
pull-requests: write
117+
uses: $/.github/workflows/_publish-wheel.yml
118+
secrets:
119+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
120+
with:
121+
artifact-pattern: epaper-dithering-${{ 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: epaper-dithering
2+
source-code: https://github.com/OpenDisplay-org/epaper-dithering
3+
license: MIT
4+
versions:
5+
- version: 6.1.1

0 commit comments

Comments
 (0)