fix(ci): reclaim space for semantic backup smoke

This commit is contained in:
2026-08-25 20:12:34 +02:00
parent a6655a5e2c
commit 97c6788f16
3 changed files with 42 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
# The local distribution gate pulls the 7 GB Ollama image, downloads the default embedding
# model, builds the application images, and then archives every durable volume. GitHub's hosted
# Linux image also ships toolchains this job never uses. Remove only those known, runner-owned
# installations so the backup is tested with the production semantic stack instead of a stub.
[[ "$(uname -s)" == Linux ]] || {
printf 'Linux is required for hosted-runner disk preparation.\n' >&2
exit 1
}
readonly unused_toolchains=(
/usr/local/lib/android
/usr/share/dotnet
/opt/ghc
/usr/local/.ghcup
)
for path in "${unused_toolchains[@]}"; do
[[ -e "$path" || -L "$path" ]] || continue
sudo rm -rf -- "$path"
done
sudo apt-get clean
docker system prune --all --force
df -h /
docker system df