5757 toolchain_artifact_filename :
5858 type : string
5959 default : llvm_sycl.tar.zst
60+
61+ pack_release :
62+ type : string
63+ required : false
64+
6065 e2e_binaries_artifact :
6166 type : string
6267 required : false
63- pack_release :
68+ e2e_binaries_spirv_backend_artifact :
69+ type : string
70+ required : false
71+ e2e_binaries_preview_artifact :
6472 type : string
6573 required : false
6674
@@ -174,6 +182,10 @@ jobs:
174182 if : ${{ inputs.cc == 'icx' || inputs.cxx == 'icpx' }}
175183 uses : ./devops/actions/setup_linux_oneapi_env
176184 - name : Configure
185+ # Setting `CMAKE_INSTALL_PREFIX` is important because that's the location
186+ # where `sycl-linux-run-tests.yml` unpacks the toolchain to. That location
187+ # *must* match between build-only and run-only E2E tests runs and we might
188+ # be creating pre-built E2E tests' binaries in this workflow.
177189 env :
178190 CC : ${{ inputs.cc }}
179191 CXX : ${{ inputs.cxx }}
@@ -183,7 +195,9 @@ jobs:
183195 mkdir -p $GITHUB_WORKSPACE/build
184196 cd $GITHUB_WORKSPACE/build
185197 python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
186- -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
198+ -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build \
199+ -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/toolchain \
200+ -t Release \
187201 --ci-defaults ${{ inputs.build_configure_extra_args }} \
188202 -DCMAKE_C_COMPILER_LAUNCHER=ccache \
189203 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
@@ -259,7 +273,7 @@ jobs:
259273
260274 - name : Pack toolchain release
261275 if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
262- run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
276+ run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/toolchain .
263277 - name : Upload toolchain release
264278 if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
265279 uses : actions/upload-artifact@v4
@@ -289,7 +303,7 @@ jobs:
289303
290304 - name : Pack toolchain
291305 if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
292- run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
306+ run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/toolchain .
293307 - name : Upload toolchain
294308 if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
295309 uses : actions/upload-artifact@v4
@@ -298,14 +312,11 @@ jobs:
298312 path : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
299313 retention-days : ${{ inputs.retention-days }}
300314
301- - name : Copy toolchain
302- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
303- # We must have the compiler in the same location as it will be in the E2E
304- # run-tests job.
305- run : cp -r $GITHUB_WORKSPACE/build/install $GITHUB_WORKSPACE/toolchain
306315
307316 - name : Source OneAPI TBB vars.sh
308- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
317+ # Tasks that use the just built toolchain below, need extra environment
318+ # setup. No harm in it if all of those tasks would get skipped.
319+ if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
309320 run : |
310321 # https://github.com/actions/runner/issues/1964 prevents us from using
311322 # the ENTRYPOINT in the image.
@@ -333,31 +344,31 @@ jobs:
333344 extra_lit_opts : --param sycl_build_targets="spir;nvidia;amd"
334345
335346 - name : Remove E2E tests before spirv-backend run
336- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
347+ if : ${{ inputs.e2e_binaries_spirv_backend_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
337348 run : rm -rf build-e2e
338349
339350 - name : Build E2E tests with SPIR-V Backend
340- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
351+ if : ${{ inputs.e2e_binaries_spirv_backend_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
341352 uses : ./devops/actions/run-tests/e2e
342353 with :
343354 ref : ${{ inputs.ref || github.sha }}
344355 testing_mode : build-only
345356 target_devices : all
346- binaries_artifact : ${{ inputs.e2e_binaries_artifact }}_spirv_backend
357+ binaries_artifact : ${{ inputs.e2e_binaries_spirv_backend_artifact }}
347358 sycl_compiler : $GITHUB_WORKSPACE/toolchain/bin/clang++
348359 extra_lit_opts : --param spirv-backend=True
349360
350361 - name : Remove E2E tests before preview-mode run
351- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
362+ if : ${{ inputs.e2e_binaries_preview_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
352363 run : rm -rf build-e2e
353364
354365 - name : Build E2E tests in Preview Mode
355- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
366+ if : ${{ inputs.e2e_binaries_preview_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
356367 uses : ./devops/actions/run-tests/e2e
357368 with :
358369 ref : ${{ inputs.ref || github.sha }}
359370 testing_mode : build-only
360371 target_devices : all
361- binaries_artifact : ${{ inputs.e2e_binaries_artifact }}_preview
372+ binaries_artifact : ${{ inputs.e2e_binaries_preview_artifact }}
362373 sycl_compiler : $GITHUB_WORKSPACE/toolchain/bin/clang++
363374 extra_lit_opts : --param test-preview-mode=True
0 commit comments