From d552bb9b4a6a6b149ef3a9c46c7138a1b472f654 Mon Sep 17 00:00:00 2001 From: zhenghaoz Date: Wed, 28 Oct 2026 09:31:40 +0800 Subject: [PATCH 1/2] test: disable FFmpeg CPU optimizations for audio fixtures --- tests/audio/generate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/audio/generate.py b/tests/audio/generate.py index bba27d3..42e0b39 100644 --- a/tests/audio/generate.py +++ b/tests/audio/generate.py @@ -16,7 +16,7 @@ def ffmpeg(source, destination, *args): - subprocess.run([options.ffmpeg, "-v", "error", "-y", "-i", str(ROOT / source), + subprocess.run([options.ffmpeg, "-cpuflags", "0", "-v", "error", "-y", "-i", str(ROOT / source), *args, str(ROOT / destination)], check=True) From 864f8825eada7d5829676928cc486ec4776825d8 Mon Sep 17 00:00:00 2001 From: zhenghaoz Date: Wed, 28 Oct 2026 09:38:44 +0800 Subject: [PATCH 2/2] ci: use tordona FFmpeg build on Windows ARM64 --- .github/workflows/ci.yml | 13 ++++++++----- tests/audio/generate.py | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fa11a7..e732306 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,11 +26,14 @@ jobs: if: matrix.os == 'windows-11-arm' shell: pwsh run: | - Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force - Repair-WinGetPackageManager -Latest -Force - Write-Output "Winget Version: $(winget --version)" - winget install -e --id yt-dlp.FFmpeg --architecture arm64 --scope user --source winget --accept-package-agreements --accept-source-agreements --disable-interactivity - [Environment]::GetEnvironmentVariable('Path', 'User') -split ';' | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + $archive = Join-Path $env:RUNNER_TEMP 'ffmpeg-arm64.7z' + $destination = Join-Path $env:RUNNER_TEMP 'ffmpeg-arm64' + Invoke-WebRequest 'https://github.com/tordona/ffmpeg-win-arm64/releases/download/9.0.2/ffmpeg-9.0.2-essentials-shared-win-arm64.7z' -OutFile $archive + if ((Get-FileHash $archive -Algorithm SHA256).Hash -ne '909b9b6c3cd6ad670d9b0b651808a8fecfc22833b4d14b02c7c4de2ef398ac97') { + throw 'FFmpeg archive checksum mismatch' + } + 7z x $archive "-o$destination" -y + (Get-ChildItem $destination -Filter ffmpeg.exe -Recurse).DirectoryName | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: Configure run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release ${{ matrix.os == 'windows-11-arm' && '-T ClangCL' || '' }} - name: Build diff --git a/tests/audio/generate.py b/tests/audio/generate.py index 42e0b39..bba27d3 100644 --- a/tests/audio/generate.py +++ b/tests/audio/generate.py @@ -16,7 +16,7 @@ def ffmpeg(source, destination, *args): - subprocess.run([options.ffmpeg, "-cpuflags", "0", "-v", "error", "-y", "-i", str(ROOT / source), + subprocess.run([options.ffmpeg, "-v", "error", "-y", "-i", str(ROOT / source), *args, str(ROOT / destination)], check=True)