54
54
runs-on : ubuntu-22.04
55
55
outputs :
56
56
matrix_only_linux_x86_64_aarch64_riscv64 : ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64 }}
57
- matrix_only_linux_x86_64 : ${{ steps.vars.outputs.matrix_only_linux_x86_64 }}
57
+ matrix_only_linux_x86_64_aarch64 : ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }}
58
+ matrix_only_linux_x86_64 : ${{ steps.vars.outputs.matrix_only_linux_x86_64 }}
59
+ matrix_only_linux_aarch64 : ${{ steps.vars.outputs.matrix_only_linux_aarch64 }}
60
+ matrix_only_linux_riscv64 : ${{ steps.vars.outputs.matrix_only_linux_riscv64 }}
58
61
steps :
59
62
- id : vars
60
63
# TODO: If we expand on this, come up with a more programmatical way of doing only certain targets.
@@ -66,21 +69,41 @@ jobs:
66
69
{\"target\": \"host_refsi_linux\"}, \
67
70
{\"target\": \"host_i686_linux\"}, \
68
71
{\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT
72
+ echo matrix_only_linux_x86_64_aarch64="[ \
73
+ {\"target\": \"host_arm_linux\"}, \
74
+ {\"target\": \"host_riscv64_linux\"}, \
75
+ {\"target\": \"host_refsi_linux\"}, \
76
+ {\"target\": \"host_i686_linux\"}, \
77
+ {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT
69
78
echo matrix_only_linux_x86_64="[ \
70
79
{\"target\": \"host_aarch64_linux\"}, \
71
80
{\"target\": \"host_riscv64_linux\"}, \
72
81
{\"target\": \"host_arm_linux\"}, \
73
82
{\"target\": \"host_refsi_linux\"}, \
74
83
{\"target\": \"host_i686_linux\"}, \
75
84
{\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT
85
+ echo matrix_only_linux_aarch64="[ \
86
+ {\"target\": \"host_x86_64_linux\"}, \
87
+ {\"target\": \"host_riscv64_linux\"}, \
88
+ {\"target\": \"host_arm_linux\"}, \
89
+ {\"target\": \"host_refsi_linux\"}, \
90
+ {\"target\": \"host_i686_linux\"}, \
91
+ {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT
92
+ echo matrix_only_linux_riscv64="[ \
93
+ {\"target\": \"host_x86_64_linux\"}, \
94
+ {\"target\": \"host_aarch64_linux\"}, \
95
+ {\"target\": \"host_arm_linux\"}, \
96
+ {\"target\": \"host_refsi_linux\"}, \
97
+ {\"target\": \"host_i686_linux\"}, \
98
+ {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT
76
99
cat $GITHUB_OUTPUT
77
100
78
101
create_ock_artefacts_windows :
79
102
needs : [workflow_vars]
80
103
# Currently there is only one windows target so we don't bother with the
81
104
# matrix, just check if it's enabled
82
105
runs-on : windows-2019
83
- if : inputs.ock && contains(inputs.target_list, 'host_x86_64_windows')
106
+ if : inputs.ock && contains(inputs.target_list, 'host_x86_64_windows')
84
107
steps :
85
108
- name : Checkout repo
86
109
uses : actions/checkout@v4
@@ -105,13 +128,14 @@ jobs:
105
128
106
129
# risc-v needs ubuntu 24.04 so we get the latest qemu as well as how we
107
130
# build llvm. Otherwise we choose ubuntu-22.04 (use a container for both for consistency).
108
- runs-on : cp-ubuntu-24.04
131
+ runs-on : ${{ contains(matrix.target, 'host_aarch64') && ' cp-graviton' || 'cp- ubuntu-24.04' }}
109
132
container :
110
- image : ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04-x86-64:latest'
111
- || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' }}
133
+ image : ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04-x86-64:latest'
134
+ || ( contains(matrix.target, 'host_aarch64') && 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-aarch64:latest'
135
+ || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' ) }}
112
136
volumes :
113
137
- ${{github.workspace}}:${{github.workspace}}
114
- if : inputs.ock && contains(inputs.target_list, 'linux')
138
+ if : inputs.ock && contains(inputs.target_list, 'linux')
115
139
steps :
116
140
- name : Checkout repo
117
141
uses : actions/checkout@v4
@@ -136,10 +160,11 @@ jobs:
136
160
target : ${{ fromJson(inputs.target_list) }}
137
161
exclude : ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }}
138
162
139
- runs-on : cp-ubuntu-24.04
163
+ runs-on : ${{ contains(matrix.target, 'host_aarch64') && ' cp-graviton' || 'cp- ubuntu-24.04' }}
140
164
container :
141
- image : ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04-x86-64:latest'
142
- || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' }}
165
+ image : ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04-x86-64:latest'
166
+ || ( contains(matrix.target, 'host_aarch64') && 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-aarch64:latest'
167
+ || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' ) }}
143
168
volumes :
144
169
- ${{github.workspace}}:${{github.workspace}}
145
170
steps :
@@ -196,7 +221,7 @@ jobs:
196
221
container :
197
222
image : ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04-x86-64:latest'
198
223
|| ( contains(matrix.target, 'host_aarch64') && 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-aarch64:latest'
199
- || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' ) }}
224
+ || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' ) }}
200
225
volumes :
201
226
- ${{github.workspace}}:${{github.workspace}}
202
227
steps :
@@ -221,21 +246,50 @@ jobs:
221
246
with :
222
247
target : ${{ matrix.target }}
223
248
224
- build_dpcpp_native_host :
249
+ build_dpcpp_native :
225
250
needs : [workflow_vars]
226
251
strategy :
227
252
matrix :
228
253
target : ${{ fromJson(inputs.target_list) }}
229
- exclude : ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}
254
+ exclude : ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}
255
+
256
+ runs-on : ${{ contains(matrix.target, 'host_aarch64') && 'cp-graviton' || 'cp-ubuntu-24.04' }}
257
+ container :
258
+ image : ${{ contains(matrix.target, 'host_aarch64') && 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-aarch64:latest'
259
+ || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' }}
260
+ volumes :
261
+ - ${{github.workspace}}:${{github.workspace}}
262
+
263
+ if : inputs.test_sycl_cts
264
+ steps :
265
+ - name : Checkout repo
266
+ uses : actions/checkout@v4
267
+ - name : set up gh
268
+ uses : ./.github/actions/setup_gh
269
+ with :
270
+ os : ${{ contains( matrix.target, 'windows') && 'windows' || 'ubuntu' }}
271
+ token : ${{ secrets.GITHUB_TOKEN }}
272
+ - name : build dpc++ artefact
273
+ uses : ./.github/actions/do_build_dpcpp
274
+ with :
275
+ target : ${{ matrix.target }}
276
+ download_dpcpp_artefact : ${{ inputs.download_dpcpp_artefact }}
277
+
278
+ build_dpcpp_cross :
279
+ needs : [workflow_vars, build_dpcpp_native] # cross builds need pre-built native artefact
280
+ strategy :
281
+ fail-fast : false # let all matrix jobs complete
282
+ matrix :
283
+ target : ${{ fromJson(inputs.target_list) }}
284
+ exclude : ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_riscv64) }}
230
285
231
- # TODO: Extend if we decide to enable for windows or build natively on another target
232
286
runs-on : cp-ubuntu-24.04
233
287
container :
234
- image : ' ghcr.io/uxlfoundation/ock_ubuntu_22 .04-x86-64:latest'
288
+ image : ' ghcr.io/uxlfoundation/ock_ubuntu_24 .04-x86-64:latest'
235
289
volumes :
236
290
- ${{github.workspace}}:${{github.workspace}}
237
291
238
- if : inputs.test_sycl_cts
292
+ if : inputs.test_sycl_cts && contains(inputs.target_list, 'host_riscv64_linux')
239
293
steps :
240
294
- name : Checkout repo
241
295
uses : actions/checkout@v4
@@ -251,49 +305,56 @@ jobs:
251
305
download_dpcpp_artefact : ${{ inputs.download_dpcpp_artefact }}
252
306
253
307
build_sycl_cts :
254
- needs : [workflow_vars, build_icd, build_dpcpp_native_host ]
308
+ needs : [workflow_vars, build_icd, build_dpcpp_native ]
255
309
strategy :
310
+ fail-fast : false # let all matrix jobs complete
256
311
matrix :
257
312
target : ${{ fromJson(inputs.target_list) }}
258
- # TODO: For now just linux x86_64
259
- exclude : ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64 ) }}
313
+ # TODO: For now just linux x86_64 & aarch64
314
+ exclude : ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64 ) }}
260
315
261
- # TODO: Extend if we decide to enable for windows or build natively on another target
262
- runs-on : cp-ubuntu-24.04
316
+ runs-on : ${{ contains(matrix.target, 'host_aarch64') && 'cp-graviton' || 'cp-ubuntu-24.04' }}
263
317
container :
264
- image : ' ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest'
318
+ image : ${{ contains(matrix.target, 'host_aarch64') && 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-aarch64:latest'
319
+ || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' }}
265
320
volumes :
266
321
- ${{github.workspace}}:${{github.workspace}}
267
322
268
- if : inputs.test_sycl_cts
323
+ if : inputs.test_sycl_cts
269
324
steps :
270
325
- name : Checkout repo
271
326
uses : actions/checkout@v4
272
327
- name : set up gh
273
328
uses : ./.github/actions/setup_gh
274
329
with :
275
330
os : ${{ contains( matrix.target, 'windows') && 'windows' || 'ubuntu' }}
276
- token : ${{ secrets.GITHUB_TOKEN }}
331
+ token : ${{ secrets.GITHUB_TOKEN }}
277
332
- name : build sycl cts artefact
278
333
uses : ./.github/actions/do_build_sycl_cts
279
334
with :
280
335
target : ${{ matrix.target }}
281
336
download_sycl_cts_artefact : ${{ inputs.download_sycl_cts_artefact }}
282
337
283
338
run_sycl_cts :
284
- needs : [workflow_vars, create_ock_artefacts_ubuntu, build_dpcpp_native_host , build_sycl_cts]
339
+ needs : [workflow_vars, create_ock_artefacts_ubuntu, build_dpcpp_native , build_sycl_cts]
285
340
strategy :
341
+ fail-fast : false # let all matrix jobs complete
286
342
matrix :
287
343
target : ${{ fromJson(inputs.target_list) }}
288
- # TODO: For now just linux x86_64
289
- exclude : ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64 ) }}
344
+ # TODO: For now just linux x86_64 and aarch64
345
+ exclude : ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64 ) }}
290
346
291
- runs-on : ' ubuntu-22.04'
292
- if : inputs.test_sycl_cts
347
+ runs-on : ${{ contains(matrix.target, 'host_aarch64') && 'cp-graviton' || 'cp-ubuntu-24.04' }}
348
+ container :
349
+ image : ${{ contains(matrix.target, 'host_aarch64') && 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-aarch64:latest'
350
+ || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' }}
351
+ volumes :
352
+ - ${{github.workspace}}:${{github.workspace}}
353
+ if : inputs.test_sycl_cts
293
354
steps :
294
355
- name : Checkout repo
295
356
uses : actions/checkout@v4
296
- - name : build dpc++ artefact
357
+ - name : run sycl cts
297
358
uses : ./.github/actions/run_sycl_cts
298
359
with :
299
360
target : ${{ matrix.target }}
0 commit comments