Skip to content

fate

fate #556

Workflow file for this run

name: fate
on:
workflow_dispatch:
jobs:
win32:
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 }}
strategy:
fail-fast: false
matrix:
os: [windows-2025, 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
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
arch: x86_32
target_arch: x86
host_arch: amd64
compiler: msvc
asan: false
asm: true
shared: false
debug: true
assert: false
cet: false
# fate-lossless-tak fails on VS2022, enable after VS2026 update
# - os: windows-2025
# 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
# 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\\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
# Switch to stable release when this is available https://github.com/madler/zlib/issues/787
ref: develop
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@v4
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@v4
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: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:
name: msys2-${{ matrix.sys }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- sys: "clang64"
os: "windows-latest"
arch: amd64
# Enable once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122793 is fixed
# - sys: "mingw64"
# os: "windows-latest"
# arch: amd64
- sys: "mingw32"
os: "windows-latest"
arch: amd64
# Enable once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122793 is fixed
# - sys: "ucrt64"
# os: "windows-latest"
# 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\\2022\\Enterprise"
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 svt-av1 tesseract-ocr vmaf whisper.cpp xevd xeve
- name: Install dependencies
if: ${{ matrix.sys != 'mingw32' && matrix.sys != 'clangarm64' }}
run: |
pacboy --noconfirm -S jack2
- 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: Restore Cached FATE Samples
id: cache
uses: actions/cache/restore@v4
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@v4
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
ubuntu:
name: ${{ matrix.arch }}-${{ matrix.compiler }}${{ matrix.asan && '-asan' || '' }}${{ matrix.msan && '-msan' || '' }}${{ matrix.shared && '-shared' || '' }}${{ matrix.cet && '-cet' || '' }}${{ matrix.sde && '-sde' || '' }}${{ matrix.asm && '-asm' || '' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
arch: [amd64, arm64]
compiler: [clang, icx]
asan: [false, true]
asm: [false, true]
msan: [false, true]
shared: [false]
cet: [false, true]
sde: [false, true]
include:
- compiler: clang
compiler_pkg: clang
# - compiler: icx
# compiler_pkg: intel-oneapi-compiler-dpcpp-cpp
exclude:
- arch: amd64
os: ubuntu-24.04-arm
- arch: arm64
os: ubuntu-24.04
- compiler: clang
asan: false
msan: false
cet: false
sde: false
- msan: true
asan: true
- msan: true
arch: arm64
- msan: true
asm: true
- compiler: icx
asan: true
- compiler: icx
msan: true
- compiler: icx
asm: true
- compiler: icx
arch: arm64
- cet: true
compiler: icx
- cet: true
asan: true
- cet: true
msan: true
- cet: true
asm: false
- sde: true
arch: arm64
- sde: true
compiler: icx
- sde: true
asan: true
- sde: true
msan: true
- sde: true
cet: true
- sde: true
asm: false
# No HW support
- cet: true
# Enable if needed
- compiler: icx
# Enable after https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20919 is merged
- sde: true
env:
CONF: ${{ matrix.arch }}-${{ matrix.compiler }}${{ matrix.asan && '-asan' || '' }}${{ matrix.msan && '-msan' || '' }}${{ matrix.shared && '-shared' || '' }}${{ matrix.cet && '-cet' || '' }}${{ matrix.sde && '-sde' || '' }}${{ matrix.asm && '-asm' || '' }}
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
GLIBC_TUNABLES: glibc.cpu.hwcaps=SHSTK
steps:
- name: Print CPU Info
run: |
cat /proc/cpuinfo
- name: Add Nightly LLVM
if: ${{ matrix.os == 'ubuntu-24.04' && !matrix.msan}}
run: |
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
echo "deb https://apt.llvm.org/noble/ llvm-toolchain-noble main" | sudo tee /etc/apt/sources.list.d/llvm.list
- name: Add Intel oneAPI DPC++/C++ Compiler
if: ${{ matrix.compiler == 'icx' }}
run: |
curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo tee /etc/apt/trusted.gpg.d/apt.intel.asc
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/intel.list
- name: Create Vulkan SDK directory
if: ${{ !matrix.cet && !matrix.sde }}
run: |
sudo mkdir -p /opt/vulkan-sdk
sudo chown $USER:$USER /opt/vulkan-sdk
- name: Install Vulkan SDK
if: ${{ !matrix.cet && !matrix.sde }}
working-directory: /opt/vulkan-sdk
run: |
curl -O https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.tar.xz
tar xvf vulkan-sdk.tar.xz
- name: Build Vulkan SDK
if: ${{ matrix.os == 'ubuntu-24.04-arm' && !matrix.cet }}
working-directory: /opt/vulkan-sdk
run: |
cd 1.*
./vulkansdk --maxjobs vulkan-loader vulkan-headers shaderc
- 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: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.compiler_pkg }} git libsdl2-dev libxml2-utils lld llvm make nasm openssh-client pkgconf rsync zlib1g-dev
- name: Free disk space
run: |
sudo apt-get autoremove -y
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
- 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
if: matrix.msan
uses: actions/checkout@v6
with:
repository: madler/zlib
ref: develop
path: zlib
- name: Build zlib
if: matrix.msan
working-directory: zlib
run: |
cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=${{ matrix.compiler }} \
-DCMAKE_C_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer" \
-DZLIB_BUILD_TESTING=OFF -DZLIB_BUILD_SHARED=OFF
sudo ninja -C build install
- name: Restore Cached FATE Samples
id: cache
uses: actions/cache/restore@v4
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@v4
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: |
if [ "${{ matrix.compiler }}" = "icx" ]; then
source /opt/intel/oneapi/setvars.sh
fi
if [ "${{ matrix.cet }}" = "false" ] && [ "${{ matrix.sde }}" != "true" ]; then
source /opt/vulkan-sdk/1.*/setup-env.sh
fi
if [ "${{ matrix.sde }}" = "true" ]; then
export PATH="$SDE_PATH:$PATH"
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
fi
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
fedora:
name: ${{ matrix.arch }}-${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
arch: [amd64, arm64]
compiler: [gcc-snapshot]
exclude:
- arch: amd64
os: ubuntu-24.04-arm
- arch: arm64
os: ubuntu-24.04
container:
image: fedora:rawhide
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: |
dnf -y copr enable jwakely/gcc-latest
dnf -y install gcc-latest glibc-devel binutils diffutils texinfo libdrm-devel git sdl2-compat-devel vulkan-headers glslang-devel spirv-tools libxml2 make mold nasm openssh pkgconf rsync zlib-devel
echo "/opt/gcc-latest/bin" >> $GITHUB_PATH
echo "LD_RUN_PATH=/opt/gcc-latest/lib" >> $GITHUB_ENV
- 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.1.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@v4
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@v4
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: |
gcc --version
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:
name: ${{ matrix.arch }}-${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
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.1.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@v4
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@v4
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