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