1 # FIXME(linux): need to configure core dumps, enable them, and then dump
2 # backtraces on failure from all core dumps:
4 # - bash: sudo apt install gdb
5 # - bash: sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern'
7 # Check travis config for `gdb --batch` command to print all crash logs
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.
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"
24 - bash: src/ci/scripts/should-skip-this.sh
25 displayName: Decide whether to run this job
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
30 - bash: python src/ci/cpu-usage-over-time.py &> cpu-usage.csv &
31 displayName: "Collect CPU-usage statistics in the background"
33 - bash: src/ci/scripts/dump-environment.sh
34 displayName: Show the current environment
36 - bash: src/ci/scripts/install-sccache.sh
39 displayName: Install sccache
40 condition: and(succeeded(), not(variables.SKIP_JOB))
42 - bash: src/ci/scripts/install-clang.sh
45 displayName: Install clang
46 condition: and(succeeded(), not(variables.SKIP_JOB))
48 - bash: src/ci/scripts/switch-xcode.sh
51 displayName: Switch to Xcode 9.3
52 condition: and(succeeded(), not(variables.SKIP_JOB))
54 - bash: src/ci/scripts/install-wix.sh
57 displayName: Install wix
58 condition: and(succeeded(), not(variables.SKIP_JOB))
60 - bash: src/ci/scripts/install-innosetup.sh
63 displayName: Install InnoSetup
64 condition: and(succeeded(), not(variables.SKIP_JOB))
66 - bash: src/ci/scripts/windows-symlink-build-dir.sh
69 displayName: Ensure the build happens on C:\ instead of D:\
70 condition: and(succeeded(), not(variables.SKIP_JOB))
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))
76 - bash: src/ci/scripts/install-msys2.sh
79 SYSTEM_WORKFOLDER: $(System.Workfolder)
80 displayName: Install msys2
81 condition: and(succeeded(), not(variables.SKIP_JOB))
83 - bash: src/ci/scripts/install-msys2-packages.sh
86 SYSTEM_WORKFOLDER: $(System.Workfolder)
87 displayName: Install msys2 packages
88 condition: and(succeeded(), not(variables.SKIP_JOB))
90 - bash: src/ci/scripts/install-mingw.sh
93 SYSTEM_WORKFOLDER: $(System.Workfolder)
94 displayName: Install MinGW
95 condition: and(succeeded(), not(variables.SKIP_JOB))
97 - bash: src/ci/scripts/install-ninja.sh
100 displayName: Install ninja
101 condition: and(succeeded(), not(variables.SKIP_JOB))
103 - bash: src/ci/scripts/enable-docker-ipv6.sh
105 AGENT_OS: $(Agent.OS)
106 displayName: Enable IPv6 on Docker
107 condition: and(succeeded(), not(variables.SKIP_JOB))
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))
118 - bash: src/ci/scripts/checkout-submodules.sh
120 AGENT_OS: $(Agent.OS)
121 displayName: Checkout submodules
122 condition: and(succeeded(), not(variables.SKIP_JOB))
124 - bash: src/ci/scripts/verify-line-endings.sh
126 AGENT_OS: $(Agent.OS)
127 displayName: Verify line endings
128 condition: and(succeeded(), not(variables.SKIP_JOB))
130 # Ensure the `aws` CLI is installed so we can deploy later on, cache docker
132 - bash: src/ci/scripts/install-awscli.sh
134 AGENT_OS: $(Agent.OS)
135 condition: and(succeeded(), not(variables.SKIP_JOB))
136 displayName: Install awscli
138 # Configure our CI_JOB_NAME variable which log analyzers can use for the main
139 # step to see what's going on.
141 builder=$(echo $AGENT_JOBNAME | cut -d ' ' -f 2)
142 echo "##vso[task.setvariable variable=CI_JOB_NAME]$builder"
143 displayName: Configure Job Name
145 # As a quick smoke check on the otherwise very fast mingw-check linux builder
146 # check our own internal scripts.
149 git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git
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"
158 rm -rf rust-toolstate
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
166 # Remove any preexisting rustup installation since it can interfere
167 # with the cargotest step and its auto-detection of things like Clippy in
169 rustup self uninstall -y || true
170 if [ "$IMAGE" = "" ]; then
173 src/ci/docker/run.sh $IMAGE
175 #timeoutInMinutes: 180
176 timeoutInMinutes: 600
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
186 - bash: src/ci/scripts/upload-artifacts.sh
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.
198 succeeded(), not(variables.SKIP_JOB),
200 variables.UPLOAD_AWS_SECRET_ACCESS_KEY,
201 eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')