-
Notifications
You must be signed in to change notification settings - Fork 273
/
azure-pipelines.yml
195 lines (177 loc) · 5.51 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
185
186
187
188
189
190
191
192
193
194
195
# 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
pr:
- master
- 202???
- 201???
trigger:
batch: true
branches:
include:
- master
- 202???
- 201???
# this part need to be set in UI
schedules:
- cron: "0 0 * * 6"
displayName: Weekly build
branches:
include:
- master
- 202???
- 201???
always: true
resources:
repositories:
- repository: sonic-swss
type: github
name: sonic-net/sonic-swss
endpoint: sonic-net
parameters:
- name: debian_version
type: string
default: bullseye
variables:
- name: BUILD_BRANCH
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
value: $(System.PullRequest.TargetBranch)
${{ else }}:
value: $(Build.SourceBranchName)
stages:
- stage: Build
jobs:
- template: .azure-pipelines/build-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-${{ parameters.debian_version }}
swss_common_artifact_name: sonic-swss-common
artifact_name: sonic-sairedis
syslog_artifact_name: sonic-sairedis.syslog
run_unit_test: true
archive_gcov: true
debian_version: ${{ parameters.debian_version }}
- stage: BuildAsan
dependsOn: []
jobs:
- template: .azure-pipelines/build-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-${{ parameters.debian_version }}
swss_common_artifact_name: sonic-swss-common
artifact_name: sonic-sairedis-asan
syslog_artifact_name: sonic-sairedis-asan.syslog
asan: true
run_unit_test: false
archive_gcov: false
debian_version: ${{ parameters.debian_version }}
- stage: BuildArm
dependsOn: Build
condition: succeeded('Build')
jobs:
- template: .azure-pipelines/build-template.yml
parameters:
arch: armhf
timeout: 180
pool: sonicbld-armhf
sonic_slave: sonic-slave-${{ parameters.debian_version }}-armhf
swss_common_artifact_name: sonic-swss-common.armhf
artifact_name: sonic-sairedis.armhf
syslog_artifact_name: sonic-sairedis.syslog.armhf
debian_version: ${{ parameters.debian_version }}
- template: .azure-pipelines/build-template.yml
parameters:
arch: arm64
timeout: 180
pool: sonicbld-arm64
sonic_slave: sonic-slave-${{ parameters.debian_version }}-arm64
swss_common_artifact_name: sonic-swss-common.arm64
artifact_name: sonic-sairedis.arm64
syslog_artifact_name: sonic-sairedis.syslog.arm64
debian_version: ${{ parameters.debian_version }}
- stage: BuildBookworm
dependsOn: BuildArm
condition: succeeded('BuildArm')
jobs:
- template: .azure-pipelines/build-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-bookworm
swss_common_artifact_name: sonic-swss-common-bookworm
artifact_name: sonic-sairedis-bookworm
syslog_artifact_name: sonic-sairedis-bookworm.syslog
run_unit_test: true
debian_version: ${{ parameters.debian_version }}
- template: .azure-pipelines/build-template.yml
parameters:
arch: armhf
timeout: 180
pool: sonicbld-armhf
sonic_slave: sonic-slave-bookworm-armhf
swss_common_artifact_name: sonic-swss-common-bookworm.armhf
artifact_name: sonic-sairedis-bookworm.armhf
syslog_artifact_name: sonic-sairedis-bookworm.syslog.armhf
debian_version: ${{ parameters.debian_version }}
- template: .azure-pipelines/build-template.yml
parameters:
arch: arm64
timeout: 180
pool: sonicbld-arm64
sonic_slave: sonic-slave-bookworm-arm64
swss_common_artifact_name: sonic-swss-common-bookworm.arm64
artifact_name: sonic-sairedis-bookworm.arm64
syslog_artifact_name: sonic-sairedis-bookworm.syslog.arm64
debian_version: ${{ parameters.debian_version }}
- stage: BuildSwss
dependsOn: Build
condition: succeeded('Build')
jobs:
- template: .azure-pipelines/build-swss-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-${{ parameters.debian_version }}
swss_common_artifact_name: sonic-swss-common
sairedis_artifact_name: sonic-sairedis
syslog_artifact_name: sonic-swss.syslog
artifact_name: sonic-swss
debian_version: ${{ parameters.debian_version }}
- stage: BuildDocker
dependsOn: BuildSwss
condition: succeeded('BuildSwss')
jobs:
- template: .azure-pipelines/build-docker-sonic-vs-template.yml
parameters:
swss_common_artifact_name: sonic-swss-common
sairedis_artifact_name: sonic-sairedis
swss_artifact_name: sonic-swss
artifact_name: docker-sonic-vs
- stage: BuildDockerAsan
dependsOn:
- BuildAsan
- BuildSwss
condition: and(succeeded('BuildAsan'), succeeded('BuildSwss'))
jobs:
- template: .azure-pipelines/build-docker-sonic-vs-template.yml
parameters:
swss_common_artifact_name: sonic-swss-common
sairedis_artifact_name: sonic-sairedis-asan
swss_artifact_name: sonic-swss
artifact_name: docker-sonic-vs-asan
asan: true
- stage: Test
dependsOn: BuildDocker
condition: succeeded('BuildDocker')
jobs:
- template: .azure-pipelines/test-docker-sonic-vs-template.yml
parameters:
log_artifact_name: log
- stage: TestAsan
dependsOn: BuildDockerAsan
condition: succeeded('BuildDockerAsan')
jobs:
- template: .azure-pipelines/test-docker-sonic-vs-template.yml
parameters:
docker_sonic_vs_name: docker-sonic-vs-asan
log_artifact_name: log-asan
asan: true