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