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