Fix CI: Make .deb files mandatory, handle optional artifacts gracefully
- .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:
parent
74e3140090
commit
da4a1f181e
1 changed files with 48 additions and 5 deletions
|
|
@ -77,6 +77,14 @@ jobs:
|
|||
echo "Using pre-installed Rust version:"
|
||||
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: |
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue