@@ -210,27 +210,6 @@ jobs:
210
210
devops
211
211
- name : Register cleanup after job is finished
212
212
uses : ./devops/actions/cleanup
213
- - name : Checkout E2E tests
214
- if : inputs.tests_selector == 'e2e'
215
- uses : ./devops/actions/cached_checkout
216
- with :
217
- path : llvm
218
- ref : ${{ inputs.ref || github.sha }}
219
- merge_ref : ${{ inputs.merge_ref }}
220
- cache_path : " /__w/repo_cache/"
221
- - name : Checkout SYCL CTS tests
222
- if : inputs.tests_selector == 'cts' && inputs.cts_testing_mode != 'run-only'
223
- uses : ./devops/actions/cached_checkout
224
- with :
225
- path : khronos_sycl_cts
226
- repository : ' KhronosGroup/SYCL-CTS'
227
- ref : ' main'
228
- default_branch : ' main'
229
- cache_path : " /__w/repo_cache/"
230
- - name : SYCL CTS GIT submodules init
231
- if : inputs.tests_selector == 'cts' && inputs.cts_testing_mode != 'run-only'
232
- run : |
233
- git -C khronos_sycl_cts submodule update --init
234
213
- name : Install drivers
235
214
if : inputs.install_igc_driver == 'true' || inputs.install_dev_igc_driver == 'true'
236
215
env :
@@ -312,178 +291,26 @@ jobs:
312
291
cat /usr/local/lib/igc/IGCTAG.txt
313
292
fi
314
293
315
- - name : Download E2E Binaries
316
- if : inputs.e2e_binaries_artifact != ''
317
- uses : actions/download-artifact@v4
318
- with :
319
- name : ${{ inputs.e2e_binaries_artifact }}
320
- - name : Extract E2E Binaries
321
- if : inputs.e2e_binaries_artifact != ''
322
- run : |
323
- mkdir build-e2e
324
- tar -I 'zstd' -xf e2e_binaries.tar.zst -C build-e2e
325
-
326
- - name : Deduce E2E CMake options
327
- if : inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
328
- id : cmake_opts
329
- shell : bash
330
- env :
331
- CMAKE_EXTRA_ARGS : ${{ inputs.extra_cmake_args }}
332
- run : |
333
- if [ -n "$CMAKE_EXTRA_ARGS" ]; then
334
- echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
335
- fi
336
- - name : Configure E2E tests
337
- if : inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
338
- run : |
339
- cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="$(which clang++)" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
340
- - name : SYCL End-to-end tests
341
- shell : bash {0}
294
+ - name : Run E2E Tests
342
295
if : inputs.tests_selector == 'e2e'
343
- env :
344
- LIT_OPTS : -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param test-mode=${{ inputs.e2e_testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }}
345
- run : |
346
- ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
347
- exit_code=$?
348
- cat e2e.log
349
- if [ $exit_code -ne 0 ]; then
350
- awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
351
- fi
352
- exit $exit_code
353
- - name : Build SYCL CTS tests
354
- if : inputs.tests_selector == 'cts' && inputs.sycl_cts_artifact == ''
355
- env :
356
- CMAKE_EXTRA_ARGS : ${{ inputs.extra_cmake_args }}
357
- run : |
358
- cts_exclude_filter=""
359
- # If CTS_TESTS_TO_BUILD is null - use filter
360
- if [ -z "$CTS_TESTS_TO_BUILD" ]; then
361
- if [ "${{ contains(inputs.cts_testing_mode, 'build-only') }}" = "true" ]; then
362
- cts_exclude_filter=$PWD/devops/cts_exclude_filter_compfails
363
- elif [ "${{ contains(inputs.target_devices, 'opencl:cpu') }}" = "true" ]; then
364
- cts_exclude_filter=$PWD/devops/cts_exclude_filter_OCL_CPU
365
- elif [ "${{ contains(inputs.target_devices, 'level_zero:gpu') }}" = "true" ]; then
366
- cts_exclude_filter=$PWD/devops/cts_exclude_filter_L0_GPU
367
- fi
368
-
369
- # List excluded SYCL CTS categories:
370
- # SYCL_CTS_EXCLUDE_TEST_CATEGORIES - Optional file specifying a list
371
- # of test categories to be excluded from the build.
372
- echo "::group::Excluded test categories"
373
- cat $cts_exclude_filter
374
- echo "::endgroup::"
375
- fi
376
-
377
- cmake -GNinja -B./build-cts -S./khronos_sycl_cts -DCMAKE_CXX_COMPILER=$(which clang++) \
378
- -DSYCL_IMPLEMENTATION=DPCPP \
379
- -DSYCL_CTS_EXCLUDE_TEST_CATEGORIES="$cts_exclude_filter" \
380
- -DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF \
381
- -DDPCPP_INSTALL_DIR="$(dirname $(which clang++))/.." \
382
- $CMAKE_EXTRA_ARGS
383
- # Ignore errors so that if one category build fails others still have a
384
- # chance to finish and be executed at the run stage. Note that
385
- # "test_conformance" target skips building "test_all" executable.
386
- ninja -C build-cts -k0 $( [ -n "$CTS_TESTS_TO_BUILD" ] && echo "$CTS_TESTS_TO_BUILD" || echo "test_conformance")
387
-
388
- - name : Pack SYCL-CTS binaries
389
- if : always() && !cancelled() && inputs.cts_testing_mode == 'build-only'
390
- run : tar -I 'zstd -9' -cf sycl_cts_bin.tar.zst -C ./build-cts/bin .
391
-
392
- - name : Upload SYCL-CTS binaries
393
- if : always() && !cancelled() && inputs.cts_testing_mode == 'build-only'
394
- uses : actions/upload-artifact@v4
296
+ uses : ./devops/actions/run-tests/e2e
395
297
with :
396
- name : sycl_cts_bin
397
- path : sycl_cts_bin.tar.zst
298
+ ref : ${{ inputs.ref || github.sha }}
299
+ merge_ref : ${{ inputs.merge_ref }}
300
+ e2e_binaries_artifact : ${{ inputs.e2e_binaries_artifact }}
301
+ extra_cmake_args : ${{ inputs.extra_cmake_args }}
302
+ e2e_testing_mode : ${{ inputs.e2e_testing_mode }}
303
+ target_devices : ${{ inputs.target_devices }}
304
+ extra_lit_opts : ${{ inputs.extra_lit_opts }}
305
+ artifact_suffix : ${{ inputs.artifact_suffix }}
398
306
retention-days : ${{ inputs.retention-days }}
399
307
400
- - name : Download SYCL-CTS binaries
401
- if : inputs.sycl_cts_artifact != ''
402
- uses : actions/download-artifact@v4
403
- with :
404
- name : ${{ inputs.sycl_cts_artifact }}
405
-
406
- - name : Extract SYCL-CTS binaries
407
- if : inputs.sycl_cts_artifact != ''
408
- run : |
409
- mkdir -p build-cts/bin
410
- tar -I 'zstd' -xf sycl_cts_bin.tar.zst -C build-cts/bin
411
-
412
- - name : SYCL CTS List devices
413
- # Proceed with execution even if the 'build' step did not succeed.
414
- if : inputs.tests_selector == 'cts' && (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only'
415
- env :
416
- ONEAPI_DEVICE_SELECTOR : ${{ inputs.target_devices }}
417
- run : |
418
- ./build-cts/bin/* --list-devices
419
-
420
- # If the suite was built on another machine then the build contains the full
421
- # set of tests. We have special files to filter out some test categories,
422
- # see "devops/cts_exclude_filter_*". Each configuration has its own file, e.g.
423
- # there is "cts_exclude_filter_OCL_CPU" for opencl:cpu device. Therefore,
424
- # these files may differ from each other, so when there is a pre-built set of
425
- # tests, we need to filter it according to the filter-file.
426
- - name : Filter SYCL CTS test categories
427
- if : inputs.sycl_cts_artifact != ''
428
- shell : bash
429
- run : |
430
- cts_exclude_filter=""
431
- if [ "${{ contains(inputs.target_devices, 'opencl:cpu') }}" = "true" ]; then
432
- cts_exclude_filter=$PWD/devops/cts_exclude_filter_OCL_CPU
433
- elif [ "${{ contains(inputs.target_devices, 'level_zero:gpu') }}" = "true" ]; then
434
- cts_exclude_filter=$PWD/devops/cts_exclude_filter_L0_GPU
435
- fi
436
-
437
- while IFS= read -r line; do
438
- if [[ $line != \#* ]]; then
439
- rm "./build-cts/bin/test_$line"
440
- fi
441
- done < "$cts_exclude_filter"
442
-
443
- - name : Run SYCL CTS tests
444
- # Proceed with execution even if the previous two steps did not succeed.
445
- if : inputs.tests_selector == 'cts' && (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only'
446
- env :
447
- ONEAPI_DEVICE_SELECTOR : ${{ inputs.target_devices }}
448
- # This job takes ~100min usually. But sometimes some test isn't
449
- # responding, so the job reaches the 360min limit. Setting a lower one.
450
- timeout-minutes : 150
451
- # By-default GitHub actions execute the "run" shell script with -e option,
452
- # so the execution terminates if any command returns a non-zero status.
453
- # Since we're using a loop to run all test-binaries separately, some test
454
- # may fail and terminate the execution. Setting "shell" value to override
455
- # the default behavior.
456
- # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#custom-shell
457
- shell : bash {0}
458
- run : |
459
- # Run each test category separately so that
460
- # - crash on one would not affect others
461
- # - multiple tests could be run in parallel
462
- mkdir logs
463
- find build-cts/bin/ -type f -print | \
464
- xargs -t -I % -P 8 sh -c 'log=logs/$(basename %).log ; echo % >$log ; date >>$log ; timeout 60m % >>$log 2>&1 ; ret=$? ; echo "exit code: $ret" >>$log ; date >>$log ; exit $ret'
465
- ret=$?
466
-
467
- for f in logs/* ; do
468
- echo "::group::$f"
469
- cat $f
470
- echo "::endgroup::"
471
- done
472
-
473
- echo "::group::Fails:"
474
- grep 'exit code: [^0]' -r logs
475
- echo "::endgroup::"
476
-
477
- grep 'exit code: [^0]' -r logs >> $GITHUB_STEP_SUMMARY
478
-
479
- exit $ret
480
- - name : Pack E2E binaries
481
- if : ${{ always() && !cancelled() && inputs.e2e_testing_mode == 'build-only'}}
482
- run : tar -I 'zstd -9' -cf e2e_binaries.tar.zst -C ./build-e2e .
483
- - name : Upload E2E binaries
484
- if : ${{ always() && !cancelled() && inputs.e2e_testing_mode == 'build-only'}}
485
- uses : actions/upload-artifact@v4
308
+ - name : Run SYCL CTS Tests
309
+ if : inputs.tests_selector == 'cts'
310
+ uses : ./devops/actions/run-tests/cts
486
311
with :
487
- name : sycl_e2e_bin_${{ inputs.artifact_suffix }}
488
- path : e2e_binaries.tar.zst
312
+ extra_cmake_args : ${{ inputs.extra_cmake_args }}
313
+ cts_testing_mode : ${{ inputs.cts_testing_mode }}
314
+ sycl_cts_artifact : ${{ inputs.sycl_cts_artifact }}
315
+ target_devices : ${{ inputs.target_devices }}
489
316
retention-days : ${{ inputs.retention-days }}
0 commit comments