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