Skip to content

Commit

Permalink
[ci]: add build for arm64 and armhf (sonic-net#757)
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <lguohan@gmail.com>
  • Loading branch information
lguohan authored Dec 29, 2020
1 parent 754849a commit 1f87590
Showing 1 changed file with 197 additions and 63 deletions.
260 changes: 197 additions & 63 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,201 @@ trigger:
branches:
include:
- "*"
jobs:
- job:
displayName: "amd64"
pool:
vmImage: 'ubuntu-20.04'

pool:
vmImage: 'ubuntu-latest'

container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest

steps:
- script: |
sudo apt-get install -qq -y \
qtbase5-dev \
libdbus-glib-1-2 \
libdbus-glib-1-dev \
libpcsclite-dev \
docbook-to-man \
docbook-utils \
aspell-en \
libhiredis0.14 \
libhiredis-dev \
libnl-3-dev \
libnl-genl-3-dev \
libnl-route-3-dev \
libnl-nf-3-dev \
libnl-cli-3-dev \
swig3.0 \
libpython2.7-dev \
libzmq5 libzmq3-dev \
libboost-all-dev
sudo apt-get install -y redis-server
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 start
sudo apt-get install -y rsyslog
sudo service rsyslog start
displayName: "Install dependencies"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifacts: 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
workingDirectory: $(Pipeline.Workspace)
displayName: "Install sonic swss Common"
- checkout: self
submodules: true
- script: |
./autogen.sh
fakeroot dpkg-buildpackage -b -us -uc -Tbinary-syncd-vs
cp ../*.deb .
displayName: "Compile sonic sairedis"
- script: |
make check
displayName: "Run sonic sairedis unit tests"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-sairedis
displayName: "Archive sonic sairedis debian packages"
container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest

steps:
- script: |
sudo apt-get install -qq -y \
qtbase5-dev \
libdbus-glib-1-2 \
libdbus-glib-1-dev \
libpcsclite-dev \
docbook-to-man \
docbook-utils \
aspell-en \
libhiredis0.14 \
libhiredis-dev \
libnl-3-dev \
libnl-genl-3-dev \
libnl-route-3-dev \
libnl-nf-3-dev \
libnl-cli-3-dev \
swig3.0 \
libpython2.7-dev \
libzmq5 libzmq3-dev \
libboost-all-dev
sudo apt-get install -y redis-server
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 start
sudo apt-get install -y rsyslog
sudo service rsyslog start
displayName: "Install dependencies"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifacts: 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
workingDirectory: $(Pipeline.Workspace)
displayName: "Install sonic swss Common"
- checkout: self
submodules: true
- script: |
./autogen.sh
fakeroot dpkg-buildpackage -b -us -uc -Tbinary-syncd-vs
cp ../*.deb .
displayName: "Compile sonic sairedis"
- script: |
make check || true
displayName: "Run sonic sairedis unit tests"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-sairedis
displayName: "Archive sonic sairedis debian packages"

- job:
timeoutInMinutes: 180
displayName: "arm64"
pool: sonic

container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster-arm64:latest

steps:
- script: |
sudo apt-get install -qq -y \
qtbase5-dev \
libdbus-glib-1-2 \
libdbus-glib-1-dev \
libpcsclite-dev \
docbook-to-man \
docbook-utils \
aspell-en \
libhiredis0.14 \
libhiredis-dev \
libnl-3-dev \
libnl-genl-3-dev \
libnl-route-3-dev \
libnl-nf-3-dev \
libnl-cli-3-dev \
swig3.0 \
libpython2.7-dev \
libzmq5 libzmq3-dev \
libboost-all-dev
sudo apt-get install -y redis-server
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 start
sudo apt-get install -y rsyslog
sudo service rsyslog start
displayName: "Install dependencies"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifacts: 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
workingDirectory: $(Pipeline.Workspace)
displayName: "Install sonic swss Common"
- checkout: self
submodules: true
- script: |
./autogen.sh
fakeroot dpkg-buildpackage -b -us -uc -Tbinary-syncd-vs -j$(nproc)
cp ../*.deb .
displayName: "Compile sonic sairedis"
- script: |
make check || true
displayName: "Run sonic sairedis unit tests"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-sairedis.arm64
displayName: "Archive sonic sairedis debian packages"

- job:
timeoutInMinutes: 180
displayName: "armhf"
pool: sonic

container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster-armhf:latest

steps:
- script: |
sudo apt-get install -qq -y \
qtbase5-dev \
libdbus-glib-1-2 \
libdbus-glib-1-dev \
libpcsclite-dev \
docbook-to-man \
docbook-utils \
aspell-en \
libhiredis0.14 \
libhiredis-dev \
libnl-3-dev \
libnl-genl-3-dev \
libnl-route-3-dev \
libnl-nf-3-dev \
libnl-cli-3-dev \
swig3.0 \
libpython2.7-dev \
libzmq5 libzmq3-dev \
libboost-all-dev
sudo apt-get install -y redis-server
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 start
sudo apt-get install -y rsyslog
sudo service rsyslog start
displayName: "Install dependencies"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifacts: 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
workingDirectory: $(Pipeline.Workspace)
displayName: "Install sonic swss Common"
- checkout: self
submodules: true
- script: |
./autogen.sh
fakeroot dpkg-buildpackage -b -us -uc -Tbinary-syncd-vs -j$(nproc)
cp ../*.deb .
displayName: "Compile sonic sairedis"
- script: |
make check || true
displayName: "Run sonic sairedis unit tests"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-sairedis.armhf
displayName: "Archive sonic sairedis debian packages"

0 comments on commit 1f87590

Please sign in to comment.