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