]> git.lizzy.rs Git - rust.git/blob - src/ci/github-actions/ci.yml
Rollup merge of #93206 - ChrisDenton:ntopenfile, r=nagisa
[rust.git] / src / ci / github-actions / ci.yml
1 ######################################################
2 #   WARNING! Action needed when changing this file   #
3 ######################################################
4
5 # Due to GitHub Actions limitations, we can't use YAML Anchors directly in the
6 # CI configuration stored on the repository. To work around that this file is
7 # expanded by a tool in the repository, and the expansion is committed as well.
8 #
9 # After you make any change to the file you'll need to run this command:
10 #
11 #   ./x.py run src/tools/expand-yaml-anchors
12 #
13 # ...and commit the file it updated in addition to this one. If you forget this
14 # step CI will fail.
15
16 ---
17
18 ###############################
19 #   YAML Anchors Definition   #
20 ###############################
21
22 # This key contains most of the YAML anchors that will be used later in the
23 # document. YAML anchors allows us to greatly reduce duplication inside the CI
24 # configuration by reusing parts of the configuration.
25 #
26 # YAML anchors work by defining an anchor with `&anchor-name` and reusing its
27 # content in another place with `*anchor-name`. The special `<<` map key merges
28 # the content of the map with the content of the anchor (or list of anchors).
29 #
30 # The expand-yaml-anchors tool will automatically remove this block from the
31 # output YAML file.
32 x--expand-yaml-anchors--remove:
33
34   - &shared-ci-variables
35     CI_JOB_NAME: ${{ matrix.name }}
36
37   - &public-variables
38     SCCACHE_BUCKET: rust-lang-ci-sccache2
39     TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
40     CACHE_DOMAIN: ci-caches.rust-lang.org
41
42   - &prod-variables
43     SCCACHE_BUCKET: rust-lang-ci-sccache2
44     DEPLOY_BUCKET: rust-lang-ci2
45     TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
46     TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/rust-lang/rust/issues
47     TOOLSTATE_PUBLISH: 1
48     # AWS_SECRET_ACCESS_KEYs are stored in GitHub's secrets storage, named
49     # AWS_SECRET_ACCESS_KEY_<keyid>. Including the key id in the name allows to
50     # rotate them in a single branch while keeping the old key in another
51     # branch, which wouldn't be possible if the key was named with the kind
52     # (caches, artifacts...).
53     CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
54     ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
55     CACHE_DOMAIN: ci-caches.rust-lang.org
56
57   - &dummy-variables
58     SCCACHE_BUCKET: rust-lang-gha-caches
59     DEPLOY_BUCKET: rust-lang-gha
60     TOOLSTATE_REPO: https://github.com/pietroalbini/rust-toolstate
61     TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/pietroalbini/rust-toolstate/issues
62     TOOLSTATE_PUBLISH: 1
63     # AWS_SECRET_ACCESS_KEYs are stored in GitHub's secrets storage, named
64     # AWS_SECRET_ACCESS_KEY_<keyid>. Including the key id in the name allows to
65     # rotate them in a single branch while keeping the old key in another
66     # branch, which wouldn't be possible if the key was named with the kind
67     # (caches, artifacts...).
68     CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5
69     ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF
70     CACHE_DOMAIN: ci-caches-gha.rust-lang.org
71
72   - &base-job
73     env: {}
74
75   - &job-linux-xl
76     os: ubuntu-20.04-xl
77     <<: *base-job
78
79   - &job-macos-xl
80     os: macos-latest  # We don't have an XL builder for this
81     <<: *base-job
82
83   - &job-windows-xl
84     os: windows-latest-xl
85     <<: *base-job
86
87   - &job-aarch64-linux
88     os: [self-hosted, ARM64, linux]
89
90   - &step
91     if: success() && !env.SKIP_JOB
92
93   - &base-ci-job
94     timeout-minutes: 600
95     runs-on: "${{ matrix.os }}"
96     env: *shared-ci-variables
97     steps:
98       - name: disable git crlf conversion
99         run: git config --global core.autocrlf false
100
101       - name: checkout the source code
102         uses: actions/checkout@v2
103         with:
104           fetch-depth: 2
105
106       # Rust Log Analyzer can't currently detect the PR number of a GitHub
107       # Actions build on its own, so a hint in the log message is needed to
108       # point it in the right direction.
109       - name: configure the PR in which the error message will be posted
110         run: echo "[CI_PR_NUMBER=$num]"
111         env:
112           num: ${{ github.event.number }}
113         if: success() && !env.SKIP_JOB && github.event_name == 'pull_request'
114
115       - name: add extra environment variables
116         run: src/ci/scripts/setup-environment.sh
117         env:
118           # Since it's not possible to merge `${{ matrix.env }}` with the other
119           # variables in `job.<name>.env`, the variables defined in the matrix
120           # are passed to the `setup-environment.sh` script encoded in JSON,
121           # which then uses log commands to actually set them.
122           EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
123         <<: *step
124
125       - name: decide whether to skip this job
126         run: src/ci/scripts/should-skip-this.sh
127         <<: *step
128
129       - name: ensure the channel matches the target branch
130         run: src/ci/scripts/verify-channel.sh
131         <<: *step
132
133       - name: configure GitHub Actions to kill the build when outdated
134         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
135         with:
136           github_token: "${{ secrets.github_token }}"
137         if: success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'
138         <<: *step
139
140       - name: collect CPU statistics
141         run: src/ci/scripts/collect-cpu-stats.sh
142         <<: *step
143
144       - name: show the current environment
145         run: src/ci/scripts/dump-environment.sh
146         <<: *step
147
148       - name: install awscli
149         run: src/ci/scripts/install-awscli.sh
150         <<: *step
151
152       - name: install sccache
153         run: src/ci/scripts/install-sccache.sh
154         <<: *step
155
156       - name: install clang
157         run: src/ci/scripts/install-clang.sh
158         <<: *step
159
160       - name: install WIX
161         run: src/ci/scripts/install-wix.sh
162         <<: *step
163
164       - name: ensure the build happens on a partition with enough space
165         run: src/ci/scripts/symlink-build-dir.sh
166         <<: *step
167
168       - name: disable git crlf conversion
169         run: src/ci/scripts/disable-git-crlf-conversion.sh
170         <<: *step
171
172       - name: install MSYS2
173         run: src/ci/scripts/install-msys2.sh
174         <<: *step
175
176       - name: install MinGW
177         run: src/ci/scripts/install-mingw.sh
178         <<: *step
179
180       - name: install ninja
181         run: src/ci/scripts/install-ninja.sh
182         <<: *step
183
184       - name: enable ipv6 on Docker
185         run: src/ci/scripts/enable-docker-ipv6.sh
186         <<: *step
187
188       # Disable automatic line ending conversion (again). On Windows, when we're
189       # installing dependencies, something switches the git configuration directory or
190       # re-enables autocrlf. We've not tracked down the exact cause -- and there may
191       # be multiple -- but this should ensure submodules are checked out with the
192       # appropriate line endings.
193       - name: disable git crlf conversion
194         run: src/ci/scripts/disable-git-crlf-conversion.sh
195         <<: *step
196
197       - name: checkout submodules
198         run: src/ci/scripts/checkout-submodules.sh
199         <<: *step
200
201       - name: ensure line endings are correct
202         run: src/ci/scripts/verify-line-endings.sh
203         <<: *step
204
205       - name: ensure backported commits are in upstream branches
206         run: src/ci/scripts/verify-backported-commits.sh
207         <<: *step
208
209       - name: ensure the stable version number is correct
210         run: src/ci/scripts/verify-stable-version-number.sh
211         <<: *step
212
213       - name: run the build
214         run: src/ci/scripts/run-build-from-ci.sh
215         env:
216           AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
217           AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
218           TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
219         <<: *step
220
221       - name: upload artifacts to S3
222         run: src/ci/scripts/upload-artifacts.sh
223         env:
224           AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
225           AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
226         # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
227         # builders *should* have the AWS credentials available. Still, explicitly
228         # adding the condition is helpful as this way CI will not silently skip
229         # deploying artifacts from a dist builder if the variables are misconfigured,
230         # erroring about invalid credentials instead.
231         if: success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')
232         <<: *step
233
234   # These snippets are used by the try-success, try-failure, auto-success and auto-failure jobs.
235   # Check out their documentation for more information on why they're needed.
236
237   - &base-outcome-job
238     name: bors build finished
239     runs-on: ubuntu-latest
240
241   - &base-success-job
242     steps:
243       - name: mark the job as a success
244         run: exit 0
245         shell: bash
246     <<: *base-outcome-job
247
248   - &base-failure-job
249     steps:
250       - name: mark the job as a failure
251         run: exit 1
252         shell: bash
253     <<: *base-outcome-job
254
255 ###########################
256 #   Builders definition   #
257 ###########################
258
259 name: CI
260 on:
261   push:
262     branches:
263       - auto
264       - try
265       - try-perf
266       - master
267   pull_request:
268     branches:
269       - "**"
270
271 defaults:
272   run:
273     # On Linux, macOS, and Windows, use the system-provided bash as the default
274     # shell. (This should only make a difference on Windows, where the default
275     # shell is PowerShell.)
276     shell: bash
277
278 jobs:
279   pr:
280     <<: *base-ci-job
281     name: PR
282     env:
283       <<: [*shared-ci-variables, *public-variables]
284     if: github.event_name == 'pull_request'
285     strategy:
286       matrix:
287         include:
288           - name: mingw-check
289             <<: *job-linux-xl
290
291           - name: x86_64-gnu-llvm-12
292             <<: *job-linux-xl
293
294           - name: x86_64-gnu-tools
295             env:
296               CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
297             <<: *job-linux-xl
298
299   auto:
300     <<: *base-ci-job
301     name: auto
302     env:
303       <<: [*shared-ci-variables, *prod-variables]
304     if: github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'
305     strategy:
306       matrix:
307         include:
308           #############################
309           #   Linux/Docker builders   #
310           #############################
311
312           - name: aarch64-gnu
313             <<: *job-aarch64-linux
314
315           - name: arm-android
316             <<: *job-linux-xl
317
318           - name: armhf-gnu
319             <<: *job-linux-xl
320
321           - name: dist-aarch64-linux
322             <<: *job-linux-xl
323
324           - name: dist-android
325             <<: *job-linux-xl
326
327           - name: dist-arm-linux
328             <<: *job-linux-xl
329
330           - name: dist-armhf-linux
331             <<: *job-linux-xl
332
333           - name: dist-armv7-linux
334             <<: *job-linux-xl
335
336           - name: dist-i586-gnu-i586-i686-musl
337             <<: *job-linux-xl
338
339           - name: dist-i686-linux
340             <<: *job-linux-xl
341
342           - name: dist-mips-linux
343             <<: *job-linux-xl
344
345           - name: dist-mips64-linux
346             <<: *job-linux-xl
347
348           - name: dist-mips64el-linux
349             <<: *job-linux-xl
350
351           - name: dist-mipsel-linux
352             <<: *job-linux-xl
353
354           - name: dist-powerpc-linux
355             <<: *job-linux-xl
356
357           - name: dist-powerpc64-linux
358             <<: *job-linux-xl
359
360           - name: dist-powerpc64le-linux
361             <<: *job-linux-xl
362
363           - name: dist-riscv64-linux
364             <<: *job-linux-xl
365
366           - name: dist-s390x-linux
367             <<: *job-linux-xl
368
369           - name: dist-various-1
370             <<: *job-linux-xl
371
372           - name: dist-various-2
373             <<: *job-linux-xl
374
375           - name: dist-x86_64-freebsd
376             <<: *job-linux-xl
377
378           - name: dist-x86_64-illumos
379             <<: *job-linux-xl
380
381           - &dist-x86_64-linux
382             name: dist-x86_64-linux
383             <<: *job-linux-xl
384
385           - name: dist-x86_64-linux-alt
386             env:
387               IMAGE: dist-x86_64-linux
388             <<: *job-linux-xl
389
390           - name: dist-x86_64-musl
391             <<: *job-linux-xl
392
393           - name: dist-x86_64-netbsd
394             <<: *job-linux-xl
395
396           - name: i686-gnu
397             <<: *job-linux-xl
398
399           - name: i686-gnu-nopt
400             <<: *job-linux-xl
401
402           - name: mingw-check
403             <<: *job-linux-xl
404
405           - name: test-various
406             <<: *job-linux-xl
407
408           - name: wasm32
409             <<: *job-linux-xl
410
411           - name: x86_64-gnu
412             <<: *job-linux-xl
413
414           # This job ensures commits landing on nightly still pass the full
415           # test suite on the stable channel. There are some UI tests that
416           # depend on the channel being built (for example if they include the
417           # channel name on the output), and this builder prevents landing
418           # changes that would result in broken builds after a promotion.
419           - name: x86_64-gnu-stable
420             env:
421               IMAGE: x86_64-gnu
422               RUST_CI_OVERRIDE_RELEASE_CHANNEL: stable
423               # Only run this job on the nightly channel. Running this on beta
424               # could cause failures when `dev: 1` in `stage0.txt`, and running
425               # this on stable is useless.
426               CI_ONLY_WHEN_CHANNEL: nightly
427             <<: *job-linux-xl
428
429           - name: x86_64-gnu-aux
430             <<: *job-linux-xl
431
432           - name: x86_64-gnu-debug
433             <<: *job-linux-xl
434
435           - name: x86_64-gnu-distcheck
436             <<: *job-linux-xl
437
438           - name: x86_64-gnu-llvm-12
439             env:
440               RUST_BACKTRACE: 1
441             <<: *job-linux-xl
442
443           - name: x86_64-gnu-nopt
444             <<: *job-linux-xl
445
446           - name: x86_64-gnu-tools
447             env:
448               DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
449             <<: *job-linux-xl
450
451           ####################
452           #  macOS Builders  #
453           ####################
454
455           - name: dist-x86_64-apple
456             env:
457               SCRIPT: ./x.py dist --host=x86_64-apple-darwin --target=x86_64-apple-darwin
458               RUST_CONFIGURE_ARGS: --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
459               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
460               MACOSX_DEPLOYMENT_TARGET: 10.7
461               NO_LLVM_ASSERTIONS: 1
462               NO_DEBUG_ASSERTIONS: 1
463               NO_OVERFLOW_CHECKS: 1
464               DIST_REQUIRE_ALL_TOOLS: 1
465             <<: *job-macos-xl
466
467           - name: dist-apple-various
468             env:
469               SCRIPT: ./x.py dist --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim
470               RUST_CONFIGURE_ARGS: --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
471               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
472               MACOSX_DEPLOYMENT_TARGET: 10.7
473               NO_LLVM_ASSERTIONS: 1
474               NO_DEBUG_ASSERTIONS: 1
475               NO_OVERFLOW_CHECKS: 1
476             <<: *job-macos-xl
477
478           - name: dist-x86_64-apple-alt
479             env:
480               SCRIPT: ./x.py dist
481               RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc --set llvm.ninja=false
482               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
483               MACOSX_DEPLOYMENT_TARGET: 10.7
484               NO_LLVM_ASSERTIONS: 1
485               NO_DEBUG_ASSERTIONS: 1
486               NO_OVERFLOW_CHECKS: 1
487             <<: *job-macos-xl
488
489           - name: x86_64-apple
490             env:
491               SCRIPT: ./x.py --stage 2 test
492               RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
493               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
494               MACOSX_DEPLOYMENT_TARGET: 10.8
495               MACOSX_STD_DEPLOYMENT_TARGET: 10.7
496               NO_LLVM_ASSERTIONS: 1
497               NO_DEBUG_ASSERTIONS: 1
498               NO_OVERFLOW_CHECKS: 1
499             <<: *job-macos-xl
500
501           # This target only needs to support 11.0 and up as nothing else supports the hardware
502           - name: dist-aarch64-apple
503             env:
504               SCRIPT: ./x.py dist --stage 2
505               RUST_CONFIGURE_ARGS: >-
506                 --build=x86_64-apple-darwin
507                 --host=aarch64-apple-darwin
508                 --target=aarch64-apple-darwin
509                 --enable-full-tools
510                 --enable-sanitizers
511                 --enable-profiler
512                 --disable-docs
513                 --set rust.jemalloc
514                 --set llvm.ninja=false
515               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
516               USE_XCODE_CLANG: 1
517               MACOSX_DEPLOYMENT_TARGET: 11.0
518               MACOSX_STD_DEPLOYMENT_TARGET: 11.0
519               NO_LLVM_ASSERTIONS: 1
520               NO_DEBUG_ASSERTIONS: 1
521               NO_OVERFLOW_CHECKS: 1
522               DIST_REQUIRE_ALL_TOOLS: 1
523               # Corresponds to 16K page size
524               #
525               # Shouldn't be needed if jemalloc-sys is updated to
526               # handle this platform like iOS or if we build on
527               # aarch64-apple-darwin itself.
528               #
529               # https://github.com/gnzlbg/jemallocator/blob/c27a859e98e3cb790dc269773d9da71a1e918458/jemalloc-sys/build.rs#L237
530               JEMALLOC_SYS_WITH_LG_PAGE: 14
531             <<: *job-macos-xl
532
533           ######################
534           #  Windows Builders  #
535           ######################
536
537           - name: x86_64-msvc-1
538             env:
539               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
540               SCRIPT: make ci-subset-1
541             <<: *job-windows-xl
542
543           - name: x86_64-msvc-2
544             env:
545               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
546               SCRIPT: make ci-subset-2
547             <<: *job-windows-xl
548
549           - name: i686-msvc-1
550             env:
551               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
552               SCRIPT: make ci-subset-1
553             <<: *job-windows-xl
554
555           - name: i686-msvc-2
556             env:
557               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
558               SCRIPT: make ci-subset-2
559             <<: *job-windows-xl
560
561           - name: x86_64-msvc-cargo
562             env:
563               SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo
564               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld
565             <<: *job-windows-xl
566
567           - name: x86_64-msvc-tools
568             env:
569               SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
570               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json
571               DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
572             <<: *job-windows-xl
573
574           # 32/64-bit MinGW builds.
575           #
576           # We are using MinGW with POSIX threads since LLVM requires
577           # C++'s std::thread which is disabled in libstdc++ with win32 threads.
578           # FIXME: Libc++ doesn't have this limitation so we can avoid
579           # winpthreads if we switch to it.
580           #
581           # Instead of relying on the MinGW version installed on CI we download
582           # and install one ourselves so we won't be surprised by changes to CI's
583           # build image.
584           #
585           # Finally, note that the downloads below are all in the `rust-lang-ci` S3
586           # bucket, but they clearly didn't originate there! The downloads originally
587           # came from the mingw-w64 SourceForge download site. Unfortunately
588           # SourceForge is notoriously flaky, so we mirror it on our own infrastructure.
589
590           - name: i686-mingw-1
591             env:
592               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
593               SCRIPT: make ci-mingw-subset-1
594               CUSTOM_MINGW: 1
595             <<: *job-windows-xl
596
597           - name: i686-mingw-2
598             env:
599               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
600               SCRIPT: make ci-mingw-subset-2
601               CUSTOM_MINGW: 1
602             <<: *job-windows-xl
603
604           - name: x86_64-mingw-1
605             env:
606               SCRIPT: make ci-mingw-subset-1
607               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-profiler
608               CUSTOM_MINGW: 1
609             <<: *job-windows-xl
610
611           - name: x86_64-mingw-2
612             env:
613               SCRIPT: make ci-mingw-subset-2
614               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-profiler
615               CUSTOM_MINGW: 1
616             <<: *job-windows-xl
617
618           - name: dist-x86_64-msvc
619             env:
620               RUST_CONFIGURE_ARGS: >-
621                 --build=x86_64-pc-windows-msvc
622                 --host=x86_64-pc-windows-msvc
623                 --target=x86_64-pc-windows-msvc
624                 --enable-full-tools
625                 --enable-profiler
626               SCRIPT: python x.py dist
627               DIST_REQUIRE_ALL_TOOLS: 1
628             <<: *job-windows-xl
629
630           - name: dist-i686-msvc
631             env:
632               RUST_CONFIGURE_ARGS: >-
633                 --build=i686-pc-windows-msvc
634                 --host=i686-pc-windows-msvc
635                 --target=i686-pc-windows-msvc,i586-pc-windows-msvc
636                 --enable-full-tools
637                 --enable-profiler
638               SCRIPT: python x.py dist
639               DIST_REQUIRE_ALL_TOOLS: 1
640             <<: *job-windows-xl
641
642           - name: dist-aarch64-msvc
643             env:
644               RUST_CONFIGURE_ARGS: >-
645                 --build=x86_64-pc-windows-msvc
646                 --host=aarch64-pc-windows-msvc
647                 --enable-full-tools
648                 --enable-profiler
649               SCRIPT: python x.py dist
650               # RLS does not build for aarch64-pc-windows-msvc. See rust-lang/rls#1693
651               DIST_REQUIRE_ALL_TOOLS: 0
652               # Hack around this SDK version, because it doesn't work with clang.
653               # See https://github.com/rust-lang/rust/issues/88796
654               WINDOWS_SDK_20348_HACK: 1
655             <<: *job-windows-xl
656
657           - name: dist-i686-mingw
658             env:
659               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler
660               SCRIPT: python x.py dist
661               CUSTOM_MINGW: 1
662               DIST_REQUIRE_ALL_TOOLS: 1
663             <<: *job-windows-xl
664
665           - name: dist-x86_64-mingw
666             env:
667               SCRIPT: python x.py dist
668               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler
669               CUSTOM_MINGW: 1
670               DIST_REQUIRE_ALL_TOOLS: 1
671             <<: *job-windows-xl
672
673           - name: dist-x86_64-msvc-alt
674             env:
675               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler
676               SCRIPT: python x.py dist
677             <<: *job-windows-xl
678
679   try:
680     <<: *base-ci-job
681     name: try
682     env:
683       <<: [*shared-ci-variables, *prod-variables]
684     if: github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'
685     strategy:
686       matrix:
687         include:
688           - &dist-x86_64-linux
689             name: dist-x86_64-linux
690             <<: *job-linux-xl
691
692   master:
693     name: master
694     runs-on: ubuntu-latest
695     env:
696       <<: [*prod-variables]
697     if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'
698     steps:
699       - name: checkout the source code
700         uses: actions/checkout@v2
701         with:
702           fetch-depth: 2
703
704       - name: publish toolstate
705         run: src/ci/publish_toolstate.sh
706         shell: bash
707         env:
708           TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
709         <<: *step
710
711   # These jobs don't actually test anything, but they're used to tell bors the
712   # build completed, as there is no practical way to detect when a workflow is
713   # successful listening to webhooks only.
714   try-success:
715     needs: [try]
716     if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
717     <<: *base-success-job
718   try-failure:
719     needs: [try]
720     if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
721     <<: *base-failure-job
722   auto-success:
723     needs: [auto]
724     if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
725     <<: *base-success-job
726   auto-failure:
727     needs: [auto]
728     if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
729     <<: *base-failure-job