Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
# Usage: build-with-sccache-fallback.sh <cargo command...>
log_file=$(mktemp)
trap 'rm -f "$log_file"' EXIT
echo "Building with sccache (fallback on errors)..."
# Attempt with sccache
if "$@" 2>&1 | tee "$log_file"; then
echo "✓ Build succeeded with sccache"
exit 0
fi
# Check for sccache-related errors
if grep -Eq "sccache.*(error|failed)|cache storage failed|dns error|connection (refused|timed out)" "$log_file"; then
echo "⚠️ sccache failure detected, retrying without cache..."
export RUSTC_WRAPPER=""
export SCCACHE_GHA_ENABLED=false
if "$@"; then
echo "✓ Build succeeded without sccache (fallback)"
exit 0
fi
fi
echo "✗ Build failed"
exit 1