Skip to content

Commit bb77596

Browse files
committed
Add e2e test splitting ci steps + enable on nightly
1 parent 06e5737 commit bb77596

File tree

2 files changed

+167
-2
lines changed

2 files changed

+167
-2
lines changed

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

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,29 @@ on:
5959
default: ''
6060
required: False
6161

62+
e2e_binaries_artifact:
63+
type: string
64+
default: ''
65+
required: False
66+
e2e_binaries_archive:
67+
type: string
68+
default: ''
69+
required: False
70+
e2e_binaries_decompress_command:
71+
type: string
72+
default: ''
73+
required: False
74+
75+
upload_artifact:
76+
type: string
77+
default: 'false'
78+
build_artifact_suffix:
79+
type: string
80+
default: 'default'
81+
artifact_archive_name:
82+
type: string
83+
default: e2e_binaries.tar.zst
84+
6285
reset_intel_gpu:
6386
type: string
6487
required: False
@@ -78,6 +101,14 @@ on:
78101
default: 'false'
79102
required: False
80103

104+
outputs:
105+
run_conclusion:
106+
value: ${{ jobs.run.outputs.build_conclusion }}
107+
artifact_archive_name:
108+
value: ${{ jobs.run.outputs.artifact_archive_name }}
109+
artifact_decompress_command:
110+
value: ${{ jobs.run.outputs.artifact_decompress_command }}
111+
81112
workflow_dispatch:
82113
inputs:
83114
runner:
@@ -87,6 +118,7 @@ on:
87118
- '["amdgpu"]'
88119
- '["Linux", "arc"]'
89120
- '["cts-cpu"]'
121+
- '["Linux", "build"]'
90122
image:
91123
description: |
92124
Use option ending with ":build" for AMDGPU, ":latest" for the rest.
@@ -142,6 +174,11 @@ on:
142174
options:
143175
- false
144176
- true
177+
upload_artifact:
178+
type: choice
179+
options:
180+
- "false"
181+
- "true"
145182

146183
permissions:
147184
contents: read
@@ -154,8 +191,31 @@ jobs:
154191
container:
155192
image: ${{ inputs.image }}
156193
options: ${{ inputs.image_options }}
194+
outputs:
195+
run_conclusion: ${{ steps.run.conclusion }}
196+
artifact_archive_name: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
197+
artifact_decompress_command: ${{ steps.artifact_info.outputs.DECOMPRESS }}
157198
env: ${{ fromJSON(inputs.env) }}
158199
steps:
200+
- name: Deduce artifact archive params
201+
if: inputs.upload_artifact == 'true'
202+
id: artifact_info
203+
run: |
204+
NAME="${{inputs.artifact_archive_name}}"
205+
if [ -z "$NAME" ]; then
206+
NAME=e2e_binaries.tar.zst
207+
fi
208+
echo ARCHIVE_NAME="$NAME" >> $GITHUB_OUTPUT
209+
if [ "${NAME}" != "${NAME%.tar.gz}" ]; then
210+
echo COMPRESS="gzip" >> $GITHUB_OUTPUT
211+
echo DECOMPRESS="gunzip" >> $GITHUB_OUTPUT
212+
elif [ "${NAME}" != "${NAME%.tar.zst}" ]; then
213+
echo COMPRESS="zstd -9" >> $GITHUB_OUTPUT
214+
echo DECOMPRESS="zstd" >> $GITHUB_OUTPUT
215+
else
216+
echo "Unsupported extension"
217+
exit 1
218+
fi
159219
- name: Reset Intel GPU
160220
if: inputs.reset_intel_gpu == 'true'
161221
run: |
@@ -270,8 +330,20 @@ jobs:
270330
cat /usr/local/lib/igc/IGCTAG.txt
271331
fi
272332
333+
- name: Download E2E Binaries
334+
if: inputs.e2e_binaries_artifact != '' && github.event_name != 'workflow_run'
335+
uses: actions/download-artifact@v4
336+
with:
337+
name: ${{ inputs.e2e_binaries_artifact }}
338+
- name: Extract/Setup E2E Binaries
339+
if: inputs.e2e_binaries_artifact != ''
340+
run: |
341+
mkdir build-e2e
342+
tar -I '${{ inputs.e2e_binaries_decompress_command }}' -xf ${{ inputs.e2e_binaries_archive }} -C build-e2e
343+
rm -f ${{ inputs.e2e_binaries_artifact }}
344+
273345
- name: Deduce E2E CMake options
274-
if: inputs.tests_selector == 'e2e'
346+
if: inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
275347
id: cmake_opts
276348
shell: bash
277349
env:
@@ -281,7 +353,7 @@ jobs:
281353
echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
282354
fi
283355
- name: Configure E2E tests
284-
if: inputs.tests_selector == 'e2e'
356+
if: inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
285357
run: |
286358
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DSYCL_TEST_E2E_TARGETS="${{ inputs.target_devices }}" -DCMAKE_CXX_COMPILER="$(which clang++)" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
287359
- name: SYCL End-to-end tests
@@ -375,3 +447,13 @@ jobs:
375447
grep 'exit code: [^0]' -r logs >> $GITHUB_STEP_SUMMARY
376448
377449
exit $ret
450+
- name: Pack e2e binaries
451+
if: ${{ always() && !cancelled() && inputs.upload_artifact == 'true'}}
452+
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C ./build-e2e .
453+
- name: Upload e2e binaries
454+
if: ${{ always() && !cancelled() && inputs.upload_artifact == 'true'}}
455+
uses: actions/upload-artifact@v4
456+
with:
457+
name: sycl_e2e_bin_${{ inputs.build_artifact_suffix }}
458+
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
459+
retention-days: ${{ inputs.retention-days }}

