Skip to content

fate

fate #2316

Workflow file for this run

name: fate
on:
schedule:
- cron: '19 * * * *'
workflow_dispatch:
jobs:
check:
name: Check for new commits
runs-on: ubuntu-latest
outputs:
has_changes: ${{ github.event_name == 'workflow_dispatch' || steps.check.outputs.has_changes }}
steps:
- name: Get latest FFmpeg commit
id: latest
run: |
COMMIT=$(git ls-remote https://github.com/FFmpeg/FFmpeg HEAD | cut -f1)
echo "commit=$COMMIT" >> $GITHUB_OUTPUT
- name: Restore last tested commit
id: cache
uses: actions/cache/restore@v5
with:
path: /tmp/ffmpeg-last-commit
key: ffmpeg-last-tested-${{ steps.latest.outputs.commit }}
- name: Check for changes
id: check
run: |
PREV=$(cat /tmp/ffmpeg-last-commit || echo "")
if [ "${{ steps.cache.outputs.cache-hit }}" = "true" ]; then
echo "No new commits (latest: ${{ steps.latest.outputs.commit }})"
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "New commits: $PREV..${{ steps.latest.outputs.commit }}"
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "${{ steps.latest.outputs.commit }}" > /tmp/ffmpeg-last-commit
fi
- name: Save last tested commit
if: steps.check.outputs.has_changes == 'true'
uses: actions/cache/save@v5
with:
path: /tmp/ffmpeg-last-commit
key: ffmpeg-last-tested-${{ steps.latest.outputs.commit }}
win32:
needs: check
if: needs.check.outputs.has_changes == 'true'
name: ${{ matrix.arch }}-${{ matrix.compiler }}${{ matrix.asan && '-asan' || '' }}${{ matrix.shared && '-shared' || '' }}${{ matrix.debug && '-debug' || '' }}${{ matrix.assert && '-assert' || '' }}${{ matrix.cet && '-cet' || '' }}${{ matrix.asm && '-asm' || '' }}
runs-on: ${{ matrix.os }}
concurrency:
group: win32-${{ matrix.arch }}-${{ matrix.compiler }}-${{ matrix.asan }}-${{ matrix.shared }}-${{ matrix.debug }}-${{ matrix.assert }}-${{ matrix.cet }}-${{ matrix.asm }}
strategy:
fail-fast: false
matrix:
os: [windows-2025-vs2026, windows-11-arm]
arch: [amd64, arm64, x86_32]
compiler: [clang-msvc, clang-cl-msvc, msvc, icx-win]
asan: [false, true]
asm: [false, true]
shared: [false, true]
debug: [false, true]
assert: [false, true]
cet: [false, true]
include:
- os: windows-2025-vs2026
arch: x86_32
target_arch: x86
host_arch: amd64
compiler: msvc
asan: false
asm: false
shared: false
debug: true
assert: false
cet: false
- os: windows-2025-vs2026
arch: x86_32
target_arch: x86
host_arch: amd64
compiler: msvc
asan: false
asm: true
shared: false
debug: true
assert: false
cet: false
- os: windows-2025-vs2026
arch: x86_32
target_arch: x86
host_arch: amd64
compiler: msvc
asan: true
asm: false
shared: false
debug: false
assert: false
cet: false
exclude:
- arch: amd64
os: windows-11-arm
- arch: arm64
os: windows-2025-vs2026
# Enable once aarch64-pc-windows-msvc/clang_rt.asan.lib is available on the runner
- arch: arm64
asan: true
- shared: true
asan: true
- debug: true
shared: true
- debug: true
asan: true
- debug: true
compiler: clang-msvc
- debug: true
compiler: clang-cl-msvc
- assert: true
compiler: clang-cl-msvc
- assert: true
compiler: clang-msvc
- assert: true
asan: true
- assert: true
shared: true
- assert: true
debug: true
- compiler: icx-win
asan: true
- compiler: icx-win
shared: true
- compiler: icx-win
debug: true
- compiler: icx-win
assert: true
- compiler: icx-win
arch: arm64
- cet: true
compiler: clang-msvc
- cet: true
compiler: clang-cl-msvc
- cet: true
asan: true
- cet: true
shared: true
- cet: true
debug: true
- cet: true
assert: true
# Doesn't work currently
- compiler: icx-win
# Only SHSTK is supported, enable if we can test IBT
- cet: true
- arch: x86_32
- asm: true
asan: true
- asm: true
shared: true
- asm: true
assert: true
- asm: true
cet: true
- asm: true
compiler: clang-msvc
- asm: true
compiler: clang-cl-msvc
- asm: true
debug: false
env:
CONF: ${{ matrix.arch }}-${{ matrix.compiler }}${{ matrix.asan && '-asan' || '' }}${{ matrix.shared && '-shared' || '' }}${{ matrix.debug && '-debug' || '' }}${{ matrix.assert && '-assert' || '' }}${{ matrix.cet && '-cet' || '' }}${{ matrix.asm && '-asm' || '' }}
VS: "C:\\Program Files\\Microsoft Visual Studio\\${{ matrix.os == 'windows-2025-vs2026' && '18' || '2022' }}\\Enterprise"
MSYSTEM: MSYS
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
steps:
- name: Print CPU Info
shell: pwsh
working-directory: ${{ runner.temp }}
run: |
curl -OL https://download.sysinternals.com/files/Coreinfo.zip
Expand-Archive -Path Coreinfo.zip -DestinationPath coreinfo
$exe = if ("${{ matrix.arch }}" -eq "arm64") { "Coreinfo64a.exe" } else { "Coreinfo64.exe" }
& .\coreinfo\$exe -accepteula
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
path-type: inherit
update: true
install: >-
gzip
make
nasm
openssh
rsync
tar
- name: Install Intel oneAPI DPC++/C++ Compiler
if: ${{ matrix.compiler == 'icx-win' }}
shell: pwsh
working-directory: ${{ runner.temp }}
run: |
curl -OL https://registrationcenter-download.intel.com/akdlm/IRC_NAS/47a201d7-d4cd-4079-a2d8-0e66b860aaaa/intel-dpcpp-cpp-compiler-2025.2.0.536_offline.exe
& .\intel-dpcpp-cpp-compiler-2025.2.0.536_offline.exe --silent --eula accept
- name: Set VULKAN_ROOT
shell: pwsh
run: |
echo "VULKAN_ROOT=${{ runner.temp }}\VulkanSDK" >> $env:GITHUB_ENV
- name: Install Vulkan SDK
if: ${{ !matrix.cet && matrix.arch != 'x86_32' }}
shell: pwsh
working-directory: ${{ runner.temp }}
run: |
$arch = if ("${{ matrix.arch }}" -eq "arm64") { "warm" } else { "windows" }
curl https://sdk.lunarg.com/sdk/download/1.4.328.1/$arch/vulkan_sdk.exe -o vulkan-sdk.exe
& .\vulkan-sdk.exe in --al -c -t $env:VULKAN_ROOT com.lunarg.vulkan com.lunarg.vulkan.core com.lunarg.vulkan.debug com.lunarg.vulkan.sdl2
- name: Disable autocrlf
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v6
- name: Checkout FFmpeg
uses: actions/checkout@v6
with:
fetch-depth: 0 # For fate version string
repository: ffmpeg/ffmpeg
path: .github/fate/src
- name: Checkout gas-preprocessor
if: ${{ matrix.compiler == 'msvc' || matrix.compiler == 'clang-cl-msvc' }}
uses: actions/checkout@v6
with:
repository: ffmpeg/gas-preprocessor
path: gas-preprocessor
- name: Checkout zlib
uses: actions/checkout@v6
with:
repository: madler/zlib
ref: v1.3.2
path: zlib
- name: Build zlib
shell: pwsh
working-directory: zlib
run: |
# Workaround for https://github.com/madler/zlib/issues/787#issuecomment-3094568653
(Get-Content "zconf.h") -replace '#if HAVE_UNISTD_H-0', '#if defined(HAVE_UNISTD_H) && HAVE_UNISTD_H' | Set-Content "zconf.h"
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.target_arch || matrix.arch }} -host_arch=${{ matrix.host_arch || matrix.arch }}"
$crt = if (${{ matrix.debug }}) { "MultiThreadedDebugDLL" } else { "MultiThreadedDLL" }
$cflags = ""
$ldflags = ""
if ("${{ matrix.cet }}" -eq "true") {
if ("${{ matrix.arch }}" -eq "amd64") {
$cflags = "-guard:ehcont"
$ldflags = "-guard:ehcont -CETCOMPAT"
} elseif ("${{ matrix.arch }}" -eq "arm64") {
$cflags = "-guard:ehcont -guard:signret"
$ldflags = "-guard:ehcont -guard:delayloadsignret"
}
}
cmake -GNinja -Bbuild `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_INSTALL_PREFIX=${{ runner.temp }}\install `
-DCMAKE_MSVC_RUNTIME_LIBRARY="$crt" `
-DCMAKE_C_FLAGS="$cflags" `
-DCMAKE_EXE_LINKER_FLAGS="$ldflags" `
-DCMAKE_SHARED_LINKER_FLAGS="$ldflags"
ninja -C build install
# FFmpeg replaces -lz with zlib.lib for MSVC targets
cp -force ${{ runner.temp }}\install\lib\zs.lib ${{ runner.temp }}\install\lib\zlib.lib
cp -force ${{ runner.temp }}\install\lib\zs.lib ${{ runner.temp }}\install\lib\z.lib
- name: Restore Cached FATE Samples
id: cache
uses: actions/cache/restore@v5
with:
path: .github/fate/samples
key: fate-samples-dummy
restore-keys: fate-samples-
- name: Sync FATE Samples
id: samples
shell: msys2 {0}
run: |
mkdir -p .github/fate/samples
rsync -vrltLW --timeout=60 rsync://fate-suite.ffmpeg.org/fate-suite/ .github/fate/samples/
echo "hash=$(find .github/fate/samples -type f -printf "%P %s %T@\n" | sort | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
- name: Cache FATE Samples
if: ${{ format('fate-samples-{0}', steps.samples.outputs.hash) != steps.cache.outputs.cache-matched-key }}
uses: actions/cache/save@v5
with:
path: .github/fate/samples
key: fate-samples-${{ steps.samples.outputs.hash }}
- name: Set up SSH
shell: msys2 {0}
env:
HOST: fate.ffmpeg.org
FINGERPRINT: "76:9f:68:32:04:1e:d5:d4:ec:47:3f:dc:fc:18:17:86"
run: |
mkdir -p "$HOME/.ssh"
chmod 700 "$HOME/.ssh"
ssh-keyscan -t ecdsa "$HOST" > "$HOME/.ssh/known_hosts"
SERVER_FINGERPRINT="$(ssh-keygen -E md5 -lf "$HOME/.ssh/known_hosts" | grep "$HOST" | awk '{gsub(/^MD5:/, "", $2); print $2}')"
if [ "$SERVER_FINGERPRINT" != "$FINGERPRINT" ]; then
echo "Fingerprint $SERVER_FINGERPRINT does not match expected $FINGERPRINT"
exit 1
fi
echo "${{ secrets.FATE_SSH_KEY }}" > "$HOME/.ssh/id_ed25519"
chmod 600 "$HOME/.ssh/id_ed25519"
- name: Build
id: build
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
# GHA images have polluted PATH, clean it up a bit
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' -and `
$_ -ne 'C:\Program Files\CMake\bin' -and `
$_ -ne 'C:\Strawberry\c\bin' }) -join ';'
$env:PATH += ";$PWD\gas-preprocessor;$env:VULKAN_ROOT\Bin"
$env:LIB += ";$env:VULKAN_ROOT\Lib"
$env:INCLUDE += ";$env:VULKAN_ROOT\Include"
if ("${{ matrix.compiler }}" -eq "icx-win") {
$env:PATH += ";C:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin"
}
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.target_arch || matrix.arch }} -host_arch=${{ matrix.host_arch || matrix.arch }}"
cd .github/fate/src
msys2 -ec 'PKG_CONFIG_PATH=`cygpath -a ''${{ runner.temp }}\install\lib\pkgconfig''` PATH="$PATH:$PWD/../install/bin" ./tests/fate.sh ../${{ env.CONF }}'
- name: Print version
if: always()
run: |
cat .github/fate/version-${{ env.CONF }}
- name: Print configure.log
if: always()
run: |
cat .github/fate/configure.log
- name: Print config.log
if: always()
run: |
cat .github/fate/build/ffbuild/config.log
- name: Print compile.log
if: always()
run: |
cat .github/fate/compile.log
- name: Print test.log
if: always()
run: |
cat .github/fate/test.log
- name: dumpbin
shell: pwsh
run: |
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.target_arch || matrix.arch }} -host_arch=${{ matrix.host_arch || matrix.arch }}"
dumpbin /headers /dependents /relocations .github/fate/install/bin/ffmpeg.exe
msys2:
needs: check
if: needs.check.outputs.has_changes == 'true'
name: msys2-${{ matrix.sys }}
runs-on: ${{ matrix.os }}
concurrency:
group: msys2-${{ matrix.sys }}
strategy:
fail-fast: false
matrix:
include:
- sys: clang64
os: windows-2025-vs2026
arch: amd64
- sys: "mingw64"
os: windows-2025-vs2026
arch: amd64
- sys: "mingw32"
os: windows-2025-vs2026
arch: amd64
- sys: "ucrt64"
os: windows-2025-vs2026
arch: amd64
- sys: "clangarm64"
os: "windows-11-arm"
arch: arm64
defaults:
run:
shell: msys2 {0}
env:
CONF: msys2-${{ matrix.sys }}
VS: "C:\\Program Files\\Microsoft Visual Studio\\${{ matrix.os == 'windows-2025-vs2026' && '18' || '2022' }}\\Enterprise"
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
steps:
- name: Disable autocrlf
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v6
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: git rsync make diffutils
pacboy: >-
amf-headers
aom
bzip2
ca-certificates
cairo
cc
chromaprint
dav1d
dlfcn
ffnvcodec-headers
fontconfig
freetype
frei0r-plugins
fribidi
gmp
gnutls
gsm
harfbuzz
kvazaar
ladspa-sdk
lame
lcms2
libass
libbluray
libbs2b
libcaca
libcdio-paranoia
libdvdnav
libexif
libgcrypt
libgme
libiconv
libilbc
libjpeg-turbo
libjxl
libmodplug
libmysofa
libopenmpt
libsoxr
libssh
libtheora
libva
libvorbis
libvpl
libvpx
libwebp
libx264
libxml2
nasm
openal
opencore-amr
openh264
openjpeg2
opus
pkgconf
rtmpdump
SDL2
speex
srt
texinfo
twolame
vapoursynth
vid.stab
vo-amrwbenc
vulkan
vulkan-headers
x265
xvidcore
zimg
zlib
zvbi
- name: Print CPU Info
run: |
cat /proc/cpuinfo
- name: Install dependencies
if: ${{ matrix.sys != 'mingw32' }}
run: |
pacboy --noconfirm -S aribb24 directx-headers fdk-aac libaribcaption liblc3 liblc3 libplacebo librist librsvg opencl-headers opencv rav1e rubberband shaderc shine snappy spirv-headers svt-av1 tesseract-ocr vmaf whisper.cpp xevd xeve
- name: Install dependencies
if: ${{ matrix.sys != 'mingw32' && matrix.sys != 'clangarm64' }}
run: |
pacboy --noconfirm -S jack2
- name: Checkout FFmpeg
uses: actions/checkout@v6
with:
fetch-depth: 0 # For fate version string
repository: ffmpeg/ffmpeg
path: .github/fate/src
- name: Restore Cached FATE Samples
id: cache
uses: actions/cache/restore@v5
with:
path: .github/fate/samples
key: fate-samples-dummy
restore-keys: fate-samples-
- name: Sync FATE Samples
id: samples
run: |
mkdir -p .github/fate/samples
rsync -vrltLW --timeout=60 rsync://fate-suite.ffmpeg.org/fate-suite/ .github/fate/samples/
echo "hash=$(find .github/fate/samples -type f -printf "%P %s %T@\n" | sort | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
- name: Cache FATE Samples
if: ${{ format('fate-samples-{0}', steps.samples.outputs.hash) != steps.cache.outputs.cache-matched-key }}
uses: actions/cache/save@v5
with:
path: .github/fate/samples
key: fate-samples-${{ steps.samples.outputs.hash }}
- name: Set up SSH
env:
HOST: fate.ffmpeg.org
FINGERPRINT: "76:9f:68:32:04:1e:d5:d4:ec:47:3f:dc:fc:18:17:86"
run: |
mkdir -p "$HOME/.ssh"
chmod 700 "$HOME/.ssh"
ssh-keyscan -t ecdsa "$HOST" > "$HOME/.ssh/known_hosts"
SERVER_FINGERPRINT="$(ssh-keygen -E md5 -lf "$HOME/.ssh/known_hosts" | grep "$HOST" | awk '{gsub(/^MD5:/, "", $2); print $2}')"
if [ "$SERVER_FINGERPRINT" != "$FINGERPRINT" ]; then
echo "Fingerprint $SERVER_FINGERPRINT does not match expected $FINGERPRINT"
exit 1
fi
echo "${{ secrets.FATE_SSH_KEY }}" > "$HOME/.ssh/id_ed25519"
chmod 600 "$HOME/.ssh/id_ed25519"
- name: Build
id: build
run: |
export FREI0R_PATH=$MSYSTEM_PREFIX/lib/frei0r-1
cd .github/fate/src
./tests/fate.sh ../${{ env.CONF }}
- name: Print version
if: always()
run: |
cat .github/fate/version-${{ env.CONF }}
- name: Print configure.log
if: always()
run: |
cat .github/fate/configure.log
- name: Print config.log
if: always()
run: |
cat .github/fate/build/ffbuild/config.log
- name: Print compile.log
if: always()
run: |
cat .github/fate/compile.log
- name: Print test.log
if: always()
run: |
cat .github/fate/test.log
- name: dumpbin
shell: pwsh
run: |
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.target_arch || matrix.arch }} -host_arch=${{ matrix.target_arch || matrix.arch }}"
dumpbin /headers /dependents /relocations .github/fate/install/bin/ffmpeg.exe
fedora:
needs: check
if: needs.check.outputs.has_changes == 'true'
name: ${{ matrix.arch }}-${{ matrix.compiler }}${{ matrix.asan && '-asan' || '' }}${{ matrix.msan && '-msan' || '' }}${{ matrix.shared && '-shared' || '' }}${{ matrix.cet && '-cet' || '' }}${{ matrix.sde && '-sde' || '' }}${{ matrix.asm && '-asm' || '' }}${{ matrix.var_init && format('-{0}', matrix.var_init) || '' }}${{ matrix.short-enums && '-short-enums' || '' }}${{ matrix.extra-warnings && '-extra-warnings' || '' }}
runs-on: ${{ matrix.os }}
concurrency:
group: fedora-${{ matrix.arch }}-${{ matrix.compiler }}-${{ matrix.asan }}-${{ matrix.msan }}-${{ matrix.shared }}-${{ matrix.cet }}-${{ matrix.sde }}-${{ matrix.asm }}-${{ matrix.var_init }}-${{ matrix.short-enums }}-${{ matrix.extra-warnings }}
strategy:
fail-fast: false
matrix:
include:
# gcc
- { os: ubuntu-24.04, arch: amd64, compiler: gcc-snapshot, compiler_bin: gcc, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: '', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04, arch: amd64, compiler: gcc-snapshot, compiler_bin: gcc, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: '', short-enums: true, extra-warnings: false }
- { os: ubuntu-24.04-arm, arch: arm64, compiler: gcc-snapshot, compiler_bin: gcc, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: '', short-enums: false, extra-warnings: false }
# clang
- { os: ubuntu-24.04, arch: amd64, compiler: clang, compiler_bin: clang, asan: true, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: '', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04, arch: amd64, compiler: clang, compiler_bin: clang, asan: true, msan: false, shared: false, cet: false, sde: false, asm: true, var_init: '', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04, arch: amd64, compiler: clang, compiler_bin: clang, asan: true, msan: false, shared: false, cet: false, sde: false, asm: true, var_init: '', short-enums: true, extra-warnings: false }
- { os: ubuntu-24.04, arch: amd64, compiler: clang, compiler_bin: clang, asan: false, msan: true, shared: false, cet: false, sde: false, asm: false, var_init: '', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04, arch: amd64, compiler: clang, compiler_bin: clang, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: 'uninitialized', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04, arch: amd64, compiler: clang, compiler_bin: clang, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: 'zero', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04, arch: amd64, compiler: clang, compiler_bin: clang, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: 'pattern', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04, arch: amd64, compiler: clang, compiler_bin: clang, asan: false, msan: false, shared: false, cet: false, sde: true, asm: true, var_init: '', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04, arch: amd64, compiler: clang, compiler_bin: clang, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: '', short-enums: false, extra-warnings: true }
- { os: ubuntu-24.04-arm, arch: arm64, compiler: clang, compiler_bin: clang, asan: true, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: '', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04-arm, arch: arm64, compiler: clang, compiler_bin: clang, asan: true, msan: false, shared: false, cet: false, sde: false, asm: true, var_init: '', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04-arm, arch: arm64, compiler: clang, compiler_bin: clang, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: 'uninitialized', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04-arm, arch: arm64, compiler: clang, compiler_bin: clang, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: 'zero', short-enums: false, extra-warnings: false }
- { os: ubuntu-24.04-arm, arch: arm64, compiler: clang, compiler_bin: clang, asan: false, msan: false, shared: false, cet: false, sde: false, asm: false, var_init: 'pattern', short-enums: false, extra-warnings: false }
container:
image: fedora:rawhide
options: --privileged
env:
CONF: ${{ matrix.arch }}-${{ matrix.compiler }}${{ matrix.asan && '-asan' || '' }}${{ matrix.msan && '-msan' || '' }}${{ matrix.shared && '-shared' || '' }}${{ matrix.cet && '-cet' || '' }}${{ matrix.sde && '-sde' || '' }}${{ matrix.asm && '-asm' || '' }}${{ matrix.var_init && format('-{0}', matrix.var_init) || '' }}${{ matrix.short-enums && '-short-enums' || '' }}${{ matrix.extra-warnings && '-extra-warnings' || '' }}
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
steps:
- name: Print CPU Info
run: |
cat /proc/cpuinfo
- name: Disable weak dependencies
run: |
echo "install_weak_deps=False" >> /etc/dnf/dnf.conf
- name: Install dependencies
run: |
dnf -y install --best \
AMF-devel binutils cmake diffutils git glibc-devel glibc-gconv-extra glibc-static glslang-devel \
libdrm-devel libshaderc-devel libxml2 make mold nasm ninja-build \
openssh pkgconf rsync sdl2-compat-devel spirv-headers-devel spirv-tools texinfo \
vulkan-headers vulkan-loader-devel
- name: Install gcc
if: ${{ matrix.compiler == 'gcc-snapshot' }}
run: |
dnf -y copr enable jwakely/gcc-latest
# DNF hardcodes skip_if_unavailable=True for copr repos, we don't want that.
# https://github.com/rpm-software-management/dnf5/blob/dfef396c29d585bf8696a0c9f8fc9b3f7e2f68c2/dnf5-plugins/copr_plugin/copr_repo.hpp#L99
sed -i 's/skip_if_unavailable=True/skip_if_unavailable=False/g' /etc/yum.repos.d/_copr:*.repo
dnf -y install --best gcc-latest
echo "/opt/gcc-latest/bin" >> $GITHUB_PATH
echo "LD_RUN_PATH=/opt/gcc-latest/lib" >> $GITHUB_ENV
- name: Install clang
if: ${{ matrix.compiler == 'clang' }}
run: |
dnf -y copr enable @fedora-llvm-team/llvm-snapshots
# DNF hardcodes skip_if_unavailable=True for copr repos, we don't want that.
# https://github.com/rpm-software-management/dnf5/blob/dfef396c29d585bf8696a0c9f8fc9b3f7e2f68c2/dnf5-plugins/copr_plugin/copr_repo.hpp#L99
sed -i 's/skip_if_unavailable=True/skip_if_unavailable=False/g' /etc/yum.repos.d/_copr:*.repo
dnf -y install --best clang lld llvm compiler-rt
- name: Upgrade packages
run: |
dnf -y upgrade --best --refresh
- uses: actions/checkout@v6
- name: Checkout FFmpeg
uses: actions/checkout@v6
with:
fetch-depth: 0 # For fate version string
repository: ffmpeg/ffmpeg
path: .github/fate/src
- name: Checkout zlib
uses: actions/checkout@v6
with:
repository: madler/zlib
ref: v1.3.2
path: zlib
- name: Build zlib
working-directory: zlib
run: |
# Workaround for https://github.com/madler/zlib/issues/787#issuecomment-3094568653
sed -i 's/#if HAVE_UNISTD_H-0/#if defined(HAVE_UNISTD_H) \&\& HAVE_UNISTD_H/' zconf.h
CMAKE_ARGS=(
-GNinja -Bbuild
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_C_COMPILER=${{ matrix.compiler_bin }}
-DZLIB_BUILD_TESTING=OFF
-DZLIB_BUILD_SHARED=OFF
)
if [ "${{ matrix.msan }}" = "true" ]; then
CMAKE_ARGS+=(-DCMAKE_C_FLAGS=-fsanitize=memory\ -fsanitize-memory-track-origins\ -fno-omit-frame-pointer)
fi
cmake "${CMAKE_ARGS[@]}"
ninja -C build install
- name: Download Intel SDE
if: ${{ matrix.sde }}
working-directory: ${{ runner.temp }}
run: |
curl -O https://downloadmirror.intel.com/859732/sde-external-9.58.0-2025-06-16-lin.tar.xz
tar xvf sde-external-9.58.0-2025-06-16-lin.tar.xz
echo "SDE_PATH=${{ runner.temp }}/sde-external-9.58.0-2025-06-16-lin" >> $GITHUB_ENV
- name: Restore Cached FATE Samples
id: cache
uses: actions/cache/restore@v5
with:
path: .github/fate/samples
key: fate-samples-dummy
restore-keys: fate-samples-
- name: Sync FATE Samples
id: samples
run: |
mkdir -p .github/fate/samples
rsync -vrltLW --timeout=60 rsync://fate-suite.ffmpeg.org/fate-suite/ .github/fate/samples/
echo "hash=$(find .github/fate/samples -type f -printf "%P %s %T@\n" | sort | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
- name: Cache FATE Samples
if: ${{ format('fate-samples-{0}', steps.samples.outputs.hash) != steps.cache.outputs.cache-matched-key }}
uses: actions/cache/save@v5
with:
path: .github/fate/samples
key: fate-samples-${{ steps.samples.outputs.hash }}
- name: Set up SSH
env:
HOST: fate.ffmpeg.org
FINGERPRINT: "76:9f:68:32:04:1e:d5:d4:ec:47:3f:dc:fc:18:17:86"
run: |
export HOME="/root"
mkdir -p "$HOME/.ssh"
chmod 700 "$HOME/.ssh"
ssh-keyscan -t ecdsa "$HOST" > "$HOME/.ssh/known_hosts"
chmod 644 "$HOME/.ssh/known_hosts"
SERVER_FINGERPRINT="$(ssh-keygen -E md5 -lf "$HOME/.ssh/known_hosts" | grep "$HOST" | awk '{gsub(/^MD5:/, "", $2); print $2}')"
if [ "$SERVER_FINGERPRINT" != "$FINGERPRINT" ]; then
echo "Fingerprint $SERVER_FINGERPRINT does not match expected $FINGERPRINT"
exit 1
fi
echo "${{ secrets.FATE_SSH_KEY }}" > "$HOME/.ssh/id_ed25519"
chmod 600 "$HOME/.ssh/id_ed25519"
- name: Build
id: build
run: |
${{ matrix.compiler_bin }} --version
if [ "${{ matrix.sde }}" = "true" ]; then
export PATH="$SDE_PATH:$PATH"
echo 0 | tee /proc/sys/kernel/yama/ptrace_scope
fi
cd .github/fate/src
export LD_LIBRARY_PATH=${{ runner.temp }}/install/lib
export PKG_CONFIG_PATH=${{ runner.temp }}/install/lib/pkgconfig
./tests/fate.sh ../${{ env.CONF }}
- name: Print version
if: always()
run: |
cat .github/fate/version-${{ env.CONF }}
- name: Print configure.log
if: always()
run: |
cat .github/fate/configure.log
- name: Print config.log
if: always()
run: |
cat .github/fate/build/ffbuild/config.log
- name: Print compile.log
if: always()
run: |
cat .github/fate/compile.log
- name: Print test.log
if: always()
run: |
cat .github/fate/test.log
- name: readelf
run: |
readelf -S .github/fate/install/bin/ffmpeg
readelf -n .github/fate/install/bin/ffmpeg
readelf -r .github/fate/install/bin/ffmpeg
chimera:
needs: check
if: needs.check.outputs.has_changes == 'true'
name: ${{ matrix.arch }}-${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
concurrency:
group: chimera-${{ matrix.arch }}-${{ matrix.compiler }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
arch: [amd64, arm64]
compiler: [clang]
exclude:
- arch: amd64
os: ubuntu-24.04-arm
- arch: arm64
os: ubuntu-24.04
# GHA doesn't support Musl on ARM64 runners with JS actions
- arch: arm64
container:
image: chimeralinux/chimera:latest
env:
CONF: ${{ matrix.arch }}-${{ matrix.compiler }}
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
steps:
- name: Print CPU Info
run: |
cat /proc/cpuinfo
- name: Install dependencies
run: |
apk add cmd:git cmd:rsync cmd:make cmd:pkgconf cmd:ssh cmd:nasm cmd:clang cmd:diff cmd:readelf cmd:tar
# Wa are Alpine now! Apparently, only Alpine is allowed to use musl...
# Workaround for https://github.com/actions/runner/issues/3852
# Needed for actions/checkout.
sed '/^ID="/s/chimera/alpine/' /etc/os-release > /tmp/os-release
mv /tmp/os-release /etc/os-release
- uses: actions/checkout@v6
- name: Checkout FFmpeg
uses: actions/checkout@v6
with:
fetch-depth: 0 # For fate version string
repository: ffmpeg/ffmpeg
path: .github/fate/src
- name: Checkout zlib
uses: actions/checkout@v6
with:
repository: madler/zlib
ref: v1.3.2
path: zlib
- name: Build zlib
working-directory: zlib
run: |
# Workaround for https://github.com/madler/zlib/issues/787#issuecomment-3094568653
sed -i '' 's/#if HAVE_UNISTD_H-0/#if defined(HAVE_UNISTD_H) \&\& HAVE_UNISTD_H/' zconf.h
mkdir build
cd build
../configure --prefix=${{ runner.temp }}/install
make -j`nproc` install
- name: Restore Cached FATE Samples
id: cache
uses: actions/cache/restore@v5
with:
path: .github/fate/samples
key: fate-samples-dummy
restore-keys: fate-samples-
- name: Sync FATE Samples
id: samples
run: |
mkdir -p .github/fate/samples
rsync -vrltLW --timeout=60 rsync://fate-suite.ffmpeg.org/fate-suite/ .github/fate/samples/
echo "hash=$(find .github/fate/samples -type f -printf "%P %s %T@\n" | sort | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
- name: Cache FATE Samples
if: ${{ format('fate-samples-{0}', steps.samples.outputs.hash) != steps.cache.outputs.cache-matched-key }}
uses: actions/cache/save@v5
with:
path: .github/fate/samples
key: fate-samples-${{ steps.samples.outputs.hash }}
- name: Set up SSH
env:
HOST: fate.ffmpeg.org
FINGERPRINT: "76:9f:68:32:04:1e:d5:d4:ec:47:3f:dc:fc:18:17:86"
run: |
mkdir -p "/root/.ssh"
chmod 700 "/root/.ssh"
ssh-keyscan -t ecdsa "$HOST" > "/root/.ssh/known_hosts"
SERVER_FINGERPRINT="$(ssh-keygen -E md5 -lf "/root/.ssh/known_hosts" | grep "$HOST" | awk '{gsub(/^MD5:/, "", $2); print $2}')"
if [ "$SERVER_FINGERPRINT" != "$FINGERPRINT" ]; then
echo "Fingerprint $SERVER_FINGERPRINT does not match expected $FINGERPRINT"
exit 1
fi
echo "${{ secrets.FATE_SSH_KEY }}" > "/root/.ssh/id_ed25519"
chmod 600 "/root/.ssh/id_ed25519"
- name: Build
id: build
run: |
clang --version
cd .github/fate/src
./tests/fate.sh ../${{ env.CONF }}
- name: Print version
if: always()
run: |
cat .github/fate/version-${{ env.CONF }}
- name: Print configure.log
if: always()
run: |
cat .github/fate/configure.log
- name: Print config.log
if: always()
run: |
cat .github/fate/build/ffbuild/config.log
- name: Print compile.log
if: always()
run: |
cat .github/fate/compile.log
- name: Print test.log
if: always()
run: |
cat .github/fate/test.log
- name: readelf
run: |
readelf -S .github/fate/install/bin/ffmpeg
readelf -n .github/fate/install/bin/ffmpeg
readelf -r .github/fate/install/bin/ffmpeg