forked from microsoft/FASTER
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
306 lines (256 loc) · 8.98 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
variables:
solution: 'cs/FASTER.sln'
solutionRemote: 'cs/remote/FASTER.remote.sln'
RunAzureTests: 'yes'
jobs:
- job: 'csharpWindows'
pool:
vmImage: windows-latest
displayName: 'C# (Windows)'
timeoutInMinutes: 75
strategy:
maxParallel: 2
matrix:
AnyCPU-Debug:
buildPlatform: 'Any CPU'
buildConfiguration: 'Debug'
AnyCPU-Release:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
x64-Debug:
buildPlatform: 'x64'
buildConfiguration: 'Debug'
x64-Release:
buildPlatform: 'x64'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solutionRemote)'
- task: VSBuild@1
inputs:
solution: '$(solutionRemote)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- powershell: 'Invoke-WebRequest -OutFile azure-storage-emulator.msi -Uri "https://go.microsoft.com/fwlink/?LinkId=717179&clcid=0x409"'
displayName: 'Download Azure Storage Emulator'
- powershell: 'msiexec /passive /lvx installation.log /a azure-storage-emulator.msi TARGETDIR="C:\storage-emulator"'
displayName: 'Install Azure Storage Emulator'
- script: '"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" create "v13.0" 13.0 -s'
displayName: 'Init Test Db'
- script: '"C:\storage-emulator\root\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start'
displayName: 'Start Storage Emulator'
- task: VSTest@2
inputs:
testAssemblyVer2: |
**\$(BuildConfiguration)\net46*\*test.dll
**\$(BuildConfiguration)\**\net46*\*test.dll
!**\*Microsoft.VisualStudio.TestPlatform*
!**\obj\**
!**\*TestAdapter.dll
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
otherConsoleOptions: '/Framework:.NETFramework,Version=v4.0'
- task: VSTest@2
inputs:
testAssemblyVer2: |
**\$(BuildConfiguration)\netcoreapp2*\*test.dll
**\$(BuildConfiguration)\**\netcoreapp2*\*test.dll
!**\*Microsoft.VisualStudio.TestPlatform*
!**\obj\**
!**\*TestAdapter.dll
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
otherConsoleOptions: '/Framework:.NETCoreApp,Version=v2.2'
- task: VSTest@2
inputs:
testAssemblyVer2: |
**\$(BuildConfiguration)\netcoreapp3*\*test.dll
**\$(BuildConfiguration)\**\netcoreapp3*\*test.dll
!**\*Microsoft.VisualStudio.TestPlatform*
!**\obj\**
!**\*TestAdapter.dll
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
otherConsoleOptions: '/Framework:.NETCoreApp,Version=v3.1'
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
searchFolder: '$(Agent.TempDirectory)'
- job: 'cppWindows'
pool:
vmImage: vs2017-win2016
displayName: 'C++ (Windows)'
strategy:
maxParallel: 2
matrix:
x64-Debug:
buildPlatform: 'x64'
buildConfiguration: 'Debug'
x64-Release:
buildPlatform: 'x64'
buildConfiguration: 'Release'
steps:
- task: CMake@1
displayName: 'CMake .. -G"Visual Studio 15 2017 Win64"'
inputs:
workingDirectory: 'cc/build'
cmakeArgs: '.. -G"Visual Studio 15 2017 Win64"'
- task: MSBuild@1
displayName: 'Build solution cc/build/FASTER.sln'
inputs:
solution: 'cc/build/FASTER.sln'
msbuildArguments: '/m /p:Configuration=$(buildConfiguration) /p:Platform=$(buildPlatform)'
- script: 'ctest -j 1 --interactive-debug-mode 0 --output-on-failure -C $(buildConfiguration) -R "in_memory"'
workingDirectory: 'cc/build'
displayName: 'Run Ctest'
- job: 'cppLinux'
pool:
vmImage: ubuntu-16.04
displayName: 'C++ (Linux)'
steps:
- script: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y g++-7 libaio-dev uuid-dev libtbb-dev
displayName: 'Install depdendencies'
- script: |
export CXX='g++-7'
cd cc
mkdir -p build/Debug build/Release
cd build/Debug
cmake -DCMAKE_BUILD_TYPE=Debug ../..
make -j
cd ../../build/Release
cmake -DCMAKE_BUILD_TYPE=Release ../..
make -j
displayName: 'Compile'
- script: |
CTEST_OUTPUT_ON_FAILURE=1 make test
workingDirectory: 'cc/build/Debug'
displayName: 'Run Tests (Debug)'
- job: 'csharpLinux'
pool:
vmImage: ubuntu-16.04
displayName: 'C# (Linux)'
steps:
- task: NuGetToolInstaller@1
inputs:
versionSpec: '5.5.0'
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.1.201'
- script: |
mono --version
msbuild /version
msbuild /t:restore $(solution)
msbuild /p:Configuration=Release $(solution)
displayName: 'Build'
- task: DotNetCoreCLI@2
inputs:
command: test
projects: '**/test/*.csproj'
arguments: '--configuration $(buildConfiguration) --framework netcoreapp3.1 -l "console;verbosity=detailed"'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '*.trx'
searchFolder: '$(Agent.TempDirectory)'
# - job: 'cppBlobsWindows'
# pool:
# vmImage: vs2017-win2016
# displayName: 'C++ Blobs (Windows)'
# strategy:
# maxParallel: 2
# matrix:
# x64-Debug:
# buildPlatform: 'x64'
# buildConfiguration: 'Debug'
# x64-Release:
# buildPlatform: 'x64'
# buildConfiguration: 'Release'
# steps:
# - task: CMake@1
# displayName: 'CMake .. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON'
# inputs:
# workingDirectory: 'cc/build'
# cmakeArgs: '.. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON'
# - script: 'git clone https://github.com/microsoft/vcpkg'
# workingDirectory: 'cc/build'
# displayName: 'Download Vcpkg'
# - script: '.\vcpkg\bootstrap-vcpkg.bat'
# workingDirectory: 'cc/build'
# displayName: 'Install Vcpkg'
# - script: '.\vcpkg\vcpkg.exe install azure-storage-cpp:x64-windows'
# workingDirectory: 'cc/build'
# displayName: 'Install Azure dependencies'
# - script: '.\vcpkg\vcpkg.exe integrate install'
# workingDirectory: 'cc/build'
# displayName: 'Integrate vcpkg with msbuild'
# - task: MSBuild@1
# displayName: 'Build solution cc/build/FASTER.sln'
# inputs:
# solution: 'cc/build/FASTER.sln'
# msbuildArguments: '/m /p:Configuration=$(buildConfiguration) /p:Platform=$(buildPlatform)'
# - powershell: 'Invoke-WebRequest -OutFile azure-storage-emulator.msi -Uri "https://go.microsoft.com/fwlink/?LinkId=717179&clcid=0x409"'
# displayName: 'Download Azure Storage Emulator'
# - powershell: 'msiexec /passive /lvx installation.log /a azure-storage-emulator.msi TARGETDIR="C:\storage-emulator"'
# displayName: 'Install Azure Storage Emulator'
# - script: '"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" create "v13.0" 13.0 -s'
# displayName: 'Init Test Db'
# - script: '"C:\storage-emulator\root\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start'
# displayName: 'Start Storage Emulator'
# - script: |
# ctest -j 1 --interactive-debug-mode 0 --output-on-failure -C $(buildConfiguration) -R "azure_test"
# ctest -j 1 --interactive-debug-mode 0 --output-on-failure -C $(buildConfiguration) -R "storage_test"
# ctest -j 1 --interactive-debug-mode 0 --output-on-failure -C $(buildConfiguration) -R "faster_blobs_example"
# workingDirectory: 'cc/build'
# displayName: 'Run Ctest'
# - job: 'cppBlobsLinux'
# pool:
# vmImage: ubuntu-18.04
# displayName: 'C++ Blobs (Linux)'
# steps:
# - script: |
# sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
# sudo apt update
# sudo apt install -y libaio-dev uuid-dev libtbb-dev npm
# displayName: 'Install dependencies'
# - script: |
# sudo ./scripts/linux/azure/blob.sh
# workingDirectory: 'cc'
# displayName: 'Install Azure dependencies'
# - script: |
# cd cc
# mkdir -p build/Debug build/Release
# cd build/Debug
# cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_BLOBS=ON ../..
# make -j
# cd ../../build/Release
# cmake -DCMAKE_BUILD_TYPE=Release -DUSE_BLOBS=ON ../..
# make -j
# displayName: 'Compile'
# - script: |
# sudo npm install -g azurite
# azurite -s &
# displayName: 'Install and launch azurite (linux storage emulator)'
# - script: |
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
# CTEST_OUTPUT_ON_FAILURE=1 make test
# workingDirectory: 'cc/build/Debug'
# displayName: 'Run Tests (Debug)'