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