From 3d58edd93b98dc5aed5dc5c8ea6e0d42309a4a60 Mon Sep 17 00:00:00 2001 From: Nikita Kornev Date: Thu, 7 Mar 2024 17:54:04 +0100 Subject: [PATCH] [CI] Improve SYCL-CTS job in Nightly workflow (#12934) 1. Use the normal runner instead of failing one. 2. Keep executing the test loop if suite fails. --- .github/workflows/sycl-linux-run-tests.yml | 22 ++++++++++++++++++++++ .github/workflows/sycl-nightly.yml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index 541060845829d..1db9951bcf0c4 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -297,6 +297,13 @@ jobs: if: inputs.tests_selector == 'cts' env: ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }} + # By-default GitHub actions execute the "run" shell script with -e option, + # so the execution terminates if any command returns a non-zero status. + # Since we're using a loop to run all test-binaries separately, some test + # may fail and terminate the execution. Setting "shell" value to override + # the default behavior. + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#custom-shell + shell: bash {0} # FIXME: For some reason the "sub_group api" test-case is failing with # SIGSEGV while running test_all, so running each binary separately. # BTW test_all requires a lot of resources to build it, so probably it'll @@ -304,10 +311,25 @@ jobs: # run: | # ./build-cts/bin/test_all $CTS_TEST_ARGS run: | + status="" + failed_suites="" for i in `ls -1 ./build-cts/bin`; do if [ "$i" != "test_all" ]; then echo "::group::Running $i" build-cts/bin/$i + if [ $? -ne 0 ]; then + status=1 + if [$failed_suites == ""]; then + failed_suites=$i + else + failed_suites="$failed_suites, $i" + fi + fi echo "::endgroup::" fi done + if [ -n "$status" ]; then + echo "Failed suite(s): $failed_suites" + exit 1 + fi + exit 0 diff --git a/.github/workflows/sycl-nightly.yml b/.github/workflows/sycl-nightly.yml index f8671ff0eabdf..606577669489a 100644 --- a/.github/workflows/sycl-nightly.yml +++ b/.github/workflows/sycl-nightly.yml @@ -73,7 +73,7 @@ jobs: target_devices: ext_oneapi_cuda:gpu - name: SYCL-CTS - runner: '["cts-cpu"]' + runner: '["Linux", "gen12"]' image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN target_devices: opencl:cpu