apple / swift (pull_request) Successful in 1m53s
apple / screenshots (pull_request) Skipped
windows / build (aarch64-pc-windows-msvc) (pull_request) Successful in 2m34s
ci / web (pull_request) Successful in 2m32s
ci / docs-site (pull_request) Successful in 1m25s
ci / bun-nix (pull_request) Successful in 26s
windows / build (x86_64-pc-windows-msvc) (pull_request) Successful in 3m23s
android / android (pull_request) Successful in 6m47s
ci / rust-arm64 (pull_request) Successful in 8m49s
nix / flake (pull_request) Failing after 16m7s
ci / rust (pull_request) Successful in 23m39s
ffmpeg-next 8.1.0 could not accept FFmpeg 9 at all: ffmpeg-sys-next's version probe
covered avcodec majors 56..62 (the range is exclusive of its end), so libavcodec 63 fell
outside what it knew how to bind. 9.0.0 widens that to 56..63, which is what actually
unblocks Arch. Bump both pins — the unconditional Linux dep and the optional Windows
amf-qsv one — and the lock with them.
No API drift to fix. The crate major is a CEILING, not a target: one source tree still
spans FFmpeg 7.x/libavcodec 61, 8.x/62 and 9.x/63 via per-version cfgs, and every wrapper
symbol the NVENC-libav, VAAPI and amf-qsv backends name survives 8.1.0 -> 9.0.0
unchanged. The three hand-written #[repr(C)] hwcontext mirrors are the parts no compiler
checks, so they were re-read against the real headers rather than trusted:
AVCUDADeviceContext and AVD3D11VAFramesContext are byte-identical across 7.1/8/9, and
AVD3D11VADeviceContext gained two trailing UINTs in 8 that 7.1 lacks — which is why that
mirror deliberately stops at the common prefix, and why its assertions now say what they
do and do not buy you. They pin our layout, not libav's; a green build is not evidence.
The CI image is the step that makes this reach users. arch.yml deliberately runs no -Syu
("the image's snapshot IS the build environment"), so the builder stayed frozen on ffmpeg
8 no matter what Arch shipped, and a canary built from that snapshot could not satisfy the
soname dep the PKGBUILD now derives. Re-keying ci/ rebuilds it against ffmpeg 9.
Ubuntu and Windows deliberately stay put: the noble .deb bundles its own FFmpeg 8 behind
an rpath and strips the libav sonames from its Depends, and Windows bundles BtbN DLLs into
the signed installer — neither is exposed to the break, BtbN publishes no FFmpeg 9 build,
and moving either would re-qualify an encode stack to buy nothing.
Verified end to end on 192.168.1.21 (CachyOS, system ffmpeg 2:9.0-5, RTX 5070 Ti): host
builds clean and links libavcodec.so.63/libavutil.so.61/libavfilter.so.12/libswscale.so.10
with no unresolved sonames; the ffmpeg-8 compat shim is gone and the service runs with
NRestarts=0 and answers 401 on :47990; pf-encode's 67 tests pass; and a live synthetic
encode drives real NVENC hardware through FFmpeg 9's libavcodec to a decodable 1080p HEVC
stream (180/180 frames, FEC loopback 0 mismatches) with libavcodec.so.63 and
libnvidia-encode both mapped into the encoding process.
64 lines
3.8 KiB
Docker
64 lines
3.8 KiB
Docker
# CI builder for the Rust workspace — Ubuntu 26.04 to match the dev/host boxes
|
|
# (FFmpeg 8 / libavcodec 62, PipeWire 1.6). Used by .gitea/workflows/ci.yml as the job
|
|
# container; rebuilt+pushed by .gitea/workflows/docker.yml.
|
|
#
|
|
# docker build -f ci/rust-ci.Dockerfile -t punktfunk-rust-ci ci
|
|
#
|
|
# The workspace links real system libs at build time (CLAUDE.md "Pinned crate facts"):
|
|
# FFmpeg, PipeWire, Opus, GL/EGL/GBM — and libcuda, which has no real driver here; the
|
|
# zerocopy path only needs the symbols at link time, so a driver userspace package plus a
|
|
# libcuda.so -> libcuda.so.1 symlink stands in for it (CI never executes the CUDA path).
|
|
FROM ubuntu:26.04
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
# toolchain + bindgen; nodejs runs the JS actions (checkout/cache); unzip is for the bun installer
|
|
build-essential clang libclang-dev pkg-config cmake git curl ca-certificates nodejs unzip \
|
|
# ffmpeg-next 9, built against whatever libav* 26.04 ships (FFmpeg 8 / libavcodec 62 today).
|
|
# The crate major is a CEILING — ffmpeg-sys-next 9 spans libavcodec 56..63 — so this image does
|
|
# not need to move in lockstep with Arch's FFmpeg 9; it just links what the distro has.
|
|
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavfilter-dev \
|
|
libavdevice-dev \
|
|
# capture / audio / display stacks (+xkbcommon for the wlr input backend)
|
|
libpipewire-0.3-dev libopus-dev libwayland-dev libxkbcommon-dev \
|
|
# zerocopy link deps (GL via libglvnd, EGL, GBM)
|
|
libgl-dev libegl-dev libgbm-dev \
|
|
# punktfunk-client-linux (GTK4/libadwaita shell, SDL3 gamepads)
|
|
libgtk-4-dev libadwaita-1-dev libsdl3-dev \
|
|
# No libvulkan-dev: nothing in the workspace compiles or links against Vulkan (pyrowave-sys
|
|
# bindgens its own vendored headers, and both host and client reach Vulkan through ash, which
|
|
# dlopens the loader), so neither the build nor deb.yml's dpkg-shlibdeps ever asks for it.
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# bun — builds the punktfunk-web console in deb.yml (which runs the web build in THIS image).
|
|
# ci.yml's web/docs jobs use the oven/bun image instead, so this is only for the deb job.
|
|
RUN curl -fsSL https://bun.sh/install | bash \
|
|
&& install -m0755 /root/.bun/bin/bun /usr/local/bin/bun \
|
|
&& bun --version
|
|
|
|
# libcuda link stub: the NVIDIA userspace library (no kernel module needed) provides
|
|
# every cuXxx symbol. On 26.04 the package already ships the libcuda.so dev symlink;
|
|
# -sf keeps this idempotent if a future package drops it again.
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends libnvidia-compute-580-server \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& ln -sf libcuda.so.1 /usr/lib/x86_64-linux-gnu/libcuda.so \
|
|
&& test -e /usr/lib/x86_64-linux-gnu/libcuda.so.1
|
|
|
|
# Toolchain shared across CI users (jobs may run as different uids).
|
|
ENV RUSTUP_HOME=/usr/local/rustup \
|
|
CARGO_HOME=/usr/local/cargo \
|
|
PATH=/usr/local/cargo/bin:$PATH
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
|
| sh -s -- -y --no-modify-path --profile minimal \
|
|
--component rustfmt,clippy \
|
|
&& chmod -R a+w "$RUSTUP_HOME" "$CARGO_HOME" \
|
|
&& rustc --version && cargo clippy --version && cargo fmt --version
|
|
|
|
# Shared compile cache: jobs set RUSTC_WRAPPER=sccache (backend = RustFS S3 on the LAN,
|
|
# see .gitea/workflows — the env lives there so dev use of this image stays uncached).
|
|
# musl build: one static binary serves the Ubuntu and Fedora images alike.
|
|
ARG SCCACHE_VERSION=0.10.0
|
|
RUN curl -fsSL "https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
|
|
| tar -xz --wildcards --strip-components=1 -C /usr/local/bin '*/sccache' \
|
|
&& sccache --version
|