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