forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 1
223 lines (218 loc) · 9.95 KB
/
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
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
name: Testing
on:
issue_comment:
types: [created]
concurrency:
group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ contains(github.event.comment.body, '/run standalone') || contains(github.event.comment.body, '/run all') }}-${{ contains(github.event.comment.body, '/run cmssw') || contains(github.event.comment.body, '/run all') }}-${{ contains(github.event.comment.body, 'lowpt') }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
standalone:
if: >
github.event.issue.pull_request &&
(contains(github.event.comment.body, '/run standalone') || contains(github.event.comment.body, '/run all')) &&
( github.event.comment.user.login == 'ariostas' ||
github.event.comment.user.login == 'GNiendorf' ||
github.event.comment.user.login == 'YonsiG' ||
github.event.comment.user.login == 'VourMa' ||
github.event.comment.user.login == 'aashayarora' ||
github.event.comment.user.login == 'bucket420' ||
github.event.comment.user.login == 'jchismar' ||
github.event.comment.user.login == 'kk428' ||
github.event.comment.user.login == 'mmasciov' ||
github.event.comment.user.login == 'pwittich' ||
github.event.comment.user.login == 'sgnoohc' ||
github.event.comment.user.login == 'slava77devel' ||
github.event.comment.user.login == 'slava77'
)
runs-on: ubuntu-latest
steps:
- name: Check out PR
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
sparse-checkout: |
RecoTracker/LST
RecoTracker/LSTCore
Configuration/ProcessModifiers
RecoTracker/ConversionSeedGenerators
RecoTracker/FinalTrackSelectors
RecoTracker/IterativeTracking
HeterogeneousCore/AlpakaInterface
DataFormats/Portable
- name: Get commit SHA
run: |
sha=$(git rev-parse HEAD)
echo "COMMIT_SHA=$sha" >> $GITHUB_ENV
- name: Create App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
skip-token-revoke: true
- name: Create in progress check
uses: LouisBrunner/[email protected]
with:
token: ${{ steps.app-token.outputs.token }}
sha: ${{ env.COMMIT_SHA }}
name: Run Standalone PU200${{ contains(github.event.comment.body, 'lowpt') && ' (low pT setup)' || '' }}
status: in_progress
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
output: |
{"title": "This check has started...", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."}
- name: Build and run PR
timeout-minutes: 60
id: build-and-run
uses: SegmentLinking/TrackLooper-actions/standalone@cmssw
with:
pr-number: ${{ github.event.issue.number }}
low-pt: ${{ contains(github.event.comment.body, 'lowpt') && 'true' || 'false' }}
- name: Upload plots to archival repo
uses: s0/git-publish-subdir-action@develop
env:
REPO: [email protected]:${{ steps.build-and-run.outputs.archive-repo }}.git
BRANCH: ${{ steps.build-and-run.outputs.archive-branch }}
FOLDER: ${{ steps.build-and-run.outputs.archive-dir }}
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }}
TARGET_DIR: ${{ steps.build-and-run.outputs.archive-dir }}
- name: Comment on PR
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${{ steps.build-and-run.outputs.comment }}`
})
- name: Comment on PR if job failed.
if: failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `There was a problem while building and running in standalone mode. The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).`
})
- name: Create App Token
if: always()
uses: actions/create-github-app-token@v1
id: app-token-end
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create completed check
uses: LouisBrunner/[email protected]
if: always()
with:
token: ${{ steps.app-token-end.outputs.token }}
sha: ${{ env.COMMIT_SHA }}
name: Run Standalone PU200${{ contains(github.event.comment.body, 'lowpt') && ' (low pT setup)' || '' }}
conclusion: ${{ job.status }}
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
output: |
{"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."}
cmssw:
if: >
github.event.issue.pull_request &&
(contains(github.event.comment.body, '/run cmssw')|| contains(github.event.comment.body, '/run all')) &&
( github.event.comment.user.login == 'ariostas' ||
github.event.comment.user.login == 'GNiendorf' ||
github.event.comment.user.login == 'YonsiG' ||
github.event.comment.user.login == 'VourMa' ||
github.event.comment.user.login == 'aashayarora' ||
github.event.comment.user.login == 'bucket420' ||
github.event.comment.user.login == 'jchismar' ||
github.event.comment.user.login == 'kk428' ||
github.event.comment.user.login == 'mmasciov' ||
github.event.comment.user.login == 'pwittich' ||
github.event.comment.user.login == 'sgnoohc' ||
github.event.comment.user.login == 'slava77devel' ||
github.event.comment.user.login == 'slava77'
)
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Get commit SHA
run: |
sha=$(git rev-parse HEAD)
echo "COMMIT_SHA=$sha" >> $GITHUB_ENV
- name: Create App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
skip-token-revoke: true
- name: Create in progress check
uses: LouisBrunner/[email protected]
with:
token: ${{ steps.app-token.outputs.token }}
sha: ${{ env.COMMIT_SHA }}
name: Run CMSSW 29834.1${{ contains(github.event.comment.body, 'lowpt') && ' (low pT setup)' || '' }}
status: in_progress
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
output: |
{"title": "This check has started...", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."}
- name: Build and run PR
timeout-minutes: 200
id: build-and-run
uses: SegmentLinking/TrackLooper-actions/cmssw@cmssw
with:
pr-number: ${{ github.event.issue.number }}
low-pt: ${{ contains(github.event.comment.body, 'lowpt') && 'true' || 'false' }}
- name: Upload plots to archival repo
uses: s0/git-publish-subdir-action@develop
env:
REPO: [email protected]:${{ steps.build-and-run.outputs.archive-repo }}.git
BRANCH: ${{ steps.build-and-run.outputs.archive-branch }}
FOLDER: ${{ steps.build-and-run.outputs.archive-dir }}
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }}
TARGET_DIR: ${{ steps.build-and-run.outputs.archive-dir }}
- name: Comment on PR
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${{ steps.build-and-run.outputs.comment }}`
})
- name: Comment on PR if job failed.
if: failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `There was a problem while building and running with CMSSW. The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).`
})
- name: Create App Token
if: always()
uses: actions/create-github-app-token@v1
id: app-token-end
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create completed check
uses: LouisBrunner/[email protected]
if: always()
with:
token: ${{ steps.app-token-end.outputs.token }}
sha: ${{ env.COMMIT_SHA }}
name: Run CMSSW 29834.1${{ contains(github.event.comment.body, 'lowpt') && ' (low pT setup)' || '' }}
conclusion: ${{ job.status }}
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
output: |
{"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."}