feat(template): add GTK4/PyGObject/Xvfb toolchain deps; always apt-update
Step 4a installs python3-gi gir1.2-gtk-4.0 xvfb for headless PyGObject GUI tests, with import-gi and Xvfb assertions. Step 1 now always runs apt-get update; --skip-update only skips the (slow) full upgrade. Previously --skip-update skipped the index refresh too, so a fresh package (gir1.2-gtk-4.0/xvfb) could not be located. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -51,12 +51,15 @@ assert_step() {
|
|||||||
# --- Step 1: apt update + upgrade ---
|
# --- Step 1: apt update + upgrade ---
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Step 1: apt update + upgrade ==="
|
echo "=== Step 1: apt update + upgrade ==="
|
||||||
|
# apt-get update always runs — package index must be fresh to locate packages.
|
||||||
|
# --skip-update only skips the (slow) full upgrade.
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive apt-get update -qq
|
||||||
|
assert_step "apt update completed" true
|
||||||
if [ "${SKIP_UPDATE:-0}" = "0" ]; then
|
if [ "${SKIP_UPDATE:-0}" = "0" ]; then
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get update -qq
|
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y -qq
|
sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y -qq
|
||||||
assert_step "apt update + upgrade completed" true
|
assert_step "apt upgrade completed" true
|
||||||
else
|
else
|
||||||
echo " [SKIP] --skip-update flag set"
|
echo " [SKIP] --skip-update flag set — upgrade skipped (index still refreshed)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Step 2: build essentials ---
|
# --- Step 2: build essentials ---
|
||||||
@@ -88,6 +91,14 @@ assert_step "git available" command -v git
|
|||||||
assert_step "7z available" command -v 7z
|
assert_step "7z available" command -v 7z
|
||||||
assert_step "curl available" command -v curl
|
assert_step "curl available" command -v curl
|
||||||
|
|
||||||
|
# --- Step 4a: GTK/GObject + headless display (PyGObject GUI tests) ---
|
||||||
|
echo ""
|
||||||
|
echo "=== Step 4a: GTK4 / GObject introspection + Xvfb ==="
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
|
||||||
|
python3-gi gir1.2-gtk-4.0 xvfb
|
||||||
|
assert_step "python3-gi importable" python3 -c "import gi"
|
||||||
|
assert_step "xvfb available" command -v Xvfb
|
||||||
|
|
||||||
# --- Step 4b: .NET SDK (optional) ---
|
# --- Step 4b: .NET SDK (optional) ---
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Step 4b: .NET SDK (optional) ==="
|
echo "=== Step 4b: .NET SDK (optional) ==="
|
||||||
|
|||||||
Reference in New Issue
Block a user