forked from sonic-net/sonic-swss-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
103 lines (91 loc) · 2.85 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
# 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"
pool:
vmImage: 'ubuntu-20.04'
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest
steps:
- script: |
sudo apt-get install -qq -y \
libhiredis-dev \
libnl-3-dev \
libnl-genl-3-dev \
libnl-route-3-dev \
libnl-nf-3-dev \
swig3.0
displayName: "Install dependencies"
- script: |
./autogen.sh
dpkg-buildpackage -us -uc -b -j$(nproc)
cp ../*.deb .
displayName: "Compile sonic swss common"
- script: |
sudo pip install Pympler==0.8
sudo apt-get install -y redis-server
sudo sed -i 's/notify-keyspace-events ""/notify-keyspace-events AKE/' /etc/redis/redis.conf
sudo sed -ri 's/^# unixsocket/unixsocket/' /etc/redis/redis.conf
sudo sed -ri 's/^unixsocketperm .../unixsocketperm 777/' /etc/redis/redis.conf
sudo sed -ri 's/redis-server.sock/redis.sock/' /etc/redis/redis.conf
sudo service redis-server restart
sudo dpkg -i libswsscommon_*.deb
sudo dpkg -i python-swsscommon_*.deb
sudo ./tests/tests && redis-cli FLUSHALL && pytest
displayName: "Run swss common unit tests"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-swss-common
displayName: "Archive swss common debian packages"
- job:
displayName: "arm64"
pool: sonic
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster-arm64:latest
steps:
- script: |
sudo apt-get install -qq -y \
libhiredis-dev \
libnl-3-dev \
libnl-genl-3-dev \
libnl-route-3-dev \
libnl-nf-3-dev \
swig3.0
displayName: "Install dependencies"
- script: |
./autogen.sh
dpkg-buildpackage -us -uc -b -j$(nproc)
cp ../*.deb .
displayName: "Compile sonic swss common"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-swss-common.arm64
displayName: "Archive swss common debian packages"
- job:
displayName: "armhf"
pool: sonic
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster-armhf:latest
steps:
- script: |
sudo apt-get install -qq -y \
libhiredis-dev \
libnl-3-dev \
libnl-genl-3-dev \
libnl-route-3-dev \
libnl-nf-3-dev \
swig3.0
displayName: "Install dependencies"
- script: |
./autogen.sh
dpkg-buildpackage -us -uc -b -j$(nproc)
cp ../*.deb .
displayName: "Compile sonic swss common"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-swss-common.armhf
displayName: "Archive swss common debian packages"