25
25
type : string
26
26
required : false
27
27
default : " default"
28
- build_cache_size :
29
- type : string
30
- required : false
31
- default : 8G
32
28
build_configure_extra_args :
33
29
type : string
34
30
required : false
39
35
artifact_archive_name :
40
36
type : string
41
37
default : llvm_sycl.tar.zst
42
- artifact_compress_command :
43
- type : string
44
- default : zstd -9
45
- artifact_decompress_command :
46
- type : string
47
- default : zstd
48
38
lts_matrix :
49
39
type : string
50
40
required : false
53
43
type : string
54
44
required : false
55
45
default : " []"
56
- lts_cmake_extra_args :
57
- type : string
58
- required : false
59
- default : " "
60
- lts_ref :
61
- type : string
62
- required : false
63
- default : ' intel'
64
46
cts_matrix :
65
47
type : string
66
48
required : false
69
51
type : string
70
52
required : false
71
53
default : " "
72
- cts_ref :
73
- type : string
74
- required : false
75
- default : ' SYCL-2020'
76
54
changes :
77
55
type : string
78
56
description : ' Filter matches for the changed files in the PR'
89
67
type : string
90
68
default : 3
91
69
70
+ workflow_dispatch :
71
+ inputs :
72
+ changes :
73
+ description : ' Filter matches for the changed files in the PR'
74
+ type : choice
75
+ options :
76
+ - " []"
77
+ - ' [llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
78
+ build_image :
79
+ type : choice
80
+ options :
81
+ - " ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build"
82
+ cc :
83
+ type : choice
84
+ options :
85
+ - gcc
86
+ cxx :
87
+ type : choice
88
+ options :
89
+ - g++
90
+ build_configure_extra_args :
91
+ type : choice
92
+ options :
93
+ - " --hip --cuda --enable-esimd-emulator"
94
+ # Cache properties need to match CC/CXX/CMake opts. Any additional choices
95
+ # would need extra care.
96
+ build_cache_root :
97
+ type : choice
98
+ options :
99
+ - " /__w/"
100
+ build_cache_suffix :
101
+ type : choice
102
+ options :
103
+ - " default"
104
+
105
+ build_artifact_suffix :
106
+ type : choice
107
+ options :
108
+ - " default"
109
+ retention-days :
110
+ type : choice
111
+ options :
112
+ - 3
113
+
92
114
jobs :
93
115
build :
94
116
name : Build + LIT
@@ -98,10 +120,31 @@ jobs:
98
120
options : -u 1001:1001
99
121
outputs :
100
122
build_conclusion : ${{ steps.build.conclusion }}
123
+ artifact_archive_name : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
124
+ artifact_decompress_command : ${{ steps.artifact_info.outputs.DECOMPRESS }}
101
125
env :
102
126
CCACHE_DIR : ${{ inputs.build_cache_root }}/build_cache_${{ inputs.build_cache_suffix }}
103
- CCACHE_MAXSIZE : ${{ inputs.build_cache_size }}
127
+ CCACHE_MAXSIZE : 8G
104
128
steps :
129
+ - name : Deduce artifact archive params
130
+ # To reduce number of inputs parameters that is limited for manual triggers.
131
+ id : artifact_info
132
+ run : |
133
+ NAME="${{inputs.artifact_archive_name}}"
134
+ if [ -z "$NAME" ]; then
135
+ NAME=llvm_sycl.tar.zst
136
+ fi
137
+ echo ARCHIVE_NAME="$NAME" >> $GITHUB_OUTPUT
138
+ if [ "${NAME}" != "${NAME%.tar.gz}" ]; then
139
+ echo COMPRESS="gzip" >> $GITHUB_OUTPUT
140
+ echo DECOMPRESS="gunzip" >> $GITHUB_OUTPUT
141
+ elif [ "${NAME}" != "${NAME%.tar.zst}" ]; then
142
+ echo COMPRESS="zstd -9" >> $GITHUB_OUTPUT
143
+ echo DECOMPRESS="zstd" >> $GITHUB_OUTPUT
144
+ else
145
+ echo "Unsupported extension"
146
+ exit 1
147
+ fi
105
148
- uses : actions/checkout@v3
106
149
with :
107
150
sparse-checkout : |
@@ -196,19 +239,19 @@ jobs:
196
239
197
240
- name : Pack toolchain
198
241
if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
199
- run : tar -I '${{ inputs.artifact_compress_command }}' -cf ${{ inputs.artifact_archive_name }} -C $GITHUB_WORKSPACE/build/install .
242
+ run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
200
243
- name : Upload toolchain
201
244
if : ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
202
245
uses : actions/upload-artifact@v3
203
246
with :
204
247
name : sycl_linux_${{ inputs.build_artifact_suffix }}
205
- path : ${{ inputs.artifact_archive_name }}
248
+ path : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
206
249
retention-days : ${{ inputs.retention-days }}
207
250
208
251
aws-start :
209
252
name : Start AWS
210
253
needs : build
211
- if : ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_aws_matrix != '[]' }}
254
+ if : ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_aws_matrix != '[]' && inputs.lts_aws_matrix != '' }}
212
255
uses : ./.github/workflows/aws.yml
213
256
secrets : inherit
214
257
with :
@@ -219,32 +262,34 @@ jobs:
219
262
needs : [build, aws-start]
220
263
# Continue if build was successful. If aws-start is not successful all
221
264
# AWS tasks will fail, but all non-AWS tasks should continue.
222
- if : ${{ always() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_matrix != '[]' }}
265
+ if : ${{ always() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_matrix != '[]' && inputs.lts_matrix != '' }}
223
266
strategy :
224
267
fail-fast : false
225
268
matrix :
226
269
include : ${{ fromJSON(inputs.lts_matrix) }}
227
- uses : ./.github/workflows/linux_single_e2e .yml
270
+ uses : ./.github/workflows/sycl_linux_run_tests .yml
228
271
with :
272
+ tests_selector : e2e
273
+
229
274
name : ${{ matrix.name }}
230
275
runner : ${{ toJSON(matrix.runs-on) }}
231
276
image : ${{ matrix.image }}
232
277
image_options : ${{ matrix.container_options }}
233
- extra_cmake_args : ' ${{ matrix.cmake_args }} ${{ inputs.lts_cmake_extra_args }} '
278
+ extra_cmake_args : ${{ matrix.cmake_args }}
234
279
target_devices : ${{ matrix.targets }}
235
280
ref : ${{ inputs.build_ref || github.sha }}
236
281
merge_ref : ${{ inputs.merge_ref }}
237
282
reset_gpu : ${{ contains(matrix.runs-on, 'gen12') && contains(matrix.runs-on, 'Linux') }}
238
283
239
284
sycl_toolchain_artifact : sycl_linux_${{ inputs.build_artifact_suffix }}
240
- sycl_toolchain_archive : ${{ inputs .artifact_archive_name }}
241
- sycl_toolchain_decompress_command : ${{ inputs .artifact_decompress_command }}
285
+ sycl_toolchain_archive : ${{ needs.build.outputs .artifact_archive_name }}
286
+ sycl_toolchain_decompress_command : ${{ needs.build.outputs .artifact_decompress_command }}
242
287
243
288
env : ${{ toJSON(matrix.env) }}
244
289
245
290
khronos_sycl_cts :
246
291
needs : build
247
- if : ${{ inputs.cts_matrix != '[]' && inputs.check_sycl == 'true' }}
292
+ if : ${{ inputs.cts_matrix != '[]' && inputs.cts_matrix != '' && inputs. check_sycl == 'true' }}
248
293
strategy :
249
294
fail-fast : false
250
295
matrix :
@@ -285,10 +330,9 @@ jobs:
285
330
- uses : ./llvm/devops/actions/khronos_cts_test
286
331
name : Run Khronos SYCL CTS
287
332
with :
288
- test_ref : ${{ inputs.cts_ref }}
289
333
sycl_artifact : sycl_linux_${{ inputs.build_artifact_suffix }}
290
- sycl_archive : ${{ inputs .artifact_archive_name }}
291
- decompress_command : ${{ inputs .artifact_decompress_command }}
334
+ sycl_archive : ${{ needs.build.outputs .artifact_archive_name }}
335
+ decompress_command : ${{ needs.build.outputs .artifact_decompress_command }}
292
336
sycl_device_filter : ${{ matrix.sycl_device_filter }}
293
337
cmake_args : ' ${{ matrix.cmake_args }} ${{ inputs.cts_cmake_extra_args }}'
294
338
@@ -297,7 +341,7 @@ jobs:
297
341
needs : [ aws-start, e2e-tests ]
298
342
# Always attempt to shutdown AWS instance, even if AWS start was not
299
343
# successful.
300
- if : ${{ always() && inputs.lts_aws_matrix != '[]' }}
344
+ if : ${{ always() && inputs.lts_aws_matrix != '[]' && inputs.lts_aws_matrix != '' }}
301
345
uses : ./.github/workflows/aws.yml
302
346
secrets : inherit
303
347
with :
0 commit comments