* fix(appimage): reuse the Vulkan pywhispercpp build across CI runs The x86_64 Build AppImage step spends most of its time recompiling pywhispercpp with Vulkan. That compile depends on the base image, tool_checksums.txt, and the pywhispercpp pin, not on the commit. Cache the native tree under one key shared by CI, Nightly, and Release. * fix(appimage): reject a partial Vulkan cache and key the build tools A failed copy could leave a tree that still contained libggml-vulkan.so, and the next run would reuse it. Check each copy, and keep the previous cache until the new one is in place. The cache id now also covers the pinned cmake and ninja export and the Vulkan compile flags. The hit path is what the build calls, and a test runs it with a stub compile command. * chore(ci): rerun AppImage against the saved Vulkan cache The review fix changed the native cache id, so run 37586979294 compiled pywhispercpp again and saved appimage-native-X64-ebf478b87986e2f6b9d80c97c2f5869fe3120c2bcd48f5d8f5a65fe06ec03015. This commit leaves the base image, tool checksums, pywhispercpp pin, installer tool pins, and Vulkan compile flags alone.
41 lines
1.7 KiB
Bash
Executable File
41 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run the AppImage build inside the pinned base image.
|
|
#
|
|
# Usage: docker-build.sh <path-to-wheel> <version> [output-dir]
|
|
#
|
|
# This is what CI calls and what you should call locally, so that what you get
|
|
# is what CI gets: the base image decides the glibc floor and the GTK version
|
|
# the AppImage links against, and building on the host instead means shipping
|
|
# whatever that host happens to run.
|
|
#
|
|
# Honours VOCALINUX_APPIMAGE_REQUIRE_VULKAN / _SKIP_VULKAN like build.sh, and
|
|
# keeps glslc and the pywhispercpp Vulkan build in VOCALINUX_APPIMAGE_CACHE
|
|
# (~/.cache/vocalinux-appimage by default) so the next build reuses them.
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/../.." && pwd)"
|
|
IMAGE="$(awk '$1=="base-image" {print $3}' "$REPO_ROOT/packaging/appimage/tool_checksums.txt")"
|
|
if [ -z "$IMAGE" ]; then
|
|
echo "No base-image pin in packaging/appimage/tool_checksums.txt" >&2
|
|
exit 1
|
|
fi
|
|
|
|
CACHE="${VOCALINUX_APPIMAGE_CACHE:-${XDG_CACHE_HOME:-$HOME/.cache}/vocalinux-appimage}"
|
|
mkdir -p "$CACHE"
|
|
|
|
# The wheel and output dir are given as host paths; the repo is mounted at the
|
|
# same place it lives, so relative arguments keep working inside.
|
|
# seccomp=unconfined only to allow unshare: without it build.sh's isolated GI
|
|
# smoke test silently skips, which is how #585 shipped.
|
|
exec docker run --rm \
|
|
--security-opt seccomp=unconfined \
|
|
-v "$REPO_ROOT:$REPO_ROOT" -w "$REPO_ROOT" \
|
|
-v "$CACHE:/cache" \
|
|
-e VOCALINUX_APPIMAGE_CACHE=/cache \
|
|
-e VOCALINUX_APPIMAGE_REQUIRE_VULKAN \
|
|
-e VOCALINUX_APPIMAGE_SKIP_VULKAN \
|
|
-e CMAKE_BUILD_PARALLEL_LEVEL \
|
|
-e HOST_UID="$(id -u)" \
|
|
-e HOST_GID="$(id -g)" \
|
|
"$IMAGE" bash packaging/appimage/container-build.sh "$@"
|