Skip to content

vapoursynth: Add version 81 #1

vapoursynth: Add version 81

vapoursynth: Add version 81 #1

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on the `build-wheel` job (linux_x86_64/linux_aarch64
# legs) of https://github.com/vapoursynth/vapoursynth/blob/R81/.github/workflows/build.yml
name: Build vapoursynth wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/vapoursynth.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-vapoursynth.yml'
- 'docs/packages/vapoursynth.yaml'
- 'patches/vapoursynth/**'
push:
branches: [main]
paths:
- '.github/workflows/build-vapoursynth.yml'
- 'docs/packages/vapoursynth.yaml'
- 'patches/vapoursynth/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
env:
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: vapoursynth
version: ${{ inputs.version }}
# One cp312-abi3 wheel: meson-python's limited-api=true builds it once and
# cibuildwheel reuses+tests it on cp313/cp314 (find_compatible_wheel).
build_abi3:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build vapoursynth ${{ matrix.version }} cp312-abi3-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
env:
VAPOURSYNTH_VERSION: ${{ matrix.version }}
steps:
- name: Checkout vapoursynth R${{ env.VAPOURSYNTH_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: vapoursynth/vapoursynth
ref: R${{ env.VAPOURSYNTH_VERSION }}
persist-credentials: false
- name: Checkout python-wheels
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: python-wheels
persist-credentials: false
# glslang, Vulkan-Headers, libp2p and zimg are meson-wrap subprojects
# fetched and statically linked in at build time; none of their
# licences are in this checkout. glslang/Vulkan-Headers pin a tag
# (subprojects/*.wrap); libp2p/zimg pin revision = HEAD, so their
# notice is staged from the default branch, same lack of pinning as
# upstream's own build.
- name: Stage the vendored subprojects' licences
run: |
set -euo pipefail
curl -fsSL --retry 5 "https://raw.githubusercontent.com/KhronosGroup/glslang/vulkan-sdk-1.4.357.0/LICENSE.txt" -o LICENSE.glslang
curl -fsSL --retry 5 "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/vulkan-sdk-1.4.357.0/LICENSE.md" -o LICENSE.vulkan-headers
curl -fsSL --retry 5 "https://raw.githubusercontent.com/sekrit-twc/libp2p/master/COPYING" -o COPYING.libp2p
curl -fsSL --retry 5 "https://raw.githubusercontent.com/sekrit-twc/zimg/master/COPYING" -o COPYING.zimg
- name: Apply patches
run: git apply python-wheels/patches/vapoursynth/${{ env.VAPOURSYNTH_VERSION }}/*.patch
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
env:
CIBW_ARCHS: riscv64
CIBW_BUILD: 'cp312-* cp313-* cp314-*'
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vapoursynth-${{ env.VAPOURSYNTH_VERSION }}-cp312-abi3-manylinux_riscv64
path: ./wheelhouse/*.whl
if-no-files-found: error
# Free-threaded wheel: upstream's own `cp3??t-*` override disables
# meson-python's limited-api, so cp314t needs its own per-interpreter
# build. Upstream's own build list names cp315t; our riscv64 image has
# cp314t but no cp315t (gotcha 11).
build_freethreaded:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build vapoursynth ${{ matrix.version }} cp314t-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
env:
VAPOURSYNTH_VERSION: ${{ matrix.version }}
steps:
- name: Checkout vapoursynth R${{ env.VAPOURSYNTH_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: vapoursynth/vapoursynth
ref: R${{ env.VAPOURSYNTH_VERSION }}
persist-credentials: false
- name: Checkout python-wheels
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: python-wheels
persist-credentials: false
- name: Stage the vendored subprojects' licences
run: |
set -euo pipefail
curl -fsSL --retry 5 "https://raw.githubusercontent.com/KhronosGroup/glslang/vulkan-sdk-1.4.357.0/LICENSE.txt" -o LICENSE.glslang
curl -fsSL --retry 5 "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/vulkan-sdk-1.4.357.0/LICENSE.md" -o LICENSE.vulkan-headers
curl -fsSL --retry 5 "https://raw.githubusercontent.com/sekrit-twc/libp2p/master/COPYING" -o COPYING.libp2p
curl -fsSL --retry 5 "https://raw.githubusercontent.com/sekrit-twc/zimg/master/COPYING" -o COPYING.zimg
- name: Apply patches
run: git apply python-wheels/patches/vapoursynth/${{ env.VAPOURSYNTH_VERSION }}/*.patch
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
env:
CIBW_ARCHS: riscv64
CIBW_BUILD: 'cp314t-*'
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vapoursynth-${{ env.VAPOURSYNTH_VERSION }}-cp314t-manylinux_riscv64
path: ./wheelhouse/*.whl
if-no-files-found: error
publish:
name: Publish vapoursynth ${{ matrix.version }}
needs: [setup, build_abi3, build_freethreaded]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
secrets:
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
with:
artifact-pattern: vapoursynth-${{ matrix.version }}-*-manylinux_riscv64