Skip to content

PyAV: add riscv64 build support, use pyav-ffmpeg artifacts in smoke.yml - #2407

Open
threexc wants to merge 4 commits into
PyAV-Org:mainfrom
threexc:tgamblin/riscv64
Open

PyAV: add riscv64 build support, use pyav-ffmpeg artifacts in smoke.yml#2407
threexc wants to merge 4 commits into
PyAV-Org:mainfrom
threexc:tgamblin/riscv64

Conversation

@threexc

@threexc threexc commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Make use of RISE's Native RISC-V Runners to build PyAV for riscv64. This requires enabling them for the repository as a GitHub Application. More info regarding enabling them is available here: https://riscv-runners.riseproject.dev/

To get the smoke.yml workflow to succeed, I've reworked it to use pyav-ffmpeg artifacts like the tests.yml workflow does, except that the armv7l job still follows the existing approach. While working through this, I encountered a bug specific to the RISC-V Runners (riscv64gc profile), where I hit an illegal instruction/core dump issue that seems to be related to: https://www.mail-archive.com/ffmpeg-trac@avcodec.org/msg69006.html . Using the pyav-ffmpeg artifacts circumvented this issue, which is why it was implemented that way. This is a temporary workaround - in the future, the RISC-V Runners will support a more expansive profile. If using pyav-ffmpeg artifacts in the smoke.yaml workflow is undesirable, I can revisit it and maybe adjust compiler flags instead.

I tried a test run on my fork. You can review the results here: threexc#2

This is being done on behalf of RISE, using the RISC-V Wheels dashboard to track upstream support for the Python ecosystem.

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 <tgamblin@baylibre.com>
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 <tgamblin@baylibre.com>
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 <tgamblin@baylibre.com>
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 <tgamblin@baylibre.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant