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