Skip to content

Commit

Permalink
[ci]: build amd64/armhf/arm64
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <[email protected]>
  • Loading branch information
lguohan committed Feb 9, 2021
1 parent fc74b1c commit 3524970
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 17 deletions.
56 changes: 56 additions & 0 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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

- variables:
- name: sonic-slave
value: sonic-slave-buster
- name: artifact_name
value: sonic-linux-kernel
condition: $[eq(${{ parameters.arch }}, 'amd64')]

- variables:
- name: sonic-slave
value: sonic-slave-buster-${{ parameters.arch }}
- name: artifact_name
value: sonic-linux-kernel.${{ parameters.arch }}
condition: $[ne(${{ parameters.arch }}, 'amd64')]

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

container:
image: sonicdev-microsoft.azurecr.io:443/$(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: $(artifact_name)
displayName: "Archive sonic kernel debian packages"
33 changes: 16 additions & 17 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@ 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

- template: .azure-pipelines/build-template.yml
parameters:
arch: armhf
timeout: 1440

- template: .azure-pipelines/build-template.yml
parameters:
arch: arm64
timeout: 1440

0 comments on commit 3524970

Please sign in to comment.