57
57
toolchain_artifact_filename :
58
58
type : string
59
59
default : llvm_sycl.tar.zst
60
+
61
+ pack_release :
62
+ type : string
63
+ required : false
64
+
60
65
e2e_binaries_artifact :
61
66
type : string
62
67
required : false
63
- pack_release :
68
+ e2e_binaries_spirv_backend_artifact :
69
+ type : string
70
+ required : false
71
+ e2e_binaries_preview_artifact :
64
72
type : string
65
73
required : false
66
74
@@ -174,6 +182,10 @@ jobs:
174
182
if : ${{ inputs.cc == 'icx' || inputs.cxx == 'icpx' }}
175
183
uses : ./devops/actions/setup_linux_oneapi_env
176
184
- 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.
177
189
env :
178
190
CC : ${{ inputs.cc }}
179
191
CXX : ${{ inputs.cxx }}
@@ -183,7 +195,9 @@ jobs:
183
195
mkdir -p $GITHUB_WORKSPACE/build
184
196
cd $GITHUB_WORKSPACE/build
185
197
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 \
187
201
--ci-defaults ${{ inputs.build_configure_extra_args }} \
188
202
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
189
203
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
@@ -259,7 +273,7 @@ jobs:
259
273
260
274
- name : Pack toolchain release
261
275
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 .
263
277
- name : Upload toolchain release
264
278
if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
265
279
uses : actions/upload-artifact@v4
@@ -289,7 +303,7 @@ jobs:
289
303
290
304
- name : Pack toolchain
291
305
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 .
293
307
- name : Upload toolchain
294
308
if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
295
309
uses : actions/upload-artifact@v4
@@ -298,14 +312,11 @@ jobs:
298
312
path : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
299
313
retention-days : ${{ inputs.retention-days }}
300
314
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
306
315
307
316
- 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' }}
309
320
run : |
310
321
# https://github.com/actions/runner/issues/1964 prevents us from using
311
322
# the ENTRYPOINT in the image.
@@ -333,31 +344,31 @@ jobs:
333
344
extra_lit_opts : --param sycl_build_targets="spir;nvidia;amd"
334
345
335
346
- 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' }}
337
348
run : rm -rf build-e2e
338
349
339
350
- 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' }}
341
352
uses : ./devops/actions/run-tests/e2e
342
353
with :
343
354
ref : ${{ inputs.ref || github.sha }}
344
355
testing_mode : build-only
345
356
target_devices : all
346
- binaries_artifact : ${{ inputs.e2e_binaries_artifact }}_spirv_backend
357
+ binaries_artifact : ${{ inputs.e2e_binaries_spirv_backend_artifact }}
347
358
sycl_compiler : $GITHUB_WORKSPACE/toolchain/bin/clang++
348
359
extra_lit_opts : --param spirv-backend=True
349
360
350
361
- 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' }}
352
363
run : rm -rf build-e2e
353
364
354
365
- 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' }}
356
367
uses : ./devops/actions/run-tests/e2e
357
368
with :
358
369
ref : ${{ inputs.ref || github.sha }}
359
370
testing_mode : build-only
360
371
target_devices : all
361
- binaries_artifact : ${{ inputs.e2e_binaries_artifact }}_preview
372
+ binaries_artifact : ${{ inputs.e2e_binaries_preview_artifact }}
362
373
sycl_compiler : $GITHUB_WORKSPACE/toolchain/bin/clang++
363
374
extra_lit_opts : --param test-preview-mode=True
0 commit comments