-
Notifications
You must be signed in to change notification settings - Fork 139
295 lines (258 loc) · 11.6 KB
/
ci-github-actions-self-hosted.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
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
name: ornl CI
on:
issue_comment:
types: [created]
jobs:
sulfur-cpu:
if: |
github.repository_owner == 'QMCPACK' &&
github.event.issue.pull_request &&
startsWith(github.event.comment.body, 'Test this please')
runs-on: [self-hosted, Linux, X64, ornl-sulfur-1]
env:
GH_JOBNAME: ${{matrix.jobname}}
GH_OS: Linux
strategy:
fail-fast: false
matrix:
jobname: [
GCC11-MPI-MKL-AFQMC-Real-Mixed, # mixed precision
GCC11-MPI-MKL-AFQMC-Complex-Mixed,
GCC11-MPI-MKL-AFQMC-Real, # full precision
GCC11-MPI-MKL-AFQMC-Complex,
]
steps:
- name: Verify actor
# Only trigger for certain "actors" (those commenting the PR, not the PR originator)
# this is in-line with the current workflow
env:
ACTOR_TOKEN: ${{secrets.TOKENIZER}}${{github.actor}}${{secrets.TOKENIZER}}
SECRET_ACTORS: ${{secrets.CI_GPU_ACTORS}}
if: contains(env.SECRET_ACTORS, env.ACTOR_TOKEN)
id: check
run: |
echo "triggered=true" >> $GITHUB_OUTPUT
# Request repo info, required since issue_comment doesn't point at PR commit, but develop
- name: GitHub API Request
if: steps.check.outputs.triggered == 'true'
id: request
uses: octokit/[email protected]
with:
route: ${{github.event.issue.pull_request.url}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Create a separate PR status pointing at GitHub Actions tab URL
# just like any other third-party service
- name: Create PR status
if: steps.check.outputs.triggered == 'true'
uses: guibranco/[email protected]
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "ornl-sulfur CI ${{ matrix.jobname }}"
state: "pending"
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
- name: Get PR information
if: steps.check.outputs.triggered == 'true'
id: pr_data
run: |
echo "branch=${{ fromJson(steps.request.outputs.data).head.ref }}" >> $GITHUB_OUTPUT
echo "repo_name=${{ fromJson(steps.request.outputs.data).head.repo.full_name }}" >> $GITHUB_OUTPUT
echo "repo_clone_url=${{ fromJson(steps.request.outputs.data).head.repo.clone_url }}" >> $GITHUB_OUTPUT
echo "repo_ssh_url=${{ fromJson(steps.request.outputs.data).head.repo.ssh_url }}" >> $GITHUB_OUTPUT
- name: Checkout PR branch
if: steps.check.outputs.triggered == 'true'
uses: actions/checkout@v4
with:
token: ${{secrets.GITHUB_TOKEN}}
repository: ${{fromJson(steps.request.outputs.data).head.repo.full_name}}
ref: ${{steps.pr_data.outputs.branch}}
- name: Configure
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-1.sh configure
- name: Build
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-1.sh build
- name: Test
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-1.sh test
- name: Report PR status
if: always() && steps.check.outputs.triggered == 'true'
uses: guibranco/[email protected]
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "ornl-sulfur CI ${{matrix.jobname}}"
state: ${{job.status}}
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
sulfur-cuda:
if: |
github.repository_owner == 'QMCPACK' &&
github.event.issue.pull_request &&
( startsWith(github.event.comment.body, 'Test this please') ||
startsWith(github.event.comment.body, 'Start testing in-house') )
runs-on: [self-hosted, Linux, X64, ornl-sulfur-2]
env:
GH_JOBNAME: ${{matrix.jobname}}
GH_OS: Linux
strategy:
fail-fast: false
matrix:
jobname: [
V100-Clang16-MPI-CUDA-AFQMC-Offload-Real-Mixed, # auxiliary field, offload
V100-Clang16-MPI-CUDA-AFQMC-Offload-Real,
V100-Clang16-MPI-CUDA-AFQMC-Offload-Complex-Mixed,
V100-Clang16-MPI-CUDA-AFQMC-Offload-Complex,
V100-GCC11-MPI-CUDA-Real-Mixed,
V100-GCC11-MPI-CUDA-Real,
V100-GCC11-MPI-CUDA-Complex-Mixed,
V100-GCC11-MPI-CUDA-Complex,
]
steps:
- name: Verify actor
# Only trigger for certain "actors" (those commenting the PR, not the PR originator)
# this is in-line with the current workflow
env:
ACTOR_TOKEN: ${{secrets.TOKENIZER}}${{github.actor}}${{secrets.TOKENIZER}}
SECRET_ACTORS: ${{secrets.CI_GPU_ACTORS}}
if: contains(env.SECRET_ACTORS, env.ACTOR_TOKEN)
id: check
run: |
echo "triggered=true" >> $GITHUB_OUTPUT
# Request repo info, required since issue_comment doesn't point at PR commit, but develop
- name: GitHub API Request
if: steps.check.outputs.triggered == 'true'
id: request
uses: octokit/[email protected]
with:
route: ${{github.event.issue.pull_request.url}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Create a separate PR status pointing at GitHub Actions tab URL
# just like any other third-party service
- name: Create PR status
if: steps.check.outputs.triggered == 'true'
uses: guibranco/[email protected]
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "ornl-sulfur CI ${{ matrix.jobname }}"
state: "pending"
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
- name: Get PR information
if: steps.check.outputs.triggered == 'true'
id: pr_data
run: |
echo "branch=${{ fromJson(steps.request.outputs.data).head.ref }}" >> $GITHUB_OUTPUT
echo "repo_name=${{ fromJson(steps.request.outputs.data).head.repo.full_name }}" >> $GITHUB_OUTPUT
echo "repo_clone_url=${{ fromJson(steps.request.outputs.data).head.repo.clone_url }}" >> $GITHUB_OUTPUT
echo "repo_ssh_url=${{ fromJson(steps.request.outputs.data).head.repo.ssh_url }}" >> $GITHUB_OUTPUT
- name: Checkout PR branch
if: steps.check.outputs.triggered == 'true'
uses: actions/checkout@v4
with:
token: ${{secrets.GITHUB_TOKEN}}
repository: ${{fromJson(steps.request.outputs.data).head.repo.full_name}}
ref: ${{steps.pr_data.outputs.branch}}
- name: Configure
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-2.sh configure
- name: Build
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-2.sh build
- name: Test
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-2.sh test
- name: Report PR status
if: always() && steps.check.outputs.triggered == 'true'
uses: guibranco/[email protected]
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "ornl-sulfur CI ${{matrix.jobname}}"
state: ${{job.status}}
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
nitrogen-rocm:
if: |
github.repository_owner == 'QMCPACK' &&
github.event.issue.pull_request &&
( startsWith(github.event.comment.body, 'Test this please') ||
startsWith(github.event.comment.body, 'Start testing in-house') )
runs-on: [self-hosted, Linux, X64, ornl-nitrogen-1]
env:
GH_JOBNAME: ${{matrix.jobname}}
GH_OS: Linux
strategy:
fail-fast: false
matrix:
jobname:
[
RadeonVII-ROCm-NoMPI-CUDA2HIP-Real-Mixed,
RadeonVII-ROCm-NoMPI-CUDA2HIP-Real,
RadeonVII-ROCm-NoMPI-CUDA2HIP-Complex-Mixed,
RadeonVII-ROCm-NoMPI-CUDA2HIP-Complex,
]
steps:
- name: Verify actor
# Only trigger for certain "actors" (those commenting the PR, not the PR originator)
# this is in-line with the current workflow
env:
ACTOR_TOKEN: ${{secrets.TOKENIZER}}${{github.actor}}${{secrets.TOKENIZER}}
SECRET_ACTORS: ${{secrets.CI_GPU_ACTORS}}
if: contains(env.SECRET_ACTORS, env.ACTOR_TOKEN)
id: check
run: |
echo "triggered=true" >> $GITHUB_OUTPUT
# Request repo info, required since issue_comment doesn't point at PR commit, but develop
- name: GitHub API Request
if: steps.check.outputs.triggered == 'true'
id: request
uses: octokit/[email protected]
with:
route: ${{github.event.issue.pull_request.url}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Create a separate PR status pointing at GitHub Actions tab URL
# just like any other third-party service
- name: Create PR status
if: steps.check.outputs.triggered == 'true'
uses: guibranco/[email protected]
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "ornl-nitrogen CI ${{matrix.jobname}}"
state: "pending"
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
- name: Get PR information
if: steps.check.outputs.triggered == 'true'
id: pr_data
run: |
echo "branch=${{ fromJson(steps.request.outputs.data).head.ref }}" >> $GITHUB_OUTPUT
echo "repo_name=${{ fromJson(steps.request.outputs.data).head.repo.full_name }}" >> $GITHUB_OUTPUT
echo "repo_clone_url=${{ fromJson(steps.request.outputs.data).head.repo.clone_url }}" >> $GITHUB_OUTPUT
echo "repo_ssh_url=${{ fromJson(steps.request.outputs.data).head.repo.ssh_url }}" >> $GITHUB_OUTPUT
- name: Checkout PR branch
if: steps.check.outputs.triggered == 'true'
uses: actions/checkout@v4
with:
token: ${{secrets.GITHUB_TOKEN}}
repository: ${{fromJson(steps.request.outputs.data).head.repo.full_name}}
ref: ${{steps.pr_data.outputs.branch}}
- name: Configure
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step_ornl-nitrogen-1.sh configure
- name: Build
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step_ornl-nitrogen-1.sh build
- name: Test
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step_ornl-nitrogen-1.sh test
- name: Report PR status
if: always() && steps.check.outputs.triggered == 'true'
uses: guibranco/[email protected]
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "ornl-nitrogen CI ${{matrix.jobname}}"
state: ${{job.status}}
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}