forked from aspnet/SignalR-Client-Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
135 lines (127 loc) · 5.06 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
variables:
# used for SDL and arcade
- name: _TeamName
value: AspNetCore
- name: _DotNetPublishToBlobFeed
value: true
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: _PublishUsingPipelines
value: true
- name: _DotNetArtifactsCategory
value: SIGNALR_CPP
- name: _DotNetValidationArtifactsCategory
value: SIGNALR_CPP
- name: Build.Repository.Clean
value: true
- name: _BuildConfig
value: 'Debug'
# used for post-build phases, internal builds only
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-AspNet-SDLValidation-Params
trigger:
- main
stages:
- stage: build
displayName: Build
jobs:
- template: .azure/default-build.yml
parameters:
agentOs: Windows
jobName: Windows_Build_Test_With_CppRestSDK
useCppRestSDK: true
cMakeRunArgs: '-A x64'
beforeBuild:
- powershell: "& ./submodules/vcpkg/bootstrap-vcpkg.bat"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Bootstrap vcpkg
- powershell: "& ./submodules/vcpkg/vcpkg.exe install cpprestsdk[websockets]:x64-windows msgpack:x64-windows --vcpkg-root ./submodules/vcpkg"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: vcpkg install dependencies
- template: .azure/default-build.yml
parameters:
agentOs: macOs
jobName: Mac_Build_Test_With_CppRestSDK
useCppRestSDK: true
beforeBuild:
- bash: "./submodules/vcpkg/bootstrap-vcpkg.sh --allowAppleClang"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Bootstrap vcpkg
- bash: "./submodules/vcpkg/vcpkg install cpprestsdk[websockets] msgpack"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: vcpkg install dependencies
- template: .azure/default-build.yml
parameters:
agentOs: Linux
jobName: Linux_Build_Test_With_CppRestSDK
useCppRestSDK: true
beforeBuild:
- bash: "./submodules/vcpkg/bootstrap-vcpkg.sh"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Bootstrap vcpkg
- bash: "./submodules/vcpkg/vcpkg install cpprestsdk[websockets] boost-system boost-chrono boost-thread msgpack --vcpkg-root ./submodules/vcpkg"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: vcpkg install dependencies
- bash: "sudo apt-get update && sudo apt install valgrind"
displayName: install valgrind
- template: .azure/default-build.yml
parameters:
agentOs: Linux
jobName: Linux_Build_Test
useCppRestSDK: false
beforeBuild:
- bash: "./submodules/vcpkg/bootstrap-vcpkg.sh"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Bootstrap vcpkg
- bash: "./submodules/vcpkg/vcpkg install msgpack --vcpkg-root ./submodules/vcpkg"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: vcpkg install dependencies
- bash: "sudo apt-get update && sudo apt install valgrind"
displayName: install valgrind
- template: .azure/default-build.yml
parameters:
agentOs: Windows
jobName: Windows_Build_Test
useCppRestSDK: false
cMakeRunArgs: '-A x64'
beforeBuild:
- powershell: "& ./submodules/vcpkg/bootstrap-vcpkg.bat"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Bootstrap vcpkg
- powershell: "& ./submodules/vcpkg/vcpkg.exe install msgpack:x64-windows --vcpkg-root ./submodules/vcpkg"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: vcpkg install dependencies
- template: .azure/default-build.yml
parameters:
agentOs: macOs
jobName: Mac_Build_Test
useCppRestSDK: false
beforeBuild:
- script: brew install gcc
displayName: Install gcc
- bash: "./submodules/vcpkg/bootstrap-vcpkg.sh"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Bootstrap vcpkg
- bash: "./submodules/vcpkg/vcpkg install msgpack"
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: vcpkg install dependencies
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- stage: post_build
displayName: Post Build Validation
jobs:
- template: /eng/common/templates/job/execute-sdl.yml
parameters:
enable: true
additionalParameters: ' -SourceToolsList @("policheck","credscan")
-TsaInstanceURL $(_TsaInstanceURL)
-TsaProjectName $(_TsaProjectName)
-TsaNotificationEmail $(_TsaNotificationEmail)
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
-TsaBugAreaPath $(_TsaBugAreaPath)
-TsaIterationPath $(_TsaIterationPath)
-TsaRepositoryName "AspNetCore"
-TsaCodebaseName "AspNetCore"
-TsaPublish $True
-PoliCheckAdditionalRunConfigParams @("UserExclusionPath < $(Build.SourcesDirectory)/eng/PoliCheckExclusions.xml")'
continueOnError: false
downloadArtifacts: false