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 - bash: src/ci/scripts/collect-cpu-stats.sh
35 displayName: Collect CPU-usage statistics in the background
37 - bash: src/ci/scripts/dump-environment.sh
38 displayName: Show the current environment
40 - bash: src/ci/scripts/install-sccache.sh
43 displayName: Install sccache
44 condition: and(succeeded(), not(variables.SKIP_JOB))
46 - bash: src/ci/scripts/install-clang.sh
49 displayName: Install clang
50 condition: and(succeeded(), not(variables.SKIP_JOB))
52 - bash: src/ci/scripts/switch-xcode.sh
55 displayName: Switch to Xcode 9.3
56 condition: and(succeeded(), not(variables.SKIP_JOB))
58 - bash: src/ci/scripts/install-wix.sh
61 displayName: Install wix
62 condition: and(succeeded(), not(variables.SKIP_JOB))
64 - bash: src/ci/scripts/install-innosetup.sh
67 displayName: Install InnoSetup
68 condition: and(succeeded(), not(variables.SKIP_JOB))
70 - bash: src/ci/scripts/windows-symlink-build-dir.sh
73 displayName: Ensure the build happens on C:\ instead of D:\
74 condition: and(succeeded(), not(variables.SKIP_JOB))
76 - bash: src/ci/scripts/disable-git-crlf-conversion.sh
77 displayName: "Disable git automatic line ending conversion (on C:/)"
78 condition: and(succeeded(), not(variables.SKIP_JOB))
80 - bash: src/ci/scripts/install-msys2.sh
83 SYSTEM_WORKFOLDER: $(System.Workfolder)
84 displayName: Install msys2
85 condition: and(succeeded(), not(variables.SKIP_JOB))
87 - bash: src/ci/scripts/install-msys2-packages.sh
90 SYSTEM_WORKFOLDER: $(System.Workfolder)
91 displayName: Install msys2 packages
92 condition: and(succeeded(), not(variables.SKIP_JOB))
94 - bash: src/ci/scripts/install-mingw.sh
97 SYSTEM_WORKFOLDER: $(System.Workfolder)
98 displayName: Install MinGW
99 condition: and(succeeded(), not(variables.SKIP_JOB))
101 - bash: src/ci/scripts/install-ninja.sh
103 AGENT_OS: $(Agent.OS)
104 displayName: Install ninja
105 condition: and(succeeded(), not(variables.SKIP_JOB))
107 - bash: src/ci/scripts/enable-docker-ipv6.sh
109 AGENT_OS: $(Agent.OS)
110 displayName: Enable IPv6 on Docker
111 condition: and(succeeded(), not(variables.SKIP_JOB))
113 # Disable automatic line ending conversion (again). On Windows, when we're
114 # installing dependencies, something switches the git configuration directory or
115 # re-enables autocrlf. We've not tracked down the exact cause -- and there may
116 # be multiple -- but this should ensure submodules are checked out with the
117 # appropriate line endings.
118 - bash: src/ci/scripts/disable-git-crlf-conversion.sh
119 displayName: Disable git automatic line ending conversion
120 condition: and(succeeded(), not(variables.SKIP_JOB))
122 - bash: src/ci/scripts/checkout-submodules.sh
124 AGENT_OS: $(Agent.OS)
125 displayName: Checkout submodules
126 condition: and(succeeded(), not(variables.SKIP_JOB))
128 - bash: src/ci/scripts/verify-line-endings.sh
130 AGENT_OS: $(Agent.OS)
131 displayName: Verify line endings
132 condition: and(succeeded(), not(variables.SKIP_JOB))
134 # Ensure the `aws` CLI is installed so we can deploy later on, cache docker
136 - bash: src/ci/scripts/install-awscli.sh
138 AGENT_OS: $(Agent.OS)
139 condition: and(succeeded(), not(variables.SKIP_JOB))
140 displayName: Install awscli
142 # As a quick smoke check on the otherwise very fast mingw-check linux builder
143 # check our own internal scripts.
144 - bash: src/ci/scripts/validate-toolstate.sh
146 TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
147 condition: and(succeeded(), not(variables.SKIP_JOB), eq(variables['IMAGE'], 'mingw-check'))
148 displayName: Verify the publish_toolstate script works
150 - bash: src/ci/scripts/run-build-from-ci.sh
151 timeoutInMinutes: 600
153 AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
154 AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
155 TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
156 condition: and(succeeded(), not(variables.SKIP_JOB))
157 displayName: Run build
159 - bash: src/ci/scripts/upload-artifacts.sh
161 AWS_ACCESS_KEY_ID: $(UPLOAD_AWS_ACCESS_KEY_ID)
162 AWS_SECRET_ACCESS_KEY: $(UPLOAD_AWS_SECRET_ACCESS_KEY)
163 displayName: Upload artifacts
164 # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
165 # builders *should* have the AWS credentials available. Still, explicitly
166 # adding the condition is helpful as this way CI will not silently skip
167 # deploying artifacts from a dist builder if the variables are misconfigured,
168 # erroring about invalid credentials instead.
171 succeeded(), not(variables.SKIP_JOB),
173 variables.UPLOAD_AWS_SECRET_ACCESS_KEY,
174 eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')