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