]> git.lizzy.rs Git - rust.git/blob - .github/workflows/ci.yml
Rollup merge of #74872 - JohnTitor:ping-risc-v, r=Mark-Simulacrum
[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-full-bootstrap
368             os: ubuntu-latest-xl
369             env: {}
370           - name: x86_64-gnu-llvm-8
371             env:
372               RUST_BACKTRACE: 1
373             os: ubuntu-latest-xl
374           - name: x86_64-gnu-nopt
375             os: ubuntu-latest-xl
376             env: {}
377           - name: x86_64-gnu-tools
378             env:
379               DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
380             os: ubuntu-latest-xl
381           - name: x86_64-msvc-1
382             env:
383               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
384               SCRIPT: make ci-subset-1
385               NO_DEBUG_ASSERTIONS: 1
386               NO_LLVM_ASSERTIONS: 1
387             os: windows-latest-xl
388           - name: x86_64-msvc-2
389             env:
390               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
391               SCRIPT: make ci-subset-2
392             os: windows-latest-xl
393           - name: i686-msvc-1
394             env:
395               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
396               SCRIPT: make ci-subset-1
397               NO_DEBUG_ASSERTIONS: 1
398               NO_LLVM_ASSERTIONS: 1
399             os: windows-latest-xl
400           - name: i686-msvc-2
401             env:
402               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
403               SCRIPT: make ci-subset-2
404               NO_DEBUG_ASSERTIONS: 1
405               NO_LLVM_ASSERTIONS: 1
406             os: windows-latest-xl
407           - name: x86_64-msvc-cargo
408             env:
409               SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo
410               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-lld"
411               VCVARS_BAT: vcvars64.bat
412               NO_DEBUG_ASSERTIONS: 1
413               NO_LLVM_ASSERTIONS: 1
414             os: windows-latest-xl
415           - name: x86_64-msvc-tools
416             env:
417               SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
418               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json"
419             os: windows-latest-xl
420           - name: i686-mingw-1
421             env:
422               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
423               SCRIPT: make ci-mingw-subset-1
424               CUSTOM_MINGW: 1
425               NO_DEBUG_ASSERTIONS: 1
426               NO_LLVM_ASSERTIONS: 1
427             os: windows-latest-xl
428           - name: i686-mingw-2
429             env:
430               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
431               SCRIPT: make ci-mingw-subset-2
432               CUSTOM_MINGW: 1
433             os: windows-latest-xl
434           - name: x86_64-mingw-1
435             env:
436               SCRIPT: make ci-mingw-subset-1
437               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu"
438               CUSTOM_MINGW: 1
439               NO_DEBUG_ASSERTIONS: 1
440               NO_LLVM_ASSERTIONS: 1
441             os: windows-latest-xl
442           - name: x86_64-mingw-2
443             env:
444               SCRIPT: make ci-mingw-subset-2
445               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu"
446               CUSTOM_MINGW: 1
447             os: windows-latest-xl
448           - name: dist-x86_64-msvc
449             env:
450               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc,aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
451               SCRIPT: python x.py dist
452               DIST_REQUIRE_ALL_TOOLS: 1
453             os: windows-latest-xl
454           - name: dist-i686-msvc
455             env:
456               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc --target=i586-pc-windows-msvc --enable-full-tools --enable-profiler"
457               SCRIPT: python x.py dist
458               DIST_REQUIRE_ALL_TOOLS: 1
459             os: windows-latest-xl
460           - name: dist-i686-mingw
461             env:
462               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --enable-full-tools --enable-profiler"
463               SCRIPT: python x.py dist
464               CUSTOM_MINGW: 1
465               DIST_REQUIRE_ALL_TOOLS: 1
466             os: windows-latest-xl
467           - name: dist-x86_64-mingw
468             env:
469               SCRIPT: python x.py dist
470               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler"
471               CUSTOM_MINGW: 1
472               DIST_REQUIRE_ALL_TOOLS: 1
473             os: windows-latest-xl
474           - name: dist-x86_64-msvc-alt
475             env:
476               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-extended --enable-profiler"
477               SCRIPT: python x.py dist
478             os: windows-latest-xl
479     timeout-minutes: 600
480     runs-on: "${{ matrix.os }}"
481     steps:
482       - name: disable git crlf conversion
483         run: git config --global core.autocrlf false
484       - name: checkout the source code
485         uses: actions/checkout@v1
486         with:
487           fetch-depth: 2
488       - name: configure GitHub Actions to kill the build when outdated
489         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
490         with:
491           github_token: "${{ secrets.github_token }}"
492         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
493       - name: configure the PR in which the error message will be posted
494         run: "echo \"[CI_PR_NUMBER=$num]\""
495         env:
496           num: "${{ github.event.number }}"
497         if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
498       - name: add extra environment variables
499         run: src/ci/scripts/setup-environment.sh
500         env:
501           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
502         if: success() && !env.SKIP_JOB
503       - name: decide whether to skip this job
504         run: src/ci/scripts/should-skip-this.sh
505         if: success() && !env.SKIP_JOB
506       - name: collect CPU statistics
507         run: src/ci/scripts/collect-cpu-stats.sh
508         if: success() && !env.SKIP_JOB
509       - name: show the current environment
510         run: src/ci/scripts/dump-environment.sh
511         if: success() && !env.SKIP_JOB
512       - name: install awscli
513         run: src/ci/scripts/install-awscli.sh
514         if: success() && !env.SKIP_JOB
515       - name: install sccache
516         run: src/ci/scripts/install-sccache.sh
517         if: success() && !env.SKIP_JOB
518       - name: install clang
519         run: src/ci/scripts/install-clang.sh
520         if: success() && !env.SKIP_JOB
521       - name: install WIX
522         run: src/ci/scripts/install-wix.sh
523         if: success() && !env.SKIP_JOB
524       - name: ensure the build happens on a partition with enough space
525         run: src/ci/scripts/symlink-build-dir.sh
526         if: success() && !env.SKIP_JOB
527       - name: disable git crlf conversion
528         run: src/ci/scripts/disable-git-crlf-conversion.sh
529         if: success() && !env.SKIP_JOB
530       - name: install MSYS2
531         run: src/ci/scripts/install-msys2.sh
532         if: success() && !env.SKIP_JOB
533       - name: install MinGW
534         run: src/ci/scripts/install-mingw.sh
535         if: success() && !env.SKIP_JOB
536       - name: install ninja
537         run: src/ci/scripts/install-ninja.sh
538         if: success() && !env.SKIP_JOB
539       - name: enable ipv6 on Docker
540         run: src/ci/scripts/enable-docker-ipv6.sh
541         if: success() && !env.SKIP_JOB
542       - name: disable git crlf conversion
543         run: src/ci/scripts/disable-git-crlf-conversion.sh
544         if: success() && !env.SKIP_JOB
545       - name: checkout submodules
546         run: src/ci/scripts/checkout-submodules.sh
547         if: success() && !env.SKIP_JOB
548       - name: ensure line endings are correct
549         run: src/ci/scripts/verify-line-endings.sh
550         if: success() && !env.SKIP_JOB
551       - name: run the build
552         run: src/ci/scripts/run-build-from-ci.sh
553         env:
554           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
555           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
556           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
557         if: success() && !env.SKIP_JOB
558       - name: upload artifacts to S3
559         run: src/ci/scripts/upload-artifacts.sh
560         env:
561           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
562           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
563         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
564   auto-fallible:
565     name: auto-fallible
566     env:
567       CI_JOB_NAME: "${{ matrix.name }}"
568       SCCACHE_BUCKET: rust-lang-gha-caches
569       DEPLOY_BUCKET: rust-lang-gha
570       TOOLSTATE_REPO: "https://github.com/pietroalbini/rust-toolstate"
571       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/pietroalbini/rust-toolstate/issues"
572       TOOLSTATE_PUBLISH: 1
573       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5
574       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF
575       CACHE_DOMAIN: ci-caches-gha.rust-lang.org
576     if: "github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
577     strategy:
578       matrix:
579         include:
580           - name: dist-x86_64-apple
581             env:
582               SCRIPT: "./x.py dist"
583               RUST_CONFIGURE_ARGS: "--target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc"
584               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
585               MACOSX_DEPLOYMENT_TARGET: 10.7
586               NO_LLVM_ASSERTIONS: 1
587               NO_DEBUG_ASSERTIONS: 1
588               DIST_REQUIRE_ALL_TOOLS: 1
589             os: macos-latest
590           - name: dist-x86_64-apple-alt
591             env:
592               SCRIPT: "./x.py dist"
593               RUST_CONFIGURE_ARGS: "--enable-extended --enable-profiler --set rust.jemalloc"
594               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
595               MACOSX_DEPLOYMENT_TARGET: 10.7
596               NO_LLVM_ASSERTIONS: 1
597               NO_DEBUG_ASSERTIONS: 1
598             os: macos-latest
599           - name: x86_64-apple
600             env:
601               SCRIPT: "./x.py --stage 2 test"
602               RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
603               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
604               MACOSX_DEPLOYMENT_TARGET: 10.8
605               MACOSX_STD_DEPLOYMENT_TARGET: 10.7
606               NO_LLVM_ASSERTIONS: 1
607               NO_DEBUG_ASSERTIONS: 1
608             os: macos-latest
609     timeout-minutes: 600
610     runs-on: "${{ matrix.os }}"
611     steps:
612       - name: disable git crlf conversion
613         run: git config --global core.autocrlf false
614       - name: checkout the source code
615         uses: actions/checkout@v1
616         with:
617           fetch-depth: 2
618       - name: configure GitHub Actions to kill the build when outdated
619         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
620         with:
621           github_token: "${{ secrets.github_token }}"
622         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
623       - name: configure the PR in which the error message will be posted
624         run: "echo \"[CI_PR_NUMBER=$num]\""
625         env:
626           num: "${{ github.event.number }}"
627         if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
628       - name: add extra environment variables
629         run: src/ci/scripts/setup-environment.sh
630         env:
631           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
632         if: success() && !env.SKIP_JOB
633       - name: decide whether to skip this job
634         run: src/ci/scripts/should-skip-this.sh
635         if: success() && !env.SKIP_JOB
636       - name: collect CPU statistics
637         run: src/ci/scripts/collect-cpu-stats.sh
638         if: success() && !env.SKIP_JOB
639       - name: show the current environment
640         run: src/ci/scripts/dump-environment.sh
641         if: success() && !env.SKIP_JOB
642       - name: install awscli
643         run: src/ci/scripts/install-awscli.sh
644         if: success() && !env.SKIP_JOB
645       - name: install sccache
646         run: src/ci/scripts/install-sccache.sh
647         if: success() && !env.SKIP_JOB
648       - name: install clang
649         run: src/ci/scripts/install-clang.sh
650         if: success() && !env.SKIP_JOB
651       - name: install WIX
652         run: src/ci/scripts/install-wix.sh
653         if: success() && !env.SKIP_JOB
654       - name: ensure the build happens on a partition with enough space
655         run: src/ci/scripts/symlink-build-dir.sh
656         if: success() && !env.SKIP_JOB
657       - name: disable git crlf conversion
658         run: src/ci/scripts/disable-git-crlf-conversion.sh
659         if: success() && !env.SKIP_JOB
660       - name: install MSYS2
661         run: src/ci/scripts/install-msys2.sh
662         if: success() && !env.SKIP_JOB
663       - name: install MinGW
664         run: src/ci/scripts/install-mingw.sh
665         if: success() && !env.SKIP_JOB
666       - name: install ninja
667         run: src/ci/scripts/install-ninja.sh
668         if: success() && !env.SKIP_JOB
669       - name: enable ipv6 on Docker
670         run: src/ci/scripts/enable-docker-ipv6.sh
671         if: success() && !env.SKIP_JOB
672       - name: disable git crlf conversion
673         run: src/ci/scripts/disable-git-crlf-conversion.sh
674         if: success() && !env.SKIP_JOB
675       - name: checkout submodules
676         run: src/ci/scripts/checkout-submodules.sh
677         if: success() && !env.SKIP_JOB
678       - name: ensure line endings are correct
679         run: src/ci/scripts/verify-line-endings.sh
680         if: success() && !env.SKIP_JOB
681       - name: run the build
682         run: src/ci/scripts/run-build-from-ci.sh
683         env:
684           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
685           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
686           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
687         if: success() && !env.SKIP_JOB
688       - name: upload artifacts to S3
689         run: src/ci/scripts/upload-artifacts.sh
690         env:
691           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
692           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
693         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
694   master:
695     name: master
696     runs-on: ubuntu-latest
697     env:
698       SCCACHE_BUCKET: rust-lang-ci-sccache2
699       DEPLOY_BUCKET: rust-lang-ci2
700       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
701       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
702       TOOLSTATE_PUBLISH: 1
703       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
704       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
705       CACHE_DOMAIN: ci-caches.rust-lang.org
706     if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
707     steps:
708       - name: checkout the source code
709         uses: actions/checkout@v1
710         with:
711           fetch-depth: 2
712       - name: publish toolstate
713         run: src/ci/publish_toolstate.sh
714         shell: bash
715         env:
716           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
717         if: success() && !env.SKIP_JOB
718   try-success:
719     needs:
720       - try
721     if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
722     steps:
723       - name: mark the job as a success
724         run: exit 0
725         shell: bash
726     name: bors build finished
727     runs-on: ubuntu-latest
728   try-failure:
729     needs:
730       - try
731     if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
732     steps:
733       - name: mark the job as a failure
734         run: exit 1
735         shell: bash
736     name: bors build finished
737     runs-on: ubuntu-latest
738   auto-success:
739     needs:
740       - auto
741     if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
742     steps:
743       - name: mark the job as a success
744         run: exit 0
745         shell: bash
746     name: bors build finished
747     runs-on: ubuntu-latest
748   auto-failure:
749     needs:
750       - auto
751     if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
752     steps:
753       - name: mark the job as a failure
754         run: exit 1
755         shell: bash
756     name: bors build finished
757     runs-on: ubuntu-latest