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 1f3705dba9a3c34736694f49c6ce836e235ce116 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 for each Python and 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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 6ef7fd6e4..0482d7ea5 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -46,12 +46,21 @@ 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", extras: true} + - {os: ubuntu-24.04-riscv, python: "3.12", ffmpeg: "8.1.2"} + - {os: ubuntu-24.04-riscv, python: "3.13", 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 +75,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 e69183a6a67a968c70bef875747f86f79e17ea43 Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Mon, 31 Aug 2026 15:25:18 -0400 Subject: [PATCH 4/4] workflows: smoke: use pyav-ffmpeg archives Do the same as the tests.yml workflow to make things consistent across both cases. We need to specify the PKG_CONFIG_PATH and related variables so that unpacking pyav-ffmpeg matches what's expected by the build, and what cibuildwheel does in tests.yaml. With this change, the build-deps script is no longer used in CI. For this to work, we need to install libxcb-shape0 with apt-get so that the .so files can be utilized, since we're not doing a repair step like in tests.yml to bundle the relevant libraries. Signed-off-by: Trevor Gamblin --- .github/workflows/smoke.yml | 54 +++++++++++++++---------------------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 0482d7ea5..44f1ac833 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -43,14 +43,14 @@ jobs: fail-fast: false matrix: config: - - {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", extras: true} - - {os: ubuntu-24.04-riscv, python: "3.12", ffmpeg: "8.1.2"} - - {os: ubuntu-24.04-riscv, python: "3.13", ffmpeg: "9.0.1"} - - {os: macos-14, python: "3.12", ffmpeg: "8.1.2"} - - {os: macos-14, python: "3.14", ffmpeg: "9.0.1"} + - {os: ubuntu-24.04, python: "3.14", ffmpeg: "9.0.1", ffmpeg_config: ffmpeg-latest.json, extras: true} + - {os: ubuntu-24.04, python: "3.12", ffmpeg: "8.1.2", ffmpeg_config: ffmpeg-8.1.json} + - {os: ubuntu-24.04, python: "3.13", ffmpeg: "9.0.1", ffmpeg_config: ffmpeg-latest.json} + - {os: ubuntu-24.04-riscv, python: "3.14", ffmpeg: "9.0.1", ffmpeg_config: ffmpeg-latest.json, extras: true} + - {os: ubuntu-24.04-riscv, python: "3.12", ffmpeg: "8.1.2", ffmpeg_config: ffmpeg-8.1.json} + - {os: ubuntu-24.04-riscv, python: "3.13", ffmpeg: "9.0.1", ffmpeg_config: ffmpeg-latest.json} + - {os: macos-14, python: "3.12", ffmpeg: "8.1.2", ffmpeg_config: ffmpeg-8.1.json} + - {os: macos-14, python: "3.14", ffmpeg: "9.0.1", ffmpeg_config: ffmpeg-latest.json} env: PYAV_PYTHON: python${{ matrix.config.python }} @@ -61,6 +61,11 @@ jobs: # 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' }} + # pyav-ffmpeg's vendor packages bake prefix=/tmp/vendor into their .pc + # files (not relocatable), so they must be extracted there verbatim. + PKG_CONFIG_PATH: /tmp/vendor/lib/pkgconfig + LD_LIBRARY_PATH: /tmp/vendor/lib + DYLD_LIBRARY_PATH: /tmp/vendor/lib steps: - uses: actions/checkout@v7 @@ -73,33 +78,18 @@ jobs: python-version: ${{ matrix.config.python }} - name: OS Packages + if: runner.os == 'Linux' run: | - case ${{ matrix.config.os }} in - ubuntu-24.04|ubuntu-24.04-riscv) - sudo apt-get update - sudo apt-get install -y \ - autoconf \ - automake \ - build-essential \ - cmake \ - libtool \ - libx264-dev \ - nasm \ - pkg-config \ - zlib1g-dev - if [[ "${{ matrix.config.extras }}" ]]; then - sudo apt-get install -y doxygen - fi - ;; - macos-14) - brew install automake libtool opus x264 - ;; - esac - - - name: Pip and FFmpeg + sudo apt-get update + sudo apt-get install -y build-essential cmake pkg-config zlib1g-dev libxcb-shape0 + if [[ "${{ matrix.config.extras }}" ]]; then + sudo apt-get install -y doxygen + fi + + - name: FFmpeg run: | . scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }} - scripts/build-deps + python scripts/fetch-vendor.py --config-file scripts/${{ matrix.config.ffmpeg_config }} /tmp/vendor - name: Build run: |