-
Notifications
You must be signed in to change notification settings - Fork 58
/
azure-pipelines.yml
108 lines (91 loc) · 3.52 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
# EVA pipeline
trigger:
- master
pool:
vmImage: 'windows-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Ensure Python 3.x'
inputs:
versionSpec: '3.x'
addToPath: true
architecture: 'x64'
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: 'Run CredScan'
inputs:
toolMajorVersion: 'V2'
outputFormat: sarif
debugMode: false
- task: CmdLine@2
displayName: 'Get SEAL source code'
inputs:
script: |
rem Use github repo
git clone https://github.com/microsoft/SEAL.git
cd SEAL
rem Use 3.6.0 specifically
git checkout 3.6.0
workingDirectory: '$(Build.SourcesDirectory)/third_party'
- task: CMake@1
displayName: 'Configure SEAL'
inputs:
cmakeArgs: '-DSEAL_THROW_ON_TRANSPARENT_CIPHERTEXT=OFF -DALLOW_COMMAND_LINE_BUILD=ON -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF -DSEAL_USE_ZSTD=OFF .'
workingDirectory: $(Build.SourcesDirectory)/third_party/SEAL
- task: MSBuild@1
displayName: 'Build SEAL'
inputs:
solution: '$(Build.SourcesDirectory)/third_party/SEAL/SEAL.sln'
msbuildArchitecture: 'x64'
platform: 'x64'
configuration: 'Debug'
- task: CmdLine@2
displayName: 'Get vcpkg'
inputs:
script: 'git clone https://github.com/microsoft/vcpkg.git'
workingDirectory: '$(Build.SourcesDirectory)/third_party'
- task: CmdLine@2
displayName: 'Bootstrap vcpkg'
inputs:
script: '$(Build.SourcesDirectory)/third_party/vcpkg/bootstrap-vcpkg.bat'
workingDirectory: '$(Build.SourcesDirectory)/third_party/vcpkg'
- task: PowerShell@2
displayName: 'Get protobuf compiler'
inputs:
targetType: 'inline'
script: |
mkdir protobuf
cd protobuf
Invoke-WebRequest -Uri "https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-win64.zip" -OutFile protobufc.zip
Expand-Archive -LiteralPath protobufc.zip -DestinationPath protobufc
workingDirectory: '$(Build.SourcesDirectory)/third_party'
- task: CmdLine@2
displayName: 'Install protobuf library'
inputs:
script: '$(Build.SourcesDirectory)/third_party/vcpkg/vcpkg.exe install protobuf[zlib]:x64-windows'
workingDirectory: '$(Build.SourcesDirectory)/third_party/vcpkg'
- task: CmdLine@2
displayName: 'Create build directory'
inputs:
script: 'mkdir build'
workingDirectory: '$(Build.SourcesDirectory)'
- task: CMake@1
displayName: 'Configure EVA'
inputs:
cmakeArgs: .. -DSEAL_DIR=$(Build.SourcesDirectory)/third_party/SEAL/cmake -DProtobuf_INCLUDE_DIR=$(Build.SourcesDirectory)/third_party/vcpkg/packages/protobuf_x64-windows/include -DProtobuf_LIBRARY=$(Build.SourcesDirectory)/third_party/vcpkg/packages/protobuf_x64-windows/lib/libprotobuf.lib -DProtobuf_PROTOC_EXECUTABLE=$(Build.SourcesDirectory)/third_party/protobuf/protobufc/bin/protoc.exe
workingDirectory: '$(Build.SourcesDirectory)/build'
- task: MSBuild@1
displayName: 'Build EVA'
inputs:
solution: '$(Build.SourcesDirectory)/build/eva.sln'
msbuildArchitecture: 'x64'
platform: 'x64'
configuration: 'Debug'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
displayName: 'Publish Security Analysis Logs'
- task: PublishBuildArtifacts@1
displayName: 'Publish build artifacts'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: windows-drop