From 31a80f36891488401e3eac2491789d70a1795aaf Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 27 Jun 2025 09:43:14 +0900 Subject: [PATCH 1/2] Revert "Improve spec test execution by adding retry logic for transient errors (#4393)" This reverts commit 64cafaff1eee1942154867e4c4088dd2bfb70284. --- .github/workflows/compilation_on_sgx.yml | 44 ++++++++++++++---------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/compilation_on_sgx.yml b/.github/workflows/compilation_on_sgx.yml index 3033c270e3..e6cc291081 100644 --- a/.github/workflows/compilation_on_sgx.yml +++ b/.github/workflows/compilation_on_sgx.yml @@ -288,24 +288,30 @@ jobs: sudo swapon /swapfile sudo swapon --show - - name: run spec tests with retry - id: run_spec_tests - uses: nick-fields/retry@v3 - with: - command: | - cd ./tests/wamr-test-suites - source /opt/intel/sgxsdk/environment + - name: run spec tests + run: | + set +e + source /opt/intel/sgxsdk/environment + attempts=0 + max_attempts=3 + + while [ $attempts -lt $max_attempts ]; do ./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }} - max_attempts: 3 - retry_on: error - shell: bash - timeout_minutes: 10 + exitcode="$?" - - name: print test results - run: | - echo "Test results:" - echo "${{ steps.run_spec_tests.outputs.stdout }}" - echo "${{ steps.run_spec_tests.outputs.stderr }}" - echo "Exit code: ${{ steps.run_spec_tests.outputs.exit_code }}" - echo "Exit error: ${{ steps.run_spec_tests.outputs.exit_error }}" - shell: bash + if [ $exitcode -eq 0 ]; then + echo "Spec test passed" + exit 0 + elif [ $exitcode -ne 143 ]; then + echo "Spec test failed with error code $exitcode" + exit 1 + fi + + echo "$exitcode is a known GitHub-hosted runner issue" + echo "::notice::Re-running the spec test due to error code 143" + attempts=$((attempts + 1)) + done + + echo "::notice::Report an error with code 143 in SGX CI after $max_attempts attempts" + exit 143 + working-directory: ./tests/wamr-test-suites From c5ea60be1f65c22b56b7ec509bece7160b0d51ef Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 27 Jun 2025 09:43:43 +0900 Subject: [PATCH 2/2] Revert "Add error handling for sgx ci (#4222)" This reverts commit 8ad47897d1f5579a3c9d75e4d7d234474fc54bbd. --- .github/workflows/compilation_on_sgx.yml | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/.github/workflows/compilation_on_sgx.yml b/.github/workflows/compilation_on_sgx.yml index e6cc291081..541f7a2840 100644 --- a/.github/workflows/compilation_on_sgx.yml +++ b/.github/workflows/compilation_on_sgx.yml @@ -290,28 +290,6 @@ jobs: - name: run spec tests run: | - set +e source /opt/intel/sgxsdk/environment - attempts=0 - max_attempts=3 - - while [ $attempts -lt $max_attempts ]; do - ./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }} - exitcode="$?" - - if [ $exitcode -eq 0 ]; then - echo "Spec test passed" - exit 0 - elif [ $exitcode -ne 143 ]; then - echo "Spec test failed with error code $exitcode" - exit 1 - fi - - echo "$exitcode is a known GitHub-hosted runner issue" - echo "::notice::Re-running the spec test due to error code 143" - attempts=$((attempts + 1)) - done - - echo "::notice::Report an error with code 143 in SGX CI after $max_attempts attempts" - exit 143 + ./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }} working-directory: ./tests/wamr-test-suites