.github/workflows/sycl-nightly.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,89 @@ jobs:
3636

3737
artifact_archive_name: sycl_linux_shared.tar.zst
3838

39+
ubuntu2204_split_test_build:
40+
needs: [ubuntu2204_build]
41+
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
42+
uses: ./.github/workflows/sycl-linux-run-tests.yml
43+
with:
44+
name: Build e2e tests
45+
runner: '["Linux", "build"]'
46+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:alldeps
47+
image_options: -u 1001
48+
target_devices: opencl:cpu
49+
tests_selector: e2e
50+
extra_lit_opts: --param test-mode=build-only
51+
ref: ${{ github.sha }}
52+
merge_ref: ''
53+
sycl_toolchain_artifact: sycl_linux_default
54+
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
55+
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
56+
upload_artifact: 'true'
57+
58+
ubuntu2204_split_test_run:
59+
needs: [ubuntu2204_build, ubuntu2204_split_test_build]
60+
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
include:
65+
- name: Intel L0 GPU
66+
runner: '["Linux", "gen12"]'
67+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
68+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
69+
target_devices: level_zero:gpu
70+
reset_intel_gpu: true
71+
tests_selector: e2e
72+
extra_lit_opts: --param gpu-intel-gen12=True
73+
74+
- name: Intel OCL GPU
75+
runner: '["Linux", "gen12"]'
76+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
77+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
78+
target_devices: opencl:gpu
79+
reset_intel_gpu: true
80+
tests_selector: e2e
81+
extra_lit_opts: --param gpu-intel-gen12=True
82+
83+
- name: OCL CPU (AMD)
84+
runner: '["Linux", "amdgpu"]'
85+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
86+
image_options: -u 1001
87+
target_devices: opencl:cpu
88+
tests_selector: e2e
89+
90+
- name: OCL CPU (Intel/GEN12)
91+
runner: '["Linux", "gen12"]'
92+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
93+
image_options: -u 1001 --privileged --cap-add SYS_ADMIN
94+
target_devices: opencl:cpu
95+
tests_selector: e2e
96+
97+
- name: OCL CPU (Intel/Arc)
98+
runner: '["Linux", "arc"]'
99+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
100+
image_options: -u 1001
101+
target_devices: opencl:cpu
102+
tests_selector: e2e
103+
uses: ./.github/workflows/sycl-linux-run-tests.yml
104+
with:
105+
name: ${{ matrix.name }}
106+
runner: ${{ matrix.runner }}
107+
image: ${{ matrix.image }}
108+
image_options: ${{ matrix.image_options }}
109+
target_devices: ${{ matrix.target_devices }}
110+
tests_selector: ${{ matrix.tests_selector }}
111+
extra_lit_opts: --param test-mode=run-only ${{ matrix.extra_lit_opts }}
112+
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
113+
ref: ${{ github.sha }}
114+
merge_ref: ''
115+
sycl_toolchain_artifact: sycl_linux_default
116+
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
117+
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
118+
e2e_binaries_artifact: sycl_e2e_bin_default
119+
e2e_binaries_archive: ${{ needs.ubuntu2204_split_test_build.outputs.artifact_archive_name }}
120+
e2e_binaries_decompress_command: ${{ needs.ubuntu2204_split_test_build.outputs.artifact_decompress_command }}
121+
39122
ubuntu2204_test:
40123
needs: [ubuntu2204_build]
41124
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}

0 commit comments

Comments
 (0)