forked from nicoboss/PrivacyAmplification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
211 lines (182 loc) · 6.33 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
variables:
ShortGitHash: ''
jobs:
- job: Build_PrivacyAmplification_On_Self_Hosted_Agent
timeoutInMinutes: 30
pool:
name: PrivacyAmplificationPool
steps:
- script: |
echo $(Build.SourceVersion)
set gitHash=$(Build.SourceVersion)
set shortHash=%gitHash:~0,7%
echo %shortHash%
echo ##vso[task.setvariable variable=ShortGitHash;]%shortHash%
displayName: 'Get ShortGitHash Script'
- task: CmdLine@2
displayName: 'Create build folder for glslang'
inputs:
script: |
mkdir "PrivacyAmplification/glslang-master/build"
failOnStderr: true
- task: CMake@1
displayName: 'Execute CMake for glslang'
inputs:
workingDirectory: 'PrivacyAmplification/glslang-master/build'
cmakeArgs: ..
- task: VSBuild@1
displayName: 'Build glslang'
inputs:
solution: 'PrivacyAmplification/glslang-master/build/glslang.sln'
platform: 'x64'
configuration: 'Release'
- task: CmdLine@2
displayName: 'Build GLSL Shaders'
inputs:
script: |
cd "PrivacyAmplification"
./compileGLSL.cmd
failOnStderr: true
- task: VSBuild@1
displayName: 'Build PrivacyAmplification'
inputs:
solution: 'PrivacyAmplification/PrivacyAmplification.sln'
platform: 'x64'
configuration: 'Release'
- task: VSBuild@1
displayName: 'Build MatrixSeedServerExample'
inputs:
solution: 'examples/MatrixSeedServerExample/MatrixSeedServerExample.sln'
platform: 'x64'
configuration: 'Release'
- task: VSBuild@1
displayName: 'Build SendKeysExample'
inputs:
solution: 'examples/SendKeysExample/SendKeysExample.sln'
platform: 'x64'
configuration: 'Release'
- task: VSBuild@1
displayName: 'Build ReceiveAmpOutExample'
inputs:
solution: 'examples/ReceiveAmpOutExample/ReceiveAmpOutExample.sln'
platform: 'x64'
configuration: 'Release'
- task: VSBuild@1
displayName: 'Build LargeBlocksizeExample'
inputs:
solution: 'examples/LargeBlocksizeExample/LargeBlocksizeExample.sln'
platform: 'x64'
configuration: 'Release'
- task: CmdLine@2
displayName: 'Copy examples to Release'
inputs:
script: |
copy "examples\MatrixSeedServerExample\x64\Release\MatrixSeedServerExample.exe" "PrivacyAmplification\bin\Release\"
copy "examples\SendKeysExample\x64\Release\SendKeysExample.exe" "PrivacyAmplification\bin\Release\"
copy "examples\ReceiveAmpOutExample\x64\Release\ReceiveAmpOutExample.exe" "PrivacyAmplification\bin\Release\"
copy "examples\LargeBlocksizeExample\x64\Release\LargeBlocksizeExample.exe" "PrivacyAmplification\bin\Release\"
failOnStderr: true
- task: CmdLine@2
displayName: '[Vulkan] CalculateCorrectionFloat Unit Test'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
PrivacyAmplification.exe unitTestCalculateCorrectionFloat
failOnStderr: true
- task: CmdLine@2
displayName: '[Vulkan] ElementWiseProduct Unit Test'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
PrivacyAmplification.exe unitTestElementWiseProduct
failOnStderr: true
- task: CmdLine@2
displayName: '[Vulkan] BinInt2float Unit Test'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
PrivacyAmplification.exe unitTestBinInt2float
failOnStderr: true
- task: CmdLine@2
displayName: '[Vulkan] ToBinaryArray Unit Test'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
PrivacyAmplification.exe unitTestToBinaryArray
failOnStderr: true
- task: CmdLine@2
displayName: '[Cuda] CalculateCorrectionFloat Unit Test'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
PrivacyAmplificationCuda.exe unitTestCalculateCorrectionFloat
failOnStderr: true
- task: CmdLine@2
displayName: '[Cuda] SetFirstElementToZero Unit Test'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
PrivacyAmplificationCuda.exe unitTestSetFirstElementToZero
failOnStderr: true
- task: CmdLine@2
displayName: '[Cuda] ElementWiseProduct Unit Test'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
PrivacyAmplificationCuda.exe unitTestElementWiseProduct
failOnStderr: true
- task: CmdLine@2
displayName: '[Cuda] BinInt2float Unit Test'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
PrivacyAmplificationCuda.exe unitTestBinInt2float
failOnStderr: true
- task: CmdLine@2
displayName: '[Cuda] ToBinaryArray Unit Test'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
PrivacyAmplificationCuda.exe unitTestToBinaryArray
failOnStderr: true
- task: CmdLine@2
displayName: 'Large Blocksize Test Cuda'
inputs:
script: |
cd "PrivacyAmplification"
./LargeBlocksizeTestCuda.cmd
failOnStderr: true
- task: CmdLine@2
displayName: 'Large Blocksize Test Vulkan'
inputs:
script: |
cd "PrivacyAmplification"
./LargeBlocksizeTestVulkan.cmd
failOnStderr: true
- task: PythonScript@0
displayName: 'Generate Vulkan Stats'
inputs:
scriptSource: 'filePath'
scriptPath: 'speedtestVulkan.py'
- task: PythonScript@0
displayName: 'Generate Cuda Stats'
inputs:
scriptSource: 'filePath'
scriptPath: 'speedtestCuda.py'
#Requires gists.cli.py3 configured with GitHub Token
- task: CmdLine@2
displayName: 'Upload Stats'
inputs:
script: |
cd "PrivacyAmplification/bin/Release/"
gists update dfae7685e20cf3f418559f7960e33cfe ? PrivacyAmpification_RTX_3080_dynamic_seed.svg
gists update dfae7685e20cf3f418559f7960e33cfe ? PrivacyAmpification_RTX_3080_static_seed.svg
gists update dfae7685e20cf3f418559f7960e33cfe ? PrivacyAmpificationCuda_RTX_3080_dynamic_seed.svg
gists update dfae7685e20cf3f418559f7960e33cfe ? PrivacyAmpificationCuda_RTX_3080_static_seed.svg
failOnStderr: true
- task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Artifact'
inputs:
targetPath: 'PrivacyAmplification/bin/Release'
artifact: 'PrivacyAmplification_$(ShortGitHash)'
publishLocation: 'pipeline'