Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci]: build amd64/armhf/arm64 #196

Merged
merged 5 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
parameters:
- name: arch
type: string
values:
- amd64
- armhf
- arm64

- name: pool
type: string
values:
- sonicbld
- sonicbld_8c
default: sonicbld

- name: timeout
type: number
default: 600

- name: sonic_slave
type: string

- name: artifact_name
type: string

jobs:
- job:
pool: ${{ parameters.pool }}
displayName: ${{ parameters.arch }}
timeoutInMinutes: ${{ parameters.timeout }}

container:
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}:latest

steps:
- checkout: self
clean: true
displayName: 'Checkout code'
- script: |
git config --global user.email "[email protected]"
git config --global user.name "Guohan Lu"
export kernel_procure_method=build
cat /proc/cpuinfo
CONFIGURED_ARCH=${{ parameters.arch }} make
displayName: "Compile sonic kernel"
- publish: $(System.DefaultWorkingDirectory)/
artifact: ${{ parameters.artifact_name }}
displayName: "Archive sonic kernel debian packages"
42 changes: 25 additions & 17 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,30 @@ trigger:
branches:
include:
- "*"
jobs:
- job:
timeoutInMinutes: 240
pool: sonicbld

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

steps:
- script: |
git config --global user.email "[email protected]"
git config --global user.name "Guohan Lu"
export kernel_procure_method=build
cat /proc/cpuinfo
make
displayName: "Compile sonic kernel"
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-linux-kernel
displayName: "Archive sonic kernel debian packages"
jobs:
- template: .azure-pipelines/build-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-buster
artifact_name: sonic-linux-kernel

- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: .azure-pipelines/build-template.yml
parameters:
arch: armhf
timeout: 1440
pool: sonicbld_8c
sonic_slave: sonic-slave-buster-armhf
artifact_name: sonic-linux-kernel.armhf

- template: .azure-pipelines/build-template.yml
parameters:
arch: arm64
timeout: 1440
pool: sonicbld_8c
sonic_slave: sonic-slave-buster-arm64
artifact_name: sonic-linux-kernel.arm64