fix(linux): refresh CEF runtime cache

This commit is contained in:
Erwan Leboucher committed 2026-07-27 23:14:31 +02:00
1 parent 8f079b8080
commit 852dd7fe9b
2 files changed
+43

No files matched your search

+9
View File
@@ -239,6 +239,15 @@ jobs:
done
# --- Linux: CEF runtime, packaged as deb / rpm / AppImage ---
- name: Remove cached CEF build outputs
if: matrix.cef
shell: bash
run: |
build_dir="src-tauri/target/release/build"
if [ -d "$build_dir" ]; then
find "$build_dir" -mindepth 1 -maxdepth 1 -type d -name 'cef-*' -print -exec rm -rf {} +
fi
- name: Build CEF binary
if: matrix.cef
shell: bash
+34
View File
@@ -21,6 +21,40 @@ if [ -z "$CEF_DIR" ]; then
exit 1
fi
CEF_VERSION="$(awk '
/^\[\[package\]\]$/ { in_cef=0 }
/^name = "cef"$/ { in_cef=1 }
in_cef && /^version = / {
gsub(/"/, "", $3)
print $3
exit
}
' "$ROOT/src-tauri/Cargo.lock")"
if [ -z "$CEF_VERSION" ]; then
echo "❌ Resolved cef version not found in src-tauri/Cargo.lock." >&2
exit 1
fi
CEF_MAJOR="${CEF_VERSION%%.*}"
CEF_LIB="$CEF_DIR/libcef.so"
if [ ! -f "$CEF_LIB" ]; then
echo "❌ libcef.so not found in $CEF_DIR." >&2
exit 1
fi
RUNTIME_MAJOR="$(
strings -a "$CEF_LIB" |
grep -Eio '[0-9]{3}\.[0-9]+\.[0-9]+\+g[^[:space:]]+\+chromium-[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' |
awk -F. 'NR == 1 { print $1; exit }'
)" || true
if [ -z "$RUNTIME_MAJOR" ]; then
echo "❌ CEF runtime version not found in $CEF_LIB." >&2
exit 1
fi
if [ "$RUNTIME_MAJOR" != "$CEF_MAJOR" ]; then
echo "❌ CEF runtime major $RUNTIME_MAJOR does not match resolved cef major $CEF_MAJOR." >&2
exit 1
fi
mkdir -p "$DEST"
echo "→ copying CEF runtime from $CEF_DIR to $DEST"
# Libraries (libcef.so + ANGLE/SwiftShader), crashpad handler, then resources.