Skip to content

Commit 4942a35

Browse files
committed
Remove step YAML anchor and env.SKIP_JOB
1 parent 246ee53 commit 4942a35

File tree

2 files changed

+4
-56
lines changed

2 files changed

+4
-56
lines changed

.github/workflows/ci.yml

+2-26
Original file line numberDiff line numberDiff line change
@@ -88,93 +88,70 @@ jobs:
8888
run: "echo \"[CI_PR_NUMBER=$num]\""
8989
env:
9090
num: "${{ github.event.number }}"
91-
if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
91+
if: "success() && github.event_name == 'pull_request'"
9292
- name: add extra environment variables
9393
run: src/ci/scripts/setup-environment.sh
9494
env:
9595
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
96-
if: success() && !env.SKIP_JOB
9796
- name: ensure the channel matches the target branch
9897
run: src/ci/scripts/verify-channel.sh
99-
if: success() && !env.SKIP_JOB
10098
- name: collect CPU statistics
10199
run: src/ci/scripts/collect-cpu-stats.sh
102-
if: success() && !env.SKIP_JOB
103100
- name: show the current environment
104101
run: src/ci/scripts/dump-environment.sh
105-
if: success() && !env.SKIP_JOB
106102
- name: install awscli
107103
run: src/ci/scripts/install-awscli.sh
108-
if: success() && !env.SKIP_JOB
109104
- name: install sccache
110105
run: src/ci/scripts/install-sccache.sh
111-
if: success() && !env.SKIP_JOB
112106
- name: select Xcode
113107
run: src/ci/scripts/select-xcode.sh
114-
if: success() && !env.SKIP_JOB
115108
- name: install clang
116109
run: src/ci/scripts/install-clang.sh
117-
if: success() && !env.SKIP_JOB
118110
- name: install tidy
119111
run: src/ci/scripts/install-tidy.sh
120-
if: success() && !env.SKIP_JOB
121112
- name: install WIX
122113
run: src/ci/scripts/install-wix.sh
123-
if: success() && !env.SKIP_JOB
124114
- name: disable git crlf conversion
125115
run: src/ci/scripts/disable-git-crlf-conversion.sh
126-
if: success() && !env.SKIP_JOB
127116
- name: checkout submodules
128117
run: src/ci/scripts/checkout-submodules.sh
129-
if: success() && !env.SKIP_JOB
130118
- name: install MSYS2
131119
run: src/ci/scripts/install-msys2.sh
132-
if: success() && !env.SKIP_JOB
133120
- name: install MinGW
134121
run: src/ci/scripts/install-mingw.sh
135-
if: success() && !env.SKIP_JOB
136122
- name: install ninja
137123
run: src/ci/scripts/install-ninja.sh
138-
if: success() && !env.SKIP_JOB
139124
- name: enable ipv6 on Docker
140125
run: src/ci/scripts/enable-docker-ipv6.sh
141-
if: success() && !env.SKIP_JOB
142126
- name: disable git crlf conversion
143127
run: src/ci/scripts/disable-git-crlf-conversion.sh
144-
if: success() && !env.SKIP_JOB
145128
- name: ensure line endings are correct
146129
run: src/ci/scripts/verify-line-endings.sh
147-
if: success() && !env.SKIP_JOB
148130
- name: ensure backported commits are in upstream branches
149131
run: src/ci/scripts/verify-backported-commits.sh
150-
if: success() && !env.SKIP_JOB
151132
- name: ensure the stable version number is correct
152133
run: src/ci/scripts/verify-stable-version-number.sh
153-
if: success() && !env.SKIP_JOB
154134
- name: run the build
155135
run: src/ci/scripts/run-build-from-ci.sh 2>&1
156136
env:
157137
AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
158138
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
159139
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
160-
if: success() && !env.SKIP_JOB
161140
- name: create github artifacts
162141
run: src/ci/scripts/create-doc-artifacts.sh
163-
if: success() && !env.SKIP_JOB
164142
- name: upload artifacts to github
165143
uses: actions/upload-artifact@v4
166144
with:
167145
name: "${{ env.DOC_ARTIFACT_NAME }}"
168146
path: obj/artifacts/doc
169147
if-no-files-found: ignore
170148
retention-days: 5
171-
if: success() && !env.SKIP_JOB
172149
- name: upload artifacts to S3
173150
run: src/ci/scripts/upload-artifacts.sh
174151
env:
175152
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
176153
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
177-
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
154+
if: "success() && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
178155
master:
179156
name: master
180157
runs-on: ubuntu-latest
@@ -199,7 +176,6 @@ jobs:
199176
shell: bash
200177
env:
201178
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
202-
if: success() && !env.SKIP_JOB
203179
try-success:
204180
needs:
205181
- job

src/ci/github-actions/ci.yml

+2-30
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ x--expand-yaml-anchors--remove:
107107
- &job-aarch64-linux
108108
os: [self-hosted, ARM64, linux]
109109

