]> git.lizzy.rs Git - rust.git/blob - .github/workflows/ci.yml
6025808eb615d39f974f34ca73e1f77595310a7e
[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-8
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@v1
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_JOBS && 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: configure GitHub Actions to kill the build when outdated
76         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
77         with:
78           github_token: "${{ secrets.github_token }}"
79         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
80       - name: collect CPU statistics
81         run: src/ci/scripts/collect-cpu-stats.sh
82         if: success() && !env.SKIP_JOB
83       - name: show the current environment
84         run: src/ci/scripts/dump-environment.sh
85         if: success() && !env.SKIP_JOB
86       - name: install awscli
87         run: src/ci/scripts/install-awscli.sh
88         if: success() && !env.SKIP_JOB
89       - name: install sccache
90         run: src/ci/scripts/install-sccache.sh
91         if: success() && !env.SKIP_JOB
92       - name: select Xcode
93         run: src/ci/scripts/select-xcode.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: run the build
129         run: src/ci/scripts/run-build-from-ci.sh
130         env:
131           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
132           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
133           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
134         if: success() && !env.SKIP_JOB
135       - name: upload artifacts to S3
136         run: src/ci/scripts/upload-artifacts.sh
137         env:
138           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
139           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
140         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
141   auto:
142     name: auto
143     env:
144       CI_JOB_NAME: "${{ matrix.name }}"
145       SCCACHE_BUCKET: rust-lang-ci-sccache2
146       DEPLOY_BUCKET: rust-lang-ci2
147       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
148       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
149       TOOLSTATE_PUBLISH: 1
150       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
151       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
152       CACHE_DOMAIN: ci-caches.rust-lang.org
153     if: "github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
154     strategy:
155       matrix:
156         include:
157           - name: arm-android
158             os: ubuntu-latest-xl
159             env: {}
160           - name: armhf-gnu
161             os: ubuntu-latest-xl
162             env: {}
163           - name: dist-aarch64-linux
164             os: ubuntu-latest-xl
165             env: {}
166           - name: dist-android
167             os: ubuntu-latest-xl
168             env: {}
169           - name: dist-arm-linux
170             os: ubuntu-latest-xl
171             env: {}
172           - name: dist-armhf-linux
173             os: ubuntu-latest-xl
174             env: {}
175           - name: dist-armv7-linux
176             os: ubuntu-latest-xl
177             env: {}
178           - name: dist-i586-gnu-i586-i686-musl
179             os: ubuntu-latest-xl
180             env: {}
181           - name: dist-i686-freebsd
182             os: ubuntu-latest-xl
183             env: {}
184           - name: dist-i686-linux
185             os: ubuntu-latest-xl
186             env: {}
187           - name: dist-mips-linux
188             os: ubuntu-latest-xl
189             env: {}
190           - name: dist-mips64-linux
191             os: ubuntu-latest-xl
192             env: {}
193           - name: dist-mips64el-linux
194             os: ubuntu-latest-xl
195             env: {}
196           - name: dist-mipsel-linux
197             os: ubuntu-latest-xl
198             env: {}
199           - name: dist-powerpc-linux
200             os: ubuntu-latest-xl
201             env: {}
202           - name: dist-powerpc64-linux
203             os: ubuntu-latest-xl
204             env: {}
205           - name: dist-powerpc64le-linux
206             os: ubuntu-latest-xl
207             env: {}
208           - name: dist-riscv64-linux
209             os: ubuntu-latest-xl
210             env: {}
211           - name: dist-s390x-linux
212             os: ubuntu-latest-xl
213             env: {}
214           - name: dist-various-1
215             os: ubuntu-latest-xl
216             env: {}
217           - name: dist-various-2
218             os: ubuntu-latest-xl
219             env: {}
220           - name: dist-x86_64-freebsd
221             os: ubuntu-latest-xl
222             env: {}
223           - name: dist-x86_64-illumos
224             os: ubuntu-latest-xl
225             env: {}
226           - name: dist-x86_64-linux
227             os: ubuntu-latest-xl
228             env: {}
229           - name: dist-x86_64-linux-alt
230             env:
231               IMAGE: dist-x86_64-linux
232             os: ubuntu-latest-xl
233           - name: dist-x86_64-musl
234             os: ubuntu-latest-xl
235             env: {}
236           - name: dist-x86_64-netbsd
237             os: ubuntu-latest-xl
238             env: {}
239           - name: i686-gnu
240             os: ubuntu-latest-xl
241             env: {}
242           - name: i686-gnu-nopt
243             os: ubuntu-latest-xl
244             env: {}
245           - name: mingw-check
246             os: ubuntu-latest-xl
247             env: {}
248           - name: test-various
249             os: ubuntu-latest-xl
250             env: {}
251           - name: wasm32
252             os: ubuntu-latest-xl
253             env: {}
254           - name: x86_64-gnu
255             os: ubuntu-latest-xl
256             env: {}
257           - name: x86_64-gnu-aux
258             os: ubuntu-latest-xl
259             env: {}
260           - name: x86_64-gnu-debug
261             os: ubuntu-latest-xl
262             env: {}
263           - name: x86_64-gnu-distcheck
264             os: ubuntu-latest-xl
265             env: {}
266           - name: x86_64-gnu-llvm-8
267             env:
268               RUST_BACKTRACE: 1
269             os: ubuntu-latest-xl
270           - name: x86_64-gnu-nopt
271             os: ubuntu-latest-xl
272             env: {}
273           - name: x86_64-gnu-tools
274             env:
275               DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
276             os: ubuntu-latest-xl
277           - name: dist-x86_64-apple
278             env:
279               SCRIPT: "./x.py dist"
280               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"
281               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
282               MACOSX_DEPLOYMENT_TARGET: 10.7
283               NO_LLVM_ASSERTIONS: 1
284               NO_DEBUG_ASSERTIONS: 1
285               DIST_REQUIRE_ALL_TOOLS: 1
286             os: macos-latest
287           - name: dist-x86_64-apple-alt
288             env:
289               SCRIPT: "./x.py dist"
290               RUST_CONFIGURE_ARGS: "--enable-extended --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             os: macos-latest
296           - name: x86_64-apple
297             env:
298               SCRIPT: "./x.py --stage 2 test"
299               RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
300               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
301               MACOSX_DEPLOYMENT_TARGET: 10.8
302               MACOSX_STD_DEPLOYMENT_TARGET: 10.7
303               NO_LLVM_ASSERTIONS: 1
304               NO_DEBUG_ASSERTIONS: 1
305             os: macos-latest
306           - name: dist-aarch64-apple
307             env:
308               SCRIPT: "./x.py dist --stage 2"
309               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"
310               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
311               SELECT_XCODE: /Applications/Xcode_12.2.app
312               USE_XCODE_CLANG: 1
313               MACOSX_DEPLOYMENT_TARGET: 11.0
314               MACOSX_STD_DEPLOYMENT_TARGET: 11.0
315               NO_LLVM_ASSERTIONS: 1
316               NO_DEBUG_ASSERTIONS: 1
317               DIST_REQUIRE_ALL_TOOLS: 1
318               JEMALLOC_SYS_WITH_LG_PAGE: 14
319             os: macos-latest
320           - name: x86_64-msvc-1
321             env:
322               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
323               SCRIPT: make ci-subset-1
324               NO_DEBUG_ASSERTIONS: 1
325               NO_LLVM_ASSERTIONS: 1
326             os: windows-latest-xl
327           - name: x86_64-msvc-2
328             env:
329               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
330               SCRIPT: make ci-subset-2
331             os: windows-latest-xl
332           - name: i686-msvc-1
333             env:
334               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
335               SCRIPT: make ci-subset-1
336               NO_DEBUG_ASSERTIONS: 1
337               NO_LLVM_ASSERTIONS: 1
338             os: windows-latest-xl
339           - name: i686-msvc-2
340             env:
341               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
342               SCRIPT: make ci-subset-2
343               NO_DEBUG_ASSERTIONS: 1
344               NO_LLVM_ASSERTIONS: 1
345             os: windows-latest-xl
346           - name: x86_64-msvc-cargo
347             env:
348               SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo
349               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-lld"
350               VCVARS_BAT: vcvars64.bat
351               NO_DEBUG_ASSERTIONS: 1
352               NO_LLVM_ASSERTIONS: 1
353             os: windows-latest-xl
354           - name: x86_64-msvc-tools
355             env:
356               SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
357               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json"
358             os: windows-latest-xl
359           - name: i686-mingw-1
360             env:
361               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
362               SCRIPT: make ci-mingw-subset-1
363               CUSTOM_MINGW: 1
364               NO_DEBUG_ASSERTIONS: 1
365               NO_LLVM_ASSERTIONS: 1
366             os: windows-latest-xl
367           - name: i686-mingw-2
368             env:
369               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
370               SCRIPT: make ci-mingw-subset-2
371               CUSTOM_MINGW: 1
372             os: windows-latest-xl
373           - name: x86_64-mingw-1
374             env:
375               SCRIPT: make ci-mingw-subset-1
376               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
377               CUSTOM_MINGW: 1
378               NO_DEBUG_ASSERTIONS: 1
379               NO_LLVM_ASSERTIONS: 1
380             os: windows-latest-xl
381           - name: x86_64-mingw-2
382             env:
383               SCRIPT: make ci-mingw-subset-2
384               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
385               CUSTOM_MINGW: 1
386             os: windows-latest-xl
387           - name: dist-x86_64-msvc
388             env:
389               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"
390               SCRIPT: python x.py dist
391               DIST_REQUIRE_ALL_TOOLS: 1
392             os: windows-latest-xl
393           - name: dist-i686-msvc
394             env:
395               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"
396               SCRIPT: python x.py dist
397               DIST_REQUIRE_ALL_TOOLS: 1
398             os: windows-latest-xl
399           - name: dist-aarch64-msvc
400             env:
401               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
402               SCRIPT: python x.py dist
403               DIST_REQUIRE_ALL_TOOLS: 0
404             os: windows-latest-xl
405           - name: dist-i686-mingw
406             env:
407               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --enable-full-tools --enable-profiler"
408               SCRIPT: python x.py dist
409               CUSTOM_MINGW: 1
410               DIST_REQUIRE_ALL_TOOLS: 1
411             os: windows-latest-xl
412           - name: dist-x86_64-mingw
413             env:
414               SCRIPT: python x.py dist
415               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler"
416               CUSTOM_MINGW: 1
417               DIST_REQUIRE_ALL_TOOLS: 1
418             os: windows-latest-xl
419           - name: dist-x86_64-msvc-alt
420             env:
421               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-extended --enable-profiler"
422               SCRIPT: python x.py dist
423             os: windows-latest-xl
424     timeout-minutes: 600
425     runs-on: "${{ matrix.os }}"
426     steps:
427       - name: disable git crlf conversion
428         run: git config --global core.autocrlf false
429       - name: checkout the source code
430         uses: actions/checkout@v1
431         with:
432           fetch-depth: 2
433       - name: configure the PR in which the error message will be posted
434         run: "echo \"[CI_PR_NUMBER=$num]\""
435         env:
436           num: "${{ github.event.number }}"
437         if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
438       - name: add extra environment variables
439         run: src/ci/scripts/setup-environment.sh
440         env:
441           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
442         if: success() && !env.SKIP_JOB
443       - name: decide whether to skip this job
444         run: src/ci/scripts/should-skip-this.sh
445         if: success() && !env.SKIP_JOB
446       - name: configure GitHub Actions to kill the build when outdated
447         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
448         with:
449           github_token: "${{ secrets.github_token }}"
450         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
451       - name: collect CPU statistics
452         run: src/ci/scripts/collect-cpu-stats.sh
453         if: success() && !env.SKIP_JOB
454       - name: show the current environment
455         run: src/ci/scripts/dump-environment.sh
456         if: success() && !env.SKIP_JOB
457       - name: install awscli
458         run: src/ci/scripts/install-awscli.sh
459         if: success() && !env.SKIP_JOB
460       - name: install sccache
461         run: src/ci/scripts/install-sccache.sh
462         if: success() && !env.SKIP_JOB
463       - name: select Xcode
464         run: src/ci/scripts/select-xcode.sh
465         if: success() && !env.SKIP_JOB
466       - name: install clang
467         run: src/ci/scripts/install-clang.sh
468         if: success() && !env.SKIP_JOB
469       - name: install WIX
470         run: src/ci/scripts/install-wix.sh
471         if: success() && !env.SKIP_JOB
472       - name: ensure the build happens on a partition with enough space
473         run: src/ci/scripts/symlink-build-dir.sh
474         if: success() && !env.SKIP_JOB
475       - name: disable git crlf conversion
476         run: src/ci/scripts/disable-git-crlf-conversion.sh
477         if: success() && !env.SKIP_JOB
478       - name: install MSYS2
479         run: src/ci/scripts/install-msys2.sh
480         if: success() && !env.SKIP_JOB
481       - name: install MinGW
482         run: src/ci/scripts/install-mingw.sh
483         if: success() && !env.SKIP_JOB
484       - name: install ninja
485         run: src/ci/scripts/install-ninja.sh
486         if: success() && !env.SKIP_JOB
487       - name: enable ipv6 on Docker
488         run: src/ci/scripts/enable-docker-ipv6.sh
489         if: success() && !env.SKIP_JOB
490       - name: disable git crlf conversion
491         run: src/ci/scripts/disable-git-crlf-conversion.sh
492         if: success() && !env.SKIP_JOB
493       - name: checkout submodules
494         run: src/ci/scripts/checkout-submodules.sh
495         if: success() && !env.SKIP_JOB
496       - name: ensure line endings are correct
497         run: src/ci/scripts/verify-line-endings.sh
498         if: success() && !env.SKIP_JOB
499       - name: run the build
500         run: src/ci/scripts/run-build-from-ci.sh
501         env:
502           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
503           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
504           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
505         if: success() && !env.SKIP_JOB
506       - name: upload artifacts to S3
507         run: src/ci/scripts/upload-artifacts.sh
508         env:
509           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
510           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
511         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
512   auto-fallible:
513     name: auto-fallible
514     env:
515       CI_JOB_NAME: "${{ matrix.name }}"
516       SCCACHE_BUCKET: rust-lang-gha-caches
517       DEPLOY_BUCKET: rust-lang-gha
518       TOOLSTATE_REPO: "https://github.com/pietroalbini/rust-toolstate"
519       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/pietroalbini/rust-toolstate/issues"
520       TOOLSTATE_PUBLISH: 1
521       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5
522       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF
523       CACHE_DOMAIN: ci-caches-gha.rust-lang.org
524     if: "github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
525     strategy:
526       fail-fast: false
527       matrix:
528         include:
529           - name: aarch64-gnu
530             os:
531               - self-hosted
532               - ARM64
533               - linux
534     timeout-minutes: 600
535     runs-on: "${{ matrix.os }}"
536     steps:
537       - name: disable git crlf conversion
538         run: git config --global core.autocrlf false
539       - name: checkout the source code
540         uses: actions/checkout@v1
541         with:
542           fetch-depth: 2
543       - name: configure the PR in which the error message will be posted
544         run: "echo \"[CI_PR_NUMBER=$num]\""
545         env:
546           num: "${{ github.event.number }}"
547         if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
548       - name: add extra environment variables
549         run: src/ci/scripts/setup-environment.sh
550         env:
551           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
552         if: success() && !env.SKIP_JOB
553       - name: decide whether to skip this job
554         run: src/ci/scripts/should-skip-this.sh
555         if: success() && !env.SKIP_JOB
556       - name: configure GitHub Actions to kill the build when outdated
557         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
558         with:
559           github_token: "${{ secrets.github_token }}"
560         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
561       - name: collect CPU statistics
562         run: src/ci/scripts/collect-cpu-stats.sh
563         if: success() && !env.SKIP_JOB
564       - name: show the current environment
565         run: src/ci/scripts/dump-environment.sh
566         if: success() && !env.SKIP_JOB
567       - name: install awscli
568         run: src/ci/scripts/install-awscli.sh
569         if: success() && !env.SKIP_JOB
570       - name: install sccache
571         run: src/ci/scripts/install-sccache.sh
572         if: success() && !env.SKIP_JOB
573       - name: select Xcode
574         run: src/ci/scripts/select-xcode.sh
575         if: success() && !env.SKIP_JOB
576       - name: install clang
577         run: src/ci/scripts/install-clang.sh
578         if: success() && !env.SKIP_JOB
579       - name: install WIX
580         run: src/ci/scripts/install-wix.sh
581         if: success() && !env.SKIP_JOB
582       - name: ensure the build happens on a partition with enough space
583         run: src/ci/scripts/symlink-build-dir.sh
584         if: success() && !env.SKIP_JOB
585       - name: disable git crlf conversion
586         run: src/ci/scripts/disable-git-crlf-conversion.sh
587         if: success() && !env.SKIP_JOB
588       - name: install MSYS2
589         run: src/ci/scripts/install-msys2.sh
590         if: success() && !env.SKIP_JOB
591       - name: install MinGW
592         run: src/ci/scripts/install-mingw.sh
593         if: success() && !env.SKIP_JOB
594       - name: install ninja
595         run: src/ci/scripts/install-ninja.sh
596         if: success() && !env.SKIP_JOB
597       - name: enable ipv6 on Docker
598         run: src/ci/scripts/enable-docker-ipv6.sh
599         if: success() && !env.SKIP_JOB
600       - name: disable git crlf conversion
601         run: src/ci/scripts/disable-git-crlf-conversion.sh
602         if: success() && !env.SKIP_JOB
603       - name: checkout submodules
604         run: src/ci/scripts/checkout-submodules.sh
605         if: success() && !env.SKIP_JOB
606       - name: ensure line endings are correct
607         run: src/ci/scripts/verify-line-endings.sh
608         if: success() && !env.SKIP_JOB
609       - name: run the build
610         run: src/ci/scripts/run-build-from-ci.sh
611         env:
612           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
613           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
614           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
615         if: success() && !env.SKIP_JOB
616       - name: upload artifacts to S3
617         run: src/ci/scripts/upload-artifacts.sh
618         env:
619           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
620           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
621         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
622   try:
623     name: try
624     env:
625       CI_JOB_NAME: "${{ matrix.name }}"
626       SCCACHE_BUCKET: rust-lang-ci-sccache2
627       DEPLOY_BUCKET: rust-lang-ci2
628       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
629       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
630       TOOLSTATE_PUBLISH: 1
631       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
632       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
633       CACHE_DOMAIN: ci-caches.rust-lang.org
634     if: "github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
635     strategy:
636       matrix:
637         include:
638           - name: dist-x86_64-linux
639             os: ubuntu-latest-xl
640             env: {}
641     timeout-minutes: 600
642     runs-on: "${{ matrix.os }}"
643     steps:
644       - name: disable git crlf conversion
645         run: git config --global core.autocrlf false
646       - name: checkout the source code
647         uses: actions/checkout@v1
648         with:
649           fetch-depth: 2
650       - name: configure the PR in which the error message will be posted
651         run: "echo \"[CI_PR_NUMBER=$num]\""
652         env:
653           num: "${{ github.event.number }}"
654         if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
655       - name: add extra environment variables
656         run: src/ci/scripts/setup-environment.sh
657         env:
658           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
659         if: success() && !env.SKIP_JOB
660       - name: decide whether to skip this job
661         run: src/ci/scripts/should-skip-this.sh
662         if: success() && !env.SKIP_JOB
663       - name: configure GitHub Actions to kill the build when outdated
664         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
665         with:
666           github_token: "${{ secrets.github_token }}"
667         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
668       - name: collect CPU statistics
669         run: src/ci/scripts/collect-cpu-stats.sh
670         if: success() && !env.SKIP_JOB
671       - name: show the current environment
672         run: src/ci/scripts/dump-environment.sh
673         if: success() && !env.SKIP_JOB
674       - name: install awscli
675         run: src/ci/scripts/install-awscli.sh
676         if: success() && !env.SKIP_JOB
677       - name: install sccache
678         run: src/ci/scripts/install-sccache.sh
679         if: success() && !env.SKIP_JOB
680       - name: select Xcode
681         run: src/ci/scripts/select-xcode.sh
682         if: success() && !env.SKIP_JOB
683       - name: install clang
684         run: src/ci/scripts/install-clang.sh
685         if: success() && !env.SKIP_JOB
686       - name: install WIX
687         run: src/ci/scripts/install-wix.sh
688         if: success() && !env.SKIP_JOB
689       - name: ensure the build happens on a partition with enough space
690         run: src/ci/scripts/symlink-build-dir.sh
691         if: success() && !env.SKIP_JOB
692       - name: disable git crlf conversion
693         run: src/ci/scripts/disable-git-crlf-conversion.sh
694         if: success() && !env.SKIP_JOB
695       - name: install MSYS2
696         run: src/ci/scripts/install-msys2.sh
697         if: success() && !env.SKIP_JOB
698       - name: install MinGW
699         run: src/ci/scripts/install-mingw.sh
700         if: success() && !env.SKIP_JOB
701       - name: install ninja
702         run: src/ci/scripts/install-ninja.sh
703         if: success() && !env.SKIP_JOB
704       - name: enable ipv6 on Docker
705         run: src/ci/scripts/enable-docker-ipv6.sh
706         if: success() && !env.SKIP_JOB
707       - name: disable git crlf conversion
708         run: src/ci/scripts/disable-git-crlf-conversion.sh
709         if: success() && !env.SKIP_JOB
710       - name: checkout submodules
711         run: src/ci/scripts/checkout-submodules.sh
712         if: success() && !env.SKIP_JOB
713       - name: ensure line endings are correct
714         run: src/ci/scripts/verify-line-endings.sh
715         if: success() && !env.SKIP_JOB
716       - name: run the build
717         run: src/ci/scripts/run-build-from-ci.sh
718         env:
719           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
720           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
721           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
722         if: success() && !env.SKIP_JOB
723       - name: upload artifacts to S3
724         run: src/ci/scripts/upload-artifacts.sh
725         env:
726           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
727           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
728         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
729   master:
730     name: master
731     runs-on: ubuntu-latest
732     env:
733       SCCACHE_BUCKET: rust-lang-ci-sccache2
734       DEPLOY_BUCKET: rust-lang-ci2
735       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
736       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
737       TOOLSTATE_PUBLISH: 1
738       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
739       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
740       CACHE_DOMAIN: ci-caches.rust-lang.org
741     if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
742     steps:
743       - name: checkout the source code
744         uses: actions/checkout@v1
745         with:
746           fetch-depth: 2
747       - name: publish toolstate
748         run: src/ci/publish_toolstate.sh
749         shell: bash
750         env:
751           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
752         if: success() && !env.SKIP_JOB
753   try-success:
754     needs:
755       - try
756     if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
757     steps:
758       - name: mark the job as a success
759         run: exit 0
760         shell: bash
761     name: bors build finished
762     runs-on: ubuntu-latest
763   try-failure:
764     needs:
765       - try
766     if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
767     steps:
768       - name: mark the job as a failure
769         run: exit 1
770         shell: bash
771     name: bors build finished
772     runs-on: ubuntu-latest
773   auto-success:
774     needs:
775       - auto
776     if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
777     steps:
778       - name: mark the job as a success
779         run: exit 0
780         shell: bash
781     name: bors build finished
782     runs-on: ubuntu-latest
783   auto-failure:
784     needs:
785       - auto
786     if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
787     steps:
788       - name: mark the job as a failure
789         run: exit 1
790         shell: bash
791     name: bors build finished
792     runs-on: ubuntu-latest