forked from microsoft/snmalloc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
347 lines (296 loc) · 8.53 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
trigger:
- master
pr:
- master
jobs:
- job:
displayName: Linux
pool:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
64-bit Clang-7 Debug:
CC: clang-7
CXX: clang++-7
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-7 Release:
CC: clang-7
CXX: clang++-7
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-8 Debug:
CC: clang-8
CXX: clang++-8
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-8 Release:
CC: clang-8
CXX: clang++-8
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit GCC-8 Debug:
CC: gcc-8
CXX: g++-8
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit GCC-8 Release:
CC: gcc-8
CXX: g++-8
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Self Host:
CC: clang-7
CXX: clang++-7
BuildType: Debug
SelfHost: true
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Cache Friendly:
CC: clang-7
CXX: clang++-7
BuildType: Debug
SelfHost: false
CMakeArgs: '-DCACHE_FRIENDLY_OFFSET=64'
Image: snmallocciteam/build_linux_x64:latest
32-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x86:latest
32-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x86:latest
container: $[ variables['Image'] ]
steps:
- script: |
set -eo pipefail
ci/scripts/build.sh
env:
CC: $(CC)
CXX: $(CXX)
BUILD_TYPE: $(BuildType)
CMAKE_ARGS: $(CMakeArgs)
displayName: 'Build'
- script: |
set -eo pipefail
ci/scripts/test.sh
env:
SELF_HOST: $(SelfHost)
BUILD_TYPE: $(BuildType)
displayName: 'Test'
- job:
displayName: 'ARM Linux'
pool:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
64-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: '-DSNMALLOC_QEMU_WORKAROUND=On'
Image: snmallocciteam/build_linux_arm64:latest
64-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: '-DSNMALLOC_QEMU_WORKAROUND=On'
Image: snmallocciteam/build_linux_arm64:latest
32-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: '-DSNMALLOC_QEMU_WORKAROUND=On'
Image: snmallocciteam/build_linux_armhf:latest
32-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: '-DSNMALLOC_QEMU_WORKAROUND=On'
Image: snmallocciteam/build_linux_armhf:latest
steps:
- script: |
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
displayName: 'Enable QEmu'
- script: |
sudo docker run -v $PWD:/src \
-e CC=$(CC) \
-e CXX=$(CXX) \
-e BUILD_TYPE=$(BuildType) \
-e CMAKE_ARGS=$(CMakeArgs) \
$(Image) \
ci/scripts/build.sh
displayName: 'Build'
- script: |
sudo docker run -v $PWD:/src \
-e BUILD_TYPE=$(BuildType) \
-e SELF_HOST=$(SelfHost) \
$(Image) \
ci/scripts/test.sh
displayName: 'Test'
- job:
displayName: Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
64-bit Debug:
BuildType: Debug
CMakeArgs: '-G"Visual Studio 15 2017 Win64"'
JFlag: -j 4
64-bit Release:
BuildType: Release
CMakeArgs: '-G"Visual Studio 15 2017 Win64"'
JFlag: '-j 2'
64-bit Release Windows8Compat:
BuildType: Release
CMakeArgs: '-G"Visual Studio 15 2017 Win64" -DWIN8COMPAT=TRUE'
JFlag: '-j 2'
32-bit Debug:
BuildType: Debug
CMakeArgs: '-G"Visual Studio 15 2017"'
JFlag: '-j 4'
32-bit Release:
BuildType: Release
CMakeArgs: '-G"Visual Studio 15 2017"'
JFlag: '-j 2'
steps:
- script: |
bash -c "cat /proc/cpuinfo"
bash -c "cat /proc/meminfo"
displayName: 'Machine stats'
- task: CMake@1
displayName: 'CMake .. $(CMakeArgs) -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On'
inputs:
cmakeArgs: '.. $(CMakeArgs) -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On'
- task: MSBuild@1
displayName: 'Build solution build/snmalloc.sln'
inputs:
solution: build/snmalloc.sln
msbuildArguments: '/m /p:Configuration=$(BuildType)'
- script: 'ctest $(JFlag) --interactive-debug-mode 0 --output-on-failure -C $(BuildType)'
workingDirectory: build
displayName: 'Run Ctest'
- job:
displayName: WinClang
pool:
vmImage: 'windows-2019'
strategy:
matrix:
64-bit Debug Clang:
BuildType: Debug
CMakeArgs: '-GNinja -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_RC_COMPILER="C:/Program Files/LLVM/bin/llvm-rc"'
JFlag: -j 4
64-bit Release Clang:
BuildType: Release
CMakeArgs: '-GNinja -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_RC_COMPILER="C:/Program Files/LLVM/bin/llvm-rc"'
JFlag: -j 4
steps:
- script: |
bash -c "cat /proc/cpuinfo"
bash -c "cat /proc/meminfo"
displayName: 'Machine stats'
- script: |
choco install --accept-license -y Ninja llvm
displayName: 'Dependencies'
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
mkdir build
cd build
cmake .. $(CMakeArgs) -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On
cmake --build . --config ${BuildType}
displayName: 'build'
- script: |
set PATH=%PATH%;"C:\Program Files\LLVM\bin\"
func-statistics-1.exe
ctest $(JFlag) --interactive-debug-mode 0 --output-on-failure -C $(BuildType)
workingDirectory: build
displayName: 'Run Ctest'
- job:
displayName: macOS
pool:
vmImage: 'macOS-10.15'
strategy:
matrix:
Debug:
BuildType: Debug
Release:
BuildType: Release
steps:
- task: CMake@1
displayName: 'CMake .. -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On'
inputs:
cmakeArgs: '.. -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On'
- script: |
set -eo pipefail
make -j 4
workingDirectory: build
failOnStderr: true
displayName: 'Compile'
- script: |
set -eo pipefail
ctest -j 4 --output-on-failure -C $(BuildType)
workingDirectory: build
failOnStderr: true
displayName: 'Test'
- job:
displayName: Format
pool:
vmImage: 'ubuntu-18.04'
container: snmallocciteam/build_linux_x64:latest
steps:
- script: |
mkdir build
cd build
cmake -GNinja ..
env:
CC: /usr/bin/gcc-8
CXX: /usr/bin/g++-8
- script: |
set -eo pipefail
ninja clangformat
git diff --exit-code
workingDirectory: build
failOnStderr: true
displayName: 'Clang-Format'
- script: |
set -eo pipefail
clang-tidy-9 src/override/malloc.cc -header-filter="`pwd`/*" -warnings-as-errors='*' -export-fixes=tidy.fail -- -std=c++17 -mcx16
displayName: 'Clang-Tidy'