-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines.yml
100 lines (88 loc) · 2.84 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
pr:
branches:
include:
- master
paths:
exclude:
- .github
- docs
- LICENSE
- README.md
trigger: none
name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
stages:
- stage: Build
jobs:
- job:
displayName: "amd64/ubuntu-22.04"
pool:
vmImage: 'ubuntu-22.04'
steps:
- script: |
set -exuo pipefail
# dash-ha build deps
sudo apt-get update
sudo apt-get install -y curl protobuf-compiler redis
curl https://sh.rustup.rs -sSf | sh -s -- -y
displayName: 'Install dash-ha dependencies'
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: Azure.sonic-buildimage.common_libs
artifact: common-lib
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
path: $(Build.ArtifactStagingDirectory)/download/common
patterns: |
target/debs/bullseye/libnl-3-200_*.deb
target/debs/bullseye/libnl-3-dev_*.deb
target/debs/bullseye/libnl-genl-3-200_*.deb
target/debs/bullseye/libnl-genl-3-dev_*.deb
target/debs/bullseye/libnl-route-3-200_*.deb
target/debs/bullseye/libnl-route-3-dev_*.deb
target/debs/bullseye/libnl-nf-3-200_*.deb
target/debs/bullseye/libnl-nf-3-dev_*.deb
target/debs/bullseye/libyang_*.deb
displayName: "Download common-libs deb packages"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: Azure.sonic-swss-common
artifact: sonic-swss-common-bookworm
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
allowPartiallySucceededBuilds: true
path: $(Build.ArtifactStagingDirectory)/download/swsscommon
patterns: |
libswsscommon_1.0.0_*.deb
libswsscommon-dev_1.0.0_*.deb
displayName: "Download libswsscommon deb packages"
- script: |
set -exuo pipefail
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y libboost-dev libboost-serialization-dev libhiredis-dev libzmq3-dev
pushd download
sudo dpkg -i $(find common -type f -name '*.deb')
sudo dpkg --ignore-depends=libboost-serialization1.74.0 -i $(find swsscommon -type f -name '*.deb')
popd
rm -rf download
workingDirectory: $(Build.ArtifactStagingDirectory)
displayName: 'Install libswsscommon'
- script: |
make ci-format
displayName: 'Check formatting'
- script: |
make ci-build
displayName: 'Build'
- script: |
make ci-doc
displayName: 'Document'
- script: |
make ci-lint
displayName: 'Lint'
- script: |
make ci-test
displayName: 'Test'