-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
- Loading branch information
1 parent
147d39f
commit 02817d8
Showing
3 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
parameters: | ||
- name: 'arch' | ||
type: string | ||
- name: 'pool' | ||
type: object | ||
default: {} | ||
- name: 'containerImage' | ||
type: string | ||
- name: 'codeCoverage' | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
- job: | ||
displayName: ${{ parameters.arch }} | ||
timeoutInMinutes: 60 | ||
pool: ${{ parameters.pool }} | ||
|
||
container: | ||
image: ${{ parameters.containerImage }} | ||
|
||
steps: | ||
- ${{ if and(eq(parameters.arch, 'amd64'), parameters.codeCoverage) }}: | ||
- script: | | ||
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb | ||
sudo dpkg -i packages-microsoft-prod.deb | ||
rm packages-microsoft-prod.deb | ||
sudo apt-get update | ||
sudo apt-get install -y apt-transport-https | ||
sudo apt-get install -y dotnet-sdk-6.0 | ||
displayName: install .Net | ||
- script: | | ||
sudo apt-get install -y \ | ||
libboost-system-dev \ | ||
libboost-thread-dev \ | ||
googletest \ | ||
libgtest-dev \ | ||
libgmock-dev \ | ||
libhiredis-dev \ | ||
libnl-3-dev \ | ||
libnl-route-3-dev \ | ||
libnl-genl-3-dev \ | ||
libnl-nf-3-dev | ||
displayName: "Install dependencies" | ||
- checkout: self | ||
clean: true | ||
submodules: true | ||
- task: DownloadPipelineArtifact@2 | ||
inputs: | ||
source: specific | ||
project: build | ||
pipeline: 9 | ||
${{ if eq(parameters.arch, 'amd64') }}: | ||
artifact: sonic-swss-common | ||
${{ else }}: | ||
artifact: sonic-swss-common.${{ parameters.arch }} | ||
runVersion: 'latestFromBranch' | ||
runBranch: 'refs/heads/master' | ||
path: '$(Build.SourcesDirectory)/sonic-swss-common' | ||
displayName: "Download sonic swss common deb packages" | ||
- script: | | ||
sudo dpkg -i sonic-swss-common/libswsscommon_1.0.0_${{ parameters.arch }}.deb | ||
sudo dpkg -i sonic-swss-common/libswsscommon-dev_1.0.0_${{ parameters.arch }}.deb | ||
displayName: "Install sonic swss common" | ||
- script: | | ||
rm ../*.deb | ||
dpkg-buildpackage -us -uc -b -j$(nproc) | ||
cp ../*.deb $(Build.ArtifactStagingDirectory) | ||
displayName: "Compile sonic dhcp-relay" | ||
- publish: $(Build.ArtifactStagingDirectory) | ||
artifact: sonic-dhcp-relay.${{ parameters.arch }} | ||
displayName: "Archive dhcp-relay debian packages" | ||
- ${{ if and(eq(parameters.arch, 'amd64'), parameters.codeCoverage) }}: | ||
- task: PublishCodeCoverageResults@1 | ||
inputs: | ||
summaryFileLocation: dhcprelay-test-result.xml | ||
pathToSources: $(Build.SourcesDirectory) | ||
codeCoverageTool: 'Cobertura' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 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: | ||
- template: .azure-pipelines/build.yml | ||
parameters: | ||
arch: amd64 | ||
pool: | ||
vmImage: 'ubuntu-20.04' | ||
codeCoverage: false | ||
containerImage: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye:latest | ||
- template: .azure-pipelines/build.yml | ||
parameters: | ||
arch: arm64 | ||
pool: sonicbld-arm64 | ||
containerImage: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye-arm64:latest | ||
- template: .azure-pipelines/build.yml | ||
parameters: | ||
arch: armhf | ||
pool: sonicbld-armhf | ||
containerImage: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye-armhf:latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
coverage: | ||
status: # Code coverage status will be posted to pull requests based on targets defined below. | ||
comments: on # Off by default. When on, details about coverage for each file changed will be posted as a pull request comment. | ||
diff: # Diff coverage is code coverage only for the lines changed in a pull request. | ||
target: 60% # Set this to a desired percentage. Default is 70 percent |