@@ -254,7 +254,7 @@ jobs:
254254 ENABLE_Zicsr ENABLE_Zifencei \
255255 ENABLE_MOP_FUSION ENABLE_BLOCK_CHAINING; do
256256 echo "JIT test with ${ext}=0"
257- if ! (make ENABLE_JIT=1 clean && make ${ext}=0 ENABLE_JIT=1 check $PARALLEL); then
257+ if ! (make distclean && make ${ext}=0 ENABLE_JIT=1 check $PARALLEL); then
258258 echo "ERROR: JIT test failed with ${ext}=0"
259259 exit 1
260260 fi
@@ -359,39 +359,77 @@ jobs:
359359 # No 'sudo' is available
360360 install : |
361361 # Retry apt update with exponential backoff for mirror sync issues
362- # Note: dep11 (AppStream metadata) failures are non-critical for build tools
363- set -o pipefail
362+ # dep11 = AppStream metadata (GUI app discovery, non-critical for CLI builds)
363+ # Critical files: Packages, Sources, Release, InRelease (binary/source indices)
364+ set +e # Don't exit on apt update failure, we'll handle it manually
365+ APT_SUCCESS=0
364366 for i in 1 2 3; do
365- if apt update -qq --allow-releaseinfo-change 2>&1 | tee /tmp/apt-update.log; then
366- APT_EXIT=0
367+ echo "=== apt update attempt $i/3 ==="
368+ # Force success even with dep11 failures (we check for critical failures below)
369+ apt update --allow-releaseinfo-change 2>&1 | tee /tmp/apt-update.log || true
370+ APT_EXIT=${PIPESTATUS[0]:-$?} # Capture apt update exit code, not tee
371+
372+ # Check for critical package index failures (ignore dep11 metadata)
373+ # dep11 files like Components-arm64.yml.gz are non-critical (AppStream metadata)
374+ # Core package indices (Packages/Sources/Release/InRelease) MUST succeed
375+ if grep -q -E "Failed to fetch.*/(Packages|Sources|Release|InRelease)" /tmp/apt-update.log 2>/dev/null; then
376+ # Critical failure detected
377+ echo "ERROR: Critical package index files failed to download"
378+ grep -E "Failed to fetch.*/(Packages|Sources|Release|InRelease)" /tmp/apt-update.log | head -5
379+ if [ $i -lt 3 ]; then
380+ delay=$((i * 30))
381+ echo "Retrying in ${delay}s... (attempt $((i + 1))/3)"
382+ sleep $delay
383+ else
384+ echo "FATAL: Core package indices unavailable after 3 attempts"
385+ cat /tmp/apt-update.log
386+ exit 1
387+ fi
367388 else
368- APT_EXIT=$?
369- fi
370- # Check for critical failures (package indices), ignore dep11 metadata
371- # Include InRelease which is the combined Release+Release.gpg file
372- if [ $APT_EXIT -eq 0 ] && ! grep -E "Failed to fetch.*/(Packages|Sources|Release|InRelease)" /tmp/apt-update.log; then
373- echo "apt update succeeded (core package lists available)"
389+ # Success: core package indices available (dep11 failures OK)
390+ APT_SUCCESS=1
391+ if [ $APT_EXIT -eq 0 ]; then
392+ echo "✓ apt update succeeded (all package lists available)"
393+ else
394+ echo "✓ apt update completed with warnings (exit=$APT_EXIT)"
395+ echo " Core package indices: AVAILABLE"
396+ if grep -q "dep11" /tmp/apt-update.log 2>/dev/null; then
397+ echo " dep11 metadata: INCOMPLETE (non-critical, GUI app metadata)"
398+ echo " Ignoring dep11 failures - build dependencies will install correctly"
399+ fi
400+ fi
374401 break
375402 fi
376- if [ $i -lt 3 ]; then
377- delay=$((i * 30))
378- echo "apt update attempt $i: errors detected (exit=$APT_EXIT), waiting ${delay}s..."
379- sleep $delay
380- else
381- echo "Warning: Proceeding after 3 attempts - some package lists may be incomplete"
382- fi
383403 done
384- # Install packages - exit 0 even if dep11 metadata is incomplete
385- 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
386- # Verify critical packages were installed
404+
405+ # Verify we succeeded in at least one attempt
406+ if [ $APT_SUCCESS -ne 1 ]; then
407+ echo "FATAL: apt update failed after all retry attempts"
408+ exit 1
409+ fi
410+
411+ # Install packages (dep11 metadata failures are benign)
412+ echo "=== Installing build dependencies ==="
413+ # Note: apt-get may still exit 100 due to dep11, but packages install correctly
414+ # We verify installation success below, so force success here
415+ apt-get install -yqq --fix-missing \
416+ make git curl wget clang libsdl2-dev libsdl2-mixer-dev lsb-release software-properties-common gnupg bc || true
417+
418+ # Verify critical packages were installed successfully
419+ echo "=== Verifying critical build tools ==="
420+ MISSING_PKGS=""
387421 for pkg in make git curl clang bc; do
388422 if ! command -v $pkg >/dev/null 2>&1; then
389- echo "ERROR: Critical package $pkg failed to install!"
390- cat /tmp/apt-install.log
391- exit 1
423+ MISSING_PKGS="$MISSING_PKGS $pkg"
392424 fi
393425 done
394- echo "All critical build tools installed successfully"
426+
427+ if [ -n "$MISSING_PKGS" ]; then
428+ echo "ERROR: Critical packages failed to install:$MISSING_PKGS"
429+ exit 1
430+ fi
431+
432+ echo "✓ All critical build tools installed successfully"
395433 # FIXME: gcc build fails on Aarch64/Linux hosts
396434 env : |
397435 CC: clang-18
@@ -421,9 +459,9 @@ jobs:
421459 make $PARALLEL
422460 make check $PARALLEL
423461 make ENABLE_JIT=1 clean && make ENABLE_JIT=1 check $PARALLEL
424- make ENABLE_JIT=1 clean && make ENABLE_EXT_A=0 ENABLE_JIT=1 check $PARALLEL
425- make ENABLE_JIT=1 clean && make ENABLE_EXT_F=0 ENABLE_JIT=1 check $PARALLEL
426- make ENABLE_JIT=1 clean && make ENABLE_EXT_C=0 ENABLE_JIT=1 check $PARALLEL
462+ make distclean && make ENABLE_EXT_A=0 ENABLE_JIT=1 check $PARALLEL
463+ make distclean && make ENABLE_EXT_F=0 ENABLE_JIT=1 check $PARALLEL
464+ make distclean && make ENABLE_EXT_C=0 ENABLE_JIT=1 check $PARALLEL
427465 # TSAN on ARM64: Fixed memory layout (0x150000000000 for main, 0x151000000000 for JIT)
428466 set -o pipefail
429467 echo "=== TSAN Test 1/3: Interpreter + FULL4G (ARM64) ==="
@@ -617,7 +655,7 @@ jobs:
617655 ENABLE_Zicsr ENABLE_Zifencei \
618656 ENABLE_MOP_FUSION ENABLE_BLOCK_CHAINING; do
619657 echo "JIT test with ${ext}=0"
620- if ! (make ENABLE_JIT=1 clean && make ${ext}=0 ENABLE_JIT=1 check $PARALLEL); then
658+ if ! (make distclean && make ${ext}=0 ENABLE_JIT=1 check $PARALLEL); then
621659 echo "ERROR: JIT test failed with ${ext}=0"
622660 exit 1
623661 fi
0 commit comments