Screen share 30: Packaging and CI for screen share (#177) #248

Manually merged
charles merged 1 commit from screenshare-30-packaging-ci into screenshare 2026-11-12 11:45:18 +00:00
Owner

Stacked on: screenshare-21-app-screenshare-runtime, screenshare-18-hw-encode-linux (18 is already contained in 21, so the branch is 21 + one commit).

What I built

  • packaging/linux/AppRun: checks every declared load-time library (libasound.so.2, libpipewire-0.3.so.0, libglib-2.0.so.0, libgobject-2.0.so.0, libgio-2.0.so.0) with ldd, names all the missing ones in one message and the packages to install on Debian/Ubuntu 22.04, Ubuntu 24.04+ (t64), Fedora and Arch (packages deduplicated), exit 127. Without ldd it starts the client as before. This covers #243's AppRun item.
  • release.yaml: linux-clean installs exactly the declared packages (libasound2 libpipewire-0.3-0 libglib2.0-0) in the bare 22.04 and checks that --debug-info prints screen capture:, stream audio:, encode: and decode:. The release notes list ALSA/PipeWire/GLib per distro, the ScreenCast portal (Wayland) and libva as optional. A comment says why libclang is present for the pipewire crate's bindgen.
  • ci.yaml: on Windows, Report disk use records whether the run was a cold build (no target dir at the start, i.e. after the cleanup). It publishes its figures as disk-windows-cold.txt / disk-windows-warm.txt on the prerelease ci-disk-windows, replacing the previous file of the same kind. Publishing is best effort and never fails the job. This exists because this Forgejo has no job-log API, which is what kept #127 open. MIN_FREE_GB goes from 12 to 18. The Linux libclang comment is also updated.
  • Docs: top-level README Install has a table of libraries and packages per distro, plus the portal and libva, and --debug-info now mentions the screen-share section. xtask/README.md and the package.rs/libs.rs docs are updated. crates/fluxer-voice/README.md has a target-dir size table (#127).
  • Tests: libs.rs unit tests check that LINUX_DECLARED stays in step with AppRun, with release.yaml's linux-clean install line and with the README Install section. tests/package.rs has AppRun behaviour tests (all screen-share libraries missing; ALSA and PipeWire missing together). The AppImage test also asserts that it loads libpipewire/GLib, and --debug-info (Linux and Windows) asserts the screen-share section.

How I tested it

  • New tests failed first: 3 unit, 2 AppRun. Then they passed. FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green locally (base 1b64a8b was green before any change).
  • AppRun under dash in ubuntu:22.04 with a fake ldd, and the real extracted AppImage in a bare ubuntu:22.04: it lists all five libraries and the three apt packages, exit 127.
  • PipeWire 0.3.48 compatibility: the binary is built against the 1.0 headers from the PPA, so I checked its imported symbols against Ubuntu 22.04's libraries. All 9 pw_/spa_ symbols are exported by 22.04's libpipewire-0.3.so.0 (0.3.48-1ubuntu3.2), and all 42 g_ symbols by its GLib. My local AppImage was built on Arch, so it cannot fully start on 22.04 (glibc 2.39+). The full start on a clean machine is what linux-clean does on the release runner, which builds on 22.04.
  • Target-dir size, Linux: a clean cargo test --workspace --no-run with CI's settings (line-tables-only, no incremental) is 13.2 GB, plus 3.0 GB for the release build, so 16.2 GB. A plain local cargo xtask ci is about 43 GB.

Deviations / for the reviewer

  • #127 is not closed by this PR. I could not read the Windows cold-build figure: the runner's logs are only published when a job fails, and I was told not to wait for CI runs. The new step publishes the figure, and the README says where to read it and to put it in the table. Known Windows facts are recorded: the cleanups of runs 156 to 163 found the target dirs at 7.6 to 11.2 GB, and C: had 17.9 to 22.7 GB free after a cleanup. MIN_FREE_GB = 18 is the Linux cold figure plus headroom. That is tight against about 18 to 23 GB free after a cleanup, so worth watching on the first Windows runs.
  • Windows --debug-info in CI: this was already the case through package_produces_portable_exe_on_windows on Server Core. It now also asserts the screen-share section. Nothing new was needed for Windows packaging (d3d11, dxgi, dwmapi and shcore are system DLLs, checked by check_windows).
  • deny.toml: no change was needed (cargo deny is green).
  • #243's last point (load PipeWire with dlopen instead of linking it): not done. Spec §12 says PipeWire is a declared runtime dependency, so it stays linked and declared.
  • The ci-disk-windows publish step is PowerShell that I could only parse-check locally with pwsh, not run. It is wrapped in try/catch and exits 0.

Closes #177

🤖 Generated with Claude Code

Stacked on: screenshare-21-app-screenshare-runtime, screenshare-18-hw-encode-linux (18 is already contained in 21, so the branch is 21 + one commit). ## What I built - **`packaging/linux/AppRun`**: checks every declared load-time library (`libasound.so.2`, `libpipewire-0.3.so.0`, `libglib-2.0.so.0`, `libgobject-2.0.so.0`, `libgio-2.0.so.0`) with `ldd`, names all the missing ones in one message and the packages to install on Debian/Ubuntu 22.04, Ubuntu 24.04+ (t64), Fedora and Arch (packages deduplicated), exit 127. Without `ldd` it starts the client as before. This covers #243's AppRun item. - **`release.yaml`**: `linux-clean` installs exactly the declared packages (`libasound2 libpipewire-0.3-0 libglib2.0-0`) in the bare 22.04 and checks that `--debug-info` prints `screen capture:`, `stream audio:`, `encode:` and `decode:`. The release notes list ALSA/PipeWire/GLib per distro, the ScreenCast portal (Wayland) and libva as optional. A comment says why `libclang` is present for the `pipewire` crate's bindgen. - **`ci.yaml`**: on Windows, `Report disk use` records whether the run was a cold build (no target dir at the start, i.e. after the cleanup). It publishes its figures as `disk-windows-cold.txt` / `disk-windows-warm.txt` on the prerelease `ci-disk-windows`, replacing the previous file of the same kind. Publishing is best effort and never fails the job. This exists because this Forgejo has no job-log API, which is what kept #127 open. `MIN_FREE_GB` goes from 12 to 18. The Linux libclang comment is also updated. - **Docs**: top-level README Install has a table of libraries and packages per distro, plus the portal and libva, and `--debug-info` now mentions the screen-share section. `xtask/README.md` and the `package.rs`/`libs.rs` docs are updated. `crates/fluxer-voice/README.md` has a target-dir size table (#127). - **Tests**: `libs.rs` unit tests check that `LINUX_DECLARED` stays in step with AppRun, with `release.yaml`'s `linux-clean` install line and with the README Install section. `tests/package.rs` has AppRun behaviour tests (all screen-share libraries missing; ALSA and PipeWire missing together). The AppImage test also asserts that it loads `libpipewire`/GLib, and `--debug-info` (Linux and Windows) asserts the screen-share section. ## How I tested it - New tests failed first: 3 unit, 2 AppRun. Then they passed. `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green locally (base 1b64a8b was green before any change). - AppRun under `dash` in `ubuntu:22.04` with a fake `ldd`, and the real extracted AppImage in a bare `ubuntu:22.04`: it lists all five libraries and the three apt packages, exit 127. - **PipeWire 0.3.48 compatibility**: the binary is built against the 1.0 headers from the PPA, so I checked its imported symbols against Ubuntu 22.04's libraries. All 9 `pw_`/`spa_` symbols are exported by 22.04's `libpipewire-0.3.so.0` (0.3.48-1ubuntu3.2), and all 42 `g_` symbols by its GLib. My local AppImage was built on Arch, so it cannot fully start on 22.04 (glibc 2.39+). The full start on a clean machine is what `linux-clean` does on the release runner, which builds on 22.04. - **Target-dir size, Linux**: a clean `cargo test --workspace --no-run` with CI's settings (`line-tables-only`, no incremental) is 13.2 GB, plus 3.0 GB for the release build, so 16.2 GB. A plain local `cargo xtask ci` is about 43 GB. ## Deviations / for the reviewer - **#127 is not closed by this PR**. I could not read the Windows cold-build figure: the runner's logs are only published when a job fails, and I was told not to wait for CI runs. The new step publishes the figure, and the README says where to read it and to put it in the table. Known Windows facts are recorded: the cleanups of runs 156 to 163 found the target dirs at 7.6 to 11.2 GB, and C: had 17.9 to 22.7 GB free after a cleanup. `MIN_FREE_GB` = 18 is the Linux cold figure plus headroom. That is tight against about 18 to 23 GB free after a cleanup, so worth watching on the first Windows runs. - **Windows `--debug-info` in CI**: this was already the case through `package_produces_portable_exe_on_windows` on Server Core. It now also asserts the screen-share section. Nothing new was needed for Windows packaging (d3d11, dxgi, dwmapi and shcore are system DLLs, checked by `check_windows`). - **`deny.toml`**: no change was needed (`cargo deny` is green). - **#243's last point** (load PipeWire with dlopen instead of linking it): not done. Spec §12 says PipeWire is a declared runtime dependency, so it stays linked and declared. - **The `ci-disk-windows` publish step** is PowerShell that I could only parse-check locally with pwsh, not run. It is wrapped in try/catch and exits 0. Closes #177 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Refs #168

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #168

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Linux package now declares ALSA, PipeWire and GLib everywhere:
AppRun names every missing declared library and the packages that
provide it (Debian/Ubuntu 22.04, Ubuntu 24.04+, Fedora, Arch), the
release workflow's clean ubuntu:22.04 job installs exactly those and
checks the --debug-info screen-share section, and the README and the
release notes list them with the portal and optional libva (#243).
Unit tests keep LINUX_DECLARED, AppRun, release.yaml and the README in
step.

Windows CI: the disk report publishes the last cold and warm run's
target-dir sizes as the prerelease ci-disk-windows (#127);
MIN_FREE_GB 12 -> 18 from the Linux cold build measured with screen
share (13.2 GB debug + 3.0 GB release).

Refs #177

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Independent review: Screen share 30 (packaging-ci)

Reviewed 1b64a8b..31723bd cold (9 files: workflows, AppRun, xtask package/libs + tests, READMEs).

Checks

  1. Plan steps: Linux declares libpipewire-0.3-0 (+ GLib) in LINUX_DECLARED, AppRun, release linux-clean, README; the portal and libva are documented as optional. Windows --debug-info already runs in CI through package_produces_portable_exe_on_windows (Server Core) and now also asserts the screen-share section. Those labels (screen capture:, stream audio:, encode:, decode:) match apps/fluxer/src/debug_info.rs::render, which is not cfg-gated. libva-dev and libclang (via clang-21 -> libclang1-21) are present. deny.toml is unchanged and needed no change.
  2. Interfaces: the task defines none. LINUX_DECLARED keeps its shape.
  3. Invariants: no crate code changed; core, ui, video and capture boundaries are unaffected. No secrets: the new Windows step uses secrets.GITHUB_TOKEN only in a curl header and never echoes it. Its catch prints only the exception message.
  4. Review Focus: no item belongs to Task 30.
  5. Local FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci: green. The 3 declared_everywhere unit tests, the 4 AppRun tests and package_produces_appimage_on_linux all pass.

Also checked: AppRun's soname matching has no substring collisions. The add eval only takes fixed package names. The script works under set -eu. The package names are correct for Debian/22.04, 24.04 t64, Fedora and Arch.

Findings

  • minor: #127 is only half done. The plan asks for the Windows cold-build size to be recorded in crates/fluxer-voice/README.md, and the table says "see below". #127 stays open, which is right; the first cold run's disk-windows-cold.txt must be copied into the table.
  • minor: MIN_FREE_GB=18 is tight against the 17.9-22.7 GB free that earlier Windows cleanups recorded. The cleanup does not throw when it stays below the minimum, so this cannot turn CI red by itself, but a cold build may still run out of disk. Retune once the cold figure is published.
  • minor: the ci-disk-windows publish PowerShell was only parse-checked, never run. It is best effort (try/catch, exit 0), so it cannot fail the job. It creates a tag ci-disk-windows on the default branch, like the existing ci-log-* prereleases do.
  • minor: the last point of #243 (load PipeWire with dlopen) was deliberately not done, per spec §12. #243 should be closed or reworded when this merges so that it does not stay open on the finished items.

Verdict: approve. No blocking findings; local CI is green. Forgejo runner results were not checked by this review.

## Independent review: Screen share 30 (packaging-ci) Reviewed `1b64a8b..31723bd` cold (9 files: workflows, AppRun, xtask package/libs + tests, READMEs). **Checks** 1. Plan steps: Linux declares `libpipewire-0.3-0` (+ GLib) in `LINUX_DECLARED`, AppRun, release `linux-clean`, README; the portal and libva are documented as optional. Windows `--debug-info` already runs in CI through `package_produces_portable_exe_on_windows` (Server Core) and now also asserts the screen-share section. Those labels (`screen capture:`, `stream audio:`, `encode:`, `decode:`) match `apps/fluxer/src/debug_info.rs::render`, which is not cfg-gated. `libva-dev` and libclang (via `clang-21` -> `libclang1-21`) are present. `deny.toml` is unchanged and needed no change. 2. Interfaces: the task defines none. `LINUX_DECLARED` keeps its shape. 3. Invariants: no crate code changed; core, ui, video and capture boundaries are unaffected. No secrets: the new Windows step uses `secrets.GITHUB_TOKEN` only in a curl header and never echoes it. Its catch prints only the exception message. 4. Review Focus: no item belongs to Task 30. 5. Local `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci`: **green**. The 3 `declared_everywhere` unit tests, the 4 AppRun tests and `package_produces_appimage_on_linux` all pass. Also checked: AppRun's soname matching has no substring collisions. The `add` eval only takes fixed package names. The script works under `set -eu`. The package names are correct for Debian/22.04, 24.04 t64, Fedora and Arch. **Findings** - minor: #127 is only half done. The plan asks for the Windows cold-build size to be recorded in `crates/fluxer-voice/README.md`, and the table says "see below". #127 stays open, which is right; the first cold run's `disk-windows-cold.txt` must be copied into the table. - minor: `MIN_FREE_GB=18` is tight against the 17.9-22.7 GB free that earlier Windows cleanups recorded. The cleanup does not throw when it stays below the minimum, so this cannot turn CI red by itself, but a cold build may still run out of disk. Retune once the cold figure is published. - minor: the `ci-disk-windows` publish PowerShell was only parse-checked, never run. It is best effort (try/catch, exit 0), so it cannot fail the job. It creates a tag `ci-disk-windows` on the default branch, like the existing `ci-log-*` prereleases do. - minor: the last point of #243 (load PipeWire with dlopen) was deliberately not done, per spec §12. #243 should be closed or reworded when this merges so that it does not stay open on the finished items. **Verdict: approve.** No blocking findings; local CI is green. Forgejo runner results were not checked by this review.
charles manually merged commit 7b903fff9b into screenshare 2026-11-12 11:45:18 +00:00
Sign in to join this conversation.
No description provided.