|
79 | 79 | type: string
|
80 | 80 | default: 'default'
|
81 | 81 | retention-days:
|
82 |
| - description: 'E2E binaries artifact retention period.' |
| 82 | + description: 'E2E/SYCL-CTS binaries artifact retention period.' |
83 | 83 | type: string
|
84 | 84 | default: 1
|
85 | 85 |
|
|
102 | 102 | default: 'false'
|
103 | 103 | required: False
|
104 | 104 |
|
| 105 | + cts_testing_mode: |
| 106 | + description: | |
| 107 | + Testing mode to run SYCL-CTS in, can be either `full`, `build-only` |
| 108 | + or `run-only`. In `build-only` mode an artifact of the CTS binaries |
| 109 | + will be uploaded. |
| 110 | + type: string |
| 111 | + default: 'full' |
| 112 | + |
| 113 | + sycl_cts_artifact: |
| 114 | + type: string |
| 115 | + default: '' |
| 116 | + required: False |
| 117 | + |
105 | 118 | workflow_dispatch:
|
106 | 119 | inputs:
|
107 | 120 | runner:
|
|
147 | 160 | LIT_OPTS won't work as we redefine it as part of this workflow.
|
148 | 161 |
|
149 | 162 | For SYCL CTS - CTS_TESTS_TO_BUILD to specify which categories to
|
150 |
| - build. |
| 163 | + build, e.g. {"CTS_TESTS_TO_BUILD":"test_category1 test_category2..."}. |
151 | 164 |
|
152 | 165 | Format: '{"VAR1":"VAL1","VAR2":"VAL2",...}'
|
153 | 166 | default: '{}'
|
@@ -340,7 +353,7 @@ jobs:
|
340 | 353 | fi
|
341 | 354 | exit $exit_code
|
342 | 355 | - name: Build SYCL CTS tests
|
343 |
| - if: inputs.tests_selector == 'cts' |
| 356 | + if: inputs.tests_selector == 'cts' && inputs.sycl_cts_artifact == '' |
344 | 357 | env:
|
345 | 358 | CMAKE_EXTRA_ARGS: ${{ inputs.extra_cmake_args }}
|
346 | 359 | run: |
|
@@ -372,17 +385,64 @@ jobs:
|
372 | 385 | # "test_conformance" target skips building "test_all" executable.
|
373 | 386 | ninja -C build-cts -k0 $( [ -n "$CTS_TESTS_TO_BUILD" ] && echo "$CTS_TESTS_TO_BUILD" || echo "test_conformance")
|
374 | 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 |
| 395 | + with: |
| 396 | + name: sycl_cts_bin |
| 397 | + path: sycl_cts_bin.tar.zst |
| 398 | + retention-days: ${{ inputs.retention-days }} |
| 399 | + |
| 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 | +
|
375 | 412 | - name: SYCL CTS List devices
|
376 | 413 | # Proceed with execution even if the 'build' step did not succeed.
|
377 |
| - if: inputs.tests_selector == 'cts' && (success() || failure()) |
| 414 | + if: inputs.tests_selector == 'cts' && (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only' |
378 | 415 | env:
|
379 | 416 | ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }}
|
380 | 417 | run: |
|
381 | 418 | ./build-cts/bin/* --list-devices
|
382 | 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 | +
|
383 | 443 | - name: Run SYCL CTS tests
|
384 | 444 | # Proceed with execution even if the previous two steps did not succeed.
|
385 |
| - if: inputs.tests_selector == 'cts' && (success() || failure()) |
| 445 | + if: inputs.tests_selector == 'cts' && (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only' |
386 | 446 | env:
|
387 | 447 | ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }}
|
388 | 448 | # This job takes ~100min usually. But sometimes some test isn't
|
|
0 commit comments