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