From 135050793131b2de20e536c3a028a06c00aae0d1 Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 14 Aug 2025 08:30:57 -0700 Subject: [PATCH] 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 --- .forgejo/workflows/ci.yml | 53 +++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 2bfa63cc..e99d5d79 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -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