]> git.lizzy.rs Git - rust.git/blob - .github/workflows/ci.yml
Auto merge of #86204 - alexcrichton:wasm-simd-stable, r=Amanieu
[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-10
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: select Xcode
96         run: src/ci/scripts/select-xcode.sh
97         if: success() && !env.SKIP_JOB
98       - name: install clang
99         run: src/ci/scripts/install-clang.sh
100         if: success() && !env.SKIP_JOB
101       - name: install WIX
102         run: src/ci/scripts/install-wix.sh
103         if: success() && !env.SKIP_JOB
104       - name: ensure the build happens on a partition with enough space
105         run: src/ci/scripts/symlink-build-dir.sh
106         if: success() && !env.SKIP_JOB
107       - name: disable git crlf conversion
108         run: src/ci/scripts/disable-git-crlf-conversion.sh
109         if: success() && !env.SKIP_JOB
110       - name: install MSYS2
111         run: src/ci/scripts/install-msys2.sh
112         if: success() && !env.SKIP_JOB
113       - name: install MinGW
114         run: src/ci/scripts/install-mingw.sh
115         if: success() && !env.SKIP_JOB
116       - name: install ninja
117         run: src/ci/scripts/install-ninja.sh
118         if: success() && !env.SKIP_JOB
119       - name: enable ipv6 on Docker
120         run: src/ci/scripts/enable-docker-ipv6.sh
121         if: success() && !env.SKIP_JOB
122       - name: disable git crlf conversion
123         run: src/ci/scripts/disable-git-crlf-conversion.sh
124         if: success() && !env.SKIP_JOB
125       - name: checkout submodules
126         run: src/ci/scripts/checkout-submodules.sh
127         if: success() && !env.SKIP_JOB
128       - name: ensure line endings are correct
129         run: src/ci/scripts/verify-line-endings.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             os: ubuntu-latest-xl
267           - name: x86_64-gnu-aux
268             os: ubuntu-latest-xl
269             env: {}
270           - name: x86_64-gnu-debug
271             os: ubuntu-latest-xl
272             env: {}
273           - name: x86_64-gnu-distcheck
274             os: ubuntu-latest-xl
275             env: {}
276           - name: x86_64-gnu-llvm-10
277             env:
278               RUST_BACKTRACE: 1
279             os: ubuntu-latest-xl
280           - name: x86_64-gnu-nopt
281             os: ubuntu-latest-xl
282             env: {}
283           - name: x86_64-gnu-tools
284             env:
285               DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
286             os: ubuntu-latest-xl
287           - name: dist-x86_64-apple
288             env:
289               SCRIPT: "./x.py dist"
290               RUST_CONFIGURE_ARGS: "--host=x86_64-apple-darwin --target=x86_64-apple-darwin,aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
291               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
292               MACOSX_DEPLOYMENT_TARGET: 10.7
293               NO_LLVM_ASSERTIONS: 1
294               NO_DEBUG_ASSERTIONS: 1
295               DIST_REQUIRE_ALL_TOOLS: 1
296             os: macos-latest
297           - name: dist-x86_64-apple-alt
298             env:
299               SCRIPT: "./x.py dist"
300               RUST_CONFIGURE_ARGS: "--enable-extended --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
301               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
302               MACOSX_DEPLOYMENT_TARGET: 10.7
303               NO_LLVM_ASSERTIONS: 1
304               NO_DEBUG_ASSERTIONS: 1
305             os: macos-latest
306           - name: x86_64-apple
307             env:
308               SCRIPT: "./x.py --stage 2 test"
309               RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
310               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
311               MACOSX_DEPLOYMENT_TARGET: 10.8
312               MACOSX_STD_DEPLOYMENT_TARGET: 10.7
313               NO_LLVM_ASSERTIONS: 1
314               NO_DEBUG_ASSERTIONS: 1
315             os: macos-latest
316           - name: dist-aarch64-apple
317             env:
318               SCRIPT: "./x.py dist --stage 2"
319               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"
320               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
321               SELECT_XCODE: /Applications/Xcode_12.2.app
322               USE_XCODE_CLANG: 1
323               MACOSX_DEPLOYMENT_TARGET: 11.0
324               MACOSX_STD_DEPLOYMENT_TARGET: 11.0
325               NO_LLVM_ASSERTIONS: 1
326               NO_DEBUG_ASSERTIONS: 1
327               DIST_REQUIRE_ALL_TOOLS: 1
328               JEMALLOC_SYS_WITH_LG_PAGE: 14
329             os: macos-latest
330           - name: x86_64-msvc-1
331             env:
332               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
333               SCRIPT: make ci-subset-1
334             os: windows-latest-xl
335           - name: x86_64-msvc-2
336             env:
337               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
338               SCRIPT: make ci-subset-2
339             os: windows-latest-xl
340           - name: i686-msvc-1
341             env:
342               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
343               SCRIPT: make ci-subset-1
344             os: windows-latest-xl
345           - name: i686-msvc-2
346             env:
347               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
348               SCRIPT: make ci-subset-2
349             os: windows-latest-xl
350           - name: x86_64-msvc-cargo
351             env:
352               SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo
353               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-lld"
354               VCVARS_BAT: vcvars64.bat
355             os: windows-latest-xl
356           - name: x86_64-msvc-tools
357             env:
358               SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
359               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json"
360               DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
361             os: windows-latest-xl
362           - name: i686-mingw-1
363             env:
364               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
365               SCRIPT: make ci-mingw-subset-1
366               CUSTOM_MINGW: 1
367             os: windows-latest-xl
368           - name: i686-mingw-2
369             env:
370               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
371               SCRIPT: make ci-mingw-subset-2
372               CUSTOM_MINGW: 1
373             os: windows-latest-xl
374           - name: x86_64-mingw-1
375             env:
376               SCRIPT: make ci-mingw-subset-1
377               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
378               CUSTOM_MINGW: 1
379             os: windows-latest-xl
380           - name: x86_64-mingw-2
381             env:
382               SCRIPT: make ci-mingw-subset-2
383               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
384               CUSTOM_MINGW: 1
385             os: windows-latest-xl
386           - name: dist-x86_64-msvc
387             env:
388               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"
389               SCRIPT: python x.py dist
390               DIST_REQUIRE_ALL_TOOLS: 1
391             os: windows-latest-xl
392           - name: dist-i686-msvc
393             env:
394               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"
395               SCRIPT: python x.py dist
396               DIST_REQUIRE_ALL_TOOLS: 1
397             os: windows-latest-xl
398           - name: dist-aarch64-msvc
399             env:
400               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
401               SCRIPT: python x.py dist
402               DIST_REQUIRE_ALL_TOOLS: 0
403             os: windows-latest-xl
404           - name: dist-i686-mingw
405             env:
406               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --enable-full-tools --enable-profiler"
407               SCRIPT: python x.py dist
408               CUSTOM_MINGW: 1
409               DIST_REQUIRE_ALL_TOOLS: 1
410             os: windows-latest-xl
411           - name: dist-x86_64-mingw
412             env:
413               SCRIPT: python x.py dist
414               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler"
415               CUSTOM_MINGW: 1
416               DIST_REQUIRE_ALL_TOOLS: 1
417             os: windows-latest-xl
418           - name: dist-x86_64-msvc-alt
419             env:
420               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-extended --enable-profiler"
421               SCRIPT: python x.py dist
422             os: windows-latest-xl
423     timeout-minutes: 600
424     runs-on: "${{ matrix.os }}"
425     steps:
426       - name: disable git crlf conversion
427         run: git config --global core.autocrlf false
428       - name: checkout the source code
429         uses: actions/checkout@v2
430         with:
431           fetch-depth: 2
432       - name: configure the PR in which the error message will be posted
433         run: "echo \"[CI_PR_NUMBER=$num]\""
434         env:
435           num: "${{ github.event.number }}"
436         if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
437       - name: add extra environment variables
438         run: src/ci/scripts/setup-environment.sh
439         env:
440           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
441         if: success() && !env.SKIP_JOB
442       - name: decide whether to skip this job
443         run: src/ci/scripts/should-skip-this.sh
444         if: success() && !env.SKIP_JOB
445       - name: ensure the channel matches the target branch
446         run: src/ci/scripts/verify-channel.sh
447         if: success() && !env.SKIP_JOB
448       - name: configure GitHub Actions to kill the build when outdated
449         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
450         with:
451           github_token: "${{ secrets.github_token }}"
452         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
453       - name: collect CPU statistics
454         run: src/ci/scripts/collect-cpu-stats.sh
455         if: success() && !env.SKIP_JOB
456       - name: show the current environment
457         run: src/ci/scripts/dump-environment.sh
458         if: success() && !env.SKIP_JOB
459       - name: install awscli
460         run: src/ci/scripts/install-awscli.sh
461         if: success() && !env.SKIP_JOB
462       - name: install sccache
463         run: src/ci/scripts/install-sccache.sh
464         if: success() && !env.SKIP_JOB
465       - name: select Xcode
466         run: src/ci/scripts/select-xcode.sh
467         if: success() && !env.SKIP_JOB
468       - name: install clang
469         run: src/ci/scripts/install-clang.sh
470         if: success() && !env.SKIP_JOB
471       - name: install WIX
472         run: src/ci/scripts/install-wix.sh
473         if: success() && !env.SKIP_JOB
474       - name: ensure the build happens on a partition with enough space
475         run: src/ci/scripts/symlink-build-dir.sh
476         if: success() && !env.SKIP_JOB
477       - name: disable git crlf conversion
478         run: src/ci/scripts/disable-git-crlf-conversion.sh
479         if: success() && !env.SKIP_JOB
480       - name: install MSYS2
481         run: src/ci/scripts/install-msys2.sh
482         if: success() && !env.SKIP_JOB
483       - name: install MinGW
484         run: src/ci/scripts/install-mingw.sh
485         if: success() && !env.SKIP_JOB
486       - name: install ninja
487         run: src/ci/scripts/install-ninja.sh
488         if: success() && !env.SKIP_JOB
489       - name: enable ipv6 on Docker
490         run: src/ci/scripts/enable-docker-ipv6.sh
491         if: success() && !env.SKIP_JOB
492       - name: disable git crlf conversion
493         run: src/ci/scripts/disable-git-crlf-conversion.sh
494         if: success() && !env.SKIP_JOB
495       - name: checkout submodules
496         run: src/ci/scripts/checkout-submodules.sh
497         if: success() && !env.SKIP_JOB
498       - name: ensure line endings are correct
499         run: src/ci/scripts/verify-line-endings.sh
500         if: success() && !env.SKIP_JOB
501       - name: run the build
502         run: src/ci/scripts/run-build-from-ci.sh
503         env:
504           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
505           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
506           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
507         if: success() && !env.SKIP_JOB
508       - name: upload artifacts to S3
509         run: src/ci/scripts/upload-artifacts.sh
510         env:
511           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
512           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
513         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
514   try:
515     name: try
516     env:
517       CI_JOB_NAME: "${{ matrix.name }}"
518       SCCACHE_BUCKET: rust-lang-ci-sccache2
519       DEPLOY_BUCKET: rust-lang-ci2
520       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
521       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
522       TOOLSTATE_PUBLISH: 1
523       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
524       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
525       CACHE_DOMAIN: ci-caches.rust-lang.org
526     if: "github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
527     strategy:
528       matrix:
529         include:
530           - name: dist-x86_64-linux
531             os: ubuntu-latest-xl
532             env: {}
533     timeout-minutes: 600
534     runs-on: "${{ matrix.os }}"
535     steps:
536       - name: disable git crlf conversion
537         run: git config --global core.autocrlf false
538       - name: checkout the source code
539         uses: actions/checkout@v2
540         with:
541           fetch-depth: 2
542       - name: configure the PR in which the error message will be posted
543         run: "echo \"[CI_PR_NUMBER=$num]\""
544         env:
545           num: "${{ github.event.number }}"
546         if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
547       - name: add extra environment variables
548         run: src/ci/scripts/setup-environment.sh
549         env:
550           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
551         if: success() && !env.SKIP_JOB
552       - name: decide whether to skip this job
553         run: src/ci/scripts/should-skip-this.sh
554         if: success() && !env.SKIP_JOB
555       - name: ensure the channel matches the target branch
556         run: src/ci/scripts/verify-channel.sh
557         if: success() && !env.SKIP_JOB
558       - name: configure GitHub Actions to kill the build when outdated
559         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
560         with:
561           github_token: "${{ secrets.github_token }}"
562         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
563       - name: collect CPU statistics
564         run: src/ci/scripts/collect-cpu-stats.sh
565         if: success() && !env.SKIP_JOB
566       - name: show the current environment
567         run: src/ci/scripts/dump-environment.sh
568         if: success() && !env.SKIP_JOB
569       - name: install awscli
570         run: src/ci/scripts/install-awscli.sh
571         if: success() && !env.SKIP_JOB
572       - name: install sccache
573         run: src/ci/scripts/install-sccache.sh
574         if: success() && !env.SKIP_JOB
575       - name: select Xcode
576         run: src/ci/scripts/select-xcode.sh
577         if: success() && !env.SKIP_JOB
578       - name: install clang
579         run: src/ci/scripts/install-clang.sh
580         if: success() && !env.SKIP_JOB
581       - name: install WIX
582         run: src/ci/scripts/install-wix.sh
583         if: success() && !env.SKIP_JOB
584       - name: ensure the build happens on a partition with enough space
585         run: src/ci/scripts/symlink-build-dir.sh
586         if: success() && !env.SKIP_JOB
587       - name: disable git crlf conversion
588         run: src/ci/scripts/disable-git-crlf-conversion.sh
589         if: success() && !env.SKIP_JOB
590       - name: install MSYS2
591         run: src/ci/scripts/install-msys2.sh
592         if: success() && !env.SKIP_JOB
593       - name: install MinGW
594         run: src/ci/scripts/install-mingw.sh
595         if: success() && !env.SKIP_JOB
596       - name: install ninja
597         run: src/ci/scripts/install-ninja.sh
598         if: success() && !env.SKIP_JOB
599       - name: enable ipv6 on Docker
600         run: src/ci/scripts/enable-docker-ipv6.sh
601         if: success() && !env.SKIP_JOB
602       - name: disable git crlf conversion
603         run: src/ci/scripts/disable-git-crlf-conversion.sh
604         if: success() && !env.SKIP_JOB
605       - name: checkout submodules
606         run: src/ci/scripts/checkout-submodules.sh
607         if: success() && !env.SKIP_JOB
608       - name: ensure line endings are correct
609         run: src/ci/scripts/verify-line-endings.sh
610         if: success() && !env.SKIP_JOB
611       - name: run the build
612         run: src/ci/scripts/run-build-from-ci.sh
613         env:
614           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
615           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
616           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
617         if: success() && !env.SKIP_JOB
618       - name: upload artifacts to S3
619         run: src/ci/scripts/upload-artifacts.sh
620         env:
621           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
622           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
623         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
624   master:
625     name: master
626     runs-on: ubuntu-latest
627     env:
628       SCCACHE_BUCKET: rust-lang-ci-sccache2
629       DEPLOY_BUCKET: rust-lang-ci2
630       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
631       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
632       TOOLSTATE_PUBLISH: 1
633       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
634       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
635       CACHE_DOMAIN: ci-caches.rust-lang.org
636     if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
637     steps:
638       - name: checkout the source code
639         uses: actions/checkout@v2
640         with:
641           fetch-depth: 2
642       - name: publish toolstate
643         run: src/ci/publish_toolstate.sh
644         shell: bash
645         env:
646           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
647         if: success() && !env.SKIP_JOB
648   try-success:
649     needs:
650       - try
651     if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
652     steps:
653       - name: mark the job as a success
654         run: exit 0
655         shell: bash
656     name: bors build finished
657     runs-on: ubuntu-latest
658   try-failure:
659     needs:
660       - try
661     if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
662     steps:
663       - name: mark the job as a failure
664         run: exit 1
665         shell: bash
666     name: bors build finished
667     runs-on: ubuntu-latest
668   auto-success:
669     needs:
670       - auto
671     if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
672     steps:
673       - name: mark the job as a success
674         run: exit 0
675         shell: bash
676     name: bors build finished
677     runs-on: ubuntu-latest
678   auto-failure:
679     needs:
680       - auto
681     if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
682     steps:
683       - name: mark the job as a failure
684         run: exit 1
685         shell: bash
686     name: bors build finished
687     runs-on: ubuntu-latest