forked from sonic-net/sonic-linkmgrd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
226 lines (210 loc) · 6.79 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# C/C++ with GCC
# Build your C/C++ project with GCC using make.
# Add steps that publish test results, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc
trigger:
branches:
include:
- "*"
jobs:
- job:
displayName: "amd64"
variables:
DIFF_COVER_CHECK_THRESHOLD: 80
DIFF_COVER_ENABLE: 'true'
DIFF_COVER_COVERAGE_FILES: linkmgrd-test-result.xml $(System.DefaultWorkingDirectory)/**/linkmgrd-test-result.xml
pool:
vmImage: 'ubuntu-20.04'
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye:latest
steps:
- script: |
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get install -y dotnet-sdk-6.0
displayName: install .Net
- script: |
sudo apt-get install -y\
libboost-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-thread-dev \
libboost-atomic-dev \
libboost-chrono-dev \
libboost-container-dev \
libboost-context-dev \
libboost-contract-dev \
libboost-coroutine-dev \
libboost-date-time-dev \
libboost-fiber-dev \
libboost-filesystem-dev \
libboost-graph-parallel-dev \
libboost-log-dev \
libboost-regex-dev \
libboost-serialization-dev \
googletest \
libgtest-dev \
libgmock-dev \
libhiredis0.14 \
libhiredis-dev \
libnl-3-dev \
libnl-route-3-dev \
libnl-genl-3-200 \
libnl-nf-3-200
displayName: "Install dependencies"
- checkout: self
clean: true
submodules: true
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifact: sonic-swss-common
runVersion: 'specific'
runId: 128696
runBranch: 'refs/heads/master'
path: '$(Build.SourcesDirectory)/sonic-swss-common'
displayName: "Download sonic swss common deb packages"
- script: |
sudo dpkg -i sonic-swss-common/libswsscommon_1.0.0_amd64.deb
sudo dpkg -i sonic-swss-common/libswsscommon-dev_1.0.0_amd64.deb
displayName: "Install sonic swss common"
- script: |
rm ../*.deb
dpkg-buildpackage -us -uc -b -j$(nproc)
cp ../*.deb $(Build.ArtifactStagingDirectory)
displayName: "Compile sonic linkmgrd"
- publish: $(Build.ArtifactStagingDirectory)
artifact: sonic-linkmgrd_1.0.0-1.amd64
displayName: "Archive linkmgrd debian packages"
- task: PublishCodeCoverageResults@1
inputs:
summaryFileLocation: linkmgrd-test-result.xml
pathToSources: $(Build.SourcesDirectory)
codeCoverageTool: 'Cobertura'
- job:
displayName: "arm64"
timeoutInMinutes: 180
pool: sonicbld-arm64
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye-arm64:latest
steps:
- script: |
sudo apt-get install -y\
libboost-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-thread-dev \
libboost-atomic-dev \
libboost-chrono-dev \
libboost-container-dev \
libboost-context-dev \
libboost-contract-dev \
libboost-coroutine-dev \
libboost-date-time-dev \
libboost-fiber-dev \
libboost-filesystem-dev \
libboost-graph-parallel-dev \
libboost-log-dev \
libboost-regex-dev \
libboost-serialization-dev \
googletest \
libgtest-dev \
libhiredis0.14 \
libhiredis-dev \
libnl-3-dev \
libnl-route-3-dev \
libnl-genl-3-200 \
libnl-nf-3-200
displayName: "Install dependencies"
- checkout: self
clean: true
submodules: true
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifact: sonic-swss-common.arm64
runVersion: 'specific'
runId: 128696
runBranch: 'refs/heads/master'
path: '$(Build.SourcesDirectory)/sonic-swss-common.arm64'
displayName: "Download sonic swss common deb packages"
- script: |
sudo dpkg -i sonic-swss-common.arm64/libswsscommon_1.0.0_arm64.deb
sudo dpkg -i sonic-swss-common.arm64/libswsscommon-dev_1.0.0_arm64.deb
displayName: "Install sonic swss common"
- script: |
rm ../*.deb
dpkg-buildpackage -us -uc -b -j$(nproc)
cp ../*.deb $(Build.ArtifactStagingDirectory)
displayName: "Compile sonic linkmgrd"
- publish: $(Build.ArtifactStagingDirectory)
artifact: sonic-linkmgrd.arm64
displayName: "Archive linkmgrd debian packages"
- job:
displayName: "armhf"
timeoutInMinutes: 180
pool: sonicbld-armhf
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye-armhf:latest
steps:
- script: |
sudo apt-get install -y \
libboost-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-thread-dev \
libboost-atomic-dev \
libboost-chrono-dev \
libboost-container-dev \
libboost-context-dev \
libboost-contract-dev \
libboost-coroutine-dev \
libboost-date-time-dev \
libboost-fiber-dev \
libboost-filesystem-dev \
libboost-graph-parallel-dev \
libboost-log-dev \
libboost-regex-dev \
libboost-serialization-dev \
googletest \
libgtest-dev \
libhiredis0.14 \
libhiredis-dev \
libnl-3-dev \
libnl-route-3-dev \
libnl-genl-3-200 \
libnl-nf-3-200
displayName: "Install dependencies"
- checkout: self
clean: true
submodules: true
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifact: sonic-swss-common.armhf
runVersion: 'specific'
runId: 128696
runBranch: 'refs/heads/master'
path: '$(Build.SourcesDirectory)/sonic-swss-common.armhf'
displayName: "Download sonic swss common deb packages"
- script: |
sudo dpkg -i sonic-swss-common.armhf/libswsscommon_1.0.0_armhf.deb
sudo dpkg -i sonic-swss-common.armhf/libswsscommon-dev_1.0.0_armhf.deb
displayName: "Install sonic swss common"
- script: |
rm ../*.deb
dpkg-buildpackage -us -uc -b -j$(nproc)
cp ../*.deb $(Build.ArtifactStagingDirectory)
displayName: "Compile sonic linkmgrd"
- publish: $(Build.ArtifactStagingDirectory)
artifact: sonic-linkmgrd.armhf
displayName: "Archive linkmgrd debian packages"