cargo tree -p punktfunk-client-session finds no ffmpeg. The host still does, which is the whole point: pf-encode keeps libavcodec unconditionally and no host workflow, packaging script or licence file was touched. Deleted: crates/pf-ffvk, video_vulkan.rs, video_vaapi.rs, video_libav.rs, the libavcodec half of video_d3d11.rs, the av_log machinery, ffmpeg::codec::Id as the decoder's vocabulary (the quic CODEC_* wire constants now serve, which is why the evidence table was keyed on them), DecodedImage::VkFrame and ::Dmabuf, the presenter's AVVkFrame lane, and the ffmpeg-fallback feature with everything behind it. DrmFrameGuard collapses from an enum to a newtype, which removes an unsafe impl Send. Roughly 25,000 lines. Then the CI, packaging, licensing and docs work the plan's §6 lists: the Windows workflows lose FFMPEG_DIR, PF_FFVK_VULKAN_INCLUDE and their PATH prepend; the MSIX loses its DLL wildcard; the client .deb stops emitting libav sonames on its own because depends come from dpkg-shlibdeps; arch, flatpak and nix drop the dependency; and the README's "FFmpeg 7 or 8" contract narrows to the host. Three defects reached users' machines in the first cut, and none was in the deletion itself. All three desktop Settings UIs offer vulkan, vaapi and d3d11va as stored decoder values, so those strings sit in shipped settings files today. Refusing them by name — which is the correct rule for a stale pin — would have bricked every upgraded client whose owner ever touched that dropdown. They now migrate onto the native rung for the same hardware family, at decoder construction AND at each dialog's lookup, because a legacy value that matches no preset displays as "Automatic" and silently rewrites the user's preference on the next save. M9's evidence filter was deleted on the argument that with no libavcodec twin below, barring an unproven rung removes hardware decode rather than moving down one rung. That is true on Windows and false on Linux for Intel and every unknown vendor id, where prefer_vulkan_first is false and the order is native-vaapi → native-vk: a rung that has decoded nothing anywhere sitting above one that is 250/250 on three drivers. Every Intel Linux desktop would have moved from libavcodec VAAPI, shipping for years, onto pf-vaadec by default — and a rung that constructs and then produces wrong pixels leaves only by the error-streak demotion, which this codebase already documents as not tripping on the B580's strobing. The filter is restored as a narrow, pure, testable rule: an unproven rung yields to a proven one, and to nothing else. Windows deliberately passes no rung below, because that vendor family is the one with a measured wrong-pixel report against Vulkan decode, and trading no evidence for evidence of corruption is the wrong direction. And the notices still said FFmpeg was bundled. The root file is what both desktop clients include_str! and what the MSIX ships, three lines under the new card saying no FFmpeg is bundled; Apple's Acknowledgements said it too, on iOS, tvOS and macOS. The generator now emits four per-client files scoped by transitive closure — 0 FFmpeg mentions in each, verified — while the root file keeps it for the host. That also ends the standing false attribution of ffmpeg-next, GTK4, windows-rs and the NVENC SDK to an iPhone. Windows has no reachable box, so it was compiled instead: a cross clippy at -D warnings on x86_64 and aarch64-pc-windows-msvc with the C toolchain stubbed so build scripts run without linking. That gate immediately caught an include_str! path one directory too deep, which nothing else could have. Gates: container clippy -D warnings, 160 tests, workspace check, both Windows targets clean, client ffmpeg count 0 and host 2. The four decode crates are untouched, so the hardware rungs' 250/250 stands. ⚠ Owed and unrun: no GPU has executed any of this milestone. M8's on-glass software check, M7's D3D11 and VAAPI AV1 hardware legs, and M9's field bake all still want hardware, and the bake window and criteria remain the user's.
170 lines
9.2 KiB
YAML
170 lines
9.2 KiB
YAML
# Windows client CI — runs on a self-hosted windows-amd64 runner (host mode; the generic runner +
|
|
# toolchain come from unom/infra's windows-runner/; punktfunk's own extras - WDK, Inno Setup,
|
|
# the ARM64 rustup target - self-provision via the "Ensure Windows toolchain" step below, a fast
|
|
# no-op once already present, so any runner with that label works with no manual dispatch step
|
|
# first). Build + clippy + fmt + test BOTH client binaries: the WinUI 3 shell
|
|
# (windows-reactor + WASAPI + SDL3) and the punktfunk-session Vulkan client
|
|
# (pf-presenter/pf-client-core/pf-console-ui — every stream runs in it, spawned by the
|
|
# shell). ARM64 note: rust-skia publishes no aarch64-pc-windows-msvc prebuilt binaries, so the
|
|
# session builds --no-default-features there (no Skia console UI; streaming is unaffected) —
|
|
# flip when skia-binaries adds the target.
|
|
#
|
|
# NO FFmpeg here since M10 (design/client-native-decode.md §6): the client decodes with
|
|
# pf-vkdecode / pf-dxvadec / openh264+rav1d and links no libav* at all, so this workflow sets
|
|
# no FFMPEG_DIR, no PF_FFVK_VULKAN_INCLUDE and prepends nothing to PATH. The provisioning
|
|
# script still fetches the FFmpeg trees because the HOST keeps FFmpeg — windows-host.yml's
|
|
# `amf-qsv` leg link-imports them.
|
|
#
|
|
# Two architectures from ONE x64 runner: x86_64-pc-windows-msvc natively and
|
|
# aarch64-pc-windows-msvc by cross-compiling. The x64 MSVC toolset ships an ARM64 cross compiler
|
|
# (VC\Tools\MSVC\<ver>\bin\Hostx64\arm64\cl.exe) and aarch64-pc-windows-msvc is a tier-2 Rust
|
|
# target with host tools, so no ARM64 runner is needed — the cc/cmake crates pick the ARM64
|
|
# compiler from the target triple (SDL3 + libopus build-from-source cross-compile fine). The one
|
|
# thing the aarch64 build can't do is *run* on the x64 host, so fmt + test run only for x64.
|
|
#
|
|
# The MSVC/WinUI toolchain (cargo/rustup on ASCII paths, NASM, CMake, LLVM, CARGO_HOME,
|
|
# CMAKE_POLICY_VERSION_MINIMUM, …) is baked into the runner's daemon env. Per-checkout
|
|
# / per-arch vars are set in a step:
|
|
# - CARGO_TARGET_DIR=C:\t… the runner's host workdir is buried deep under
|
|
# C:\Windows\System32\config\systemprofile\.cache\act\<hash>\hostexecutor\,
|
|
# so the default target\ path blows past Windows' MAX_PATH (260) inside the
|
|
# CMake-from-source builds (audiopus_sys / SDL3) — MSBuild's tracker then
|
|
# can't create its .tlog (DirectoryNotFoundException -> MSB6003). A short
|
|
# root keeps every nested path well under the limit (per-arch so the two
|
|
# matrix legs don't share a target dir).
|
|
#
|
|
# Steps use `shell: pwsh` (PowerShell 7) deliberately: Windows PowerShell 5.1's
|
|
# `Out-File -Encoding utf8` prepends a UTF-8 BOM that corrupts the first GITHUB_ENV line (that
|
|
# var silently never gets set). pwsh writes no BOM.
|
|
# The runner's daemon wrapper puts C:\Program Files\PowerShell\7 on PATH so the job finds pwsh.
|
|
name: windows
|
|
# One pending run per workflow+ref: a newer push supersedes the queued/running one and cancels
|
|
# it (a canary only needs the latest commit; each release tag is its own ref so tag runs never
|
|
# cancel each other). Keeps a busy push cadence from piling ~10 queued runs per commit onto the
|
|
# runner fleet. Gitea honors this for push triggers (PR triggers: see gitea#35933).
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'clients/windows/**'
|
|
- 'clients/session/**'
|
|
- 'crates/punktfunk-core/**'
|
|
- 'crates/pf-client-core/**'
|
|
- 'crates/pf-presenter/**'
|
|
- 'crates/pf-console-ui/**'
|
|
- 'crates/pf-bitstream/**'
|
|
- 'crates/pf-vkdecode/**'
|
|
- 'crates/pf-dxvadec/**'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- '.gitea/workflows/windows.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'clients/windows/**'
|
|
- 'clients/session/**'
|
|
- 'crates/punktfunk-core/**'
|
|
- 'crates/pf-client-core/**'
|
|
- 'crates/pf-presenter/**'
|
|
- 'crates/pf-console-ui/**'
|
|
- 'crates/pf-bitstream/**'
|
|
- 'crates/pf-vkdecode/**'
|
|
- 'crates/pf-dxvadec/**'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- '.gitea/workflows/windows.yml'
|
|
workflow_dispatch:
|
|
|
|
# Shared compile cache: sccache -> RustFS S3 (storage.unom.io, LAN-pinned via ci-core's
|
|
# unbound). Keys include compiler hash + target + flags, so cross-OS/arch entries can
|
|
# never collide; every Rust job on every host feeds and reads one warm cache.
|
|
env:
|
|
RUSTC_WRAPPER: sccache
|
|
SCCACHE_BUCKET: unom-ci-sccache
|
|
SCCACHE_ENDPOINT: https://storage.unom.io
|
|
SCCACHE_REGION: home-central
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_SECRET_ACCESS_KEY }}
|
|
# sccache and incremental compilation are mutually exclusive; CI wants the shared
|
|
# cache, dev boxes keep incremental.
|
|
CARGO_INCREMENTAL: "0"
|
|
|
|
jobs:
|
|
# SECURITY: this job builds PULL-REQUEST code (attacker-controllable build.rs / cargo build) on the
|
|
# host-mode, persistent `windows-amd64` runner that the release-SIGNING jobs (windows-host.yml /
|
|
# windows-msix.yml, which decrypt MSIX_CERT_PFX_B64 + REGISTRY_TOKEN to disk) also run on. Untrusted
|
|
# PR code could therefore persist on that machine or harvest signing material a later job exposes.
|
|
# The DEFINITIVE fix is operational and lives outside this file: enable Gitea's "require approval to
|
|
# run workflows for PRs from outside collaborators/forks", and/or route PR CI to isolated ephemeral
|
|
# runners. The `if:` below is only a backstop — it skips fork PRs where Gitea reports the fork flag,
|
|
# and FAILS OPEN (still runs) for same-repo PRs and on Gitea versions that don't populate it, so it
|
|
# never blocks internal PR CI.
|
|
build:
|
|
runs-on: windows-amd64
|
|
if: >-
|
|
github.event_name != 'pull_request' ||
|
|
github.event.pull_request.head.repo.fork != true
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [x86_64-pc-windows-msvc, aarch64-pc-windows-msvc]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Ensure Windows toolchain (WDK, Inno Setup, ARM64 target)
|
|
shell: pwsh
|
|
run: ./scripts/ci/ensure-windows-toolchain.ps1
|
|
|
|
- name: Configure + toolchain versions
|
|
shell: pwsh
|
|
run: |
|
|
# Per-arch short target root (dodges MAX_PATH; keeps the two legs from sharing target\).
|
|
$td = if ('${{ matrix.target }}' -eq 'aarch64-pc-windows-msvc') { 'C:\t-a64' } else { 'C:\t' }
|
|
"CARGO_TARGET_DIR=$td" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
|
# No FFMPEG_DIR / PF_FFVK_VULKAN_INCLUDE / PATH prepend: the client links no libav*
|
|
# since M10 (see this file's header), so nothing here needs import libs or runtime DLLs.
|
|
# The HOST still does — windows-host.yml sets them for its amf-qsv leg.
|
|
rustup target add ${{ matrix.target }}
|
|
rustc --version
|
|
cargo --version
|
|
Write-Output "target ${{ matrix.target }} target-dir $td"
|
|
|
|
# Both client binaries. ARM64: no skia-binaries prebuilt for the target, so the session
|
|
# drops its `ui` feature there (pf-console-ui excluded; --no-default-features is a no-op
|
|
# for the shell, which has no features).
|
|
# punktfunk-cli is in every gate: windows-msix.yml ships its `punktfunk.exe` alias, so
|
|
# a CLI that only the release workflow compiles is a release-day surprise. Its tests
|
|
# RUN the binary (help contract), as the session's contract_smoke runs the session —
|
|
# the gate class that catches a compiling-but-wrong binary (the 0.22.0 clobber).
|
|
- name: Build
|
|
shell: pwsh
|
|
run: |
|
|
$sf = @(); if ('${{ matrix.target }}' -eq 'aarch64-pc-windows-msvc') { $sf = @('--no-default-features') }
|
|
cargo build -p punktfunk-client-windows -p punktfunk-client-session -p punktfunk-cli @sf --target ${{ matrix.target }}
|
|
|
|
- name: Clippy (-D warnings)
|
|
shell: pwsh
|
|
run: |
|
|
# Every crate in the `paths:` trigger above is named here: `cargo clippy -p X` BUILDS a
|
|
# dependency but only LINTS the packages it is given, so a decode crate that starts the
|
|
# run but is missing from this list would be gated by nothing.
|
|
$pkgs = @('-p','punktfunk-client-windows','-p','punktfunk-client-session','-p','punktfunk-cli','-p','pf-client-core','-p','pf-presenter','-p','pf-bitstream','-p','pf-vkdecode','-p','pf-dxvadec')
|
|
$sf = @()
|
|
if ('${{ matrix.target }}' -eq 'aarch64-pc-windows-msvc') { $sf = @('--no-default-features') } else { $pkgs += @('-p','pf-console-ui') }
|
|
cargo clippy @pkgs --all-targets @sf --target ${{ matrix.target }} -- -D warnings
|
|
|
|
- name: Rustfmt check
|
|
if: matrix.target == 'x86_64-pc-windows-msvc'
|
|
shell: pwsh
|
|
run: cargo fmt -p punktfunk-client-windows -p punktfunk-client-session -p punktfunk-cli -p pf-client-core -p pf-presenter -p pf-console-ui -p pf-dxvadec -- --check
|
|
|
|
- name: Test
|
|
if: matrix.target == 'x86_64-pc-windows-msvc'
|
|
shell: pwsh
|
|
run: cargo test -p punktfunk-client-windows -p punktfunk-client-session -p punktfunk-cli -p pf-client-core -p pf-presenter -p pf-console-ui -p pf-dxvadec --target ${{ matrix.target }}
|