Skip to content

[ci] Build FFmpeg natively per architecture, then merge - #3273

Merged
VietND96 merged 1 commit into
trunkfrom
ci/ffmpeg-native-arch-build
Oct 19, 2026
Merged

VietND96 merged 1 commit into
trunkfrom
ci/ffmpeg-native-arch-build

Conversation

@VietND96

Copy link
Copy Markdown
Member

Summary

  • build-ffmpeg.yml built both amd64 and arm64 in a single docker buildx build --platform linux/amd64,linux/arm64 call on one ubuntu-24.04 runner, QEMU-emulating arm64. That's the same pattern build-images.yml moved away from (see its build job comment: "QEMU-emulating arm64 ... ran past an hour"), and on the Ubuntu 26.04 base it also triggered GNU tar's "Cannot open: Function not implemented" failure under emulation (fixed separately in [build] Update base image to Ubuntu 26.04 (resolute) #3272 by switching to bsdtar, but the underlying emulation cost and risk remained).
  • Split the workflow the same way build-images.yml does:
    • prepare: computes BUILD_DATE and the lowercased GHCR namespace once, so every job agrees.
    • build (matrix: amd64 on ubuntu-24.04, arm64 on ubuntu-24.04-arm): builds natively, single platform, no QEMU; pushes its own arch-tagged image to GHCR.
    • merge: combines the two arch tags into one real multi-arch manifest on GHCR via docker buildx imagetools create.
    • deploy (only on workflow_dispatch with release: true): copies that already-merged GHCR manifest straight to Docker Hub under the public tags (latest, $(FFMPEG_VERSION), $(FFMPEG_VERSION)-$(BUILD_DATE)), instead of rebuilding or re-pushing any layers.
  • New/changed Makefile targets: push_ffmpeg_arch, merge_ffmpeg_arch, rewritten release_ffmpeg_latest/release_ffmpeg_ghcr_latest to source from the merged GHCR manifest; dropped the now-unused tag_ffmpeg_latest. Added a small ARCH variable (derived the same way CURRENT_PLATFORM is).
  • Also bumped the Makefile's FFMPEG_VERSION default from 8.1 to 9.0, to match .ffmpeg/Dockerfile's own ARG FFMPEG_VERSION="9.0" default merged in [build] Update base image to Ubuntu 26.04 (resolute) #3272. make ffmpeg always passes --build-arg FFMPEG_VERSION=$(FFMPEG_VERSION) explicitly, which was silently overriding the Dockerfile's default back to 8.1 in every CI run — so the FFmpeg 9.0 bump from [build] Update base image to Ubuntu 26.04 (resolute) #3272 was never actually exercised in CI until this fix.

Test plan

  • Validated the new workflow YAML (no duplicate keys, parses correctly).
  • Validated the Makefile (mbake validate) and dry-ran every new/changed target (push_ffmpeg_arch, merge_ffmpeg_arch, release_ffmpeg_latest, release_ffmpeg_ghcr_latest) to confirm they expand to the expected docker commands with FFMPEG_VERSION=9.0.
  • Built the .ffmpeg/Dockerfile builder stage natively on linux/arm64 locally with FFMPEG_VERSION=9.0 through to the Go/bsdtar step successfully.
  • Full CI run on ubuntu-24.04/ubuntu-24.04-arm native runners, since this sandbox's network restrictions blocked a complete local from-source FFmpeg/x264/rclone compile.

🤖 Generated with Claude Code

build-ffmpeg.yml built both amd64 and arm64 in a single buildx call on
one amd64 runner, QEMU-emulating arm64 - the same pattern build-images.yml
moved away from after multi-hour runs, and on this base the emulation
also triggered GNU tar's "Function not implemented" failure.

Split it the same way: a native per-arch build job (ubuntu-24.04 /
ubuntu-24.04-arm) pushes its single-arch result to GHCR, a merge job
combines the two into one manifest, and release (workflow_dispatch
with release=true) copies that manifest to Docker Hub instead of
rebuilding or re-pushing layers.

Also bump the Makefile's FFMPEG_VERSION default to 9.0 to match
.ffmpeg/Dockerfile's own ARG default - `make ffmpeg` always passes
--build-arg FFMPEG_VERSION=$(FFMPEG_VERSION), which was silently
overriding the Dockerfile's default back to 8.1 in every CI run so far.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@VietND96
VietND96 merged commit 7f2fa83 into trunk Oct 19, 2026
40 of 42 checks passed
@VietND96
VietND96 deleted the ci/ffmpeg-native-arch-build branch October 19, 2026 06:40
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