-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathcmake-generate.tests.yml
More file actions
113 lines (99 loc) · 3.17 KB
/
cmake-generate.tests.yml
File metadata and controls
113 lines (99 loc) · 3.17 KB
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
parameters:
- name: Artifacts
type: object
default: []
- name: ServiceDirectory
type: string
default: not-specified
- name: CMakeTestOptions
type: object
default: []
- name: MaxParallel
type: number
default: 0
# Matrix generation:
# https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/job-matrix/README.md
- name: Matrix
type: string
default: ''
- name: UsePlatformContainer
type: boolean
default: false
- name: DependsOn
type: string
default: not-set
- name: CloudConfig
type: object
default: {}
- name: JobName
type: string
default: CMakeGenerate
- name: TimeoutInMinutes
type: number
default: 120
- name: OSName
type: string
default: ''
jobs:
- job:
displayName: ${{ parameters.JobName }}
timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
condition: >-
and(
succeededOrFailed(),
ne(variables['Skip.CMakeGenerate'], 'true'),
ne(${{ parameters.Matrix }}, '{}')
)
dependsOn: ${{ parameters.DependsOn }}
strategy:
maxParallel: ${{ parameters.MaxParallel }}
matrix: $[ ${{ parameters.Matrix }} ]
pool:
name: $(Pool)
# 1es pipeline templates converts `image` to demands: ImageOverride under the hood
# which is incompatible with image selection in the default non-1es hosted pools
${{ if eq(parameters.OSName, 'macOS') }}:
vmImage: $(OSVmImage)
${{ else }}:
image: $(OSVmImage)
os: ${{ parameters.OSName }}
${{ if eq(parameters.OSName, 'macOS') }}:
templateContext:
sdl:
codeql:
compiled:
enabled: false
${{ if eq(parameters.UsePlatformContainer, 'true') }}:
# Add a default so the job doesn't fail when the matrix is empty
container: $[ variables['Container'] ]
variables:
CMOCKA_XML_FILE: "%g-test-results.xml"
steps:
- checkout: self
submodules: recursive
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml
parameters:
AgentImage: $(OSVmImage)
- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml
- pwsh: sudo apt update && sudo apt install -y $(AptDependencies)
retryCountOnTaskFailure: 10
condition: and(succeeded(), ne(variables['AptDependencies'], ''))
displayName: Install dependencies from apt
- pwsh: |
brew install $(BrewDependencies)
condition: and(succeeded(), ne(variables['BrewDependencies'], ''))
displayName: Install dependencies from brew
- template: /eng/pipelines/templates/steps/vcpkg.yml
- script: cmake --version
displayName: cmake --version
- ${{ each artifact in parameters.Artifacts }}:
- script: echo 'CMake generate tests for ${{ artifact.Name }}'
displayName: ${{ artifact.Name }}
- ${{ each cmakeOption in parameters.CMakeTestOptions }}:
- template: /eng/pipelines/templates/steps/cmake-generate.yml
parameters:
CmakeGeneratePath: sdk/${{ parameters.ServiceDirectory }}/${{ artifact.Path }}
GenerateArgs: ${{ cmakeOption.Value }}
Env: "$(CmakeEnvArg)"
PackageName: ${{ artifact.Name }}
- template: /eng/pipelines/templates/steps/show-failure-logs.yml