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