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