-
Notifications
You must be signed in to change notification settings - Fork 3
252 lines (232 loc) · 9 KB
/
benchmark-crucible-ci.yaml
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
name: benchmark-crucible-ci
on:
workflow_call:
inputs:
ci_target:
required: true
type: string
crucible_ci_test:
required: false
type: string
ci_target_branch:
required: true
type: string
crucible_ci_test_branch:
required: false
type: string
github_workspace:
required: true
type: string
secrets:
registry_auth:
required: false
ci_registry_auth:
required: false
production_registry_auth:
required: false
quay_oauth_token:
required: false
concurrency:
group: ${{ inputs.ci_target }}/${{ github.ref }}/benchmark-crucible-ci
cancel-in-progress: true
env:
GITHUB_WORKSPACE: ${{ inputs.github_workspace }}
jobs:
gen-params:
runs-on: [ self-hosted, workflow-overhead ]
timeout-minutes: 10
outputs:
userenvs: ${{ steps.get-userenvs.outputs.userenvs }}
github_hosted_scenarios: ${{ steps.get-scenarios-github.outputs.scenarios }}
self_hosted_scenarios: ${{ steps.get-scenarios-self.outputs.scenarios }}
repo_name: ${{ steps.get-repo-name.outputs.repo-name }}
steps:
- name: checkout crucible-ci default
if: ${{ inputs.crucible_ci_test != 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: main
path: crucible-ci
- name: checkout crucible-ci crucible_ci_test
if: ${{ inputs.crucible_ci_test == 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: ${{ inputs.crucible_ci_test_branch }}
path: crucible-ci
- name: checkout rickshaw
uses: actions/checkout@v4
with:
repository: perftool-incubator/rickshaw
ref: master
path: rickshaw
- name: run get-userenvs
id: get-userenvs
uses: ./crucible-ci/.github/actions/get-userenvs
with:
rickshaw-directory: "./rickshaw"
- name: run get-scenarios-github
id: get-scenarios-github
uses: ./crucible-ci/.github/actions/get-scenarios
with:
runner-type: "github"
benchmark: "${{ inputs.ci_target }}"
- name: run get-scenarios-self
id: get-scenarios-self
uses: ./crucible-ci/.github/actions/get-scenarios
with:
runner-type: "self"
runner-tags: "cpu-partitioning,remotehosts"
benchmark: "${{ inputs.ci_target }}"
- name: run get-repo-name
id: get-repo-name
uses: ./crucible-ci/.github/actions/get-repo-name
display-params:
runs-on: [ self-hosted, workflow-overhead ]
timeout-minutes: 10
needs: gen-params
steps:
- name: Echo gen-params outputs
run: echo "${{ toJSON(needs.gen-params.outputs) }}"
github-runners:
runs-on: ubuntu-latest
timeout-minutes: 90
needs:
- gen-params
- display-params
strategy:
fail-fast: false
matrix:
scenario: ${{ fromJSON(needs.gen-params.outputs.github_hosted_scenarios) }}
userenv: ${{ fromJSON(needs.gen-params.outputs.userenvs) }}
steps:
- name: Matrix Parameters => (${{ matrix.scenario.enabled }}, ${{ matrix.scenario.endpoint }}, ${{ matrix.scenario.benchmark }}, ${{ matrix.userenv }})
run: |
echo "enabled=${{ matrix.scenario.enabled }}"
echo "endpoint=${{ matrix.scenario.endpoint }}"
echo "benchmark=${{ matrix.scenario.benchmark }}"
echo "userenv=${{ matrix.userenv }}"
- name: checkout crucible-ci default
if: ${{ inputs.crucible_ci_test != 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: main
path: crucible-ci
- name: checkout crucible-ci crucible_ci_test
if: ${{ inputs.crucible_ci_test == 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: ${{ inputs.crucible_ci_test_branch }}
path: crucible-ci
- name: checkout bench-${{ inputs.ci_target }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/bench-${{ inputs.ci_target }}
ref: ${{ inputs.ci_target_branch }}
path: "bench-${{ inputs.ci_target }}"
- name: import ci secret
env:
ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }}
if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }}
run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json"
- name: import production secret
env:
ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }}
if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }}
run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json"
- name: import quay oath token
env:
QUAY_OAUTH_TOKEN: ${{ secrets.quay_oauth_token }}
if: ${{ env.QUAY_OAUTH_TOKEN != '' }}
run: sudo bash -c "echo \"$QUAY_OAUTH_TOKEN\" > /root/quay-oauth.token"
- name: run crucible-ci->integration-tests
if: ${{ matrix.scenario.enabled }}
uses: ./crucible-ci/.github/actions/integration-tests
with:
artifact_tag: "${{ inputs.ci_target }}__github-runners__${{ matrix.scenario.endpoint }}-${{ matrix.scenario.benchmark }}-${{ matrix.userenv }}"
ci_endpoint: "${{ matrix.scenario.endpoint }}"
scenarios: "${{ matrix.scenario.benchmark }}"
userenvs: "${{ matrix.userenv }}"
ci_target: "${{ inputs.ci_target }}"
ci_target_dir: "${{ github.workspace }}/bench-${{ inputs.ci_target }}"
- name: skip crucible-ci->integration-tests
if: ${{ ! matrix.scenario.enabled }}
run: echo "crucible-ci->integration-tests not enabled"
self-hosted-runners:
runs-on: [ self-hosted, cpu-partitioning, remotehosts ]
timeout-minutes: 90
needs:
- gen-params
- display-params
strategy:
fail-fast: false
matrix:
scenario: ${{ fromJSON(needs.gen-params.outputs.self_hosted_scenarios) }}
userenv: ${{ fromJSON(needs.gen-params.outputs.userenvs) }}
steps:
- name: Matrix Parameters => (${{ matrix.scenario.enabled }}, ${{ matrix.scenario.endpoint }}, ${{ matrix.scenario.benchmark }}, ${{ matrix.userenv }})
run: |
echo "enabled=${{ matrix.scenario.enabled }}"
echo "endpoint=${{ matrix.scenario.endpoint }}"
echo "benchmark=${{ matrix.scenario.benchmark }}"
echo "userenv=${{ matrix.userenv }}"
- name: checkout crucible-ci default
if: ${{ inputs.crucible_ci_test != 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: main
path: crucible-ci
- name: checkout crucible-ci crucible_ci_test
if: ${{ inputs.crucible_ci_test == 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: ${{ inputs.crucible_ci_test_branch }}
path: crucible-ci
- name: checkout bench-${{ inputs.ci_target }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/bench-${{ inputs.ci_target }}
ref: ${{ inputs.ci_target_branch }}
path: "bench-${{ inputs.ci_target }}"
- name: import ci secret
env:
ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }}
if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }}
run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json"
- name: import production secret
env:
ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }}
if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }}
run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json"
- name: import quay oath token
env:
QUAY_OAUTH_TOKEN: ${{ secrets.quay_oauth_token }}
if: ${{ env.QUAY_OAUTH_TOKEN != '' }}
run: sudo bash -c "echo \"$QUAY_OAUTH_TOKEN\" > /root/quay-oauth.token"
- name: run crucible-ci->integration-tests
if: ${{ matrix.scenario.enabled }}
uses: ./crucible-ci/.github/actions/integration-tests
with:
artifact_tag: "${{ inputs.ci_target }}__self-hosted-runners__${{ matrix.scenario.endpoint }}-${{ matrix.scenario.benchmark }}-${{ matrix.userenv }}"
ci_endpoint: "${{ matrix.scenario.endpoint }}"
scenarios: "${{ matrix.scenario.benchmark }}"
userenvs: "${{ matrix.userenv }}"
ci_target: "${{ inputs.ci_target }}"
ci_target_dir: ${{ github.workspace }}/bench-${{ inputs.ci_target }}
- name: skip crucible-ci->integration-tests
if: ${{ ! matrix.scenario.enabled }}
run: echo "crucible-ci->integration-tests not enabled"
benchmark-crucible-ci-complete:
runs-on: [ self-hosted, workflow-overhead ]
timeout-minutes: 10
needs:
- github-runners
- self-hosted-runners
steps:
- name: Confirm Success
run: echo "benchmark-crucible-ci-complete"