-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
101 lines (92 loc) · 2.85 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
trigger:
branches:
include:
- master
- develop
- azure
pool:
vmImage: 'windows-latest'
variables:
buildPlatform: 'x64'
buildConfiguration: 'Release'
toolset: 'msvc-14.2'
toolset-platform: 'v142'
build_dir: '$(Build.ArtifactStagingDirectory)\build'
cmake_prefix: '$(build_dir)\dependencies\install\$(toolset)'
solution: '$(build_dir)\Showtime.sln'
steps:
- checkout: self
clean: true
submodules: recursive
- task: PowerShell@2
displayName: Install tools
inputs:
targetType: 'inline'
script: |
choco install visualstudio2019-workload-nativedesktop --params "--includeRecommended"
$VS_path = $(vswhere -format value -property installationPath)
Write-Host "##vso[task.setvariable variable=VS_path;]$(vswhere -format value -property installationPath)"
choco install procdump
Write-Host "##vso[task.setvariable variable=PROCDUMP_PATH ;]%ProgramData%\chocolatey\bin\"
- task: Cache@2
displayName: Cache dependencies
inputs:
key: 'dependencies | "$(Agent.OS)"'
restoreKeys: |
dependencies | "$(Agent.OS)"
dependencies
path: $(cmake_prefix)
cacheHitVar: DEPENDENCIES_RESTORED
- task: PowerShell@2
displayName: Build dependencies
condition: ne(variables.DEPENDENCIES_RESTORED, 'true')
inputs:
filePath: 'install_dependencies.ps1'
arguments: '-config $(buildConfiguration) -build_dir $(build_dir) -toolset $(toolset)'
errorActionPreference: 'continue'
ignoreLASTEXITCODE: true
pwsh: true
workingDirectory: '$(System.DefaultWorkingDirectory)'
- task: CMake@1
displayName: Generate CMake project
inputs:
workingDirectory: '$(build_dir)'
cmakeArgs: >-
-T $(toolset-platform)
-S $(Build.SourcesDirectory)
-G "Visual Studio 16 2019"
-A $(buildPlatform)
-DCMAKE_PREFIX_PATH=$(cmake_prefix)
-DBUILD_SHARED=ON
-DBUILD_STATIC=ON
-DBUILD_DRAFTS=OFF
-DBUILD_TESTING=ON
- task: VSBuild@1
displayName: Compile solution
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
maximumCpuCount: true
- task: VSTest@2
displayName: Test solution
condition: eq(variables.DEPENDENCIES_RESTORED, 'true')
inputs:
testSelector: 'testAssemblies'
runSettingsFile: '$(Build.SourcesDirectory)/azure_test.runsettings'
testAssemblyVer2: |
bin\Windows\Test*.exe
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(build_dir)'
pathtoCustomTestAdapters: '$(VS_path)\Common7\IDE\Extensions\em3ozjcu.15r'
testRunTitle: 'Native tests'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
diagnosticsEnabled: true
runInParallel: false
collectDumpOn: 'onAbortOnly'
rerunFailedTests: True
rerunFailedThreshold: '30'
rerunFailedTestCasesMaxLimit: '5'
rerunMaxAttempts: '3'