From 6ebc0edce4dc4cf5400c5f70049bab14d6aaefb2 Mon Sep 17 00:00:00 2001 From: lguohan Date: Tue, 29 Dec 2020 17:50:01 -0800 Subject: [PATCH] [ci]: add azure-pipeline for amd64 (#1571) Signed-off-by: Guohan Lu --- .artifactignore | 2 ++ azure-pipelines.yml | 71 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .artifactignore create mode 100644 azure-pipelines.yml diff --git a/.artifactignore b/.artifactignore new file mode 100644 index 000000000000..1126a160d97d --- /dev/null +++ b/.artifactignore @@ -0,0 +1,2 @@ +**/* +!*.deb diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000000..aa0c9f5b0daf --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,71 @@ +# 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 -y libhiredis0.14 libhiredis-dev + sudo apt-get install -y libzmq5 libzmq3-dev + 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 + sudo apt-get install -y libdbus-1-3 + sudo apt-get install -y libteam-dev \ + libteam5 \ + libteamdctl0 + displayName: "Install dependencies" + - task: DownloadPipelineArtifact@2 + inputs: + source: specific + project: build + pipeline: 9 + artifacts: sonic-swss-common + displayName: "Download sonic swss common deb packages" + - task: DownloadPipelineArtifact@2 + inputs: + source: specific + project: build + pipeline: 12 + artifacts: sonic-sairedis + displayName: "Download sonic sairedis 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 + sudo dpkg -i sonic-sairedis/libsaivs_*.deb + sudo dpkg -i sonic-sairedis/libsaivs-dev_*.deb + sudo dpkg -i sonic-sairedis/libsairedis_*.deb + sudo dpkg -i sonic-sairedis/libsairedis-dev_*.deb + sudo dpkg -i sonic-sairedis/libsaimetadata_*.deb + sudo dpkg -i sonic-sairedis/libsaimetadata-dev_*.deb + sudo dpkg -i sonic-sairedis/syncd-vs_*.deb + workingDirectory: $(Pipeline.Workspace) + displayName: "Install sonic swss common and sairedis" + - checkout: self + submodules: true + - script: | + ./autogen.sh + dpkg-buildpackage -us -uc -b -j$(nproc) + cp ../*.deb . + displayName: "Compile sonic swss" + - publish: $(System.DefaultWorkingDirectory)/ + artifact: sonic-swss + displayName: "Archive swss debian packages"