]> git.lizzy.rs Git - rust.git/blob - .github/workflows/ci.yml
Auto merge of #106646 - Amanieu:ilp32-object, r=Mark-Simulacrum
[rust.git] / .github / workflows / ci.yml
1 #############################################################
2 #   WARNING: automatically generated file, DO NOT CHANGE!   #
3 #############################################################
4
5 # This file was automatically generated by the expand-yaml-anchors tool. The
6 # source file that generated this one is:
7 #
8 #   src/ci/github-actions/ci.yml
9 #
10 # Once you make changes to that file you need to run:
11 #
12 #   ./x.py run src/tools/expand-yaml-anchors/
13 #
14 # The CI build will fail if the tool is not run after changes to this file.
15
16 ---
17 name: CI
18 "on":
19   push:
20     branches:
21       - auto
22       - try
23       - try-perf
24       - master
25   pull_request:
26     branches:
27       - "**"
28 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-13
295             env:
296               RUST_BACKTRACE: 1
297             os: ubuntu-20.04-xl
298           - name: x86_64-gnu-llvm-13-stage1
299             env:
300               RUST_BACKTRACE: 1
301             os: ubuntu-20.04-xl
302           - name: x86_64-gnu-nopt
303             os: ubuntu-20.04-xl
304             env: {}
305           - name: x86_64-gnu-tools
306             env:
307               DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
308             os: ubuntu-20.04-xl
309           - name: dist-x86_64-apple
310             env:
311               SCRIPT: "./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin"
312               RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false --set rust.lto=thin"
313               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
314               MACOSX_DEPLOYMENT_TARGET: 10.7
315               SELECT_XCODE: /Applications/Xcode_13.4.1.app
316               NO_LLVM_ASSERTIONS: 1
317               NO_DEBUG_ASSERTIONS: 1
318               NO_OVERFLOW_CHECKS: 1
319               DIST_REQUIRE_ALL_TOOLS: 1
320             os: macos-12-xl
321           - name: dist-apple-various
322             env:
323               SCRIPT: "./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim"
324               RUST_CONFIGURE_ARGS: "--enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
325               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
326               MACOSX_DEPLOYMENT_TARGET: 10.7
327               SELECT_XCODE: /Applications/Xcode_13.4.1.app
328               NO_LLVM_ASSERTIONS: 1
329               NO_DEBUG_ASSERTIONS: 1
330               NO_OVERFLOW_CHECKS: 1
331             os: macos-12-xl
332           - name: dist-x86_64-apple-alt
333             env:
334               SCRIPT: "./x.py dist bootstrap --include-default-paths"
335               RUST_CONFIGURE_ARGS: "--enable-extended --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
336               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
337               MACOSX_DEPLOYMENT_TARGET: 10.7
338               SELECT_XCODE: /Applications/Xcode_13.4.1.app
339               NO_LLVM_ASSERTIONS: 1
340               NO_DEBUG_ASSERTIONS: 1
341               NO_OVERFLOW_CHECKS: 1
342             os: macos-12-xl
343           - name: x86_64-apple-1
344             env:
345               SCRIPT: "./x.py --stage 2 test --exclude tests/ui --exclude tests/rustdoc --exclude tests/run-make-fulldeps"
346               RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
347               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
348               MACOSX_DEPLOYMENT_TARGET: 10.8
349               MACOSX_STD_DEPLOYMENT_TARGET: 10.7
350               NO_LLVM_ASSERTIONS: 1
351               NO_DEBUG_ASSERTIONS: 1
352               NO_OVERFLOW_CHECKS: 1
353             os: macos-12-xl
354           - name: x86_64-apple-2
355             env:
356               SCRIPT: "./x.py --stage 2 test tests/ui tests/rustdoc tests/run-make-fulldeps"
357               RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
358               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
359               MACOSX_DEPLOYMENT_TARGET: 10.8
360               MACOSX_STD_DEPLOYMENT_TARGET: 10.7
361               NO_LLVM_ASSERTIONS: 1
362               NO_DEBUG_ASSERTIONS: 1
363               NO_OVERFLOW_CHECKS: 1
364             os: macos-12-xl
365           - name: dist-aarch64-apple
366             env:
367               SCRIPT: "./x.py dist bootstrap --include-default-paths --stage 2"
368               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"
369               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
370               SELECT_XCODE: /Applications/Xcode_13.4.1.app
371               USE_XCODE_CLANG: 1
372               MACOSX_DEPLOYMENT_TARGET: 11.0
373               MACOSX_STD_DEPLOYMENT_TARGET: 11.0
374               NO_LLVM_ASSERTIONS: 1
375               NO_DEBUG_ASSERTIONS: 1
376               NO_OVERFLOW_CHECKS: 1
377               DIST_REQUIRE_ALL_TOOLS: 1
378               JEMALLOC_SYS_WITH_LG_PAGE: 14
379             os: macos-12-xl
380           - name: x86_64-msvc-1
381             env:
382               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
383               SCRIPT: make ci-subset-1
384             os: windows-latest-xl
385           - name: x86_64-msvc-2
386             env:
387               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
388               SCRIPT: make ci-subset-2
389             os: windows-latest-xl
390           - name: i686-msvc-1
391             env:
392               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
393               SCRIPT: make ci-subset-1
394             os: windows-latest-xl
395           - name: i686-msvc-2
396             env:
397               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
398               SCRIPT: make ci-subset-2
399             os: windows-latest-xl
400           - name: x86_64-msvc-cargo
401             env:
402               SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo
403               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-lld"
404             os: windows-latest-xl
405           - name: x86_64-msvc-tools
406             env:
407               SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
408               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json"
409               DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
410             os: windows-latest-xl
411           - name: i686-mingw-1
412             env:
413               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --set llvm.allow-old-toolchain"
414               SCRIPT: make ci-mingw-subset-1
415               NO_DOWNLOAD_CI_LLVM: 1
416               CUSTOM_MINGW: 1
417             os: windows-latest-xl
418           - name: i686-mingw-2
419             env:
420               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --set llvm.allow-old-toolchain"
421               SCRIPT: make ci-mingw-subset-2
422               NO_DOWNLOAD_CI_LLVM: 1
423               CUSTOM_MINGW: 1
424             os: windows-latest-xl
425           - name: x86_64-mingw-1
426             env:
427               SCRIPT: make ci-mingw-subset-1
428               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler --set llvm.allow-old-toolchain"
429               NO_DOWNLOAD_CI_LLVM: 1
430               CUSTOM_MINGW: 1
431             os: windows-latest-xl
432           - name: x86_64-mingw-2
433             env:
434               SCRIPT: make ci-mingw-subset-2
435               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler --set llvm.allow-old-toolchain"
436               NO_DOWNLOAD_CI_LLVM: 1
437               CUSTOM_MINGW: 1
438             os: windows-latest-xl
439           - name: dist-x86_64-msvc
440             env:
441               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"
442               SCRIPT: PGO_HOST=x86_64-pc-windows-msvc src/ci/pgo.sh python x.py dist bootstrap --include-default-paths
443               DIST_REQUIRE_ALL_TOOLS: 1
444             os: windows-latest-xl
445           - name: dist-i686-msvc
446             env:
447               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"
448               SCRIPT: python x.py dist bootstrap --include-default-paths
449               DIST_REQUIRE_ALL_TOOLS: 1
450             os: windows-latest-xl
451           - name: dist-aarch64-msvc
452             env:
453               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
454               SCRIPT: python x.py dist bootstrap --include-default-paths
455               DIST_REQUIRE_ALL_TOOLS: 1
456               WINDOWS_SDK_20348_HACK: 1
457             os: windows-latest-xl
458           - name: dist-i686-mingw
459             env:
460               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --enable-full-tools --enable-profiler --set llvm.allow-old-toolchain"
461               NO_DOWNLOAD_CI_LLVM: 1
462               SCRIPT: python x.py dist bootstrap --include-default-paths
463               CUSTOM_MINGW: 1
464               DIST_REQUIRE_ALL_TOOLS: 1
465             os: windows-latest-xl
466           - name: dist-x86_64-mingw
467             env:
468               SCRIPT: python x.py dist bootstrap --include-default-paths
469               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler --set llvm.allow-old-toolchain"
470               NO_DOWNLOAD_CI_LLVM: 1
471               CUSTOM_MINGW: 1
472               DIST_REQUIRE_ALL_TOOLS: 1
473             os: windows-latest-xl
474           - name: dist-x86_64-msvc-alt
475             env:
476               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-extended --enable-profiler"
477               SCRIPT: python x.py dist bootstrap --include-default-paths
478             os: windows-latest-xl
479     timeout-minutes: 600
480     runs-on: "${{ matrix.os }}"
481     steps:
482       - name: disable git crlf conversion
483         run: git config --global core.autocrlf false
484       - name: checkout the source code
485         uses: actions/checkout@v3
486         with:
487           fetch-depth: 2
488       - name: configure the PR in which the error message will be posted
489         run: "echo \"[CI_PR_NUMBER=$num]\""
490         env:
491           num: "${{ github.event.number }}"
492         if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
493       - name: add extra environment variables
494         run: src/ci/scripts/setup-environment.sh
495         env:
496           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
497         if: success() && !env.SKIP_JOB
498       - name: decide whether to skip this job
499         run: src/ci/scripts/should-skip-this.sh
500         if: success() && !env.SKIP_JOB
501       - name: ensure the channel matches the target branch
502         run: src/ci/scripts/verify-channel.sh
503         if: success() && !env.SKIP_JOB
504       - name: configure GitHub Actions to kill the build when outdated
505         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
506         with:
507           github_token: "${{ secrets.github_token }}"
508         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try' && github.ref != 'refs/heads/try-perf'"
509       - name: collect CPU statistics
510         run: src/ci/scripts/collect-cpu-stats.sh
511         if: success() && !env.SKIP_JOB
512       - name: show the current environment
513         run: src/ci/scripts/dump-environment.sh
514         if: success() && !env.SKIP_JOB
515       - name: install awscli
516         run: src/ci/scripts/install-awscli.sh
517         if: success() && !env.SKIP_JOB
518       - name: install sccache
519         run: src/ci/scripts/install-sccache.sh
520         if: success() && !env.SKIP_JOB
521       - name: select Xcode
522         run: src/ci/scripts/select-xcode.sh
523         if: success() && !env.SKIP_JOB
524       - name: install clang
525         run: src/ci/scripts/install-clang.sh
526         if: success() && !env.SKIP_JOB
527       - name: install WIX
528         run: src/ci/scripts/install-wix.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: checkout submodules
534         run: src/ci/scripts/checkout-submodules.sh
535         if: success() && !env.SKIP_JOB
536       - name: install MSYS2
537         run: src/ci/scripts/install-msys2.sh
538         if: success() && !env.SKIP_JOB
539       - name: install MinGW
540         run: src/ci/scripts/install-mingw.sh
541         if: success() && !env.SKIP_JOB
542       - name: install ninja
543         run: src/ci/scripts/install-ninja.sh
544         if: success() && !env.SKIP_JOB
545       - name: enable ipv6 on Docker
546         run: src/ci/scripts/enable-docker-ipv6.sh
547         if: success() && !env.SKIP_JOB
548       - name: disable git crlf conversion
549         run: src/ci/scripts/disable-git-crlf-conversion.sh
550         if: success() && !env.SKIP_JOB
551       - name: ensure line endings are correct
552         run: src/ci/scripts/verify-line-endings.sh
553         if: success() && !env.SKIP_JOB
554       - name: ensure backported commits are in upstream branches
555         run: src/ci/scripts/verify-backported-commits.sh
556         if: success() && !env.SKIP_JOB
557       - name: ensure the stable version number is correct
558         run: src/ci/scripts/verify-stable-version-number.sh
559         if: success() && !env.SKIP_JOB
560       - name: run the build
561         run: src/ci/scripts/run-build-from-ci.sh
562         env:
563           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
564           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
565           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
566         if: success() && !env.SKIP_JOB
567       - name: upload artifacts to S3
568         run: src/ci/scripts/upload-artifacts.sh
569         env:
570           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
571           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
572         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
573   try:
574     permissions:
575       actions: write
576     name: try
577     env:
578       CI_JOB_NAME: "${{ matrix.name }}"
579       SCCACHE_BUCKET: rust-lang-ci-sccache2
580       DEPLOY_BUCKET: rust-lang-ci2
581       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
582       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
583       TOOLSTATE_PUBLISH: 1
584       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
585       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
586       CACHE_DOMAIN: ci-caches.rust-lang.org
587     if: "github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
588     strategy:
589       matrix:
590         include:
591           - name: dist-x86_64-linux
592             os: ubuntu-20.04-xl
593             env: {}
594     timeout-minutes: 600
595     runs-on: "${{ matrix.os }}"
596     steps:
597       - name: disable git crlf conversion
598         run: git config --global core.autocrlf false
599       - name: checkout the source code
600         uses: actions/checkout@v3
601         with:
602           fetch-depth: 2
603       - name: configure the PR in which the error message will be posted
604         run: "echo \"[CI_PR_NUMBER=$num]\""
605         env:
606           num: "${{ github.event.number }}"
607         if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
608       - name: add extra environment variables
609         run: src/ci/scripts/setup-environment.sh
610         env:
611           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
612         if: success() && !env.SKIP_JOB
613       - name: decide whether to skip this job
614         run: src/ci/scripts/should-skip-this.sh
615         if: success() && !env.SKIP_JOB
616       - name: ensure the channel matches the target branch
617         run: src/ci/scripts/verify-channel.sh
618         if: success() && !env.SKIP_JOB
619       - name: configure GitHub Actions to kill the build when outdated
620         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
621         with:
622           github_token: "${{ secrets.github_token }}"
623         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try' && github.ref != 'refs/heads/try-perf'"
624       - name: collect CPU statistics
625         run: src/ci/scripts/collect-cpu-stats.sh
626         if: success() && !env.SKIP_JOB
627       - name: show the current environment
628         run: src/ci/scripts/dump-environment.sh
629         if: success() && !env.SKIP_JOB
630       - name: install awscli
631         run: src/ci/scripts/install-awscli.sh
632         if: success() && !env.SKIP_JOB
633       - name: install sccache
634         run: src/ci/scripts/install-sccache.sh
635         if: success() && !env.SKIP_JOB
636       - name: select Xcode
637         run: src/ci/scripts/select-xcode.sh
638         if: success() && !env.SKIP_JOB
639       - name: install clang
640         run: src/ci/scripts/install-clang.sh
641         if: success() && !env.SKIP_JOB
642       - name: install WIX
643         run: src/ci/scripts/install-wix.sh
644         if: success() && !env.SKIP_JOB
645       - name: disable git crlf conversion
646         run: src/ci/scripts/disable-git-crlf-conversion.sh
647         if: success() && !env.SKIP_JOB
648       - name: checkout submodules
649         run: src/ci/scripts/checkout-submodules.sh
650         if: success() && !env.SKIP_JOB
651       - name: install MSYS2
652         run: src/ci/scripts/install-msys2.sh
653         if: success() && !env.SKIP_JOB
654       - name: install MinGW
655         run: src/ci/scripts/install-mingw.sh
656         if: success() && !env.SKIP_JOB
657       - name: install ninja
658         run: src/ci/scripts/install-ninja.sh
659         if: success() && !env.SKIP_JOB
660       - name: enable ipv6 on Docker
661         run: src/ci/scripts/enable-docker-ipv6.sh
662         if: success() && !env.SKIP_JOB
663       - name: disable git crlf conversion
664         run: src/ci/scripts/disable-git-crlf-conversion.sh
665         if: success() && !env.SKIP_JOB
666       - name: ensure line endings are correct
667         run: src/ci/scripts/verify-line-endings.sh
668         if: success() && !env.SKIP_JOB
669       - name: ensure backported commits are in upstream branches
670         run: src/ci/scripts/verify-backported-commits.sh
671         if: success() && !env.SKIP_JOB
672       - name: ensure the stable version number is correct
673         run: src/ci/scripts/verify-stable-version-number.sh
674         if: success() && !env.SKIP_JOB
675       - name: run the build
676         run: src/ci/scripts/run-build-from-ci.sh
677         env:
678           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
679           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
680           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
681         if: success() && !env.SKIP_JOB
682       - name: upload artifacts to S3
683         run: src/ci/scripts/upload-artifacts.sh
684         env:
685           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
686           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
687         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
688   master:
689     name: master
690     runs-on: ubuntu-latest
691     env:
692       SCCACHE_BUCKET: rust-lang-ci-sccache2
693       DEPLOY_BUCKET: rust-lang-ci2
694       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
695       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
696       TOOLSTATE_PUBLISH: 1
697       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
698       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
699       CACHE_DOMAIN: ci-caches.rust-lang.org
700     if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
701     steps:
702       - name: checkout the source code
703         uses: actions/checkout@v3
704         with:
705           fetch-depth: 2
706       - name: publish toolstate
707         run: src/ci/publish_toolstate.sh
708         shell: bash
709         env:
710           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
711         if: success() && !env.SKIP_JOB
712   try-success:
713     needs:
714       - try
715     if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
716     steps:
717       - name: mark the job as a success
718         run: exit 0
719         shell: bash
720     name: bors build finished
721     runs-on: ubuntu-latest
722   try-failure:
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 failure
728         run: exit 1
729         shell: bash
730     name: bors build finished
731     runs-on: ubuntu-latest
732   auto-success:
733     needs:
734       - auto
735     if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
736     steps:
737       - name: mark the job as a success
738         run: exit 0
739         shell: bash
740     name: bors build finished
741     runs-on: ubuntu-latest
742   auto-failure:
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 failure
748         run: exit 1
749         shell: bash
750     name: bors build finished
751     runs-on: ubuntu-latest