@@ -5,6 +5,15 @@ permissions:
5
5
6
6
on :
7
7
pull_request :
8
+ types :
9
+ - opened
10
+ - synchronize
11
+ - reopened
12
+ # When a PR is closed, we still start this workflow, but then skip
13
+ # all the jobs, which makes it effectively a no-op. The reason to
14
+ # do this is that it allows us to take advantage of concurrency groups
15
+ # to cancel in progress CI jobs whenever the PR is closed.
16
+ - closed
8
17
paths :
9
18
- .github/workflows/premerge.yaml
10
19
push :
14
23
15
24
jobs :
16
25
premerge-checks-linux :
17
- if : github.repository_owner == 'llvm'
26
+ if : >-
27
+ github.repository_owner == 'llvm' &&
28
+ (github.event_name != 'pull_request' || github.event.action != 'closed')
18
29
runs-on : llvm-premerge-linux-runners
19
30
concurrency :
20
31
group : ${{ github.workflow }}-linux-${{ github.event.pull_request.number || github.sha }}
73
84
./.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"
74
85
75
86
premerge-checks-windows :
76
- if : github.repository_owner == 'llvm'
87
+ if : >-
88
+ github.repository_owner == 'llvm' &&
89
+ (github.event_name != 'pull_request' || github.event.action != 'closed')
77
90
runs-on : llvm-premerge-windows-runners
78
91
concurrency :
79
92
group : ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
@@ -141,7 +154,8 @@ jobs:
141
154
if : >-
142
155
github.repository_owner == 'llvm' &&
143
156
(startswith(github.ref_name, 'release/') ||
144
- startswith(github.base_ref, 'release/'))
157
+ startswith(github.base_ref, 'release/')) &&
158
+ (github.event_name != 'pull_request' || github.event.action != 'closed')
145
159
steps :
146
160
- name : Checkout LLVM
147
161
uses : actions/checkout@v4
0 commit comments