@@ -238,7 +238,7 @@ jobs:
238238 ENABLE_Zicsr ENABLE_Zifencei \
239239 ENABLE_MOP_FUSION ENABLE_BLOCK_CHAINING; do
240240 echo "JIT test with ${ext}=0"
241- if ! (make ENABLE_JIT=1 clean && make ${ext}=0 ENABLE_JIT=1 check $PARALLEL); then
241+ if ! (make distclean && make ${ext}=0 ENABLE_JIT=1 check $PARALLEL); then
242242 echo "ERROR: JIT test failed with ${ext}=0"
243243 exit 1
244244 fi
@@ -343,39 +343,77 @@ jobs:
343343 # No 'sudo' is available
344344 install : |
345345 # Retry apt update with exponential backoff for mirror sync issues
346- # Note: dep11 (AppStream metadata) failures are non-critical for build tools
347- set -o pipefail
346+ # dep11 = AppStream metadata (GUI app discovery, non-critical for CLI builds)
347+ # Critical files: Packages, Sources, Release, InRelease (binary/source indices)
348+ set +e # Don't exit on apt update failure, we'll handle it manually
349+ APT_SUCCESS=0
348350 for i in 1 2 3; do
349- if apt update -qq --allow-releaseinfo-change 2>&1 | tee /tmp/apt-update.log; then
350- APT_EXIT=0
351+ echo "=== apt update attempt $i/3 ==="
352+ # Force success even with dep11 failures (we check for critical failures below)
353+ apt update --allow-releaseinfo-change 2>&1 | tee /tmp/apt-update.log || true
354+ APT_EXIT=${PIPESTATUS[0]:-$?} # Capture apt update exit code, not tee
355+
356+ # Check for critical package index failures (ignore dep11 metadata)
357+ # dep11 files like Components-arm64.yml.gz are non-critical (AppStream metadata)
358+ # Core package indices (Packages/Sources/Release/InRelease) MUST succeed
359+ if grep -q -E "Failed to fetch.*/(Packages|Sources|Release|InRelease)" /tmp/apt-update.log 2>/dev/null; then
360+ # Critical failure detected
361+ echo "ERROR: Critical package index files failed to download"
362+ grep -E "Failed to fetch.*/(Packages|Sources|Release|InRelease)" /tmp/apt-update.log | head -5
363+ if [ $i -lt 3 ]; then
364+ delay=$((i * 30))
365+ echo "Retrying in ${delay}s... (attempt $((i + 1))/3)"
366+ sleep $delay
367+ else
368+ echo "FATAL: Core package indices unavailable after 3 attempts"
369+ cat /tmp/apt-update.log
370+ exit 1
371+ fi
351372 else
352- APT_EXIT=$?
353- fi
354- # Check for critical failures (package indices), ignore dep11 metadata
355- # Include InRelease which is the combined Release+Release.gpg file
356- if [ $APT_EXIT -eq 0 ] && ! grep -E "Failed to fetch.*/(Packages|Sources|Release|InRelease)" /tmp/apt-update.log; then
357- echo "apt update succeeded (core package lists available)"
373+ # Success: core package indices available (dep11 failures OK)
374+ APT_SUCCESS=1
375+ if [ $APT_EXIT -eq 0 ]; then
376+ echo "✓ apt update succeeded (all package lists available)"
377+ else
378+ echo "✓ apt update completed with warnings (exit=$APT_EXIT)"
379+ echo " Core package indices: AVAILABLE"
380+ if grep -q "dep11" /tmp/apt-update.log 2>/dev/null; then
381+ echo " dep11 metadata: INCOMPLETE (non-critical, GUI app metadata)"
382+ echo " Ignoring dep11 failures - build dependencies will install correctly"
383+ fi
384+ fi
358385 break
359386 fi
360- if [ $i -lt 3 ]; then
361- delay=$((i * 30))
362- echo "apt update attempt $i: errors detected (exit=$APT_EXIT), waiting ${delay}s..."
363- sleep $delay
364- else
365- echo "Warning: Proceeding after 3 attempts - some package lists may be incomplete"
366- fi
367387 done
368- # Install packages - exit 0 even if dep11 metadata is incomplete
369- apt install -yqq make git curl wget clang libsdl2-dev libsdl2-mixer-dev lsb-release software-properties-common gnupg bc 2>&1 | tee /tmp/apt-install.log || true
370- # Verify critical packages were installed
388+
389+ # Verify we succeeded in at least one attempt
390+ if [ $APT_SUCCESS -ne 1 ]; then
391+ echo "FATAL: apt update failed after all retry attempts"
392+ exit 1
393+ fi
394+
395+ # Install packages (dep11 metadata failures are benign)
396+ echo "=== Installing build dependencies ==="
397+ # Note: apt-get may still exit 100 due to dep11, but packages install correctly
398+ # We verify installation success below, so force success here
399+ apt-get install -yqq --fix-missing \
400+ make git curl wget clang libsdl2-dev libsdl2-mixer-dev lsb-release software-properties-common gnupg bc || true
401+
402+ # Verify critical packages were installed successfully
403+ echo "=== Verifying critical build tools ==="
404+ MISSING_PKGS=""
371405 for pkg in make git curl clang bc; do
372406 if ! command -v $pkg >/dev/null 2>&1; then
373- echo "ERROR: Critical package $pkg failed to install!"
374- cat /tmp/apt-install.log
375- exit 1
407+ MISSING_PKGS="$MISSING_PKGS $pkg"
376408 fi
377409 done
378- echo "All critical build tools installed successfully"
410+
411+ if [ -n "$MISSING_PKGS" ]; then
412+ echo "ERROR: Critical packages failed to install:$MISSING_PKGS"
413+ exit 1
414+ fi
415+
416+ echo "✓ All critical build tools installed successfully"
379417 # FIXME: gcc build fails on Aarch64/Linux hosts
380418 env : |
381419 CC: clang-18
@@ -405,9 +443,9 @@ jobs:
405443 make $PARALLEL
406444 make check $PARALLEL
407445 make ENABLE_JIT=1 clean && make ENABLE_JIT=1 check $PARALLEL
408- make ENABLE_JIT=1 clean && make ENABLE_EXT_A=0 ENABLE_JIT=1 check $PARALLEL
409- make ENABLE_JIT=1 clean && make ENABLE_EXT_F=0 ENABLE_JIT=1 check $PARALLEL
410- make ENABLE_JIT=1 clean && make ENABLE_EXT_C=0 ENABLE_JIT=1 check $PARALLEL
446+ make distclean && make ENABLE_EXT_A=0 ENABLE_JIT=1 check $PARALLEL
447+ make distclean && make ENABLE_EXT_F=0 ENABLE_JIT=1 check $PARALLEL
448+ make distclean && make ENABLE_EXT_C=0 ENABLE_JIT=1 check $PARALLEL
411449 # TSAN on ARM64: Fixed memory layout (0x150000000000 for main, 0x151000000000 for JIT)
412450 set -o pipefail
413451 echo "=== TSAN Test 1/3: Interpreter + FULL4G (ARM64) ==="
@@ -601,7 +639,7 @@ jobs:
601639 ENABLE_Zicsr ENABLE_Zifencei \
602640 ENABLE_MOP_FUSION ENABLE_BLOCK_CHAINING; do
603641 echo "JIT test with ${ext}=0"
604- if ! (make ENABLE_JIT=1 clean && make ${ext}=0 ENABLE_JIT=1 check $PARALLEL); then
642+ if ! (make distclean && make ${ext}=0 ENABLE_JIT=1 check $PARALLEL); then
605643 echo "ERROR: JIT test failed with ${ext}=0"
606644 exit 1
607645 fi
0 commit comments