Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

ci(desktop): verify Linux deb frontend assets and FFmpeg sonames

Richie McIlroy71f7f3327f6a
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index a2134671f..a5d282cfc 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -313,6 +313,51 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
RUST_TARGET_TRIPLE: ${{ matrix.settings.target }}
+ # Guards against the two Linux packaging regressions:
+ # 1. Frontend assets missing: the .deb must ship the vinxi frontend
+ # (index.html + _build/) under /usr/lib/Cap/, not just the wallpaper
+ # resources. A blank webview ships if turbo's cache restores no
+ # .output/public (see @cap/desktop#build outputs in turbo.json).
+ # 2. FFmpeg soname mismatch: every libav*/libsw* the main binary lists
+ # as NEEDED must be bundled under /usr/lib/cap/ with the exact same
+ # soname. The bundled libs come from native-deps (FFmpeg 7); if the
+ # binary linked system FFmpeg 6 the loader fails at launch.
+ - name: Verify Linux deb contents
+ if: ${{ runner.os == 'Linux' }}
+ shell: bash
+ run: |
+ set -euo pipefail
+ DEB="$(find target/${{ matrix.settings.target }}/release/bundle/deb -name '*.deb' | head -n1)"
+ if [[ -z "$DEB" ]]; then echo "::error::No .deb produced"; exit 1; fi
+ echo "Inspecting $DEB"
+ WORK="$(mktemp -d)"
+ dpkg-deb -x "$DEB" "$WORK"
+
+ # (1) frontend assets present
+ if [[ ! -f "$WORK/usr/lib/Cap/index.html" ]]; then
+ echo "::error::Frontend assets missing from deb (no /usr/lib/Cap/index.html)."
+ find "$WORK/usr/lib/Cap" -maxdepth 2 | head -50 || true
+ exit 1
+ fi
+ echo "Frontend assets OK (index.html present)"
+
+ # (2) every FFmpeg soname the binary NEEDs is bundled
+ BIN="$WORK/usr/bin/Cap"
+ NEEDED="$(objdump -p "$BIN" | awk '/NEEDED/{print $2}' | grep -E '^lib(av|sw|postproc)' || true)"
+ MISSING=0
+ for so in $NEEDED; do
+ if [[ ! -f "$WORK/usr/lib/cap/$so" ]]; then
+ echo "::error::Binary NEEDs $so but it is not bundled under /usr/lib/cap/"
+ MISSING=1
+ fi
+ done
+ echo "Bundled FFmpeg libs:"; ls -1 "$WORK/usr/lib/cap" 2>/dev/null || true
+ if [[ "$MISSING" -ne 0 ]]; then
+ echo "::error::FFmpeg soname mismatch between binary and bundled libs."
+ exit 1
+ fi
+ echo "FFmpeg soname bundle OK"
+
- name: Upload unsigned Windows installer
if: ${{ runner.os == 'Windows' }}
id: upload_unsigned_windows_installer