]> git.lizzy.rs Git - rust.git/blob - .github/workflows/ci.yml
Rollup merge of #80874 - jyn514:intra-doc-docs, r=Manishearth
[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_JOB && 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               DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
353             os: windows-latest-xl
354           - name: i686-mingw-1
355             env:
356               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
357               SCRIPT: make ci-mingw-subset-1
358               CUSTOM_MINGW: 1
359             os: windows-latest-xl
360           - name: i686-mingw-2
361             env:
362               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
363               SCRIPT: make ci-mingw-subset-2
364               CUSTOM_MINGW: 1
365             os: windows-latest-xl
366           - name: x86_64-mingw-1
367             env:
368               SCRIPT: make ci-mingw-subset-1
369               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
370               CUSTOM_MINGW: 1
371             os: windows-latest-xl
372           - name: x86_64-mingw-2
373             env:
374               SCRIPT: make ci-mingw-subset-2
375               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
376               CUSTOM_MINGW: 1
377             os: windows-latest-xl
378           - name: dist-x86_64-msvc
379             env:
380               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"
381               SCRIPT: python x.py dist
382               DIST_REQUIRE_ALL_TOOLS: 1
383             os: windows-latest-xl
384           - name: dist-i686-msvc
385             env:
386               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"
387               SCRIPT: python x.py dist
388               DIST_REQUIRE_ALL_TOOLS: 1
389             os: windows-latest-xl
390           - name: dist-aarch64-msvc
391             env:
392               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
393               SCRIPT: python x.py dist
394               DIST_REQUIRE_ALL_TOOLS: 0
395             os: windows-latest-xl
396           - name: dist-i686-mingw
397             env:
398               RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --enable-full-tools --enable-profiler"
399               SCRIPT: python x.py dist
400               CUSTOM_MINGW: 1
401               DIST_REQUIRE_ALL_TOOLS: 1
402             os: windows-latest-xl
403           - name: dist-x86_64-mingw
404             env:
405               SCRIPT: python x.py dist
406               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler"
407               CUSTOM_MINGW: 1
408               DIST_REQUIRE_ALL_TOOLS: 1
409             os: windows-latest-xl
410           - name: dist-x86_64-msvc-alt
411             env:
412               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-extended --enable-profiler"
413               SCRIPT: python x.py dist
414             os: windows-latest-xl
415     timeout-minutes: 600
416     runs-on: "${{ matrix.os }}"
417     steps:
418       - name: disable git crlf conversion
419         run: git config --global core.autocrlf false
420       - name: checkout the source code
421         uses: actions/checkout@v2
422         with:
423           fetch-depth: 2
424       - name: configure the PR in which the error message will be posted
425         run: "echo \"[CI_PR_NUMBER=$num]\""
426         env:
427           num: "${{ github.event.number }}"
428         if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
429       - name: add extra environment variables
430         run: src/ci/scripts/setup-environment.sh
431         env:
432           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
433         if: success() && !env.SKIP_JOB
434       - name: decide whether to skip this job
435         run: src/ci/scripts/should-skip-this.sh
436         if: success() && !env.SKIP_JOB
437       - name: configure GitHub Actions to kill the build when outdated
438         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
439         with:
440           github_token: "${{ secrets.github_token }}"
441         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
442       - name: collect CPU statistics
443         run: src/ci/scripts/collect-cpu-stats.sh
444         if: success() && !env.SKIP_JOB
445       - name: show the current environment
446         run: src/ci/scripts/dump-environment.sh
447         if: success() && !env.SKIP_JOB
448       - name: install awscli
449         run: src/ci/scripts/install-awscli.sh
450         if: success() && !env.SKIP_JOB
451       - name: install sccache
452         run: src/ci/scripts/install-sccache.sh
453         if: success() && !env.SKIP_JOB
454       - name: select Xcode
455         run: src/ci/scripts/select-xcode.sh
456         if: success() && !env.SKIP_JOB
457       - name: install clang
458         run: src/ci/scripts/install-clang.sh
459         if: success() && !env.SKIP_JOB
460       - name: install WIX
461         run: src/ci/scripts/install-wix.sh
462         if: success() && !env.SKIP_JOB
463       - name: ensure the build happens on a partition with enough space
464         run: src/ci/scripts/symlink-build-dir.sh
465         if: success() && !env.SKIP_JOB
466       - name: disable git crlf conversion
467         run: src/ci/scripts/disable-git-crlf-conversion.sh
468         if: success() && !env.SKIP_JOB
469       - name: install MSYS2
470         run: src/ci/scripts/install-msys2.sh
471         if: success() && !env.SKIP_JOB
472       - name: install MinGW
473         run: src/ci/scripts/install-mingw.sh
474         if: success() && !env.SKIP_JOB
475       - name: install ninja
476         run: src/ci/scripts/install-ninja.sh
477         if: success() && !env.SKIP_JOB
478       - name: enable ipv6 on Docker
479         run: src/ci/scripts/enable-docker-ipv6.sh
480         if: success() && !env.SKIP_JOB
481       - name: disable git crlf conversion
482         run: src/ci/scripts/disable-git-crlf-conversion.sh
483         if: success() && !env.SKIP_JOB
484       - name: checkout submodules
485         run: src/ci/scripts/checkout-submodules.sh
486         if: success() && !env.SKIP_JOB
487       - name: ensure line endings are correct
488         run: src/ci/scripts/verify-line-endings.sh
489         if: success() && !env.SKIP_JOB
490       - name: run the build
491         run: src/ci/scripts/run-build-from-ci.sh
492         env:
493           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
494           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
495           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
496         if: success() && !env.SKIP_JOB
497       - name: upload artifacts to S3
498         run: src/ci/scripts/upload-artifacts.sh
499         env:
500           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
501           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
502         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
503   try:
504     name: try
505     env:
506       CI_JOB_NAME: "${{ matrix.name }}"
507       SCCACHE_BUCKET: rust-lang-ci-sccache2
508       DEPLOY_BUCKET: rust-lang-ci2
509       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
510       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
511       TOOLSTATE_PUBLISH: 1
512       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
513       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
514       CACHE_DOMAIN: ci-caches.rust-lang.org
515     if: "github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
516     strategy:
517       matrix:
518         include:
519           - name: dist-x86_64-linux
520             os: ubuntu-latest-xl
521             env: {}
522     timeout-minutes: 600
523     runs-on: "${{ matrix.os }}"
524     steps:
525       - name: disable git crlf conversion
526         run: git config --global core.autocrlf false
527       - name: checkout the source code
528         uses: actions/checkout@v2
529         with:
530           fetch-depth: 2
531       - name: configure the PR in which the error message will be posted
532         run: "echo \"[CI_PR_NUMBER=$num]\""
533         env:
534           num: "${{ github.event.number }}"
535         if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
536       - name: add extra environment variables
537         run: src/ci/scripts/setup-environment.sh
538         env:
539           EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
540         if: success() && !env.SKIP_JOB
541       - name: decide whether to skip this job
542         run: src/ci/scripts/should-skip-this.sh
543         if: success() && !env.SKIP_JOB
544       - name: configure GitHub Actions to kill the build when outdated
545         uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
546         with:
547           github_token: "${{ secrets.github_token }}"
548         if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
549       - name: collect CPU statistics
550         run: src/ci/scripts/collect-cpu-stats.sh
551         if: success() && !env.SKIP_JOB
552       - name: show the current environment
553         run: src/ci/scripts/dump-environment.sh
554         if: success() && !env.SKIP_JOB
555       - name: install awscli
556         run: src/ci/scripts/install-awscli.sh
557         if: success() && !env.SKIP_JOB
558       - name: install sccache
559         run: src/ci/scripts/install-sccache.sh
560         if: success() && !env.SKIP_JOB
561       - name: select Xcode
562         run: src/ci/scripts/select-xcode.sh
563         if: success() && !env.SKIP_JOB
564       - name: install clang
565         run: src/ci/scripts/install-clang.sh
566         if: success() && !env.SKIP_JOB
567       - name: install WIX
568         run: src/ci/scripts/install-wix.sh
569         if: success() && !env.SKIP_JOB
570       - name: ensure the build happens on a partition with enough space
571         run: src/ci/scripts/symlink-build-dir.sh
572         if: success() && !env.SKIP_JOB
573       - name: disable git crlf conversion
574         run: src/ci/scripts/disable-git-crlf-conversion.sh
575         if: success() && !env.SKIP_JOB
576       - name: install MSYS2
577         run: src/ci/scripts/install-msys2.sh
578         if: success() && !env.SKIP_JOB
579       - name: install MinGW
580         run: src/ci/scripts/install-mingw.sh
581         if: success() && !env.SKIP_JOB
582       - name: install ninja
583         run: src/ci/scripts/install-ninja.sh
584         if: success() && !env.SKIP_JOB
585       - name: enable ipv6 on Docker
586         run: src/ci/scripts/enable-docker-ipv6.sh
587         if: success() && !env.SKIP_JOB
588       - name: disable git crlf conversion
589         run: src/ci/scripts/disable-git-crlf-conversion.sh
590         if: success() && !env.SKIP_JOB
591       - name: checkout submodules
592         run: src/ci/scripts/checkout-submodules.sh
593         if: success() && !env.SKIP_JOB
594       - name: ensure line endings are correct
595         run: src/ci/scripts/verify-line-endings.sh
596         if: success() && !env.SKIP_JOB
597       - name: run the build
598         run: src/ci/scripts/run-build-from-ci.sh
599         env:
600           AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
601           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
602           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
603         if: success() && !env.SKIP_JOB
604       - name: upload artifacts to S3
605         run: src/ci/scripts/upload-artifacts.sh
606         env:
607           AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
608           AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
609         if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
610   master:
611     name: master
612     runs-on: ubuntu-latest
613     env:
614       SCCACHE_BUCKET: rust-lang-ci-sccache2
615       DEPLOY_BUCKET: rust-lang-ci2
616       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
617       TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
618       TOOLSTATE_PUBLISH: 1
619       CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
620       ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
621       CACHE_DOMAIN: ci-caches.rust-lang.org
622     if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
623     steps:
624       - name: checkout the source code
625         uses: actions/checkout@v1
626         with:
627           fetch-depth: 2
628       - name: publish toolstate
629         run: src/ci/publish_toolstate.sh
630         shell: bash
631         env:
632           TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
633         if: success() && !env.SKIP_JOB
634   try-success:
635     needs:
636       - try
637     if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
638     steps:
639       - name: mark the job as a success
640         run: exit 0
641         shell: bash
642     name: bors build finished
643     runs-on: ubuntu-latest
644   try-failure:
645     needs:
646       - try
647     if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
648     steps:
649       - name: mark the job as a failure
650         run: exit 1
651         shell: bash
652     name: bors build finished
653     runs-on: ubuntu-latest
654   auto-success:
655     needs:
656       - auto
657     if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
658     steps:
659       - name: mark the job as a success
660         run: exit 0
661         shell: bash
662     name: bors build finished
663     runs-on: ubuntu-latest
664   auto-failure:
665     needs:
666       - auto
667     if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
668     steps:
669       - name: mark the job as a failure
670         run: exit 1
671         shell: bash
672     name: bors build finished
673     runs-on: ubuntu-latest