Skip to content

Commit 7c57fef

Browse files
authored
[ci]: build amd64/armhf/arm64 for CI build (#196)
Signed-off-by: Guohan Lu <[email protected]>
1 parent fc74b1c commit 7c57fef

File tree

2 files changed

+73
-17
lines changed

2 files changed

+73
-17
lines changed

.azure-pipelines/build-template.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
parameters:
2+
- name: arch
3+
type: string
4+
values:
5+
- amd64
6+
- armhf
7+
- arm64
8+
9+
- name: pool
10+
type: string
11+
values:
12+
- sonicbld
13+
- sonicbld_8c
14+
default: sonicbld
15+
16+
- name: timeout
17+
type: number
18+
default: 600
19+
20+
- name: sonic_slave
21+
type: string
22+
23+
- name: artifact_name
24+
type: string
25+
26+
jobs:
27+
- job:
28+
pool: ${{ parameters.pool }}
29+
displayName: ${{ parameters.arch }}
30+
timeoutInMinutes: ${{ parameters.timeout }}
31+
32+
container:
33+
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}:latest
34+
35+
steps:
36+
- checkout: self
37+
clean: true
38+
displayName: 'Checkout code'
39+
- script: |
40+
git config --global user.email "[email protected]"
41+
git config --global user.name "Guohan Lu"
42+
export kernel_procure_method=build
43+
cat /proc/cpuinfo
44+
CONFIGURED_ARCH=${{ parameters.arch }} make
45+
displayName: "Compile sonic kernel"
46+
- publish: $(System.DefaultWorkingDirectory)/
47+
artifact: ${{ parameters.artifact_name }}
48+
displayName: "Archive sonic kernel debian packages"

azure-pipelines.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,30 @@ trigger:
77
branches:
88
include:
99
- "*"
10-
jobs:
11-
- job:
12-
timeoutInMinutes: 240
13-
pool: sonicbld
1410

15-
container:
16-
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest
11+
stages:
12+
- stage: Build
1713

18-
steps:
19-
- script: |
20-
git config --global user.email "[email protected]"
21-
git config --global user.name "Guohan Lu"
22-
export kernel_procure_method=build
23-
cat /proc/cpuinfo
24-
make
25-
displayName: "Compile sonic kernel"
26-
- publish: $(System.DefaultWorkingDirectory)/
27-
artifact: sonic-linux-kernel
28-
displayName: "Archive sonic kernel debian packages"
14+
jobs:
15+
- template: .azure-pipelines/build-template.yml
16+
parameters:
17+
arch: amd64
18+
sonic_slave: sonic-slave-buster
19+
artifact_name: sonic-linux-kernel
20+
21+
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
22+
- template: .azure-pipelines/build-template.yml
23+
parameters:
24+
arch: armhf
25+
timeout: 1440
26+
pool: sonicbld_8c
27+
sonic_slave: sonic-slave-buster-armhf
28+
artifact_name: sonic-linux-kernel.armhf
29+
30+
- template: .azure-pipelines/build-template.yml
31+
parameters:
32+
arch: arm64
33+
timeout: 1440
34+
pool: sonicbld_8c
35+
sonic_slave: sonic-slave-buster-arm64
36+
artifact_name: sonic-linux-kernel.arm64

0 commit comments

Comments
 (0)