Fix CI: Make .deb files mandatory, handle optional artifacts gracefully
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Successful in 6m18s
Comprehensive CI/CD Pipeline / Security Audit (push) Failing after 6s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 1m33s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped

- .deb files are now REQUIRED - workflow fails if none exist
- Optional artifacts (CI summary, Rust binary) are handled gracefully
- Force stable Rust toolchain to avoid SIGSEGV bugs in 1.89.0
- Search parent directories for .deb files (dpkg-buildpackage behavior)
- Should resolve Build 74 Rust compilation failure
This commit is contained in:
joe 2025-08-14 08:30:57 -07:00
parent d5afc45966
commit 1350507931

View file

@ -78,6 +78,14 @@ jobs:
rustc --version
cargo --version
# Force stable Rust to avoid SIGSEGV bugs in 1.89.0
echo "🔧 Forcing stable Rust toolchain..."
rustup default stable
rustup update stable
echo "✅ Now using stable Rust:"
rustc --version
cargo --version
- name: Build project
run: |
cargo build --release
@ -253,8 +261,31 @@ jobs:
echo " 🎯 $PKG_NAME ($PKG_VERSION) [$PKG_ARCH] - $PKG_SIZE"
done
else
echo "❌ No .deb packages found!"
exit 1
echo "⚠️ No .deb packages found in current directory"
echo "🔍 Searching for .deb files in parent directories..."
# Look for .deb files in parent directories (where dpkg-buildpackage puts them)
if ls ../*.deb >/dev/null 2>&1; then
echo "✅ Found .deb files in parent directory, copying them..."
cp ../*.deb artifacts/
echo "📦 Packages copied:"
ls -la artifacts/*.deb
# Show package details
echo ""
echo "📋 Package Details:"
for pkg in artifacts/*.deb; do
PKG_NAME=$(dpkg-deb -f "$pkg" Package 2>/dev/null || echo "Unknown")
PKG_VERSION=$(dpkg-deb -f "$pkg" Version 2>/dev/null || echo "Unknown")
PKG_ARCH=$(dpkg-deb -f "$pkg" Architecture 2>/dev/null || echo "Unknown")
PKG_SIZE=$(du -h "$pkg" | cut -f1)
echo " 🎯 $PKG_NAME ($PKG_VERSION) [$PKG_ARCH] - $PKG_SIZE"
done
else
echo "❌ CRITICAL: No .deb packages found anywhere!"
echo "🚨 .deb packages are REQUIRED - build must fail"
exit 1 # Fail the workflow - .deb files are mandatory
fi
fi
# Copy build summary
@ -361,10 +392,22 @@ jobs:
run: |
echo "Publishing .deb packages to Forgejo Debian Registry..."
# Check if we have .deb files
# .deb files are MANDATORY - fail if none exist
if ! ls *.deb >/dev/null 2>&1; then
echo "❌ No .deb files found to publish"
exit 1
echo "⚠️ No .deb files found in current directory"
echo "🔍 Searching for .deb files in parent directories..."
# Look for .deb files in parent directories (where dpkg-buildpackage puts them)
if ls ../*.deb >/dev/null 2>&1; then
echo "✅ Found .deb files in parent directory, copying them..."
cp ../*.deb ./
echo "📦 Copied packages:"
ls -la *.deb
else
echo "❌ CRITICAL: No .deb files found anywhere!"
echo "🚨 .deb packages are REQUIRED - build must fail"
exit 1 # Fail the workflow - .deb files are mandatory
fi
fi
# Get build info for registry