]> git.lizzy.rs Git - rust.git/blob - src/ci/github-actions/ci.yml
x.py setup: Avoid infinite loop if stdin is /dev/null
[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-latest-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@v1
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_JOBS && 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: configure GitHub Actions to kill the build when outdated
130         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
131         with:
132           github_token: "${{ secrets.github_token }}"
133         if: success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'
134         <<: *step
135
136       - name: collect CPU statistics
137         run: src/ci/scripts/collect-cpu-stats.sh
138         <<: *step
139
140       - name: show the current environment
141         run: src/ci/scripts/dump-environment.sh
142         <<: *step
143
144       - name: install awscli
145         run: src/ci/scripts/install-awscli.sh
146         <<: *step
147
148       - name: install sccache
149         run: src/ci/scripts/install-sccache.sh
150         <<: *step
151
152       - name: select Xcode
153         run: src/ci/scripts/select-xcode.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: run the build
206         run: src/ci/scripts/run-build-from-ci.sh
207         env:
208           AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
209           AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
210           TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
211         <<: *step
212
213       - name: upload artifacts to S3
214         run: src/ci/scripts/upload-artifacts.sh
215         env:
216           AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
217           AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
218         # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
219         # builders *should* have the AWS credentials available. Still, explicitly
220         # adding the condition is helpful as this way CI will not silently skip
221         # deploying artifacts from a dist builder if the variables are misconfigured,
222         # erroring about invalid credentials instead.
223         if: success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')
224         <<: *step
225
226   # These snippets are used by the try-success, try-failure, auto-success and auto-failure jobs.
227   # Check out their documentation for more information on why they're needed.
228
229   - &base-outcome-job
230     name: bors build finished
231     runs-on: ubuntu-latest
232
233   - &base-success-job
234     steps:
235       - name: mark the job as a success
236         run: exit 0
237         shell: bash
238     <<: *base-outcome-job
239
240   - &base-failure-job
241     steps:
242       - name: mark the job as a failure
243         run: exit 1
244         shell: bash
245     <<: *base-outcome-job
246
247 ###########################
248 #   Builders definition   #
249 ###########################
250
251 name: CI
252 on:
253   push:
254     branches:
255       - auto
256       - try
257       - try-perf
258       - master
259   pull_request:
260     branches:
261       - "**"
262
263 defaults:
264   run:
265     # On Linux, macOS, and Windows, use the system-provided bash as the default
266     # shell. (This should only make a difference on Windows, where the default
267     # shell is PowerShell.)
268     shell: bash
269
270 jobs:
271   pr:
272     <<: *base-ci-job
273     name: PR
274     env:
275       <<: [*shared-ci-variables, *public-variables]
276     if: github.event_name == 'pull_request'
277     strategy:
278       matrix:
279         include:
280           - name: mingw-check
281             <<: *job-linux-xl
282
283           - name: x86_64-gnu-llvm-8
284             <<: *job-linux-xl
285
286           - name: x86_64-gnu-tools
287             env:
288               CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
289             <<: *job-linux-xl
290
291   auto:
292     <<: *base-ci-job
293     name: auto
294     env:
295       <<: [*shared-ci-variables, *prod-variables]
296     if: github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'
297     strategy:
298       matrix:
299         include:
300           #############################
301           #   Linux/Docker builders   #
302           #############################
303
304           - name: arm-android
305             <<: *job-linux-xl
306
307           - name: armhf-gnu
308             <<: *job-linux-xl
309
310           - name: dist-aarch64-linux
311             <<: *job-linux-xl
312
313           - name: dist-android
314             <<: *job-linux-xl
315
316           - name: dist-arm-linux
317             <<: *job-linux-xl
318
319           - name: dist-armhf-linux
320             <<: *job-linux-xl
321
322           - name: dist-armv7-linux
323             <<: *job-linux-xl
324
325           - name: dist-i586-gnu-i586-i686-musl
326             <<: *job-linux-xl
327
328           - name: dist-i686-freebsd
329             <<: *job-linux-xl
330
331           - name: dist-i686-linux
332             <<: *job-linux-xl
333
334           - name: dist-mips-linux
335             <<: *job-linux-xl
336
337           - name: dist-mips64-linux
338             <<: *job-linux-xl
339
340           - name: dist-mips64el-linux
341             <<: *job-linux-xl
342
343           - name: dist-mipsel-linux
344             <<: *job-linux-xl
345
346           - name: dist-powerpc-linux
347             <<: *job-linux-xl
348
349           - name: dist-powerpc64-linux
350             <<: *job-linux-xl
351
352           - name: dist-powerpc64le-linux
353             <<: *job-linux-xl
354
355           - name: dist-riscv64-linux
356             <<: *job-linux-xl
357
358           - name: dist-s390x-linux
359             <<: *job-linux-xl
360
361           - name: dist-various-1
362             <<: *job-linux-xl
363
364           - name: dist-various-2
365             <<: *job-linux-xl
366
367           - name: dist-x86_64-freebsd
368             <<: *job-linux-xl
369
370           - name: dist-x86_64-illumos
371             <<: *job-linux-xl
372
373           - &dist-x86_64-linux
374             name: dist-x86_64-linux
375             <<: *job-linux-xl
376
377           - name: dist-x86_64-linux-alt
378             env:
379               IMAGE: dist-x86_64-linux
380             <<: *job-linux-xl
381
382           - name: dist-x86_64-musl
383             <<: *job-linux-xl
384
385           - name: dist-x86_64-netbsd
386             <<: *job-linux-xl
387
388           - name: i686-gnu
389             <<: *job-linux-xl
390
391           - name: i686-gnu-nopt
392             <<: *job-linux-xl
393
394           - name: mingw-check
395             <<: *job-linux-xl
396
397           - name: test-various
398             <<: *job-linux-xl
399
400           - name: wasm32
401             <<: *job-linux-xl
402
403           - name: x86_64-gnu
404             <<: *job-linux-xl
405
406           - name: x86_64-gnu-aux
407             <<: *job-linux-xl
408
409           - name: x86_64-gnu-debug
410             <<: *job-linux-xl
411
412           - name: x86_64-gnu-distcheck
413             <<: *job-linux-xl
414
415           - name: x86_64-gnu-llvm-8
416             env:
417               RUST_BACKTRACE: 1
418             <<: *job-linux-xl
419
420           - name: x86_64-gnu-nopt
421             <<: *job-linux-xl
422
423           - name: x86_64-gnu-tools
424             env:
425               DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
426             <<: *job-linux-xl
427
428           ####################
429           #  macOS Builders  #
430           ####################
431
432           - name: dist-x86_64-apple
433             env:
434               SCRIPT: ./x.py dist
435               RUST_CONFIGURE_ARGS: --host=x86_64-apple-darwin --target=x86_64-apple-darwin,aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
436               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
437               MACOSX_DEPLOYMENT_TARGET: 10.7
438               NO_LLVM_ASSERTIONS: 1
439               NO_DEBUG_ASSERTIONS: 1
440               DIST_REQUIRE_ALL_TOOLS: 1
441             <<: *job-macos-xl
442
443           - name: dist-x86_64-apple-alt
444             env:
445               SCRIPT: ./x.py dist
446               RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc --set llvm.ninja=false
447               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
448               MACOSX_DEPLOYMENT_TARGET: 10.7
449               NO_LLVM_ASSERTIONS: 1
450               NO_DEBUG_ASSERTIONS: 1
451             <<: *job-macos-xl
452
453           - name: x86_64-apple
454             env:
455               SCRIPT: ./x.py --stage 2 test
456               RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
457               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
458               MACOSX_DEPLOYMENT_TARGET: 10.8
459               MACOSX_STD_DEPLOYMENT_TARGET: 10.7
460               NO_LLVM_ASSERTIONS: 1
461               NO_DEBUG_ASSERTIONS: 1
462             <<: *job-macos-xl
463
464           # This target only needs to support 11.0 and up as nothing else supports the hardware
465           - name: dist-aarch64-apple
466             env:
467               SCRIPT: ./x.py dist --stage 2
468               RUST_CONFIGURE_ARGS: >-
469                 --build=x86_64-apple-darwin
470                 --host=aarch64-apple-darwin
471                 --target=aarch64-apple-darwin
472                 --enable-full-tools
473                 --enable-sanitizers
474                 --enable-profiler
475                 --set rust.jemalloc
476                 --set llvm.ninja=false
477               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
478               SELECT_XCODE: /Applications/Xcode_12_beta.app
479               USE_XCODE_CLANG: 1
480               MACOSX_DEPLOYMENT_TARGET: 11.0
481               MACOSX_STD_DEPLOYMENT_TARGET: 11.0
482               NO_LLVM_ASSERTIONS: 1
483               NO_DEBUG_ASSERTIONS: 1
484               DIST_REQUIRE_ALL_TOOLS: 1
485               # Corresponds to 16K page size
486               #
487               # Shouldn't be needed if jemalloc-sys is updated to
488               # handle this platform like iOS or if we build on
489               # aarch64-apple-darwin itself.
490               #
491               # https://github.com/gnzlbg/jemallocator/blob/c27a859e98e3cb790dc269773d9da71a1e918458/jemalloc-sys/build.rs#L237
492               JEMALLOC_SYS_WITH_LG_PAGE: 14
493             <<: *job-macos-xl
494
495           ######################
496           #  Windows Builders  #
497           ######################
498
499           - name: x86_64-msvc-1
500             env:
501               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
502               SCRIPT: make ci-subset-1
503               # FIXME(#59637)
504               NO_DEBUG_ASSERTIONS: 1
505               NO_LLVM_ASSERTIONS: 1
506             <<: *job-windows-xl
507
508           - name: x86_64-msvc-2
509             env:
510               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
511               SCRIPT: make ci-subset-2
512             <<: *job-windows-xl
513
514           - name: i686-msvc-1
515             env:
516               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
517               SCRIPT: make ci-subset-1
518               # FIXME(#59637)
519               NO_DEBUG_ASSERTIONS: 1
520               NO_LLVM_ASSERTIONS: 1
521             <<: *job-windows-xl
522
523           - name: i686-msvc-2
524             env:
525               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
526               SCRIPT: make ci-subset-2
527               # FIXME(#59637)
528               NO_DEBUG_ASSERTIONS: 1
529               NO_LLVM_ASSERTIONS: 1
530             <<: *job-windows-xl
531
532           - name: x86_64-msvc-cargo
533             env:
534               SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo
535               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld
536               VCVARS_BAT: vcvars64.bat
537               # FIXME(#59637)
538               NO_DEBUG_ASSERTIONS: 1
539               NO_LLVM_ASSERTIONS: 1
540             <<: *job-windows-xl
541
542           - name: x86_64-msvc-tools
543             env:
544               SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
545               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json
546             <<: *job-windows-xl
547
548           # 32/64-bit MinGW builds.
549           #
550           # We are using MinGW with POSIX threads since LLVM requires
551           # C++'s std::thread which is disabled in libstdc++ with win32 threads.
552           # FIXME: Libc++ doesn't have this limitation so we can avoid
553           # winpthreads if we switch to it.
554           #
555           # Instead of relying on the MinGW version installed on CI we download
556           # and install one ourselves so we won't be surprised by changes to CI's
557           # build image.
558           #
559           # Finally, note that the downloads below are all in the `rust-lang-ci` S3
560           # bucket, but they clearly didn't originate there! The downloads originally
561           # came from the mingw-w64 SourceForge download site. Unfortunately
562           # SourceForge is notoriously flaky, so we mirror it on our own infrastructure.
563
564           - name: i686-mingw-1
565             env:
566               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
567               SCRIPT: make ci-mingw-subset-1
568               CUSTOM_MINGW: 1
569               # FIXME(#59637)
570               NO_DEBUG_ASSERTIONS: 1
571               NO_LLVM_ASSERTIONS: 1
572             <<: *job-windows-xl
573
574           - name: i686-mingw-2
575             env:
576               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
577               SCRIPT: make ci-mingw-subset-2
578               CUSTOM_MINGW: 1
579             <<: *job-windows-xl
580
581           - name: x86_64-mingw-1
582             env:
583               SCRIPT: make ci-mingw-subset-1
584               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-profiler
585               CUSTOM_MINGW: 1
586               # FIXME(#59637)
587               NO_DEBUG_ASSERTIONS: 1
588               NO_LLVM_ASSERTIONS: 1
589             <<: *job-windows-xl
590
591           - name: x86_64-mingw-2
592             env:
593               SCRIPT: make ci-mingw-subset-2
594               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-profiler
595               CUSTOM_MINGW: 1
596             <<: *job-windows-xl
597
598           - name: dist-x86_64-msvc
599             env:
600               RUST_CONFIGURE_ARGS: >-
601                 --build=x86_64-pc-windows-msvc
602                 --host=x86_64-pc-windows-msvc
603                 --target=x86_64-pc-windows-msvc
604                 --enable-full-tools
605                 --enable-profiler
606               SCRIPT: python x.py dist
607               DIST_REQUIRE_ALL_TOOLS: 1
608             <<: *job-windows-xl
609
610           - name: dist-i686-msvc
611             env:
612               RUST_CONFIGURE_ARGS: >-
613                 --build=i686-pc-windows-msvc
614                 --host=i686-pc-windows-msvc
615                 --target=i686-pc-windows-msvc,i586-pc-windows-msvc
616                 --enable-full-tools
617                 --enable-profiler
618               SCRIPT: python x.py dist
619               DIST_REQUIRE_ALL_TOOLS: 1
620             <<: *job-windows-xl
621
622           - name: dist-aarch64-msvc
623             env:
624               RUST_CONFIGURE_ARGS: >-
625                 --build=x86_64-pc-windows-msvc
626                 --host=aarch64-pc-windows-msvc
627                 --enable-full-tools
628                 --enable-profiler
629               SCRIPT: python x.py dist
630               # RLS does not build for aarch64-pc-windows-msvc. See rust-lang/rls#1693
631               DIST_REQUIRE_ALL_TOOLS: 0
632             <<: *job-windows-xl
633
634           - name: dist-i686-mingw
635             env:
636               RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler
637               SCRIPT: python x.py dist
638               CUSTOM_MINGW: 1
639               DIST_REQUIRE_ALL_TOOLS: 1
640             <<: *job-windows-xl
641
642           - name: dist-x86_64-mingw
643             env:
644               SCRIPT: python x.py dist
645               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler
646               CUSTOM_MINGW: 1
647               DIST_REQUIRE_ALL_TOOLS: 1
648             <<: *job-windows-xl
649
650           - name: dist-x86_64-msvc-alt
651             env:
652               RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler
653               SCRIPT: python x.py dist
654             <<: *job-windows-xl
655
656   auto-fallible:
657     <<: *base-ci-job
658     name: auto-fallible
659     env:
660       <<: [*shared-ci-variables, *dummy-variables]
661     if: github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'
662     strategy:
663       fail-fast: false
664       matrix:
665         include:
666           #############################
667           #   Linux/Docker builders   #
668           #############################
669
670           - name: aarch64-gnu
671             <<: *job-aarch64-linux
672
673   try:
674     <<: *base-ci-job
675     name: try
676     env:
677       <<: [*shared-ci-variables, *prod-variables]
678     if: github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'
679     strategy:
680       matrix:
681         include:
682           - *dist-x86_64-linux
683
684   master:
685     name: master
686     runs-on: ubuntu-latest
687     env:
688       <<: [*prod-variables]
689     if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'
690     steps:
691       - name: checkout the source code
692         uses: actions/checkout@v1
693         with:
694           fetch-depth: 2
695
696       - name: publish toolstate
697         run: src/ci/publish_toolstate.sh
698         shell: bash
699         env:
700           TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
701         <<: *step
702
703   # These jobs don't actually test anything, but they're used to tell bors the
704   # build completed, as there is no practical way to detect when a workflow is
705   # successful listening to webhooks only.
706   try-success:
707     needs: [try]
708     if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
709     <<: *base-success-job
710   try-failure:
711     needs: [try]
712     if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
713     <<: *base-failure-job
714   auto-success:
715     needs: [auto]
716     if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
717     <<: *base-success-job
718   auto-failure:
719     needs: [auto]
720     if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
721     <<: *base-failure-job