forked from Marvell-OpenNOS/sonic-swss-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
120 lines (108 loc) · 3.44 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
# 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:
- "*"
resources:
repositories:
- repository: sonic-sairedis
type: github
name: Azure/sonic-sairedis
endpoint: build
- repository: sonic-swss
type: github
name: Azure/sonic-swss
endpoint: build
stages:
- stage: Build
jobs:
- job:
displayName: "amd64/ubuntu-20.04"
pool:
vmImage: 'ubuntu-20.04'
steps:
- script: |
sudo apt-get update
sudo apt-get install -y make libtool m4 autoconf dh-exec debhelper cmake pkg-config \
libhiredis-dev libnl-3-dev libnl-genl-3-dev libnl-route-3-dev libnl-nf-3-dev swig3.0 \
libpython2.7-dev libgtest-dev libboost-dev libboost1.71-dev
sudo apt-get install -y sudo
sudo apt-get install -y redis-server redis-tools
sudo apt-get install -y python3-pip
sudo pip3 install pytest
sudo apt-get install -y python
sudo apt-get install cmake libgtest-dev
cd /usr/src/gtest && sudo cmake . && sudo make
displayName: "Install dependencies"
- script: |
dpkg-buildpackage -rfakeroot -us -uc -b -j$(nproc) && cp ../*.deb .
displayName: "Compile sonic swss common"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-swss-common.amd64.ubuntu20_04
displayName: "Archive swss common debian packages"
- template: .azure-pipelines/build-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-buster
artifact_name: sonic-swss-common
run_unit_test: true
- stage: BuildArm
dependsOn: Build
condition: succeeded('Build')
jobs:
- template: .azure-pipelines/build-template.yml
parameters:
arch: armhf
timeout: 180
pool: sonicbld
sonic_slave: sonic-slave-buster-armhf
artifact_name: sonic-swss-common.armhf
- template: .azure-pipelines/build-template.yml
parameters:
arch: arm64
timeout: 180
pool: sonicbld
sonic_slave: sonic-slave-buster-arm64
artifact_name: sonic-swss-common.arm64
- stage: BuildSairedis
dependsOn: Build
condition: succeeded('Build')
jobs:
- template: .azure-pipelines/build-sairedis-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-buster
swss_common_artifact_name: sonic-swss-common
artifact_name: sonic-sairedis
syslog_artifact_name: sonic-sairedis.syslog
- stage: BuildSwss
dependsOn: BuildSairedis
condition: succeeded('BuildSairedis')
jobs:
- template: .azure-pipelines/build-swss-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-buster
swss_common_artifact_name: sonic-swss-common
sairedis_artifact_name: sonic-sairedis
artifact_name: sonic-swss
- 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: Test
dependsOn: BuildDocker
condition: succeeded('BuildDocker')
jobs:
- template: .azure-pipelines/test-docker-sonic-vs-template.yml
parameters:
log_artifact_name: log