|
10 | 10 | - opened |
11 | 11 | - synchronize |
12 | 12 | paths: |
13 | | - - ".github/workflows/build_llvm_libraries.yml" |
14 | | - - ".github/workflows/compilation_on_sgx.yml" |
| 13 | + - ".github/workflows/**" |
15 | 14 | - "build-scripts/**" |
16 | 15 | - "core/**" |
17 | 16 | - "!core/deps/**" |
|
26 | 25 | - main |
27 | 26 | - "dev/**" |
28 | 27 | paths: |
29 | | - - ".github/workflows/build_llvm_libraries.yml" |
30 | | - - ".github/workflows/compilation_on_sgx.yml" |
| 28 | + - ".github/workflows/**" |
31 | 29 | - "build-scripts/**" |
32 | 30 | - "core/**" |
33 | 31 | - "!core/deps/**" |
@@ -288,30 +286,22 @@ jobs: |
288 | 286 | sudo swapon /swapfile |
289 | 287 | sudo swapon --show |
290 | 288 |
|
291 | | - - name: run spec tests |
292 | | - run: | |
293 | | - set +e |
294 | | - source /opt/intel/sgxsdk/environment |
295 | | - attempts=0 |
296 | | - max_attempts=3 |
297 | | -
|
298 | | - while [ $attempts -lt $max_attempts ]; do |
| 289 | + - name: run spec tests with retry |
| 290 | + id: run_spec_tests |
| 291 | + uses: nick-fields/retry@v3 |
| 292 | + with: |
| 293 | + command: | |
| 294 | + cd ./tests/wamr-test-suites |
| 295 | + source /opt/intel/sgxsdk/environment |
299 | 296 | ./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }} |
300 | | - exitcode="$?" |
| 297 | + max_attempts: 3 |
| 298 | + retry_on: error |
| 299 | + retry_on_exit_code: 143 |
| 300 | + shell: bash |
| 301 | + timeout_minutes: 10 |
301 | 302 |
|
302 | | - if [ $exitcode -eq 0 ]; then |
303 | | - echo "Spec test passed" |
304 | | - exit 0 |
305 | | - elif [ $exitcode -ne 143 ]; then |
306 | | - echo "Spec test failed with error code $exitcode" |
307 | | - exit 1 |
308 | | - fi |
309 | | -
|
310 | | - echo "$exitcode is a known GitHub-hosted runner issue" |
311 | | - echo "::notice::Re-running the spec test due to error code 143" |
312 | | - attempts=$((attempts + 1)) |
313 | | - done |
314 | | -
|
315 | | - echo "::notice::Report an error with code 143 in SGX CI after $max_attempts attempts" |
316 | | - exit 143 |
317 | | - working-directory: ./tests/wamr-test-suites |
| 303 | + #TODO: just for test. remove me before merging |
| 304 | + - name: print test result |
| 305 | + run: | |
| 306 | + echo "-->" ${{ steps.run_spec_tests.outputs.exit_code }} |
| 307 | + echo "-->" ${{ steps.run_spec_tests.outputs.exit_error }} |
0 commit comments