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 # Configure our CI_JOB_NAME variable which log analyzers can use for the main
12 # step to see what's going on.
14 builder=$(echo $AGENT_JOBNAME | cut -d ' ' -f 2)
15 echo "##vso[task.setvariable variable=CI_JOB_NAME]$builder"
16 displayName: Configure Job Name
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.
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"
31 - bash: src/ci/scripts/should-skip-this.sh
32 displayName: Decide whether to run this job
34 # Spawn a background process to collect CPU usage statistics which we'll upload
35 # at the end of the build. See the comments in the script here for more
37 - bash: python src/ci/cpu-usage-over-time.py &> cpu-usage.csv &
38 displayName: "Collect CPU-usage statistics in the background"
40 - bash: src/ci/scripts/dump-environment.sh
41 displayName: Show the current environment
43 - bash: src/ci/scripts/install-sccache.sh
46 displayName: Install sccache
47 condition: and(succeeded(), not(variables.SKIP_JOB))
49 - bash: src/ci/scripts/install-clang.sh
52 displayName: Install clang
53 condition: and(succeeded(), not(variables.SKIP_JOB))
55 - bash: src/ci/scripts/switch-xcode.sh
58 displayName: Switch to Xcode 9.3
59 condition: and(succeeded(), not(variables.SKIP_JOB))
61 - bash: src/ci/scripts/install-wix.sh
64 displayName: Install wix
65 condition: and(succeeded(), not(variables.SKIP_JOB))
67 - bash: src/ci/scripts/install-innosetup.sh
70 displayName: Install InnoSetup
71 condition: and(succeeded(), not(variables.SKIP_JOB))
73 - bash: src/ci/scripts/windows-symlink-build-dir.sh
76 displayName: Ensure the build happens on C:\ instead of D:\
77 condition: and(succeeded(), not(variables.SKIP_JOB))
79 - bash: src/ci/scripts/disable-git-crlf-conversion.sh
80 displayName: "Disable git automatic line ending conversion (on C:/)"
81 condition: and(succeeded(), not(variables.SKIP_JOB))
83 - bash: src/ci/scripts/install-msys2.sh
86 SYSTEM_WORKFOLDER: $(System.Workfolder)
87 displayName: Install msys2
88 condition: and(succeeded(), not(variables.SKIP_JOB))
90 - bash: src/ci/scripts/install-msys2-packages.sh
93 SYSTEM_WORKFOLDER: $(System.Workfolder)
94 displayName: Install msys2 packages
95 condition: and(succeeded(), not(variables.SKIP_JOB))
97 - bash: src/ci/scripts/install-mingw.sh
100 SYSTEM_WORKFOLDER: $(System.Workfolder)
101 displayName: Install MinGW
102 condition: and(succeeded(), not(variables.SKIP_JOB))
104 - bash: src/ci/scripts/install-ninja.sh
106 AGENT_OS: $(Agent.OS)
107 displayName: Install ninja
108 condition: and(succeeded(), not(variables.SKIP_JOB))
110 - bash: src/ci/scripts/enable-docker-ipv6.sh
112 AGENT_OS: $(Agent.OS)
113 displayName: Enable IPv6 on Docker
114 condition: and(succeeded(), not(variables.SKIP_JOB))
116 # Disable automatic line ending conversion (again). On Windows, when we're
117 # installing dependencies, something switches the git configuration directory or
118 # re-enables autocrlf. We've not tracked down the exact cause -- and there may
119 # be multiple -- but this should ensure submodules are checked out with the
120 # appropriate line endings.
121 - bash: src/ci/scripts/disable-git-crlf-conversion.sh
122 displayName: Disable git automatic line ending conversion
123 condition: and(succeeded(), not(variables.SKIP_JOB))
125 - bash: src/ci/scripts/checkout-submodules.sh
127 AGENT_OS: $(Agent.OS)
128 displayName: Checkout submodules
129 condition: and(succeeded(), not(variables.SKIP_JOB))
131 - bash: src/ci/scripts/verify-line-endings.sh
133 AGENT_OS: $(Agent.OS)
134 displayName: Verify line endings
135 condition: and(succeeded(), not(variables.SKIP_JOB))
137 # Ensure the `aws` CLI is installed so we can deploy later on, cache docker
139 - bash: src/ci/scripts/install-awscli.sh
141 AGENT_OS: $(Agent.OS)
142 condition: and(succeeded(), not(variables.SKIP_JOB))
143 displayName: Install awscli
145 # As a quick smoke check on the otherwise very fast mingw-check linux builder
146 # check our own internal scripts.
147 - bash: src/ci/scripts/validate-toolstate.sh
149 TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
150 condition: and(succeeded(), not(variables.SKIP_JOB), eq(variables['IMAGE'], 'mingw-check'))
151 displayName: Verify the publish_toolstate script works
153 - bash: src/ci/scripts/run-build-from-ci.sh
154 timeoutInMinutes: 600
156 AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
157 AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
158 TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
159 condition: and(succeeded(), not(variables.SKIP_JOB))
160 displayName: Run build
162 - bash: src/ci/scripts/upload-artifacts.sh
164 AWS_ACCESS_KEY_ID: $(UPLOAD_AWS_ACCESS_KEY_ID)
165 AWS_SECRET_ACCESS_KEY: $(UPLOAD_AWS_SECRET_ACCESS_KEY)
166 displayName: Upload artifacts
167 # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
168 # builders *should* have the AWS credentials available. Still, explicitly
169 # adding the condition is helpful as this way CI will not silently skip
170 # deploying artifacts from a dist builder if the variables are misconfigured,
171 # erroring about invalid credentials instead.
174 succeeded(), not(variables.SKIP_JOB),
176 variables.UPLOAD_AWS_SECRET_ACCESS_KEY,
177 eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')