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