Skip to content

Commit eeef05c

Browse files
committed
[CI] Build & run CTS separately
Gen12 takes ~90min to build and run SYCL-CTS, where run takes less than 10mins. This patch updates workflows to build the suite on PVC and then upload artifacts to required machines.
1 parent ecaab93 commit eeef05c

File tree

2 files changed

+89
-18
lines changed

2 files changed

+89
-18
lines changed

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ on:
7979
type: string
8080
default: 'default'
8181
retention-days:
82-
description: 'E2E binaries artifact retention period.'
82+
description: 'E2E/SYCL-CTS binaries artifact retention period.'
8383
type: string
8484
default: 1
8585

@@ -102,6 +102,16 @@ on:
102102
default: 'false'
103103
required: False
104104

105+
cts_build_only:
106+
type: string
107+
default: 'false'
108+
required: False
109+
110+
sycl_cts_artifact:
111+
type: string
112+
default: ''
113+
required: False
114+
105115
workflow_dispatch:
106116
inputs:
107117
runner:
@@ -339,7 +349,7 @@ jobs:
339349
fi
340350
exit $exit_code
341351
- name: Build SYCL CTS tests
342-
if: inputs.tests_selector == 'cts'
352+
if: inputs.tests_selector == 'cts' && inputs.sycl_cts_artifact == ''
343353
env:
344354
CMAKE_EXTRA_ARGS: ${{ inputs.extra_cmake_args }}
345355
run: |
@@ -371,17 +381,41 @@ jobs:
371381
# "test_conformance" target skips building "test_all" executable.
372382
ninja -C build-cts -k0 $( [ -n "$CTS_TESTS_TO_BUILD" ] && echo "$CTS_TESTS_TO_BUILD" || echo "test_conformance")
373383
384+
- name: Pack SYCL-CTS binaries
385+
if: inputs.tests_selector == 'cts' && (success() || failure()) && inputs.cts_build_only == 'true'
386+
run: tar -I 'zstd -9' -cf sycl_cts_bin.tar.zst -C ./build-cts/bin .
387+
388+
- name: Upload SYCL-CTS binaries
389+
if: inputs.tests_selector == 'cts' && (success() || failure()) && inputs.cts_build_only == 'true'
390+
uses: actions/upload-artifact@v4
391+
with:
392+
name: sycl_cts_bin
393+
path: sycl_cts_bin.tar.zst
394+
retention-days: ${{ inputs.retention-days }}
395+
396+
- name: Download SYCL-CTS binaries
397+
if: inputs.tests_selector == 'cts' && (success() || failure()) && inputs.sycl_cts_artifact != ''
398+
uses: actions/download-artifact@v4
399+
with:
400+
name: ${{ inputs.sycl_cts_artifact }}
401+
402+
- name: Extract SYCL-CTS binaries
403+
if: inputs.tests_selector == 'cts' && (success() || failure()) && inputs.sycl_cts_artifact != ''
404+
run: |
405+
mkdir -p build-cts/bin
406+
tar -I 'zstd' -xf sycl_cts_bin.tar.zst -C build-cts/bin
407+
374408
- name: SYCL CTS List devices
375409
# Proceed with execution even if the 'build' step did not succeed.
376-
if: inputs.tests_selector == 'cts' && (success() || failure())
410+
if: inputs.tests_selector == 'cts' && (success() || failure()) && inputs.cts_build_only != 'true'
377411
env:
378412
ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }}
379413
run: |
380414
./build-cts/bin/* --list-devices
381415
382416
- name: Run SYCL CTS tests
383417
# Proceed with execution even if the previous two steps did not succeed.
384-
if: inputs.tests_selector == 'cts' && (success() || failure())
418+
if: inputs.tests_selector == 'cts' && (success() || failure()) && inputs.cts_build_only != 'true'
385419
env:
386420
ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }}
387421
# This job takes ~100min usually. But sometimes some test isn't

.github/workflows/sycl-nightly.yml

Lines changed: 51 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,6 @@ jobs:
8888
image_options: -u 1001
8989
target_devices: opencl:cpu
9090
tests_selector: e2e
91-
92-
- name: SYCL-CTS on OCL CPU
93-
runner: '["Linux", "gen12"]'
94-
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
95-
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
96-
target_devices: opencl:cpu
97-
tests_selector: cts
98-
99-
- name: SYCL-CTS on L0 gen12
100-
runner: '["Linux", "gen12"]'
101-
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
102-
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
103-
target_devices: level_zero:gpu
104-
tests_selector: cts
10591
uses: ./.github/workflows/sycl-linux-run-tests.yml
10692
with:
10793
name: ${{ matrix.name }}
@@ -174,6 +160,57 @@ jobs:
174160
with:
175161
mode: stop
176162

163+
build-sycl-cts:
164+
needs: ubuntu2204_build
165+
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
166+
uses: ./.github/workflows/sycl-linux-run-tests.yml
167+
with:
168+
name: Build SYCL-CTS
169+
runner: '["Linux", "build"]'
170+
cts_build_only: 'true'
171+
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
172+
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
173+
tests_selector: cts
174+
ref: ${{ github.sha }}
175+
sycl_toolchain_artifact: sycl_linux_default
176+
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
177+
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
178+
179+
run-sycl-cts:
180+
needs: [ubuntu2204_build, build-sycl-cts]
181+
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
182+
strategy:
183+
fail-fast: false
184+
matrix:
185+
include:
186+
- name: SYCL-CTS on OCL CPU
187+
runner: '["Linux", "gen12"]'
188+
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
189+
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
190+
target_devices: opencl:cpu
191+
tests_selector: cts
192+
193+
- name: SYCL-CTS on L0 gen12
194+
runner: '["Linux", "gen12"]'
195+
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
196+
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
197+
target_devices: level_zero:gpu
198+
tests_selector: cts
199+
uses: ./.github/workflows/sycl-linux-run-tests.yml
200+
with:
201+
name: ${{ matrix.name }}
202+
runner: ${{ matrix.runner }}
203+
image: ${{ matrix.image }}
204+
image_options: ${{ matrix.image_options }}
205+
target_devices: ${{ matrix.target_devices }}
206+
tests_selector: ${{ matrix.tests_selector }}
207+
ref: ${{ github.sha }}
208+
merge_ref: ''
209+
sycl_toolchain_artifact: sycl_linux_default
210+
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
211+
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
212+
sycl_cts_artifact: sycl_cts_bin
213+
177214
nightly_build_upload:
178215
name: Nightly Build Upload
179216
if: ${{ github.ref_name == 'sycl' }}

0 commit comments

Comments
 (0)