Voice 25: Packaging and CI for voice (#86) #144
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "voice-25-packaging-ci"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Release packages and CI for the voice stack (Voice plan, Task 25; spec §10).
Clean-machine check in
cargo xtask package(xtask/src/package/libs.rs, new). After the release build,packagereads the libraries the binary needs beforemainfrom the file itself (ELFDT_NEEDED; PE import and delay-import tables, hand-parsed, bounds-checked, no new dependency), prints them (==> xtask package: loads ..., on Windows alsodelay-loads ...) and fails when one would be missing on a clean machine:libasound.so.2. Anything else would have to be bundled, so packaging fails and names it. Today's release binary loadslibm.so.6, libasound.so.2, libgcc_s.so.1, libc.so.6, ld-linux-x86-64.so.2; libwebrtc is static.msdmo.dlloropengl32.dll, and any DLL that is neither an API set nor in the build machine'sSystem32. The runner is Windows Server Core, the smallest Windows, so an exe that passes there loads on any Windows 10+.Windows: the exe loads on Server Core (
.cargo/config.toml). Run 161 showed that the voice test binaries die in the loader on the runner:msdmo.dllis missing (libwebrtc's own audio device module imports it).opengl32.dll(wgpu's GL backend, #93) is missing too. Both are now/DELAYLOADed, next to the existing+crt-static:LoadLibrarys opengl32 itself first (wgpu-hal 27.0.4gles/wgl.rs) and reports a missing one as an unavailable backend.xtask packageno longer setsRUSTFLAGSitself; the config applies to both tests and release, and the check refuses an exe built without it.xtask/tests/package.rstherefore no longer skips the launch check on the runner: the packaged exe must run--debug-infoand exit 0 there, and must delay-loadopengl32.dll.Linux: the declared audio dependency.
libasound.so.2stays out of the AppImage, as the AppImage excludelist requires, because it must match the system's ALSA plugins. It is declared in four places:AppRun: whenlddreports it missing, prints which package to install (Debian/Ubuntu 22.04, 24.04+, Fedora, Arch) and exits 127.LINUX_DECLARED.Release workflow.
webrtc-sysneeds (libglib2.0-dev, clang 21,CXX=clang++-21). Before this change the release build could not compile with LiveKit.linux-clean: downloads the AppImage from the draft into a bareubuntu:22.04that has onlylibasound2, verifies the checksum, and runs--appimage-extract-and-run --debug-info.publishnow waits for it.--debug-infoon the runner. With the delay-loads it can pass there.Windows CI disk (#51, #127):
CARGO_PROFILE_DEV_DEBUG=line-tables-onlyon the Windows job.MIN_FREE_GBgoes from 30 to 12.Report disk usestep (always runs) prints the size of the target dirs and the free space of every drive.Numbers behind the threshold:
cargo test --workspace(test binaries 450-830 MB each). On the runner C: went from 22.7 GB free to 6.7 GB between runs 161 and 163.CARGO_INCREMENTAL=0). 12 GB is therefore "a cold run fits".Docs:
README.md(runtime dependencies, clang 21 /libglib2.0-devto build),xtask/README.md(package section), header ofrelease.yaml.Stacked on: voice-13-voice-livekit-interop
How it was tested
FLUXER_SCREENSHOT_TESTS=1 cargo xtask cigreen locally on the base (5550287) and with this branch.Unit tests in
libs.rs:xtask/tests/package.rs:loadsline names libc and libasound;AppRunwith a stand-inlddexits 127 and nameslibasound2when the library is missing, and starts the client with its arguments when it is there;--debug-infowith no skip, and thedelay-loadsline namesopengl32.dll.Clean machine, by hand (Docker): built with
cargo xtask package --target linuxinsideubuntu:22.04, using the release workflow's package list plus clang 21 from apt.llvm.org. The build printedloads libm.so.6, libasound.so.2, libgcc_s.so.1, libc.so.6, ld-linux-x86-64.so.2. Then--appimage-extract-and-run --debug-infoin freshubuntu:22.04containers:libasound2installed: the report (os: ... Ubuntu 22.04.5 LTS,gpu: no adapter found), exit 0.The new
linux-cleanrelease job repeats this second case.Deviations / for the reviewer
System32and the--debug-infolaunch on Server Core are checked only by the Windows runner on this branch. If/DELAYLOADdoes not take for an import, the check names the DLL..cargo/config.tomlis outside the task's file list. It is where the Windows rustflags already live (#128), and the delay-loads must apply to test binaries as well as the release exe.deny.toml: no change needed (no new crate;cargo denygreen).Closes #86
🤖 Generated with Claude Code
Independent review: Voice 25 (packaging-ci), diff 5550287..894d27b
Plan step check. Linux and Windows both get a clean-machine check (
xtask/src/package/libs.rs: ELF DT_NEEDED, PE import and delay-import tables), andxtask/tests/package.rsasserts it. The Windows--debug-infolaunch is no longer skipped on the runner. The Linux package declareslibasound.so.2in AppRun (exits 127 and names the package), the README and the release notes. Therelease.yamllinux-cleanjob starts the AppImage in a bareubuntu:22.04that has onlylibasound2, andpublishwaits for that job. The Windows cleanup threshold was retuned and a disk report step was added. Commit messagebuild: package voice dependenciesmatches the plan. This task has no Interfaces block, so no other task's names are affected.Invariants. No core, UI or crate dependency changes and no
deny.tomlchange; the only new code is xtask code. Every parser read is bounds-checked, andmalformed_files_are_errors_not_panicscovers truncation and overflow. No tokens appear in code or logs:GITHUB_TOKENis used only in headers.Checked by hand:
opengl32.dlldelay-load: wgpu-hal 27.0.4gles/wgl.rsInstance::initcallsLoadLibraryA("opengl32.dll")and returns an error before the firstwglCreateContext, so a missing DLL shows up as an unavailable backend and not as a delay-load exception.msdmo.dlldelay-load: webrtc-sys 0.3.53 creates the platform ADM only throughAcquirePlatformAdm()(PlatformAudio), and no crate in this repo uses PlatformAudio, so the DLL is never loaded.linux-clean:VERSIONis workflow-level env.LINUX_SUMSis thesha256sumline for$NAME, so--checkworks in the working directory.${url#*://*/}strips scheme and host as intended.--debug-infostarts withfluxer(debug_info.rs:54), so the grep matches.Findings
.forgejo/workflows/ci.yamlMIN_FREE_GB: 12is based on Linux numbers (8.8 GB debug at line-tables-only plus 2.8 GB release). The plan asks for the Windows target dir to be measured. That is deferred to #127 through the new "Report disk use" step. Windows PDBs and import libs are likely larger, so 12 may be too tight for a cold Windows run. Retune it from the first report.release.yamllinux-cleandownloads a draft asset from/attachments/<uuid>with the actions token. Forgejo accepts token auth on attachment downloads, but no run has used this path yet, so it is unverified until the first release dispatch. If it fails, the release stays a draft and nothing is published, so the failure is safe.libs::check_windowschecks delay-loaded DLLs only for the load-time case. A future delay-load of a non-system DLL would pass the check and fail at first call. Today the list is onlymsdmo/opengl32, so this is not a problem now..cargo/config.toml/DELAYLOAD+delayimp.lib, the un-skipped launch check, the delay-loads assertion) could be run locally. The Windows runner must confirm them, as the implementer says.Local gate:
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh worktree on894d27b(cold target dir) exited rc=0.tests/package.rsran 4/4, includingpackage_produces_appimage_on_linuxand bothapprun_*tests. All 9libs::testspassed.Verdict: APPROVE. No blocking findings and local ci is green. The Windows runner still has to confirm the delay-load and launch changes.
🤖 Generated with Claude Code