fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
5.1 KiB139 linesraw
1# FIXME(linux): need to configure core dumps, enable them, and then dump
2# backtraces on failure from all core dumps:
3#
4# - bash: sudo apt install gdb
5# - bash: sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern'
6#
7# Check travis config for `gdb --batch` command to print all crash logs
8
9steps:
10
11# Configure our CI_JOB_NAME variable which log analyzers can use for the main
12# step to see what's going on.
13- bash: |
14    builder=$(echo $AGENT_JOBNAME | cut -d ' ' -f 2)
15    echo "##vso[task.setvariable variable=CI_JOB_NAME]$builder"
16  displayName: Configure Job Name
17
18# Disable automatic line ending conversion, which is enabled by default on
19# Azure's Windows image. Having the conversion enabled caused regressions both
20# in our test suite (it broke miri tests) and in the ecosystem, since we
21# started shipping install scripts with CRLF endings instead of the old LF.
22#
23# Note that we do this a couple times during the build as the PATH and current
24# user/directory change, e.g. when mingw is enabled.
25- bash: git config --global core.autocrlf false
26  displayName: "Disable git automatic line ending conversion"
27
28- checkout: self
29  fetchDepth: 2
30
31- bash: src/ci/scripts/setup-environment.sh
32  displayName: Setup environment
33
34- bash: src/ci/scripts/clean-disk.sh
35  displayName: Clean disk
36
37- bash: src/ci/scripts/should-skip-this.sh
38  displayName: Decide whether to run this job
39
40- bash: src/ci/scripts/collect-cpu-stats.sh
41  displayName: Collect CPU-usage statistics in the background
42
43- bash: src/ci/scripts/dump-environment.sh
44  displayName: Show the current environment
45
46- bash: src/ci/scripts/install-sccache.sh
47  displayName: Install sccache
48  condition: and(succeeded(), not(variables.SKIP_JOB))
49
50- bash: src/ci/scripts/install-clang.sh
51  displayName: Install clang
52  condition: and(succeeded(), not(variables.SKIP_JOB))
53
54- bash: src/ci/scripts/install-wix.sh
55  displayName: Install wix
56  condition: and(succeeded(), not(variables.SKIP_JOB))
57
58- bash: src/ci/scripts/install-innosetup.sh
59  displayName: Install InnoSetup
60  condition: and(succeeded(), not(variables.SKIP_JOB))
61
62- bash: src/ci/scripts/windows-symlink-build-dir.sh
63  displayName: Ensure the build happens on C:\ instead of D:\
64  condition: and(succeeded(), not(variables.SKIP_JOB))
65
66- bash: src/ci/scripts/disable-git-crlf-conversion.sh
67  displayName: "Disable git automatic line ending conversion (on C:/)"
68  condition: and(succeeded(), not(variables.SKIP_JOB))
69
70- bash: src/ci/scripts/install-msys2.sh
71  displayName: Install msys2
72  condition: and(succeeded(), not(variables.SKIP_JOB))
73
74- bash: src/ci/scripts/install-msys2-packages.sh
75  displayName: Install msys2 packages
76  condition: and(succeeded(), not(variables.SKIP_JOB))
77
78- bash: src/ci/scripts/install-mingw.sh
79  displayName: Install MinGW
80  condition: and(succeeded(), not(variables.SKIP_JOB))
81
82- bash: src/ci/scripts/install-ninja.sh
83  displayName: Install ninja
84  condition: and(succeeded(), not(variables.SKIP_JOB))
85
86- bash: src/ci/scripts/enable-docker-ipv6.sh
87  displayName: Enable IPv6 on Docker
88  condition: and(succeeded(), not(variables.SKIP_JOB))
89
90# Disable automatic line ending conversion (again). On Windows, when we're
91# installing dependencies, something switches the git configuration directory or
92# re-enables autocrlf. We've not tracked down the exact cause -- and there may
93# be multiple -- but this should ensure submodules are checked out with the
94# appropriate line endings.
95- bash: src/ci/scripts/disable-git-crlf-conversion.sh
96  displayName: Disable git automatic line ending conversion
97  condition: and(succeeded(), not(variables.SKIP_JOB))
98
99- bash: src/ci/scripts/checkout-submodules.sh
100  displayName: Checkout submodules
101  condition: and(succeeded(), not(variables.SKIP_JOB))
102
103- bash: src/ci/scripts/verify-line-endings.sh
104  displayName: Verify line endings
105  condition: and(succeeded(), not(variables.SKIP_JOB))
106
107# Ensure the `aws` CLI is installed so we can deploy later on, cache docker
108# images, etc.
109- bash: src/ci/scripts/install-awscli.sh
110  condition: and(succeeded(), not(variables.SKIP_JOB))
111  displayName: Install awscli
112
113- bash: src/ci/scripts/run-build-from-ci.sh
114  timeoutInMinutes: 600
115  env:
116    AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
117    AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
118    TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
119  condition: and(succeeded(), not(variables.SKIP_JOB))
120  displayName: Run build
121
122- bash: src/ci/scripts/upload-artifacts.sh
123  env:
124    AWS_ACCESS_KEY_ID: $(UPLOAD_AWS_ACCESS_KEY_ID)
125    AWS_SECRET_ACCESS_KEY: $(UPLOAD_AWS_SECRET_ACCESS_KEY)
126  displayName: Upload artifacts
127  # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
128  # builders *should* have the AWS credentials available. Still, explicitly
129  # adding the condition is helpful as this way CI will not silently skip
130  # deploying artifacts from a dist builder if the variables are misconfigured,
131  # erroring about invalid credentials instead.
132  condition: |
133    and(
134      succeeded(), not(variables.SKIP_JOB),
135      or(
136        variables.UPLOAD_AWS_SECRET_ACCESS_KEY,
137        eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')
138      )
139    )