代码拉取完成,页面将自动刷新
# 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 libgmock-dev
cd /usr/src/gtest && sudo cmake . && sudo make
ARCH=$(dpkg --print-architecture)
set -x
sudo curl -fsSL -o /usr/local/bin/bazel \
https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH}
sudo chmod 755 /usr/local/bin/bazel
displayName: "Install dependencies"
- script: |
./autogen.sh
dpkg-buildpackage -rfakeroot -us -uc -b -j$(nproc) && cp ../*.deb .
displayName: "Compile sonic swss common"
- script: |
bazel build //...
bazel test //...
displayName: "Compile and test all Bazel targets"
- 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
archive_gcov: true
- stage: BuildArm
dependsOn: Build
condition: succeeded('Build')
jobs:
- template: .azure-pipelines/build-template.yml
parameters:
arch: armhf
timeout: 180
pool: sonicbld-armhf
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-arm64
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。