fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
7.1 KiB203 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# Disable automatic line ending conversion, which is enabled by default on
12# Azure's Windows image. Having the conversion enabled caused regressions both
13# in our test suite (it broke miri tests) and in the ecosystem, since we
14# started shipping install scripts with CRLF endings instead of the old LF.
15#
16# Note that we do this a couple times during the build as the PATH and current
17# user/directory change, e.g. when mingw is enabled.
18- bash: git config --global core.autocrlf false
19  displayName: "Disable git automatic line ending conversion"
20
21- checkout: self
22  fetchDepth: 2
23
24- bash: src/ci/scripts/should-skip-this.sh
25  displayName: Decide whether to run this job
26
27# Spawn a background process to collect CPU usage statistics which we'll upload
28# at the end of the build. See the comments in the script here for more
29# information.
30- bash: python src/ci/cpu-usage-over-time.py &> cpu-usage.csv &
31  displayName: "Collect CPU-usage statistics in the background"
32
33- bash: src/ci/scripts/dump-environment.sh
34  displayName: Show the current environment
35
36- bash: src/ci/scripts/install-sccache.sh
37  env:
38    AGENT_OS: $(Agent.OS)
39  displayName: Install sccache
40  condition: and(succeeded(), not(variables.SKIP_JOB))
41
42- bash: src/ci/scripts/install-clang.sh
43  env:
44    AGENT_OS: $(Agent.OS)
45  displayName: Install clang
46  condition: and(succeeded(), not(variables.SKIP_JOB))
47
48- bash: src/ci/scripts/switch-xcode.sh
49  env:
50    AGENT_OS: $(Agent.OS)
51  displayName: Switch to Xcode 9.3
52  condition: and(succeeded(), not(variables.SKIP_JOB))
53
54- bash: src/ci/scripts/install-wix.sh
55  env:
56    AGENT_OS: $(Agent.OS)
57  displayName: Install wix
58  condition: and(succeeded(), not(variables.SKIP_JOB))
59
60- bash: src/ci/scripts/install-innosetup.sh
61  env:
62    AGENT_OS: $(Agent.OS)
63  displayName: Install InnoSetup
64  condition: and(succeeded(), not(variables.SKIP_JOB))
65
66- bash: src/ci/scripts/windows-symlink-build-dir.sh
67  env:
68    AGENT_OS: $(Agent.OS)
69  displayName: Ensure the build happens on C:\ instead of D:\
70  condition: and(succeeded(), not(variables.SKIP_JOB))
71
72- bash: src/ci/scripts/disable-git-crlf-conversion.sh
73  displayName: "Disable git automatic line ending conversion (on C:/)"
74  condition: and(succeeded(), not(variables.SKIP_JOB))
75
76- bash: src/ci/scripts/install-msys2.sh
77  env:
78    AGENT_OS: $(Agent.OS)
79    SYSTEM_WORKFOLDER: $(System.Workfolder)
80  displayName: Install msys2
81  condition: and(succeeded(), not(variables.SKIP_JOB))
82
83- bash: src/ci/scripts/install-msys2-packages.sh
84  env:
85    AGENT_OS: $(Agent.OS)
86    SYSTEM_WORKFOLDER: $(System.Workfolder)
87  displayName: Install msys2 packages
88  condition: and(succeeded(), not(variables.SKIP_JOB))
89
90- bash: src/ci/scripts/install-mingw.sh
91  env:
92    AGENT_OS: $(Agent.OS)
93    SYSTEM_WORKFOLDER: $(System.Workfolder)
94  displayName: Install MinGW
95  condition: and(succeeded(), not(variables.SKIP_JOB))
96
97- bash: src/ci/scripts/install-ninja.sh
98  env:
99    AGENT_OS: $(Agent.OS)
100  displayName: Install ninja
101  condition: and(succeeded(), not(variables.SKIP_JOB))
102
103- bash: src/ci/scripts/enable-docker-ipv6.sh
104  env:
105    AGENT_OS: $(Agent.OS)
106  displayName: Enable IPv6 on Docker
107  condition: and(succeeded(), not(variables.SKIP_JOB))
108
109# Disable automatic line ending conversion (again). On Windows, when we're
110# installing dependencies, something switches the git configuration directory or
111# re-enables autocrlf. We've not tracked down the exact cause -- and there may
112# be multiple -- but this should ensure submodules are checked out with the
113# appropriate line endings.
114- bash: src/ci/scripts/disable-git-crlf-conversion.sh
115  displayName: Disable git automatic line ending conversion
116  condition: and(succeeded(), not(variables.SKIP_JOB))
117
118- bash: src/ci/scripts/checkout-submodules.sh
119  env:
120    AGENT_OS: $(Agent.OS)
121  displayName: Checkout submodules
122  condition: and(succeeded(), not(variables.SKIP_JOB))
123
124- bash: src/ci/scripts/verify-line-endings.sh
125  env:
126    AGENT_OS: $(Agent.OS)
127  displayName: Verify line endings
128  condition: and(succeeded(), not(variables.SKIP_JOB))
129
130# Ensure the `aws` CLI is installed so we can deploy later on, cache docker
131# images, etc.
132- bash: src/ci/scripts/install-awscli.sh
133  env:
134    AGENT_OS: $(Agent.OS)
135  condition: and(succeeded(), not(variables.SKIP_JOB))
136  displayName: Install awscli
137
138# Configure our CI_JOB_NAME variable which log analyzers can use for the main
139# step to see what's going on.
140- bash: |
141    builder=$(echo $AGENT_JOBNAME | cut -d ' ' -f 2)
142    echo "##vso[task.setvariable variable=CI_JOB_NAME]$builder"
143  displayName: Configure Job Name
144
145# As a quick smoke check on the otherwise very fast mingw-check linux builder
146# check our own internal scripts.
147- bash: |
148    set -e
149    git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git
150    cd rust-toolstate
151    python2.7 "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" ""
152    # Only check maintainers if this build is supposed to publish toolstate.
153    # Builds that are not supposed to publish don't have the access token.
154    if [ -n "${TOOLSTATE_PUBLISH+is_set}" ]; then
155      TOOLSTATE_VALIDATE_MAINTAINERS_REPO=rust-lang/rust python2.7 "${BUILD_SOURCESDIRECTORY}/src/tools/publish_toolstate.py"
156    fi
157    cd ..
158    rm -rf rust-toolstate
159  env:
160    TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
161  condition: and(succeeded(), not(variables.SKIP_JOB), eq(variables['IMAGE'], 'mingw-check'))
162  displayName: Verify the publish_toolstate script works
163
164- bash: |
165    set -e
166    # Remove any preexisting rustup installation since it can interfere
167    # with the cargotest step and its auto-detection of things like Clippy in
168    # the environment
169    rustup self uninstall -y || true
170    if [ "$IMAGE" = "" ]; then
171      src/ci/run.sh
172    else
173      src/ci/docker/run.sh $IMAGE
174    fi
175  #timeoutInMinutes: 180
176  timeoutInMinutes: 600
177  env:
178    CI: true
179    SRC: .
180    AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
181    AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
182    TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
183  condition: and(succeeded(), not(variables.SKIP_JOB))
184  displayName: Run build
185
186- bash: src/ci/scripts/upload-artifacts.sh
187  env:
188    AWS_ACCESS_KEY_ID: $(UPLOAD_AWS_ACCESS_KEY_ID)
189    AWS_SECRET_ACCESS_KEY: $(UPLOAD_AWS_SECRET_ACCESS_KEY)
190  displayName: Upload artifacts
191  # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
192  # builders *should* have the AWS credentials available. Still, explicitly
193  # adding the condition is helpful as this way CI will not silently skip
194  # deploying artifacts from a dist builder if the variables are misconfigured,
195  # erroring about invalid credentials instead.
196  condition: |
197    and(
198      succeeded(), not(variables.SKIP_JOB),
199      or(
200        variables.UPLOAD_AWS_SECRET_ACCESS_KEY,
201        eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')
202      )
203    )