forked from microsoft/SymCrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
114 lines (109 loc) · 3.64 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
# This file defines the build pipeline to build SymCrypt in Azure Dev Ops. It defines multiple jobs
# for building and testing SymCrypt in each of the target environments. For more information on Azure
# Pipelines, see https://docs.microsoft.com/en-us/azure/devops/pipelines/customize-pipeline
# Execute the pipeline whenever a change is made to master
trigger:
- master
# Execute the pipeline on any PR into master. (Currently not supported on Azure Git Repos; must
# be configured through the UI.)
pr:
- master
# List of jobs to build. Each job follows the same general format.
# 1. Windows AMD64 with CPU optimizations
# 2. Windows x86 with CPU optimizations
# 3. Linux (host native) with no CPU optimizations
jobs:
- job: Windows_AMD64
pool:
vmImage: 'windows-2019' # Windows Server 2019 with Visual Studio 2019
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
submodules: recursive
# Initialize CMake
# cd bin; cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake-toolchain/windows-amd64.cmake
- task: CMake@1
inputs:
workingDirectory: '$(Build.SourcesDirectory)/bin'
cmakeArgs: '.. -DCMAKE_TOOLCHAIN_FILE=../cmake-toolchain/windows-amd64.cmake'
# Build with CMake
# cmake --build .
- task: CMake@1
inputs:
workingDirectory: '$(Build.SourcesDirectory)/bin'
cmakeArgs: '--build .'
# Execute unit tests using the inline script
- script: |
cd bin\exe\AMD64\WindowsUserMode\Debug
.\symcryptunittest.exe
displayName: 'Execute generic unit test'
name: 'WindowsGenericUnitTest'
# Copy build output files to artifact staging directory
- task: CopyFiles@2
inputs:
SourceFolder: 'bin'
Contents: '**'
TargetFolder: '$(build.artifactstagingdirectory)'
# Publish staged artifacts so they're available in the pipeline results
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop-Windows-AMD64'
publishLocation: 'Container'
- job: Windows_x86
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
submodules: recursive
- task: CMake@1
inputs:
workingDirectory: '$(Build.SourcesDirectory)/bin'
cmakeArgs: '.. -DCMAKE_TOOLCHAIN_FILE=../cmake-toolchain/windows-x86.cmake -A Win32'
- task: CMake@1
inputs:
workingDirectory: '$(Build.SourcesDirectory)/bin'
cmakeArgs: '--build .'
- script: |
cd bin\exe\x86\WindowsUserMode\Debug
.\symcryptunittest.exe
displayName: 'Execute generic unit test'
name: 'WindowsGenericUnitTest'
- task: CopyFiles@2
inputs:
SourceFolder: 'bin'
Contents: '**'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop-Windows-x86'
publishLocation: 'Container'
- job: Linux
pool:
vmImage: 'ubuntu-18.04'
steps:
- checkout: self
submodules: recursive
- task: CMake@1
inputs:
workingDirectory: '$(Build.SourcesDirectory)/bin'
cmakeArgs: '..'
- task: CMake@1
inputs:
workingDirectory: '$(Build.SourcesDirectory)/bin'
cmakeArgs: '--build .'
- script: |
cd bin/exe/x86_64/Generic
./symcryptunittest
displayName: 'Execute generic unit test'
name: 'LinuxGenericUnitTest'
- task: CopyFiles@2
inputs:
SourceFolder: 'bin'
Contents: '**'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop-Linux-Generic'
publishLocation: 'Container'