-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
92 lines (81 loc) · 2.21 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
trigger:
batch: true
branches:
include:
- main
- development
- release/*
paths:
exclude:
- README.md
pool:
name: Default
demands:
- msbuild
- visualstudio
- vstest
variables:
buildPlatform: 'x64'
steps:
- task: NuGetToolInstaller@1
displayName: 'Use NuGet 5.10.0'
inputs:
versionSpec: '5.10.0'
checkLatest: true
- task: GitVersion@5
inputs:
runtime: 'core'
configFilePath: 'GitVersion.yml'
- script: echo %Action%%BuildVersion%
displayName: 'Set build version'
env:
Action: '##vso[build.updatebuildnumber]'
BuildVersion: $(GitVersion.NugetVersionV2)
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
vstsFeed: 'ec2759e0-0587-4306-8a8d-8695f15e2336'
continueOnError: true
- task: VSBuild@1
displayName: 'Build solution string2map.sln RELEASE'
inputs:
solution: 'string2map.sln'
platform: 'x64'
configuration: 'Release'
maximumCpuCount: true
msbuildArchitecture: 'x64'
- task: CmdLine@2
inputs:
script: |
echo Running googletest
cd x64
cd Release
tests.exe --gtest_output=xml:..\..\TestResults\
- task: PublishTestResults@2
displayName: 'Publish Release Test Results **/TEST-*.xml'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TestResults/tests.xml'
mergeTestResults: true
buildPlatform: 'x64'
buildConfiguration: 'Release'
continueOnError: true
- task: NuGetCommand@2
displayName: 'NuGet pack'
inputs:
command: 'pack'
packagesToPack: 'nuget/SiddiqSoft.string2map.nuspec;!nuget/SiddiqSoft.string2map.symbols.nuspec'
versioningScheme: 'off'
buildProperties: 'VERSION=$(build.buildNumber)'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg;build/*.nupkg;!build/*symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'sqs-nuget'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))