-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
126 lines (110 loc) · 3.32 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
name: 'splituri build'
trigger:
batch: true
branches:
include:
- master
- main
- bufix/*
- release/*
- hotfix/*
- feature/*
paths:
exclude:
- README.md
strategy:
matrix:
Windows:
osName: Windows_NT
poolName: Default
poolImageName:
Linux:
osName: Linux
poolName: Default
poolImageName:
variables:
buildConfiguration: 'Release'
buildLatestTag: '0.0.0'
pool:
name: $(poolName)
vmImage: $(poolImageName)
demands:
- Agent.OS -equals $(osName)
steps:
- checkout: self
fetchDepth: 0
- task: NuGetToolInstaller@1
displayName: 'Install Nuget'
inputs:
versionSpec: '>=5.0.0-0'
checkLatest: true
- task: gitversion/setup@3
displayName: 'Install GitVersion..'
inputs:
versionSpec: '6.x'
preferLatestVersion: true
- task: gitversion/execute@3
displayName: 'Determine Version..'
inputs:
useConfigFile: true
configFilePath: 'GitVersion.yml'
- script: echo %Action%%BuildVersion%
displayName: 'Set build version to $(GitVersion.MajorMinorPatch)'
env:
Action: '##vso[build.updatebuildnumber]'
BuildVersion: $(GitVersion.MajorMinorPatch)
- task: CMake@1
displayName: 'CMake ..'
inputs:
cmakeArgs: '..'
- task: CMake@1
displayName: 'CMake --build . --config $(buildConfiguration)'
inputs:
cmakeArgs: '--build . --config $(buildConfiguration)'
condition: succeeded()
- task: CMake@1
displayName: 'CMake -E chdir $(System.DefaultWorkingDirectory)/build/tests ctest'
inputs:
cmakeArgs: '-E chdir $(System.DefaultWorkingDirectory)/build/tests ctest . --output-junit $(System.DefaultWorkingDirectory)/build/tests/test_detail.xml --output-on-failure'
condition: succeeded()
continueOnError: true
- task: PublishTestResults@2
displayName: 'Publish $(buildConfiguration) Test Results test_detail.xml'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '$(System.DefaultWorkingDirectory)/build/tests/test_detail.xml'
mergeTestResults: true
buildConfiguration: '$(buildConfiguration)'
continueOnError: false
condition: succeeded()
- task: NuGetCommand@2
displayName: 'NuGet pack'
inputs:
command: 'pack'
packagesToPack: 'nuget/*.nuspec'
versioningScheme: 'off'
buildProperties: 'VERSION=$(GitVersion.MajorMinorPatch)'
condition: and(succeeded(), startsWith(variables['Agent.OS'], 'Windows'))
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;build/*.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'sqs-nuget'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Agent.OS'], 'Windows'))
- task: GitHubRelease@1
inputs:
gitHubConnection: 'github-packages-sqs'
repositoryName: 'siddiqsoft/splituri'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(build.buildNumber)'
title: 'v$(build.buildNumber)'
releaseNotesSource: 'inline'
releaseNotesInline: 'Documentation https://siddiqsoft.github.io/splituri'
isPreRelease: true
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Agent.OS'], 'Windows'))