From 0d76d78e49e18d73f246df96e1234207808bf414 Mon Sep 17 00:00:00 2001 From: Justin Williams Date: Thu, 24 Jul 2025 13:06:37 +0000 Subject: [PATCH] CI - Added Debian 10 Repository Updates Signed-off-by: Justin Williams --- .github/workflows/amdsmi-build.yml | 132 +++++++++++++++++++---------- 1 file changed, 88 insertions(+), 44 deletions(-) diff --git a/.github/workflows/amdsmi-build.yml b/.github/workflows/amdsmi-build.yml index bf4b7b07dd..802d68cd07 100644 --- a/.github/workflows/amdsmi-build.yml +++ b/.github/workflows/amdsmi-build.yml @@ -33,6 +33,18 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Update repositories for Debian10 + if: matrix.os == 'Debian10' + run: | + set -e + echo 'Updating repositories for Debian10 (archived)' + cat > /etc/apt/sources.list << EOF + deb http://archive.debian.org/debian buster main + deb http://archive.debian.org/debian-security buster/updates main + EOF + echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99-disable-check-valid-until + apt update + - name: Build AMDSMI run: | set -e @@ -66,7 +78,7 @@ jobs: echo "All $RETRIES build attempts failed. Exiting." exit 1 fi - sleep $((2 ** (i - 1))) + sleep $((2 * i)) fi done echo "Build completed on ${{ matrix.os }}" @@ -99,7 +111,7 @@ jobs: echo "All $RETRIES installation attempts failed. Exiting." exit 1 fi - sleep $((2 ** (i - 1))) + sleep $((2 * i)) fi done echo "Build completed on ${{ matrix.os }}" @@ -134,6 +146,18 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Update repositories for Debian10 + if: matrix.os == 'Debian10' + run: | + set -e + echo 'Updating repositories for Debian10 (archived)' + cat > /etc/apt/sources.list << EOF + deb http://archive.debian.org/debian buster main + deb http://archive.debian.org/debian-security buster/updates main + EOF + echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99-disable-check-valid-until + apt update + - name: Build and Install for Test run: | set -e @@ -158,7 +182,7 @@ jobs: echo "All $RETRIES build attempts failed. Exiting." exit 1 fi - sleep $((2 ** (i - 1))) + sleep $((2 * i)) fi done @@ -176,7 +200,7 @@ jobs: echo "All $RETRIES installation attempts failed. Exiting." exit 1 fi - sleep $((2 ** (i - 1))) + sleep $((2 * i)) fi done @@ -231,23 +255,33 @@ jobs: echo 'Running AMDSMI tests' cd /opt/rocm/share/amd_smi/tests source amdsmitst.exclude - ./amdsmitst --gtest_filter="-$(echo ${BLACKLIST_ALL_ASICS})" > /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log 2>&1 - TEST_EXIT_CODE=$? - - if [ $TEST_EXIT_CODE -ne 0 ]; then - echo "AMDSMI tests failed with exit code $TEST_EXIT_CODE." - echo "=============== TEST OUTPUT ===============" - cat /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log | grep -E "\[==========\]|\[ PASSED \]|\[ SKIPPED \]|\[ FAILED \]" - echo "==============================================" - echo "AMDSMI tests failed" - exit $TEST_EXIT_CODE - else - echo "AMDSMI tests passed" - echo "=============== TEST OUTPUT ===============" - cat /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log | grep -E "\[==========\]|\[ PASSED \]|\[ SKIPPED \]|\[ FAILED \]" - echo "==============================================" - echo "AMDSMI tests done" - fi + + AMDSMI_RETRIES=3 + for attempt in $(seq 1 $AMDSMI_RETRIES); do + echo "AMDSMI test attempt $attempt for ${{ matrix.os }}..." + if ./amdsmitst --gtest_filter="-$(echo ${BLACKLIST_ALL_ASICS})" > /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log 2>&1; then + echo "AMDSMI tests passed on attempt $attempt" + echo "=============== TEST OUTPUT ===============" + cat /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log | grep -E "\[==========\]|\[ PASSED \]|\[ SKIPPED \]|\[ FAILED \]" + echo "==============================================" + echo "AMDSMI tests done" + break + else + TEST_EXIT_CODE=$? + echo "AMDSMI tests failed on attempt $attempt with exit code $TEST_EXIT_CODE" + if [ $attempt -eq $AMDSMI_RETRIES ]; then + echo "All $AMDSMI_RETRIES AMDSMI test attempts failed. Final failure." + echo "=============== TEST OUTPUT ===============" + cat /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log | grep -E "\[==========\]|\[ PASSED \]|\[ SKIPPED \]|\[ FAILED \]" + echo "==============================================" + echo "AMDSMI tests failed" + exit $TEST_EXIT_CODE + else + echo "Retrying AMDSMI tests in $((2 * attempt)) seconds..." + sleep $((2 * attempt)) + fi + fi + done # Python Tests echo 'Running Python tests' @@ -387,7 +421,7 @@ jobs: echo "All $RETRIES build attempts failed. Exiting." exit 1 fi - sleep $((2 ** (i - 1))) + sleep $((2 * i)) fi done echo "Build completed on ${{ matrix.os }}" @@ -426,7 +460,7 @@ jobs: echo "All $RETRIES build attempts failed. Exiting." exit 1 fi - sleep $((2 ** (i - 1))) + sleep $((2 * i)) fi done echo "Build completed on ${{ matrix.os }}" @@ -457,7 +491,7 @@ jobs: echo "All $RETRIES installation attempts failed. Exiting." exit 1 fi - sleep $((2 ** (i - 1))) + sleep $((2 * i)) fi done @@ -568,7 +602,7 @@ jobs: BUILD_FOLDER=$GITHUB_WORKSPACE/build RETRIES=5 - # Set QA_RPATHS to ignore empty (0x0010) and invalid (0x0002) RPATHs + # Set QA_RPATHS to ignore empty (0x0010 | 0x0002) RPATHs export QA_RPATHS=$((0x0010 | 0x0002)) for i in $(seq 1 $RETRIES); do @@ -588,7 +622,7 @@ jobs: echo "All $RETRIES build attempts failed. Exiting." exit 1 fi - sleep $((2 ** (i - 1))) + sleep $((2 * i)) fi done @@ -608,7 +642,7 @@ jobs: echo "All $RETRIES installation attempts failed. Exiting." exit 1 fi - sleep $((2 ** (i - 1))) + sleep $((2 * i)) fi done @@ -703,23 +737,33 @@ jobs: echo 'Running AMDSMI tests' cd /opt/rocm/share/amd_smi/tests source amdsmitst.exclude - ./amdsmitst --gtest_filter="-$(echo ${BLACKLIST_ALL_ASICS})" > /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log 2>&1 - TEST_EXIT_CODE=$? - - if [ $TEST_EXIT_CODE -ne 0 ]; then - echo "AMDSMI tests failed with exit code $TEST_EXIT_CODE." - echo "=============== TEST OUTPUT ===============" - cat /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log | grep -E "\[==========\]|\[ PASSED \]|\[ SKIPPED \]|\[ FAILED \]" - echo "==============================================" - echo "AMDSMI tests failed" - exit $TEST_EXIT_CODE - else - echo "AMDSMI tests passed" - echo "=============== TEST OUTPUT ===============" - cat /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log | grep -E "\[==========\]|\[ PASSED \]|\[ SKIPPED \]|\[ FAILED \]" - echo "==============================================" - echo "AMDSMI tests done" - fi + + AMDSMI_RETRIES=3 + for attempt in $(seq 1 $AMDSMI_RETRIES); do + echo "AMDSMI test attempt $attempt for ${{ matrix.os }}..." + if ./amdsmitst --gtest_filter="-$(echo ${BLACKLIST_ALL_ASICS})" > /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log 2>&1; then + echo "AMDSMI tests passed on attempt $attempt" + echo "=============== TEST OUTPUT ===============" + cat /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log | grep -E "\[==========\]|\[ PASSED \]|\[ SKIPPED \]|\[ FAILED \]" + echo "==============================================" + echo "AMDSMI tests done" + break + else + TEST_EXIT_CODE=$? + echo "AMDSMI tests failed on attempt $attempt with exit code $TEST_EXIT_CODE" + if [ $attempt -eq $AMDSMI_RETRIES ]; then + echo "All $AMDSMI_RETRIES AMDSMI test attempts failed. Final failure." + echo "=============== TEST OUTPUT ===============" + cat /tmp/test-results-${{ matrix.os }}/amdsmi_tests.log | grep -E "\[==========\]|\[ PASSED \]|\[ SKIPPED \]|\[ FAILED \]" + echo "==============================================" + echo "AMDSMI tests failed" + exit $TEST_EXIT_CODE + else + echo "Retrying AMDSMI tests in $((2 * attempt)) seconds..." + sleep $((2 * attempt)) + fi + fi + done # Python Tests echo 'Running Python tests'