33
33
type : string
34
34
required : false
35
35
default : " --hip --cuda --native_cpu"
36
- build_artifact_suffix :
37
- type : string
38
- required : true
39
36
build_target :
40
37
type : string
41
38
required : false
42
39
default : sycl-toolchain
43
- artifact_archive_name :
44
- type : string
45
- default : llvm_sycl.tar.zst
40
+
46
41
changes :
47
42
type : string
48
43
description : ' Filter matches for the changed files in the PR'
49
44
default : ' [llvm, clang, sycl, llvm_spirv, xptifw, libclc]'
50
45
required : false
46
+
47
+ # Artifacts:
48
+
51
49
retention-days :
52
50
description : ' Artifacts retention period'
53
51
type : string
54
52
default : 3
53
+
54
+ toolchain_artifact :
55
+ type : string
56
+ required : true
57
+ toolchain_artifact_filename :
58
+ type : string
59
+ default : llvm_sycl.tar.zst
60
+
61
+ release_toolchain_artifact :
62
+ type : string
63
+ required : false
64
+ description : |
65
+ If provided, create an additional toolchain artifact without utilities
66
+ used for testing in it. File name of the archive is the same as in the
67
+ `toolchain_artifact` above.
68
+
55
69
e2e_binaries_artifact :
56
70
type : string
57
71
required : false
58
- pack_release :
72
+ e2e_binaries_spirv_backend_artifact :
73
+ type : string
74
+ required : false
75
+ e2e_binaries_preview_artifact :
59
76
type : string
60
77
required : false
61
78
62
79
outputs :
63
80
build_conclusion :
64
81
value : ${{ jobs.build.outputs.build_conclusion }}
65
- artifact_archive_name :
66
- value : ${{ jobs.build.outputs.artifact_archive_name }}
67
- artifact_decompress_command :
68
- value : ${{ jobs.build.outputs.artifact_decompress_command }}
82
+ toolchain_artifact :
83
+ value : ${{ inputs.toolchain_artifact }}
84
+ toolchain_artifact_filename :
85
+ value : ${{ jobs.build.outputs.toolchain_artifact_filename }}
86
+ toolchain_decompress_command :
87
+ value : ${{ jobs.build.outputs.toolchain_decompress_command }}
69
88
70
89
workflow_dispatch :
71
90
inputs :
@@ -102,18 +121,15 @@ on:
102
121
options :
103
122
- " default"
104
123
105
- build_artifact_suffix :
106
- type : choice
107
- options :
108
- - " default"
109
124
retention-days :
110
125
type : choice
111
126
options :
112
127
- 3
113
128
114
- pack_release :
115
- type : string
116
- required : false
129
+ toolchain_artifact :
130
+ type : choice
131
+ options :
132
+ - " sycl_linux_default"
117
133
118
134
permissions : read-all
119
135
@@ -126,8 +142,8 @@ jobs:
126
142
options : -u 1001:1001
127
143
outputs :
128
144
build_conclusion : ${{ steps.build.conclusion }}
129
- artifact_archive_name : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
130
- artifact_decompress_command : ${{ steps.artifact_info.outputs.DECOMPRESS }}
145
+ toolchain_artifact_filename : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
146
+ toolchain_decompress_command : ${{ steps.artifact_info.outputs.DECOMPRESS }}
131
147
env :
132
148
CCACHE_DIR : ${{ inputs.build_cache_root }}/build_cache_${{ inputs.build_cache_suffix }}
133
149
CCACHE_MAXSIZE : 8G
@@ -136,7 +152,7 @@ jobs:
136
152
# To reduce number of inputs parameters that is limited for manual triggers.
137
153
id : artifact_info
138
154
run : |
139
- NAME="${{inputs.artifact_archive_name }}"
155
+ NAME="${{inputs.toolchain_artifact_filename }}"
140
156
if [ -z "$NAME" ]; then
141
157
NAME=llvm_sycl.tar.zst
142
158
fi
@@ -167,6 +183,10 @@ jobs:
167
183
if : ${{ inputs.cc == 'icx' || inputs.cxx == 'icpx' }}
168
184
uses : ./devops/actions/setup_linux_oneapi_env
169
185
- name : Configure
186
+ # Setting `CMAKE_INSTALL_PREFIX` is important because that's the location
187
+ # where `sycl-linux-run-tests.yml` unpacks the toolchain to. That location
188
+ # *must* match between build-only and run-only E2E tests runs and we might
189
+ # be creating pre-built E2E tests' binaries in this workflow.
170
190
env :
171
191
CC : ${{ inputs.cc }}
172
192
CXX : ${{ inputs.cxx }}
@@ -176,7 +196,9 @@ jobs:
176
196
mkdir -p $GITHUB_WORKSPACE/build
177
197
cd $GITHUB_WORKSPACE/build
178
198
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
179
- -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
199
+ -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build \
200
+ -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/toolchain \
201
+ -t Release \
180
202
--ci-defaults ${{ inputs.build_configure_extra_args }} \
181
203
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
182
204
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
@@ -188,19 +210,25 @@ jobs:
188
210
run : cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
189
211
- name : check-llvm
190
212
if : always() && !cancelled() && contains(inputs.changes, 'llvm')
213
+ env :
214
+ # Can't inline to support possible quotes inside:
215
+ BUILD_CONFIGURE_EXTRA_ARGS : ${{ inputs.build_configure_extra_args }}
191
216
run : |
192
- if [[ "${{ inputs.build_configure_extra_args } }" == *"--use-libcxx"* ]]; then
217
+ if [[ "${BUILD_CONFIGURE_EXTRA_ARGS }" == *"--use-libcxx"* ]]; then
193
218
# https://github.com/llvm/llvm-project/issues/59429
194
219
export LIT_FILTER_OUT="ExecutionEngine/MCJIT"
195
220
fi
196
221
197
222
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
198
223
- name : check-clang
199
224
if : always() && !cancelled() && contains(inputs.changes, 'clang')
225
+ env :
226
+ # Can't inline to support possible quotes inside:
227
+ BUILD_CONFIGURE_EXTRA_ARGS : ${{ inputs.build_configure_extra_args }}
200
228
run : |
201
229
# Can we move this to Dockerfile? Hopefully, noop on Windows.
202
230
export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache
203
- if [[ "${{ inputs.build_configure_extra_args } }" == *"--use-libcxx"* ]]; then
231
+ if [[ "${BUILD_CONFIGURE_EXTRA_ARGS }" == *"--use-libcxx"* ]]; then
204
232
# https://github.com/llvm/llvm-project/issues/59428
205
233
export LIT_FILTER_OUT="(E|e)xception"
206
234
fi
@@ -245,13 +273,13 @@ jobs:
245
273
cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain
246
274
247
275
- name : Pack toolchain release
248
- if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true ' }}
249
- run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
276
+ if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.release_toolchain_artifact != ' ' }}
277
+ run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/toolchain .
250
278
- name : Upload toolchain release
251
- if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true ' }}
279
+ if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.release_toolchain_artifact != ' ' }}
252
280
uses : actions/upload-artifact@v4
253
281
with :
254
- name : sycl_linux_release
282
+ name : ${{ inputs.release_toolchain_artifact }}
255
283
path : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
256
284
retention-days : ${{ inputs.retention-days }}
257
285
@@ -276,23 +304,20 @@ jobs:
276
304
277
305
- name : Pack toolchain
278
306
if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
279
- run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
307
+ run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/toolchain .
280
308
- name : Upload toolchain
281
309
if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
282
310
uses : actions/upload-artifact@v4
283
311
with :
284
- name : sycl_linux_ ${{ inputs.build_artifact_suffix }}
312
+ name : ${{ inputs.toolchain_artifact }}
285
313
path : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
286
314
retention-days : ${{ inputs.retention-days }}
287
315
288
- - name : Copy toolchain
289
- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
290
- # We must have the compiler in the same location as it will be in the E2E
291
- # run-tests job.
292
- run : cp -r $GITHUB_WORKSPACE/build/install $GITHUB_WORKSPACE/toolchain
293
316
294
317
- name : Source OneAPI TBB vars.sh
295
- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
318
+ # Tasks that use the just built toolchain below, need extra environment
319
+ # setup. No harm in it if all of those tasks would get skipped.
320
+ if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
296
321
run : |
297
322
# https://github.com/actions/runner/issues/1964 prevents us from using
298
323
# the ENTRYPOINT in the image.
@@ -320,31 +345,31 @@ jobs:
320
345
extra_lit_opts : --param sycl_build_targets="spir;nvidia;amd"
321
346
322
347
- name : Remove E2E tests before spirv-backend run
323
- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
348
+ if : ${{ inputs.e2e_binaries_spirv_backend_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
324
349
run : rm -rf build-e2e
325
350
326
351
- name : Build E2E tests with SPIR-V Backend
327
- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
352
+ if : ${{ inputs.e2e_binaries_spirv_backend_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
328
353
uses : ./devops/actions/run-tests/e2e
329
354
with :
330
355
ref : ${{ inputs.ref || github.sha }}
331
356
testing_mode : build-only
332
357
target_devices : all
333
- binaries_artifact : ${{ inputs.e2e_binaries_artifact }}_spirv_backend
358
+ binaries_artifact : ${{ inputs.e2e_binaries_spirv_backend_artifact }}
334
359
sycl_compiler : $GITHUB_WORKSPACE/toolchain/bin/clang++
335
360
extra_lit_opts : --param spirv-backend=True
336
361
337
362
- name : Remove E2E tests before preview-mode run
338
- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
363
+ if : ${{ inputs.e2e_binaries_preview_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
339
364
run : rm -rf build-e2e
340
365
341
366
- name : Build E2E tests in Preview Mode
342
- if : ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
367
+ if : ${{ inputs.e2e_binaries_preview_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
343
368
uses : ./devops/actions/run-tests/e2e
344
369
with :
345
370
ref : ${{ inputs.ref || github.sha }}
346
371
testing_mode : build-only
347
372
target_devices : all
348
- binaries_artifact : ${{ inputs.e2e_binaries_artifact }}_preview
373
+ binaries_artifact : ${{ inputs.e2e_binaries_preview_artifact }}
349
374
sycl_compiler : $GITHUB_WORKSPACE/toolchain/bin/clang++
350
375
extra_lit_opts : --param test-preview-mode=True
0 commit comments