forked from matheusgomes28/base64pp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
184 lines (160 loc) · 4.93 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
#
trigger:
branches:
include:
- main
- releases/*
pr:
- main
- releases/*
pool:
vmImage: ubuntu-latest
resources:
containers:
- container: ubuntu18.04-gcc11-conan2-doxygen1.9.6
image: mattgomes28/cpp-ubuntu-bionic:0.11
options: --user 0:0
stages:
- stage: failfast
displayName: FailFast Checks
jobs:
- job: failfast
displayName: Failfast Scripts
container: ubuntu18.04-gcc11-conan2-doxygen1.9.6
continueOnError: false
steps:
- bash: scripts/shellcheck.sh
displayName: Linting Shell
workingDirectory: $(Build.SourcesDirectory)
- bash: scripts/cpp-lint.sh
displayName: Linting CPP files
workingDirectory: $(Build.SourcesDirectory)
- stage: 'build'
displayName: 'Build Project'
dependsOn:
- failfast
jobs:
- template: scripts/pipeline/ubuntu_build.yml
parameters:
jobName: ubuntu_build_x86_64_debug
buildType: Debug
cmakePreset: unix-deb
cmakeExtraArgs: -DBUILD_DOCS="On"
containerName: ubuntu18.04-gcc11-conan2-doxygen1.9.6
- template: scripts/pipeline/ubuntu_build.yml
parameters:
jobName: ubuntu_build_x86_64_release
buildType: Release
cmakePreset: unix-rel
containerName: ubuntu18.04-gcc11-conan2-doxygen1.9.6
- template: scripts/pipeline/windows_build.yml
parameters:
jobName: windows_build_x64_debug
buildType: Debug
cmakePreset: vs2022-deb
- template: scripts/pipeline/windows_build.yml
parameters:
jobName: windows_build_x64_release
buildType: Release
cmakePreset: vs2022-rel
- stage: docs
displayName: Build Documentation
dependsOn:
- build
jobs:
- job:
container: ubuntu18.04-gcc11-conan2-doxygen1.9.6
displayName: Build Doxygen CMake
steps:
- checkout: self
submodules: recursive
- bash: scripts/helpers/conan-install.sh
displayName: Installing all Conan dependencies
workingDirectory: $(Build.SourcesDirectory)
- template: scripts/pipeline/download_build.yml
parameters:
artifactName: UbuntuDebugBuild
destination: $(Build.SourcesDirectory)/build
- bash: |
set -euo pipefail
cd "build/unix-deb" && cmake --build . --target=doxygen_build
displayName: Building The Doxygen Target
workingDirectory: $(Build.SourcesDirectory)
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(Build.SourcesDirectory)/build/unix-deb/docs
artifactName: 'DocsFiles'
- stage: tests
displayName: Running Tests
dependsOn:
- build
jobs:
- job:
container: ubuntu18.04-gcc11-conan2-doxygen1.9.6
displayName: Ubuntu Tests
steps:
- template: scripts/pipeline/download_build.yml
parameters:
artifactName: UbuntuDebugBuild
destination: $(Build.SourcesDirectory)/build
- bash: |
set -euo pipefail
cd "build/unix-deb" && ctest --verbose --test-dir="build/unix-deb"
displayName: Running All Tests
workingDirectory: $(Build.SourcesDirectory)
- bash: |
set -euo pipefail
./scripts/gather_cov.sh
displayName: Generating Coverage Stats
- task: PublishPipelineArtifact@1
displayName: Upload Coverage Artifacts
condition: always()
inputs:
targetPath: $(Build.SourcesDirectory)/coverage
artifactName: Coverage
- bash: |
set -euo pipefail
bash <(curl -s https://codecov.io/bash) -f coverage.info
displayName: Upload To CodeCov
env:
CODECOV_TOKEN: $(CodeCovToken)
workingDirectory: $(Build.SourcesDirectory)
- job:
pool:
vmImage: windows-2022
displayName: Windows Tests
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
inputs:
targetPath: $(Build.SourcesDirectory)/build
artifactName: WindowsDebugBuild
- pwsh: |
cd "build/vs2022-deb"
ctest --verbose --test-dir="build/vs2022-deb" -C Debug
displayName: Running All Tests
workingDirectory: $(Build.SourcesDirectory)
failOnStderr: true
- stage: static_analysis
displayName: Static Analysis
dependsOn:
- build
jobs:
- job:
container: ubuntu18.04-gcc11-conan2-doxygen1.9.6
displayName: Running Clang-Tidy
steps:
- checkout: self
- bash: scripts/helpers/conan-install.sh
displayName: Installing all Conan dependencies
workingDirectory: $(Build.SourcesDirectory)
- bash: |
set -euo pipefail
cmake --preset "unix-deb" -DCMAKE_EXPORT_COMPILE_COMMANDS=On
./scripts/static-analysis.sh
displayName: Running Clang-Tidy script
workingDirectory: $(Build.SourcesDirectory)