@@ -23,12 +23,6 @@ parameters:
23
23
- name : sonic_slave
24
24
type : string
25
25
26
- - name : buildimage_artifact_name
27
- type : string
28
-
29
- - name : buildimage_pipeline
30
- type : number
31
-
32
26
- name : sairedis_artifact_name
33
27
type : string
34
28
@@ -46,6 +40,13 @@ parameters:
46
40
type : boolean
47
41
default : false
48
42
43
+ - name : common_lib_artifact_name
44
+ type : string
45
+
46
+ - name : asan
47
+ type : boolean
48
+ default : false
49
+
49
50
jobs :
50
51
- job :
51
52
displayName : ${{ parameters.arch }}
54
55
pool :
55
56
${{ if ne(parameters.pool, 'default') }} :
56
57
name : ${{ parameters.pool }}
57
- ${{ if eq(parameters.pool, 'default') }} :
58
+ ${{ else }} :
58
59
vmImage : ' ubuntu-20.04'
59
60
60
61
container :
@@ -79,62 +80,72 @@ jobs:
79
80
inputs :
80
81
source : specific
81
82
project : build
82
- pipeline : 9
83
+ pipeline : Azure.sonic-swss-common
83
84
artifact : ${{ parameters.swss_common_artifact_name }}
84
85
runVersion : ' latestFromBranch'
85
- runBranch : ' refs/heads/master'
86
- path : ' $(Build.SourcesDirectory)/${{ parameters.swss_common_artifact_name }}'
86
+ runBranch : ' refs/heads/$(BUILD_BRANCH)'
87
+ path : $(Build.ArtifactStagingDirectory)/download
88
+ patterns : |
89
+ libswsscommon_1.0.0_${{ parameters.arch }}.deb
90
+ libswsscommon-dev_1.0.0_${{ parameters.arch }}.deb
87
91
displayName : " Download sonic swss common deb packages"
88
92
- task : DownloadPipelineArtifact@2
89
93
inputs :
90
94
source : specific
91
95
project : build
92
- pipeline : 12
96
+ pipeline : Azure.sonic-sairedis
93
97
artifact : ${{ parameters.sairedis_artifact_name }}
94
98
runVersion : ' latestFromBranch'
95
- runBranch : ' refs/heads/master'
96
- path : ' $(Build.SourcesDirectory)/${{ parameters.sairedis_artifact_name }}'
99
+ runBranch : ' refs/heads/$(BUILD_BRANCH)'
100
+ path : $(Build.ArtifactStagingDirectory)/download
101
+ patterns : |
102
+ libsaivs_*.deb
103
+ libsaivs-dev_*.deb
104
+ libsairedis_*.deb
105
+ libsairedis-dev_*.deb
106
+ libsaimetadata_*.deb
107
+ libsaimetadata-dev_*.deb
108
+ syncd-vs_*.deb
97
109
displayName : " Download sonic sairedis deb packages"
98
110
- task : DownloadPipelineArtifact@2
99
111
inputs :
100
112
source : specific
101
113
project : build
102
- pipeline : ${{ parameters.buildimage_pipeline }}
103
- artifact : ${{ parameters.buildimage_artifact_name }}
114
+ pipeline : Azure.sonic-buildimage.common_libs
115
+ artifact : ${{ parameters.common_lib_artifact_name }}
104
116
runVersion : ' latestFromBranch'
105
- runBranch : ' refs/heads/master'
106
- path : ' $(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }}'
107
- displayName : " Download sonic buildimage deb packages"
117
+ runBranch : ' refs/heads/$(BUILD_BRANCH)'
118
+ path : $(Build.ArtifactStagingDirectory)/download
119
+ patterns : |
120
+ target/debs/buster/libnl-3-200_*.deb
121
+ target/debs/buster/libnl-3-dev_*.deb
122
+ target/debs/buster/libnl-genl-3-200_*.deb
123
+ target/debs/buster/libnl-genl-3-dev_*.deb
124
+ target/debs/buster/libnl-route-3-200_*.deb
125
+ target/debs/buster/libnl-route-3-dev_*.deb
126
+ target/debs/buster/libnl-nf-3-200_*.deb
127
+ target/debs/buster/libnl-nf-3-dev_*.deb
128
+ target/debs/buster/libyang_*.deb
129
+ displayName : " Download common libs"
108
130
- script : |
109
- cd $(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }}
110
- sudo dpkg -i target/debs/buster/libnl-3-200_*.deb
111
- sudo dpkg -i target/debs/buster/libnl-3-dev_*.deb
112
- sudo dpkg -i target/debs/buster/libnl-genl-3-200_*.deb
113
- sudo dpkg -i target/debs/buster/libnl-genl-3-dev_*.deb
114
- sudo dpkg -i target/debs/buster/libnl-route-3-200_*.deb
115
- sudo dpkg -i target/debs/buster/libnl-route-3-dev_*.deb
116
- sudo dpkg -i target/debs/buster/libnl-nf-3-200_*.deb
117
- sudo dpkg -i target/debs/buster/libnl-nf-3-dev_*.deb
118
- cd $(Build.SourcesDirectory)/${{ parameters.swss_common_artifact_name }}
119
- sudo dpkg -i libswsscommon_1.0.0_${{ parameters.arch }}.deb
120
- sudo dpkg -i libswsscommon-dev_1.0.0_${{ parameters.arch }}.deb
121
- cd $(Build.SourcesDirectory)/${{ parameters.sairedis_artifact_name }}
122
- sudo dpkg -i libsaivs_*.deb
123
- sudo dpkg -i libsaivs-dev_*.deb
124
- sudo dpkg -i libsairedis_*.deb
125
- sudo dpkg -i libsairedis-dev_*.deb
126
- sudo dpkg -i libsaimetadata_*.deb
127
- sudo dpkg -i libsaimetadata-dev_*.deb
128
- sudo dpkg -i syncd-vs_*.deb
129
- workingDirectory: $(Pipeline.Workspace)
131
+ set -ex
132
+ cd download
133
+ sudo dpkg -i $(find target/debs/buster -type f)
134
+ sudo dpkg -i $(ls *.deb)
135
+ cd ..
136
+ rm -rf download
137
+ workingDirectory: $(Build.ArtifactStagingDirectory)
130
138
displayName: "Install libnl3, sonic swss common and sairedis"
131
139
- script : |
132
- set -x
140
+ set -ex
133
141
tar czf pytest.tgz tests
134
142
cp -r pytest.tgz $(Build.ArtifactStagingDirectory)/
135
143
if [ '${{ parameters.archive_gcov }}' == True ]; then
136
144
export ENABLE_GCOV=y
137
145
fi
146
+ if [ '${{ parameters.asan }}' == True ]; then
147
+ export ENABLE_ASAN=y
148
+ fi
138
149
./autogen.sh
139
150
dpkg-buildpackage -us -uc -b -j$(nproc) && cp ../*.deb .
140
151
displayName: "Compile sonic swss"
0 commit comments