Repository navigation
191 lines (174 loc) · 7.48 KB
/
Copy pathci-self-cpu.yml
File metadata and controls
191 lines (174 loc) · 7.48 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
name: CI Self CPU
run-name: CI Self CPU / PR ${{ inputs.pr_number || inputs.ref }}
# Emergency lane: T1 no-hardware Linux runs on [self-hosted, cpu], while T3
# NPU jobs run on the a2a3/a5 pools. The lane stays callable from /run-cpu via
# workflow_call and from manual workflow_dispatch. T2 (macOS) is intentionally
# absent. Job bodies live in reusable workflows shared with ci.yml, and only the
# runner/setup inputs differ here; gate outputs come from the canonical reusable
# detect-changes workflow, executed on [self-hosted, cpu] in this lane.
#
# Provisioning contract for the cpu runner (out-of-repo, dnf): every cpu agent
# needs the same set — cmake ninja-build gcc-c++ clang-tools-extra graphviz
# gtest-devel python3-devel. T1 jobs create plain venvs from the runner's
# python3 (the repo supports >=3.9; the runner's 3.9 caught the zip(strict=)
# bug that CI's 3.10 never did) with a pip cache; the venv isolates T1 from
# any system/user python state. T3 (NPU) jobs keep their --system-site-packages
# venvs (driver bindings). g++-15 is a symlink stand-in for the
# ubuntu-toolchain ppa g++ — see below. ci.yml lints with clang-tidy 18 while
# HCE 2.0 packages only LLVM 12, so an agent also provides 18 on PATH under the
# versioned name clang-tidy-18 (installed with its clang builtin headers,
# without which it resolves no resource dir); the pre-commit job shadows the
# distro clang-tidy with it when present.
permissions:
contents: read
on:
workflow_call:
inputs:
repository:
description: "Target repo (fork PRs pass fork full name); defaults to this repo."
required: false
type: string
ref:
description: "PR head SHA or branch to validate. Empty = ref this run was triggered on."
required: false
type: string
pr_number:
description: "PR number (run naming / concurrency keying)."
required: false
type: string
workflow_dispatch:
inputs:
repository:
description: "Target repo (fork PRs pass fork full name)."
required: false
default: hw-native-sys/simpler
type: string
ref:
description: "PR head SHA or branch to validate."
required: false
type: string
pr_number:
description: "PR number (run naming / concurrency keying)."
required: false
type: string
concurrency:
group: ci-self-cpu-${{ inputs.pr_number || inputs.ref }}
cancel-in-progress: true
jobs:
detect-changes:
uses: ./.github/workflows/_detect-changes.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
base_repository: ${{ github.repository }}
base_ref: main
runs_on: '["self-hosted","cpu"]'
pre-commit:
uses: ./.github/workflows/_pre-commit.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
base_repository: ${{ github.repository }}
runs_on: '["self-hosted","cpu"]'
setup_variant: self-cpu
ut:
needs: [detect-changes]
if: needs.detect-changes.outputs.non_code_only != 'true' && needs.detect-changes.outputs.ut_affected == 'true'
uses: ./.github/workflows/_ut-no-hardware.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","cpu"]'
setup_variant: self-cpu
packaging:
needs: [detect-changes]
if: needs.detect-changes.outputs.non_code_only != 'true' && needs.detect-changes.outputs.examples_only != 'true' && needs.detect-changes.outputs.tests_only != 'true'
uses: ./.github/workflows/_packaging.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","cpu"]'
setup_variant: self-cpu
profiling-flags-smoke:
needs: [detect-changes]
if: (needs.detect-changes.outputs.a2a3_changed == 'true' || needs.detect-changes.outputs.a5_changed == 'true') && needs.detect-changes.outputs.examples_only != 'true' && needs.detect-changes.outputs.tests_only != 'true'
uses: ./.github/workflows/_profiling-flags-smoke.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","cpu"]'
setup_variant: self-cpu
st-sim-a2a3:
needs: [detect-changes]
if: needs.detect-changes.outputs.a2a3_changed == 'true' && needs.detect-changes.outputs.st_affected == 'true'
uses: ./.github/workflows/_st-sim-a2a3.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","cpu"]'
setup_variant: self-cpu
include_dfx_smokes: false
st-sim-a5:
needs: [detect-changes]
if: needs.detect-changes.outputs.a5_changed == 'true' && needs.detect-changes.outputs.st_affected == 'true'
uses: ./.github/workflows/_st-sim-a5.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","cpu"]'
setup_variant: self-cpu
include_dfx_smokes: false
ut-a2a3:
needs: [detect-changes]
if: needs.detect-changes.outputs.non_code_only != 'true' && needs.detect-changes.outputs.ut_affected == 'true'
uses: ./.github/workflows/_ut-npu-a2a3.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","a2a3"]'
include_cann_examples: false
st-framework-eager-a2a3:
needs: [detect-changes, pre-commit]
if: needs.detect-changes.outputs.a2a3_changed == 'true' && needs.detect-changes.outputs.st_affected == 'true'
uses: ./.github/workflows/_st-framework-eager.yml
with:
platform: a2a3
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","a2a3"]'
st-framework-eager-a5:
needs: [detect-changes, pre-commit]
if: needs.detect-changes.outputs.a5_changed == 'true' && needs.detect-changes.outputs.st_affected == 'true'
uses: ./.github/workflows/_st-framework-eager.yml
with:
platform: a5
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","a5"]'
st-onboard-a2a3:
needs: [detect-changes]
if: needs.detect-changes.outputs.a2a3_changed == 'true' && needs.detect-changes.outputs.st_affected == 'true'
uses: ./.github/workflows/_st-npu-a2a3.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","a2a3"]'
include_dfx_smokes: false
ut-a5:
needs: [detect-changes]
if: needs.detect-changes.outputs.non_code_only != 'true' && needs.detect-changes.outputs.ut_affected == 'true'
uses: ./.github/workflows/_ut-npu-a5.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","a5"]'
include_cann_examples: false
st-onboard-a5:
needs: [detect-changes]
if: needs.detect-changes.outputs.a5_changed == 'true' && needs.detect-changes.outputs.st_affected == 'true'
uses: ./.github/workflows/_st-npu-a5.yml
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
runs_on: '["self-hosted","a5"]'
include_dfx_smokes: false