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
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 :
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.
142174 options :
143175 - false
144176 - true
177+ upload_artifact :
178+ type : choice
179+ options :
180+ - " false"
181+ - " true"
145182
146183permissions :
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 }}
0 commit comments