forked from uxlfoundation/oneapi-construction-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (118 loc) · 4.18 KB
/
planned_testing.yml
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
# Simple workflow for running non-documentation PR testing
name: Run ock tests for PR testing
on:
workflow_call:
inputs:
ock:
required: false
type: boolean
default: true
test_tornado:
required: false
type: boolean
default: true
target_list:
required: false
type: string
llvm_version:
required: false
type: string
default: 19
pull_request:
required: false
type: bool
default: false
jobs:
# Calculate some useful variables that can be used through the workflow
# Currently this can be used to exclude all but certain targets in matrices
workflow_vars:
runs-on: ubuntu-22.04
outputs:
matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }}
matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }}
steps:
- id: vars
run: |
echo matrix_only_linux_x86_64_aarch64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT
echo matrix_only_linux_x86_64="[ {\"target\": \"host_aarch64_linux\"}, {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT
create_ock_artefacts:
needs: [workflow_vars]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}
runs-on: ${{ (contains(matrix.target, 'host_riscv') && 'ubuntu-24.04') || (contains(matrix.target, 'windows') && 'windows-2019' || 'ubuntu-22.04' ) }}
if : inputs.ock
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: build ock artefact
uses: ./.github/actions/do_build_ock_artefact
with:
target: ${{ matrix.target }}
llvm_version: ${{ inputs.llvm_version }}
build_icd:
# Will also be required for opencl
if: inputs.test_tornado
needs: [workflow_vars]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}
runs-on: ubuntu-22.04
steps:
- name: clone ock platform
uses: actions/checkout@v4
with:
sparse-checkout: |
platform
.github
# The following can also be done with the matrix with exclude: to limit the targets to what we want
- name : build and upload icd ${{matrix.target}}
uses: ./.github/actions/do_build_icd
with:
target: ${{matrix.target}}
# Currently only builds and runs on x86_64 linux
build_cts:
if: inputs.test_opencl_cts
needs: [ workflow_vars, build_icd ]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}
# Todo: expand for aarch64
runs-on: ubuntu-22.04
steps:
- name: clone ock platform
uses: actions/checkout@v4
with:
sparse-checkout: |
platform
.github
# TODO: Consider separating out tornado build and run in the future
- name : build and upload tornado
uses: ./.github/actions/do_build_tornado
with:
target: ${{ matrix.target }}
- name : run tornado
uses: ./.github/actions/run_tornado
with:
target: ${{ matrix.target }}
# Todo: expand for aarch64
runs-on: ubuntu-22.04
steps:
- name: clone ock platform
uses: actions/checkout@v4
with:
sparse-checkout: |
platform
.github
# TODO: Consider separating out tornado build and run in the future
- name : build and upload tornado
uses: ./.github/actions/do_build_tornado
with:
target: ${{ matrix.target }}
- name : run tornado
uses: ./.github/actions/run_tornado
with:
target: ${{ matrix.target }}