forked from microsoft/FASTER
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
168 lines (142 loc) · 4.4 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
variables:
solution: 'cs/FASTER.sln'
RunAzureTests: 'yes'
jobs:
- job: 'csharpWindows'
pool:
vmImage: windows-latest
displayName: 'C# (Windows)'
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
inputs:
versionSpec: '5.5.0'
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
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)\netcoreapp*\*test.dll
**\$(BuildConfiguration)\**\netcoreapp*\*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'
- 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'
- 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'