From 47be30aa482e1c93e52af7e3182d59bfe5ff3e21 Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Fri, 28 Aug 2026 10:09:05 -0400 Subject: [PATCH 1/4] workflows: smoke: add '-y' for apt-get install Be explicit when running apt-get and provide the '-y' option so that the workflows install any packages they need, in case the runner environment doesn't already contain them. Signed-off-by: Trevor Gamblin --- .github/workflows/smoke.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 74cd42ad0..6ef7fd6e4 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -68,7 +68,7 @@ jobs: case ${{ matrix.config.os }} in ubuntu-24.04) sudo apt-get update - sudo apt-get install \ + sudo apt-get install -y \ autoconf \ automake \ build-essential \ @@ -79,7 +79,7 @@ jobs: pkg-config \ zlib1g-dev if [[ "${{ matrix.config.extras }}" ]]; then - sudo apt-get install doxygen + sudo apt-get install -y doxygen fi ;; macos-14) From cacd661c5b6cf03c3ae2ba83f07592484f1b22a3 Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Fri, 28 Aug 2026 09:34:41 -0400 Subject: [PATCH 2/4] workflows: tests: add riscv64 Use a RISE RISC-V Runner (ubuntu-24.04-riscv) for riscv64 in the package-wheel job. We need to tell uv to use the RISE registry first and fallback to PyPI otherwise, so that it doesn't try to build packages like Pillow (which also doesn't have riscv64 PyPI wheels yet) from source. Signed-off-by: Trevor Gamblin --- .github/workflows/tests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eb4b4c294..7189a0566 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,6 +33,8 @@ jobs: arch: arm64 - os: macos-15-intel arch: x86_64 + - os: ubuntu-24.04-riscv + arch: riscv64 - os: ubuntu-24.04-arm arch: aarch64 - os: ubuntu-24.04 @@ -61,7 +63,10 @@ jobs: CIBW_BEFORE_BUILD: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-latest.json /tmp/vendor CIBW_BEFORE_BUILD_MACOS: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-latest.json /tmp/vendor CIBW_BEFORE_BUILD_WINDOWS: python scripts\fetch-vendor.py --config-file scripts\ffmpeg-latest.json C:\cibw\vendor - CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig + # riscv64 wheels (e.g. numpy, for CIBW_TEST_REQUIRES) are often missing on + # PyPI; RISE mirrors prebuilt wheels for it. unsafe-best-match is needed so + # uv still falls back to PyPI for packages/versions RISE doesn't carry. + CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig${{ matrix.arch == 'riscv64' && ' UV_INDEX=https://pypi.riseproject.dev/simple/ UV_INDEX_STRATEGY=unsafe-best-match' || '' }} CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names CIBW_ENVIRONMENT_WINDOWS: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib PYAV_SKIP_TESTS=unicode_filename CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel} From b3a8b89770dbdb6d3087ef93158c2404ef9eeb33 Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Fri, 28 Aug 2026 09:39:25 -0400 Subject: [PATCH 3/4] workflows: smoke: add riscv64 Use a RISE RISC-V Runner to test the latest FFmpeg combo in the smoke tests. We need to tell uv to use the RISE registry first and fallback to PyPI otherwise, so that it doesn't try to build packages like Pillow (which also doesn't have riscv64 wheels on PyPI yet) from source. Signed-off-by: Trevor Gamblin --- .github/workflows/smoke.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 6ef7fd6e4..37f4c191b 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -46,12 +46,19 @@ jobs: - {os: ubuntu-24.04, python: "3.14", ffmpeg: "9.0.1", extras: true} - {os: ubuntu-24.04, python: "3.12", ffmpeg: "8.1.2"} - {os: ubuntu-24.04, python: "3.13", ffmpeg: "9.0.1"} + - {os: ubuntu-24.04-riscv, python: "3.14", ffmpeg: "9.0.1"} - {os: macos-14, python: "3.12", ffmpeg: "8.1.2"} - {os: macos-14, python: "3.14", ffmpeg: "9.0.1"} env: PYAV_PYTHON: python${{ matrix.config.python }} PYAV_LIBRARY: ffmpeg-${{ matrix.config.ffmpeg }} + # riscv64 wheels (e.g. Pillow) are often missing on PyPI; RISE mirrors + # prebuilt wheels for it so uv doesn't have to build them from source. + # unsafe-best-match is needed so uv still falls back to PyPI for + # packages/versions RISE doesn't happen to carry. + UV_INDEX: ${{ matrix.config.os == 'ubuntu-24.04-riscv' && 'https://pypi.riseproject.dev/simple/' || '' }} + UV_INDEX_STRATEGY: ${{ matrix.config.os == 'ubuntu-24.04-riscv' && 'unsafe-best-match' || 'first-index' }} steps: - uses: actions/checkout@v7 @@ -66,7 +73,7 @@ jobs: - name: OS Packages run: | case ${{ matrix.config.os }} in - ubuntu-24.04) + ubuntu-24.04|ubuntu-24.04-riscv) sudo apt-get update sudo apt-get install -y \ autoconf \ From 562d3b739a5cd9b1f15780c8ee626f3bc33148fb Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Tue, 8 Sep 2026 10:06:14 -0400 Subject: [PATCH 4/4] scripts: build-deps: add RISC-V-specific vector options workaround Signed-off-by: Trevor Gamblin --- scripts/build-deps | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/build-deps b/scripts/build-deps index a888e65f5..28018636c 100755 --- a/scripts/build-deps +++ b/scripts/build-deps @@ -39,6 +39,20 @@ else echo " Building without NVIDIA NVENC/NVDEC support" fi +# Some riscv64 toolchains include the Zbb extension by default. FFmpeg's runtime +# CPU feature checks then get compiled away, causing SIGILL on hardware (like +# the RISE RISC-V Runners) that doesn't actually implement Zbb +# (https://trac.ffmpeg.org/ticket/11251). Being explicit about -march=riscv64gc +# isn't enough to work around this, so also disable FFmpeg's riscv-specific +# (scalar Zbb + vector) code paths. rv_zicbop's configure dependency is only on +# "riscv", not "rv", so we have to disable all of the related vector options. +# This is a temporary fix that should be removed once RISC-V Runners support +# RVA23. +CONFFLAGS_RISCV="" +if [[ "$(uname -m)" == "riscv64" ]]; then + CONFFLAGS_RISCV="--extra-cflags=-march=rv64gc --disable-rv --disable-rvv --disable-rv_zicbop --disable-rv_zvbb" +fi + cd "$PYAV_LIBRARY_ROOT" # Download and expand the source. @@ -72,6 +86,7 @@ echo ./configure --enable-filter=abuffer,abuffersink,aformat,aresample,atempo,buffer,buffersink,bwdif,color,ebur128,loudnorm,lutrgb,overlay,palettegen,scale,testsrc,vflip,volume \ --disable-avx512 \ $CONFFLAGS_NVIDIA \ + $CONFFLAGS_RISCV \ --prefix="$PYAV_LIBRARY_PREFIX" \ || exit 2 echo