-
Notifications
You must be signed in to change notification settings - Fork 47
665 lines (615 loc) · 24.5 KB
/
Copy pathrun_ock_internal_tests.yml
File metadata and controls
665 lines (615 loc) · 24.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
# Simple workflow for running internal ock tests
name: Run ock internal tests
on:
workflow_call:
inputs:
is_pull_request:
required: false
type: boolean
default: true
llvm_source:
required: false
description: 'method of sourcing llvm (install or cache), currently advisory until all converted'
type: string
default: 'install'
llvm_previous:
required: true
type: string
description: 'previous llvm version to use for those jobs tied to previous.'
llvm_previous_branch:
required: true
type: string
description: 'previous llvm branch to use for those jobs tied to previous.'
llvm_current:
required: true
type: string
description: 'current llvm version to use for those jobs tied to current.'
llvm_current_branch:
required: true
type: string
description: 'current llvm branch to use for those jobs tied to current.'
github_token:
type: string
description: 'gh token for downloading artifacts - only needed if we want llvm from a previous workflow'
default: 'TOKEN_NOT_SET'
target_list:
required: false
type: string
default: '[ "host_x86_64_linux",
"host_aarch64_linux",
"host_riscv64_linux",
"host_i686_linux",
"refsi_riscv64_linux",
"host_x86_64_windows" ]'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
is_pull_request:
required: false
type: bool
default: true
llvm_source:
required: false
type: string
description: 'method of sourcing llvm (install or cache), currently advisory until all converted'
default: 'install'
llvm_previous:
required: false
type: string
description: 'previous llvm version to for those jobs tied to previous.'
llvm_current:
required: false
type: string
description: 'previous llvm version to for those jobs tied to current.'
permissions:
packages: read
jobs:
set_env_vars:
# Set inter-job env var for common run_cities options
runs-on: ubuntu-latest
outputs:
run_cities_options: ${{ steps.run_cities_id.outputs.COMMON_RUN_CITIES_OPTIONS }}
steps:
- name: set run_cities var
id: run_cities_id
run: |
echo "COMMON_RUN_CITIES_OPTIONS<<EOF" >> $GITHUB_OUTPUT
echo '-s $GITHUB_WORKSPACE/scripts/jenkins/cts_summary/opencl_conformance_tests_wimpy_very_quick.csv -b $GITHUB_WORKSPACE/build/test_conformance -L $GITHUB_WORKSPACE/build/lib -e OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/build/lib/libCL.so -e OCL_ICD_VENDORS=/dev/null --timeout 00:10:00 --verbose -l $GITHUB_WORKSPACE/build/cts.log -f $GITHUB_WORKSPACE/build/cts.fail' >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
# build and run host x86_64, execute UnitCL and lit tests and build and run offline
run_host_x86_64:
if: contains(inputs.target_list, 'host_x86_64_linux')
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
- name: Checkout repo
uses: actions/checkout@v6
# installs tools, ninja, installs llvm and sets up ccache
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_previous }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build
uses: ./.github/actions/do_build_pr/run_host_x86_64
- name: run just online lit
run:
ninja -C build check-ock-all-lit
- name: run host online check
run:
ninja -C build check-ock-UnitCL
- name: run host x86_64 offline
run:
ninja -C build_offline check-ock-UnitCL
# build and run clang-tidy
run_clang_tidy_changes:
if: contains(inputs.target_list, 'host_x86_64_linux')
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
- name: Checkout repo
uses: actions/checkout@v6
# installs tools, ninja, installs llvm and sets up ccache
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
# Install requirements
- name: Install clang-tidy and parallel
run: |
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null
sudo apt-get update
sudo apt-get install --yes clang-tidy-21 parallel
- name: build initial config files
uses: ./.github/actions/do_build_ock
with:
build_type: ReleaseAssert
host_image: ON
build_targets: build.ninja
# Assume all clang-tidy prerequisites are files ending in '.cpp' or '.h'.
- name: build actual targets needed
run:
ninja -C build $(ninja -C build -t targets all | sed -nE 's/(\.cpp|\.h):.*/\1/p')
- name: run clang-tidy
run: |
git config --global --add safe.directory $PWD
git fetch origin ${{ github.base_ref }}
./scripts/compute-dependants.py \
--exclude-filter='(/build/.*\.s$)|(.*/(external|cookie)/.*)' \
--build-dir="$PWD/build" \
`git diff --name-only --diff-filter=d \
HEAD..origin/${{ github.base_ref }} | \
grep -P '\.(c|cc|cxx|cpp|h|hh|hpp|hxx)$'` | \
tee /dev/stderr | \
parallel --verbose -- clang-tidy-21 --quiet -p "$PWD/build/" "{}"
# ^ When updating the clang-tidy version, the version used by the cmake
# target should match updated c.f. the `tidy` target
# run clang-format-diff on the repo
run_clang_format:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu-clang-format
run:
pip install clang-format==21.1.2
- name: run clang-format
run: |
# we've installed clang-format-21 in the docker via pip, which just installs it as clang-format,
# so just use clang-format-diff and -b clang-format directly
git fetch origin ${{ github.base_ref }}
git diff --no-color origin/${{ github.base_ref }} | \
clang-format-diff.py -p1 -regex \
"^(?!(.+\\/)*(external|cookie)\\/).*\\.(c|cc|cxx|cpp|h|hh|hxx|hpp)$" -b clang-format
# Based on: mr-windows-msvc-x86_64-llvm-previous-cl3.0-offline
run_windows_msvc_x86_64_llvm_latest_cl3_0_offline:
runs-on: windows-2025
if: contains(inputs.target_list, 'host_x86_64_windows')
steps:
- name: Setup Windows llvm base
uses: llvm/actions/setup-windows@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main branch
with:
arch: amd64
- name: Checkout repo
uses: actions/checkout@v6
# installs tools, ninja, installs llvm and sets up ccache
- name: setup-windows
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
os: windows
llvm_source: ${{ inputs.llvm_source }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and test ock
uses: ./.github/actions/do_build_pr/run_windows_msvc_x86_64_llvm_latest_cl3_0_offline
# Based on: mr-ubuntu-gcc-x86_64-riscv-fp16-cl3.0-unitcl_vecz
run_ubuntu_gcc_x86_64_riscv_fp16_cl3_0_unitcl_vecz:
if: contains(inputs.target_list, 'refsi_riscv64_linux')
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_previous }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_64_riscv_fp16_cl3_0_unitcl_vecz
# Based on: mr-ubuntu-clang-x86-llvm-previous-cl3-0-offline
run-ubuntu-clang-x86-llvm-latest-cl3-0-offline:
# do not run as PR job due to cross where we always install
if: ${{ !inputs.is_pull_request && contains(inputs.target_list, 'host_i686_linux') }}
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 90 # offline needs longer timeout
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
cross_arch: x86
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and run ock
uses: ./.github/actions/do_build_pr/run_ubuntu_clang_x86_llvm_latest_cl3_0_offline
# Based on: mr-ubuntu-gcc-x86_64-riscv-fp16-cl3-0
run-ubuntu-gcc-x86_64-riscv-fp16-cl3-0:
if: contains(inputs.target_list, 'refsi_riscv64_linux')
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and run ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_64_riscv_fp16_cl3_0
# Based on: mr-ubuntu-gcc-x86_64-riscv-cl3-0
run-ubuntu-gcc-x86_64-riscv-cl3-0:
if: contains(inputs.target_list, 'refsi_riscv64_linux')
needs: [set_env_vars]
env:
COMMON_RUN_CITIES_OPTIONS: ${{ needs.set_env_vars.outputs.run_cities_options }}
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and run ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_64_riscv_cl3_0
- name: download cached opencl_cts artifact
uses: actions/cache/restore@v5
with:
key: opencl_cts_host_x86_64_linux
path: build/test_conformance
fail-on-cache-miss: true
- name: run_cities call and run
uses: ./.github/actions/run_cities_internal
with:
run_cities_path: $GITHUB_WORKSPACE/scripts/testing
run_cities_options: "-e 'CA_RISCV_VF=1,S' \
${{ env.COMMON_RUN_CITIES_OPTIONS }}"
# Based on: mr-ubuntu-gcc-x86_64-riscv-cl3-0-part2
run-ubuntu-gcc-x86_64-riscv-cl3-0-part2:
if: contains(inputs.target_list, 'refsi_riscv64_linux')
needs: [set_env_vars]
env:
COMMON_RUN_CITIES_OPTIONS: ${{ needs.set_env_vars.outputs.run_cities_options }}
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and run ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_64_riscv_cl3_0
with:
build_targets: 'check-ock-UnitCL-group-vecz'
disable_unitcl_vecz_checks: 'OFF'
- name: download cached opencl_cts artifact
uses: actions/cache/restore@v5
with:
key: opencl_cts_host_x86_64_linux
path: build/test_conformance
fail-on-cache-miss: true
- name: run_cities call and run
uses: ./.github/actions/run_cities_internal
with:
run_cities_path: $GITHUB_WORKSPACE/scripts/testing
run_cities_options: "-e 'CA_RISCV_VF=1,S,VP' \
${{ env.COMMON_RUN_CITIES_OPTIONS }}"
# Based on: mr-ubuntu-gcc-x86-llvm-latest-x86_64-images-cl3-0-release
run-ubuntu-gcc-x86-llvm-latest-x86_64-images-cl3-0-release:
if: contains(inputs.target_list, 'host_x86_64_linux')
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and run ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_llvm_latest_x86_64_images_cl3_0_release
# Based on: mr-ubuntu-gcc-aarch64-llvm-previous-cl3-0-fp16
run-ubuntu-gcc-aarch64-llvm-latest-cl3-0-fp16:
if: contains(inputs.target_list, 'host_aarch64_linux')
runs-on: ubuntu-22.04-arm
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-aarch64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 90 # aarch64 needs longer timeout
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and run ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_aarch64_llvm_latest_cl3_0_fp16
# Based on a combination of: mr-ubuntu-gcc-x86_64-clik
# and: mr-ubuntu-gcc-x86_64-clik-refsi
run-ubuntu-gcc-x86_64-clik-refsi:
if: contains(inputs.target_list, 'refsi_riscv64_linux')
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al
- name: Run Clik
run: |
cmake -Bbuild_clik -GNinja -DCMAKE_INSTALL_PREFIX=install clik
LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ninja -Cbuild_clik check
- name: Run Clik-Refsi # No initial clean - just point o/p at new dirs
run: |
cmake -Bbuild_clik_refsi -GNinja -DCMAKE_INSTALL_PREFIX=install_refsi -DCLIK_HAL_NAME=refsi -DHAL_REFSI_SOC=M1 -DCLIK_EXTERNAL_HAL_DIR=${{ github.workspace }}/examples/refsi/hal_refsi clik
LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ninja -Cbuild_clik_refsi check
# Based on: mr-ubuntu-gcc-x86_64-refsi-g1-wi-cl3-0
run-ubuntu-gcc-x86_64-refsi-g1-wi-cl3-0:
if: ${{ !inputs.is_pull_request && contains(inputs.target_list, 'refsi_riscv64_linux') }}
needs: [set_env_vars]
env:
COMMON_RUN_CITIES_OPTIONS: ${{ needs.set_env_vars.outputs.run_cities_options }}
# do not run as PR job for now to avoid flooding the concurrency
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_64_refsi_g1_wi_cl3_0
- name: download cached opencl_cts artifact
uses: actions/cache/restore@v5
with:
key: opencl_cts_host_x86_64_linux
path: build/test_conformance
fail-on-cache-miss: true
- name: set-up skipped.txt for run_cities.py
run: |
echo 'Subgroups,subgroups/test_subgroups barrier_functions_core' >> $GITHUB_WORKSPACE/skipped.txt
- name: run_cities call and run
uses: ./.github/actions/run_cities_internal
with:
run_cities_path: $GITHUB_WORKSPACE/scripts/testing
run_cities_options: "-i $GITHUB_WORKSPACE/skipped.txt \
${{ env.COMMON_RUN_CITIES_OPTIONS }}"
# Based on: mr-run-ubuntu-gcc-x86_64-refsi-tutorial-end
run-ubuntu-gcc-x86_64-refsi-tutorial-end:
if: contains(inputs.target_list, 'refsi_riscv64_linux')
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_64_refsi_tutorial
# Based on: mr-run-ubuntu-gcc-x86_64-refsi-tutorial-start:
run-ubuntu-gcc-x86_64-refsi-tutorial-start:
if: contains(inputs.target_list, 'refsi_riscv64_linux')
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_64_refsi_tutorial
with:
setup_new_target_params: ''
tutorial_point: start
# Based on: mr-ubuntu-build-ock-in-tree-llvm
run-ubuntu-build-ock-in-tree-llvm:
if: ${{ !inputs.is_pull_request && contains(inputs.target_list, 'host_x86_64_linux') && inputs.llvm_version != 'main' }}
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
- name: Checkout repo
uses: actions/checkout@v6
# installs tools, ninja, installs llvm and sets up ccache
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout llvm-project
uses: actions/checkout@v6
with:
repository: llvm/llvm-project
path: llvm-project
ref: ${{ inputs.llvm_current_branch }}
fetch-depth: 1
- name: build and run
run: |
# Position llvm-project alongside ock
mv llvm-project ..
cd ../llvm-project
cmake -S llvm -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang \
-DLLVM_TARGETS_TO_BUILD="X86;AArch64;ARM;RISCV" -DLLVM_EXTERNAL_PROJECTS=ock \
-DLLVM_EXTERNAL_OCK_SOURCE_DIR=$PWD/../oneapi-construction-kit
ninja -C build check-ock-vecz-lit
# Based on: mr-ubuntu-clang-x86-llvm-latest-cl3.0
run-ubuntu-clang-x86-llvm-latest-cl3-0:
if: ${{ !inputs.is_pull_request && contains(inputs.target_list, 'host_i686_linux') }}
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
- name: Checkout repo
uses: actions/checkout@v6
# installs tools, ninja, installs llvm and sets up ccache
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
cross_arch: x86
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and run ock
uses: ./.github/actions/do_build_pr/run_ubuntu_clang_x86_llvm_latest_cl3_0
# Based on: mr-ubuntu-gcc-x86-llvm-previous-cl3.0-release
run-ubuntu-gcc-x86-llvm-previous-cl3-0-release:
if: ${{ !inputs.is_pull_request && contains(inputs.target_list, 'host_i686_linux') }}
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
- name: Checkout repo
uses: actions/checkout@v6
# installs tools, ninja, installs llvm and sets up ccache
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_previous }}
# llvm_build_type: Release
cross_arch: x86
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and run ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_llvm_previous_cl3_0_release
# Based on: mr-ubuntu-gcc-x86_64-cpu
run-ubuntu-gcc-x86_64-cpu:
if: contains(inputs.target_list, 'host_x86_64_linux')
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
- name: Checkout repo
uses: actions/checkout@v6
# installs tools, ninja, installs llvm and sets up ccache
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_current }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and run ock
uses: ./.github/actions/do_build_pr/run_ubuntu_gcc_x86_64_cpu
# Based on: mr-windows-msvc-x86_64-llvm-previous-cl3.0-images
run-windows-msvc-x86_64-llvm-previous-cl3_0-images:
runs-on: windows-2025
if: ${{ !inputs.is_pull_request && contains(inputs.target_list, 'host_x86_64_windows') }}
steps:
- name: Setup Windows llvm base
uses: llvm/actions/setup-windows@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main branch
with:
arch: amd64
- name: Checkout repo
uses: actions/checkout@v6
# installs tools, ninja, installs llvm and sets up ccache
- name: setup-windows
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_previous }}
os: windows
llvm_source: ${{ inputs.llvm_source }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build and test ock
uses: ./.github/actions/do_build_pr/run_windows_msvc_x86_64_llvm_previous_cl3_0_images
run-ubuntu-clang-tidy-x86_64:
if: ${{ !inputs.is_pull_request && contains(inputs.target_list, 'host_x86_64_linux') }}
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
- name: Checkout repo
uses: actions/checkout@v6
# Install requirements
- name: Install clang-tidy and parallel
run: |
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null
sudo apt-get update
sudo apt-get install --yes clang-tidy-21 parallel
- name: setup-ubuntu
uses: ./.github/actions/setup_build
with:
llvm_version: ${{ inputs.llvm_previous }}
llvm_source: ${{ inputs.llvm_source}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: build ock / clang-tidy
uses: ./.github/actions/do_build_pr/run_ubuntu_clang_tidy_x86_64