]> git.lizzy.rs Git - rust.git/blob - .github/workflows/ci.yml
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.git] / .github / workflows / ci.yml
1 #############################################################
2 #   WARNING: automatically generated file, DO NOT CHANGE!   #
3 #############################################################
4
5 # This file was automatically generated by the expand-yaml-anchors tool. The
6 # source file that generated this one is:
7 #
8 #   src/ci/github-actions/ci.yml
9 #
10 # Once you make changes to that file you need to run:
11 #
12 #   ./x.py run src/tools/expand-yaml-anchors/
13 #
14 # The CI build will fail if the tool is not run after changes to this file.
15
16 ---
17 name: CI
18 "on":
19   push:
20     branches:
21       - auto
22       - try
23       - try-perf
24       - master
25   pull_request:
26     branches:
27       - "**"
28 defaults:
29   run:
30     shell: bash
31 jobs:
32   pr:
33     name: PR
34     env:
35       CI_JOB_NAME: "${{ matrix.name }}"
36       SCCACHE_BUCKET: rust-lang-ci-sccache2
37       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
38       CACHE_DOMAIN: ci-caches.rust-lang.org
39     if: "github.event_name == 'pull_request'"
40     strategy:
41       matrix:
42         include:
43           - name: mingw-check
44             os: ubuntu-latest-xl
45             env: {}
46           - name: x86_64-gnu-llvm-10
47             os: ubuntu-latest-xl
48             env: {}
49           - name: x86_64-gnu-tools
50             env:
51               CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
52             os: ubuntu-latest-xl
53     timeout-minutes: 600
54     runs-on: "${{ matrix.os }}"
55     steps:
56       - name: disable git crlf conversion
57         run: git config --global core.autocrlf false
58       - name: checkout the source code
59         uses: actions/checkout@v2
60         with:
61           fetch-depth: 2
62       - name: configure the PR in which the error message will be posted
63         run: "echo \"[CI_PR_NUMBER=$num]\""
64         env:
65           num: "${{ github.event.number }}"
66         if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
67       - name: add extra environment variables
68         run: src/ci/scripts/setup-environment.sh
69         env:
70           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
71         if: success() && !env.SKIP_JOB
72       - name: decide whether to skip this job
73         run: src/ci/scripts/should-skip-this.sh
74         if: success() && !env.SKIP_JOB
75       - name: ensure the channel matches the target branch
76         run: src/ci/scripts/verify-channel.sh
77         if: success() && !env.SKIP_JOB
78       - name: configure GitHub Actions to kill the build when outdated
79         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
80         with:
81           github_token: "${{ secrets.github_token }}"
82         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
83       - name: collect CPU statistics
84         run: src/ci/scripts/collect-cpu-stats.sh
85         if: success() && !env.SKIP_JOB
86       - name: show the current environment
87         run: src/ci/scripts/dump-environment.sh
88         if: success() && !env.SKIP_JOB
89       - name: install awscli
90         run: src/ci/scripts/install-awscli.sh
91         if: success() && !env.SKIP_JOB
92       - name: install sccache
93         run: src/ci/scripts/install-sccache.sh
94         if: success() && !env.SKIP_JOB
95       - name: select Xcode
96         run: src/ci/scripts/select-xcode.sh
97         if: success() && !env.SKIP_JOB
98       - name: install clang
99         run: src/ci/scripts/install-clang.sh
100         if: success() && !env.SKIP_JOB
101       - name: install WIX
102         run: src/ci/scripts/install-wix.sh
103         if: success() && !env.SKIP_JOB
104       - name: ensure the build happens on a partition with enough space
105         run: src/ci/scripts/symlink-build-dir.sh
106         if: success() && !env.SKIP_JOB
107       - name: disable git crlf conversion
108         run: src/ci/scripts/disable-git-crlf-conversion.sh
109         if: success() && !env.SKIP_JOB
110       - name: install MSYS2
111         run: src/ci/scripts/install-msys2.sh
112         if: success() && !env.SKIP_JOB
113       - name: install MinGW
114         run: src/ci/scripts/install-mingw.sh
115         if: success() && !env.SKIP_JOB
116       - name: install ninja
117         run: src/ci/scripts/install-ninja.sh
118         if: success() && !env.SKIP_JOB
119       - name: enable ipv6 on Docker
120         run: src/ci/scripts/enable-docker-ipv6.sh
121         if: success() && !env.SKIP_JOB
122       - name: disable git crlf conversion
123         run: src/ci/scripts/disable-git-crlf-conversion.sh
124         if: success() && !env.SKIP_JOB
125       - name: checkout submodules
126         run: src/ci/scripts/checkout-submodules.sh
127         if: success() && !env.SKIP_JOB
128       - name: ensure line endings are correct
129         run: src/ci/scripts/verify-line-endings.sh
130         if: success() && !env.SKIP_JOB
131       - name: run the build
132         run: src/ci/scripts/run-build-from-ci.sh
133         env:
134           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
135           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
136           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
137         if: success() && !env.SKIP_JOB
138       - name: upload artifacts to S3
139         run: src/ci/scripts/upload-artifacts.sh
140         env:
141           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
142           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
143         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
144   auto:
145     name: auto
146     env:
147       CI_JOB_NAME: "${{ matrix.name }}"
148       SCCACHE_BUCKET: rust-lang-ci-sccache2
149       DEPLOY_BUCKET: rust-lang-ci2
150       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
151       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
152       TOOLSTATE_PUBLISH: 1
153       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
154       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
155       CACHE_DOMAIN: ci-caches.rust-lang.org
156     if: "github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
157     strategy:
158       matrix:
159         include:
160           - name: aarch64-gnu
161             os:
162               - self-hosted
163               - ARM64
164               - linux
165           - name: arm-android
166             os: ubuntu-latest-xl
167             env: {}
168           - name: armhf-gnu
169             os: ubuntu-latest-xl
170             env: {}
171           - name: dist-aarch64-linux
172             os: ubuntu-latest-xl
173             env: {}
174           - name: dist-android
175             os: ubuntu-latest-xl
176             env: {}
177           - name: dist-arm-linux
178             os: ubuntu-latest-xl
179             env: {}
180           - name: dist-armhf-linux
181             os: ubuntu-latest-xl
182             env: {}
183           - name: dist-armv7-linux
184             os: ubuntu-latest-xl
185             env: {}
186           - name: dist-i586-gnu-i586-i686-musl
187             os: ubuntu-latest-xl
188             env: {}
189           - name: dist-i686-linux
190             os: ubuntu-latest-xl
191             env: {}
192           - name: dist-mips-linux
193             os: ubuntu-latest-xl
194             env: {}
195           - name: dist-mips64-linux
196             os: ubuntu-latest-xl
197             env: {}
198           - name: dist-mips64el-linux
199             os: ubuntu-latest-xl
200             env: {}
201           - name: dist-mipsel-linux
202             os: ubuntu-latest-xl
203             env: {}
204           - name: dist-powerpc-linux
205             os: ubuntu-latest-xl
206             env: {}
207           - name: dist-powerpc64-linux
208             os: ubuntu-latest-xl
209             env: {}
210           - name: dist-powerpc64le-linux
211             os: ubuntu-latest-xl
212             env: {}
213           - name: dist-riscv64-linux
214             os: ubuntu-latest-xl
215             env: {}
216           - name: dist-s390x-linux
217             os: ubuntu-latest-xl
218             env: {}
219           - name: dist-various-1
220             os: ubuntu-latest-xl
221             env: {}
222           - name: dist-various-2
223             os: ubuntu-latest-xl
224             env: {}
225           - name: dist-x86_64-freebsd
226             os: ubuntu-latest-xl
227             env: {}
228           - name: dist-x86_64-illumos
229             os: ubuntu-latest-xl
230             env: {}
231           - name: dist-x86_64-linux
232             os: ubuntu-latest-xl
233             env: {}
234           - name: dist-x86_64-linux-alt
235             env:
236               IMAGE: dist-x86_64-linux
237             os: ubuntu-latest-xl
238           - name: dist-x86_64-musl
239             os: ubuntu-latest-xl
240             env: {}
241           - name: dist-x86_64-netbsd
242             os: ubuntu-latest-xl
243             env: {}
244           - name: i686-gnu
245             os: ubuntu-latest-xl
246             env: {}
247           - name: i686-gnu-nopt
248             os: ubuntu-latest-xl
249             env: {}
250           - name: mingw-check
251             os: ubuntu-latest-xl
252             env: {}
253           - name: test-various
254             os: ubuntu-latest-xl
255             env: {}
256           - name: wasm32
257             os: ubuntu-latest-xl
258             env: {}
259           - name: x86_64-gnu
260             os: ubuntu-latest-xl
261             env: {}
262           - name: x86_64-gnu-stable
263             env:
264               IMAGE: x86_64-gnu
265               RUST_CI_OVERRIDE_RELEASE_CHANNEL: stable
266               CI_ONLY_WHEN_CHANNEL: nightly
267             os: ubuntu-latest-xl
268           - name: x86_64-gnu-aux
269             os: ubuntu-latest-xl
270             env: {}
271           - name: x86_64-gnu-debug
272             os: ubuntu-latest-xl
273             env: {}
274           - name: x86_64-gnu-distcheck
275             os: ubuntu-latest-xl
276             env: {}
277           - name: x86_64-gnu-llvm-10
278             env:
279               RUST_BACKTRACE: 1
280             os: ubuntu-latest-xl
281           - name: x86_64-gnu-nopt
282             os: ubuntu-latest-xl
283             env: {}
284           - name: x86_64-gnu-tools
285             env:
286               DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
287             os: ubuntu-latest-xl
288           - name: dist-x86_64-apple
289             env:
290               SCRIPT: "./x.py dist"
291               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"
292               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
293               MACOSX_DEPLOYMENT_TARGET: 10.7
294               NO_LLVM_ASSERTIONS: 1
295               NO_DEBUG_ASSERTIONS: 1
296               DIST_REQUIRE_ALL_TOOLS: 1
297             os: macos-latest
298           - name: dist-x86_64-apple-alt
299             env:
300               SCRIPT: "./x.py dist"
301               RUST_CONFIGURE_ARGS: "--enable-extended --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
302               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
303               MACOSX_DEPLOYMENT_TARGET: 10.7
304               NO_LLVM_ASSERTIONS: 1
305               NO_DEBUG_ASSERTIONS: 1
306             os: macos-latest
307           - name: x86_64-apple
308             env:
309               SCRIPT: "./x.py --stage 2 test"
310               RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
311               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
312               MACOSX_DEPLOYMENT_TARGET: 10.8
313               MACOSX_STD_DEPLOYMENT_TARGET: 10.7
314               NO_LLVM_ASSERTIONS: 1
315               NO_DEBUG_ASSERTIONS: 1
316             os: macos-latest
317           - name: dist-aarch64-apple
318             env:
319               SCRIPT: "./x.py dist --stage 2"
320               RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
321               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
322               SELECT_XCODE: /Applications/Xcode_12.2.app
323               USE_XCODE_CLANG: 1
324               MACOSX_DEPLOYMENT_TARGET: 11.0
325               MACOSX_STD_DEPLOYMENT_TARGET: 11.0
326               NO_LLVM_ASSERTIONS: 1
327               NO_DEBUG_ASSERTIONS: 1
328               DIST_REQUIRE_ALL_TOOLS: 1
329               JEMALLOC_SYS_WITH_LG_PAGE: 14
330             os: macos-latest
331           - name: x86_64-msvc-1
332             env:
333               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
334               SCRIPT: make ci-subset-1
335             os: windows-latest-xl
336           - name: x86_64-msvc-2
337             env:
338               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
339               SCRIPT: make ci-subset-2
340             os: windows-latest-xl
341           - name: i686-msvc-1
342             env:
343               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
344               SCRIPT: make ci-subset-1
345             os: windows-latest-xl
346           - name: i686-msvc-2
347             env:
348               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
349               SCRIPT: make ci-subset-2
350             os: windows-latest-xl
351           - name: x86_64-msvc-cargo
352             env:
353               SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo
354               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-lld"
355               VCVARS_BAT: vcvars64.bat
356             os: windows-latest-xl
357           - name: x86_64-msvc-tools
358             env:
359               SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
360               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json"
361               DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
362             os: windows-latest-xl
363           - name: i686-mingw-1
364             env:
365               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
366               SCRIPT: make ci-mingw-subset-1
367               CUSTOM_MINGW: 1
368             os: windows-latest-xl
369           - name: i686-mingw-2
370             env:
371               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
372               SCRIPT: make ci-mingw-subset-2
373               CUSTOM_MINGW: 1
374             os: windows-latest-xl
375           - name: x86_64-mingw-1
376             env:
377               SCRIPT: make ci-mingw-subset-1
378               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
379               CUSTOM_MINGW: 1
380             os: windows-latest-xl
381           - name: x86_64-mingw-2
382             env:
383               SCRIPT: make ci-mingw-subset-2
384               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
385               CUSTOM_MINGW: 1
386             os: windows-latest-xl
387           - name: dist-x86_64-msvc
388             env:
389               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler"
390               SCRIPT: python x.py dist
391               DIST_REQUIRE_ALL_TOOLS: 1
392             os: windows-latest-xl
393           - name: dist-i686-msvc
394             env:
395               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc --host=i686-pc-windows-msvc --target=i686-pc-windows-msvc,i586-pc-windows-msvc --enable-full-tools --enable-profiler"
396               SCRIPT: python x.py dist
397               DIST_REQUIRE_ALL_TOOLS: 1
398             os: windows-latest-xl
399           - name: dist-aarch64-msvc
400             env:
401               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
402               SCRIPT: python x.py dist
403               DIST_REQUIRE_ALL_TOOLS: 0
404             os: windows-latest-xl
405           - name: dist-i686-mingw
406             env:
407               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --enable-full-tools --enable-profiler"
408               SCRIPT: python x.py dist
409               CUSTOM_MINGW: 1
410               DIST_REQUIRE_ALL_TOOLS: 1
411             os: windows-latest-xl
412           - name: dist-x86_64-mingw
413             env:
414               SCRIPT: python x.py dist
415               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler"
416               CUSTOM_MINGW: 1
417               DIST_REQUIRE_ALL_TOOLS: 1
418             os: windows-latest-xl
419           - name: dist-x86_64-msvc-alt
420             env:
421               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-extended --enable-profiler"
422               SCRIPT: python x.py dist
423             os: windows-latest-xl
424     timeout-minutes: 600
425     runs-on: "${{ matrix.os }}"
426     steps:
427       - name: disable git crlf conversion
428         run: git config --global core.autocrlf false
429       - name: checkout the source code
430         uses: actions/checkout@v2
431         with:
432           fetch-depth: 2
433       - name: configure the PR in which the error message will be posted
434         run: "echo \"[CI_PR_NUMBER=$num]\""
435         env:
436           num: "${{ github.event.number }}"
437         if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
438       - name: add extra environment variables
439         run: src/ci/scripts/setup-environment.sh
440         env:
441           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
442         if: success() && !env.SKIP_JOB
443       - name: decide whether to skip this job
444         run: src/ci/scripts/should-skip-this.sh
445         if: success() && !env.SKIP_JOB
446       - name: ensure the channel matches the target branch
447         run: src/ci/scripts/verify-channel.sh
448         if: success() && !env.SKIP_JOB
449       - name: configure GitHub Actions to kill the build when outdated
450         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
451         with:
452           github_token: "${{ secrets.github_token }}"
453         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
454       - name: collect CPU statistics
455         run: src/ci/scripts/collect-cpu-stats.sh
456         if: success() && !env.SKIP_JOB
457       - name: show the current environment
458         run: src/ci/scripts/dump-environment.sh
459         if: success() && !env.SKIP_JOB
460       - name: install awscli
461         run: src/ci/scripts/install-awscli.sh
462         if: success() && !env.SKIP_JOB
463       - name: install sccache
464         run: src/ci/scripts/install-sccache.sh
465         if: success() && !env.SKIP_JOB
466       - name: select Xcode
467         run: src/ci/scripts/select-xcode.sh
468         if: success() && !env.SKIP_JOB
469       - name: install clang
470         run: src/ci/scripts/install-clang.sh
471         if: success() && !env.SKIP_JOB
472       - name: install WIX
473         run: src/ci/scripts/install-wix.sh
474         if: success() && !env.SKIP_JOB
475       - name: ensure the build happens on a partition with enough space
476         run: src/ci/scripts/symlink-build-dir.sh
477         if: success() && !env.SKIP_JOB
478       - name: disable git crlf conversion
479         run: src/ci/scripts/disable-git-crlf-conversion.sh
480         if: success() && !env.SKIP_JOB
481       - name: install MSYS2
482         run: src/ci/scripts/install-msys2.sh
483         if: success() && !env.SKIP_JOB
484       - name: install MinGW
485         run: src/ci/scripts/install-mingw.sh
486         if: success() && !env.SKIP_JOB
487       - name: install ninja
488         run: src/ci/scripts/install-ninja.sh
489         if: success() && !env.SKIP_JOB
490       - name: enable ipv6 on Docker
491         run: src/ci/scripts/enable-docker-ipv6.sh
492         if: success() && !env.SKIP_JOB
493       - name: disable git crlf conversion
494         run: src/ci/scripts/disable-git-crlf-conversion.sh
495         if: success() && !env.SKIP_JOB
496       - name: checkout submodules
497         run: src/ci/scripts/checkout-submodules.sh
498         if: success() && !env.SKIP_JOB
499       - name: ensure line endings are correct
500         run: src/ci/scripts/verify-line-endings.sh
501         if: success() && !env.SKIP_JOB
502       - name: run the build
503         run: src/ci/scripts/run-build-from-ci.sh
504         env:
505           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
506           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
507           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
508         if: success() && !env.SKIP_JOB
509       - name: upload artifacts to S3
510         run: src/ci/scripts/upload-artifacts.sh
511         env:
512           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
513           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
514         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
515   try:
516     name: try
517     env:
518       CI_JOB_NAME: "${{ matrix.name }}"
519       SCCACHE_BUCKET: rust-lang-ci-sccache2
520       DEPLOY_BUCKET: rust-lang-ci2
521       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
522       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
523       TOOLSTATE_PUBLISH: 1
524       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
525       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
526       CACHE_DOMAIN: ci-caches.rust-lang.org
527     if: "github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
528     strategy:
529       matrix:
530         include:
531           - name: dist-x86_64-linux
532             os: ubuntu-latest-xl
533             env: {}
534     timeout-minutes: 600
535     runs-on: "${{ matrix.os }}"
536     steps:
537       - name: disable git crlf conversion
538         run: git config --global core.autocrlf false
539       - name: checkout the source code
540         uses: actions/checkout@v2
541         with:
542           fetch-depth: 2
543       - name: configure the PR in which the error message will be posted
544         run: "echo \"[CI_PR_NUMBER=$num]\""
545         env:
546           num: "${{ github.event.number }}"
547         if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
548       - name: add extra environment variables
549         run: src/ci/scripts/setup-environment.sh
550         env:
551           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
552         if: success() && !env.SKIP_JOB
553       - name: decide whether to skip this job
554         run: src/ci/scripts/should-skip-this.sh
555         if: success() && !env.SKIP_JOB
556       - name: ensure the channel matches the target branch
557         run: src/ci/scripts/verify-channel.sh
558         if: success() && !env.SKIP_JOB
559       - name: configure GitHub Actions to kill the build when outdated
560         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
561         with:
562           github_token: "${{ secrets.github_token }}"
563         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
564       - name: collect CPU statistics
565         run: src/ci/scripts/collect-cpu-stats.sh
566         if: success() && !env.SKIP_JOB
567       - name: show the current environment
568         run: src/ci/scripts/dump-environment.sh
569         if: success() && !env.SKIP_JOB
570       - name: install awscli
571         run: src/ci/scripts/install-awscli.sh
572         if: success() && !env.SKIP_JOB
573       - name: install sccache
574         run: src/ci/scripts/install-sccache.sh
575         if: success() && !env.SKIP_JOB
576       - name: select Xcode
577         run: src/ci/scripts/select-xcode.sh
578         if: success() && !env.SKIP_JOB
579       - name: install clang
580         run: src/ci/scripts/install-clang.sh
581         if: success() && !env.SKIP_JOB
582       - name: install WIX
583         run: src/ci/scripts/install-wix.sh
584         if: success() && !env.SKIP_JOB
585       - name: ensure the build happens on a partition with enough space
586         run: src/ci/scripts/symlink-build-dir.sh
587         if: success() && !env.SKIP_JOB
588       - name: disable git crlf conversion
589         run: src/ci/scripts/disable-git-crlf-conversion.sh
590         if: success() && !env.SKIP_JOB
591       - name: install MSYS2
592         run: src/ci/scripts/install-msys2.sh
593         if: success() && !env.SKIP_JOB
594       - name: install MinGW
595         run: src/ci/scripts/install-mingw.sh
596         if: success() && !env.SKIP_JOB
597       - name: install ninja
598         run: src/ci/scripts/install-ninja.sh
599         if: success() && !env.SKIP_JOB
600       - name: enable ipv6 on Docker
601         run: src/ci/scripts/enable-docker-ipv6.sh
602         if: success() && !env.SKIP_JOB
603       - name: disable git crlf conversion
604         run: src/ci/scripts/disable-git-crlf-conversion.sh
605         if: success() && !env.SKIP_JOB
606       - name: checkout submodules
607         run: src/ci/scripts/checkout-submodules.sh
608         if: success() && !env.SKIP_JOB
609       - name: ensure line endings are correct
610         run: src/ci/scripts/verify-line-endings.sh
611         if: success() && !env.SKIP_JOB
612       - name: run the build
613         run: src/ci/scripts/run-build-from-ci.sh
614         env:
615           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
616           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
617           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
618         if: success() && !env.SKIP_JOB
619       - name: upload artifacts to S3
620         run: src/ci/scripts/upload-artifacts.sh
621         env:
622           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
623           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
624         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
625   master:
626     name: master
627     runs-on: ubuntu-latest
628     env:
629       SCCACHE_BUCKET: rust-lang-ci-sccache2
630       DEPLOY_BUCKET: rust-lang-ci2
631       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
632       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
633       TOOLSTATE_PUBLISH: 1
634       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
635       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
636       CACHE_DOMAIN: ci-caches.rust-lang.org
637     if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
638     steps:
639       - name: checkout the source code
640         uses: actions/checkout@v2
641         with:
642           fetch-depth: 2
643       - name: publish toolstate
644         run: src/ci/publish_toolstate.sh
645         shell: bash
646         env:
647           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
648         if: success() && !env.SKIP_JOB
649   try-success:
650     needs:
651       - try
652     if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
653     steps:
654       - name: mark the job as a success
655         run: exit 0
656         shell: bash
657     name: bors build finished
658     runs-on: ubuntu-latest
659   try-failure:
660     needs:
661       - try
662     if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
663     steps:
664       - name: mark the job as a failure
665         run: exit 1
666         shell: bash
667     name: bors build finished
668     runs-on: ubuntu-latest
669   auto-success:
670     needs:
671       - auto
672     if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
673     steps:
674       - name: mark the job as a success
675         run: exit 0
676         shell: bash
677     name: bors build finished
678     runs-on: ubuntu-latest
679   auto-failure:
680     needs:
681       - auto
682     if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
683     steps:
684       - name: mark the job as a failure
685         run: exit 1
686         shell: bash
687     name: bors build finished
688     runs-on: ubuntu-latest