@@ -5,14 +5,27 @@ 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
17
+ paths :
18
+ - .github/workflows/premerge.yaml
8
19
push :
9
20
branches :
10
21
- ' main'
11
22
- ' release/**'
12
23
13
24
jobs :
14
25
premerge-checks-linux :
15
- if : false && github.repository_owner == 'llvm'
26
+ if : >-
27
+ false && github.repository_owner == 'llvm' &&
28
+ (github.event_name != 'pull_request' || github.event.action != 'closed')
16
29
runs-on : llvm-premerge-linux-runners
17
30
concurrency :
18
31
group : ${{ github.workflow }}-linux-${{ github.event.pull_request.number || github.sha }}
71
84
./.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"
72
85
73
86
premerge-checks-windows :
74
- if : false && github.repository_owner == 'llvm'
87
+ if : >-
88
+ false && github.repository_owner == 'llvm' &&
89
+ (github.event_name != 'pull_request' || github.event.action != 'closed')
75
90
runs-on : llvm-premerge-windows-runners
76
91
concurrency :
77
92
group : ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
@@ -139,7 +154,8 @@ jobs:
139
154
if : >-
140
155
github.repository_owner == 'llvm' &&
141
156
(startswith(github.ref_name, 'release/') ||
142
- startswith(github.base_ref, 'release/'))
157
+ startswith(github.base_ref, 'release/')) &&
158
+ (github.event_name != 'pull_request' || github.event.action != 'closed')
143
159
steps :
144
160
- name : Checkout LLVM
145
161
uses : actions/checkout@v4
0 commit comments