Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix(ci): verify frontend build output before Linux deb packaging check
Richie McIlroyc2fd22dea442
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex a5d282cfc..d0c5c8236 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -314,36 +314,50 @@ jobs: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.+ # 1. Frontend missing: vinxi must produce apps/desktop/.output/public,+ # which Tauri EMBEDS into the binary (it is NOT shipped as a loose+ # /usr/lib/Cap/index.html file). A blank webview ships if turbo's cache+ # restores an empty .output/public (see @cap/desktop#build outputs in+ # turbo.json), so we assert the build output exists and is non-empty.+ # 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 contentsif: ${{ runner.os == 'Linux' }}shell: bashrun: |set -euo pipefail++ # (1) frontend was actually built. Tauri embeds .output/public into the+ # binary at build time, so an empty/missing dir => blank webview.+ FE="apps/desktop/.output/public/index.html"+ if [[ ! -s "$FE" ]]; then+ echo "::error::Frontend build output missing/empty ($FE) - webview would be blank."+ ls -la apps/desktop/.output/public 2>/dev/null || echo "(no .output/public dir)"+ exit 1+ fi+ echo "Frontend build output OK ($FE, $(wc -c < "$FE") bytes)"+DEB="$(find target/${{ matrix.settings.target }}/release/bundle/deb -name '*.deb' | head -n1)"if [[ -z "$DEB" ]]; then echo "::error::No .deb produced"; exit 1; fiecho "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+ # Best-effort confirmation that the SPA actually got embedded into the+ # binary (Tauri stores asset path keys as plaintext). Informational only.+ if strings "$WORK/usr/bin/Cap" 2>/dev/null | grep -q "index.html"; then+ echo "Binary appears to embed the frontend (index.html key present)"+ else+ echo "::warning::Could not confirm embedded frontend key in binary (asset format may differ)"fi- echo "Frontend assets OK (index.html present)"# (2) every FFmpeg soname the binary NEEDs is bundledBIN="$WORK/usr/bin/Cap"NEEDED="$(objdump -p "$BIN" | awk '/NEEDED/{print $2}' | grep -E '^lib(av|sw|postproc)' || true)"+ echo "Binary NEEDs FFmpeg sonames:"; echo "${NEEDED:-(none)}"+ echo "Bundled FFmpeg libs:"; ls -1 "$WORK/usr/lib/cap" 2>/dev/null || trueMISSING=0for so in $NEEDED; doif [[ ! -f "$WORK/usr/lib/cap/$so" ]]; then@@ -351,7 +365,6 @@ jobs:MISSING=1fidone- echo "Bundled FFmpeg libs:"; ls -1 "$WORK/usr/lib/cap" 2>/dev/null || trueif [[ "$MISSING" -ne 0 ]]; thenecho "::error::FFmpeg soname mismatch between binary and bundled libs."exit 1