110-
- &step
111-
if: success() && !env.SKIP_JOB
112-
113110
- &base-ci-job
114111
defaults:
115112
run:
@@ -151,7 +148,7 @@ x--expand-yaml-anchors--remove:
151148
run: echo "[CI_PR_NUMBER=$num]"
152149
env:
153150
num: ${{ github.event.number }}
154-
if: success() && !env.SKIP_JOB && github.event_name == 'pull_request'
151+
if: success() && github.event_name == 'pull_request'
155152

156153
- name: add extra environment variables
157154
run: src/ci/scripts/setup-environment.sh
@@ -161,67 +158,51 @@ x--expand-yaml-anchors--remove:
161158
# are passed to the `setup-environment.sh` script encoded in JSON,
162159
# which then uses log commands to actually set them.
163160
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
164-
<<: *step
165161

166162
- name: ensure the channel matches the target branch
167163
run: src/ci/scripts/verify-channel.sh
168-
<<: *step
169164

170165
- name: collect CPU statistics
171166
run: src/ci/scripts/collect-cpu-stats.sh
172-
<<: *step
173167

174168
- name: show the current environment
175169
run: src/ci/scripts/dump-environment.sh
176-
<<: *step
177170

178171
- name: install awscli
179172
run: src/ci/scripts/install-awscli.sh
180-
<<: *step
181173

182174
- name: install sccache
183175
run: src/ci/scripts/install-sccache.sh
184-
<<: *step
185176

186177
- name: select Xcode
187178
run: src/ci/scripts/select-xcode.sh
188-
<<: *step
189179

190180
- name: install clang
191181
run: src/ci/scripts/install-clang.sh
192-
<<: *step
193182

194183
- name: install tidy
195184
run: src/ci/scripts/install-tidy.sh
196-
<<: *step
197185

198186
- name: install WIX
199187
run: src/ci/scripts/install-wix.sh
200-
<<: *step
201188

202189
- name: disable git crlf conversion
203190
run: src/ci/scripts/disable-git-crlf-conversion.sh
204-
<<: *step
205191

206192
- name: checkout submodules
207193
run: src/ci/scripts/checkout-submodules.sh
208-
<<: *step
209194

210195
- name: install MSYS2
211196
run: src/ci/scripts/install-msys2.sh
212-
<<: *step
213197

214198
- name: install MinGW
215199
run: src/ci/scripts/install-mingw.sh
216-
<<: *step
217200

218201
- name: install ninja
219202
run: src/ci/scripts/install-ninja.sh
220-
<<: *step
221203

222204
- name: enable ipv6 on Docker
223205
run: src/ci/scripts/enable-docker-ipv6.sh
224-
<<: *step
225206

226207
# Disable automatic line ending conversion (again). On Windows, when we're
227208
# installing dependencies, something switches the git configuration directory or
@@ -230,19 +211,15 @@ x--expand-yaml-anchors--remove:
230211
# appropriate line endings.
231212
- name: disable git crlf conversion
232213
run: src/ci/scripts/disable-git-crlf-conversion.sh
233-
<<: *step
234214

235215
- name: ensure line endings are correct
236216
run: src/ci/scripts/verify-line-endings.sh
237-
<<: *step
238217

239218
- name: ensure backported commits are in upstream branches
240219
run: src/ci/scripts/verify-backported-commits.sh
241-
<<: *step
242220

243221
- name: ensure the stable version number is correct
244222
run: src/ci/scripts/verify-stable-version-number.sh
245-
<<: *step
246223

247224
- name: run the build
248225
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
@@ -251,11 +228,9 @@ x--expand-yaml-anchors--remove:
251228
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
252229
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
253230
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
254-
<<: *step
255231

256232
- name: create github artifacts
257233
run: src/ci/scripts/create-doc-artifacts.sh
258-
<<: *step
259234

260235
- name: upload artifacts to github
261236
uses: actions/upload-artifact@v4
@@ -265,7 +240,6 @@ x--expand-yaml-anchors--remove:
265240
path: obj/artifacts/doc
266241
if-no-files-found: ignore
267242
retention-days: 5
268-
<<: *step
269243

270244
- name: upload artifacts to S3
271245
run: src/ci/scripts/upload-artifacts.sh
@@ -277,8 +251,7 @@ x--expand-yaml-anchors--remove:
277251
# adding the condition is helpful as this way CI will not silently skip
278252
# deploying artifacts from a dist builder if the variables are misconfigured,
279253
# erroring about invalid credentials instead.
280-
if: success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')
281-
<<: *step
254+
if: success() && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')
282255

283256
# These snippets are used by the try-success, try-failure, auto-success and auto-failure jobs.
284257
# Check out their documentation for more information on why they're needed.
@@ -395,7 +368,6 @@ jobs:
395368
shell: bash
396369
env:
397370
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
398-
<<: *step
399371

400372
# These jobs don't actually test anything, but they're used to tell bors the
401373
# build completed, as there is no practical way to detect when a workflow is

0 commit comments

Comments
 (0)