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