SignalR-Client-Cpp/azure-pipelines.yml

136 строки
5.1 KiB
YAML

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