[ci] Support the cross build for armhf/arm64 (#11587)

Why I did it
[ci] Support the cross build for armhf/arm64
This commit is contained in:
xumia 2022-08-01 11:31:02 +08:00 committed by GitHub
parent 9c64c1ea47
commit 6f323b3e83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -16,6 +16,9 @@ parameters:
- name: 'jobGroups'
type: object
default: ''
- name: 'qemuOrCrossBuild'
type: boolean
default: false
jobs:
- template: azure-pipelines-image-template.yml
@ -36,6 +39,9 @@ jobs:
docker_syncd_rpc_image: no
syncd_rpc_image: no
platform_rpc: no
${{ if parameters.qemuOrCrossBuild }}:
SONIC_SLAVE_DOCKER_DRIVER: 'vfs'
CACHE_MODE: 'none'
${{ if ne(parameters.jobGroups, '') }}:
jobGroups: ${{ parameters.jobGroups }}
${{ if eq(parameters.jobGroups, '') }}:
@ -67,7 +73,8 @@ jobs:
platform_rpc: centec
- name: centec-arm64
pool: sonicbld-arm64
${{ if not(parameters.qemuOrCrossBuild) }}:
pool: sonicbld-arm64
timeoutInMinutes: 2880
variables:
PLATFORM_ARCH: arm64
@ -81,7 +88,8 @@ jobs:
dbg_image: yes
- name: marvell-armhf
pool: sonicbld-armhf
${{ if not(parameters.qemuOrCrossBuild) }}:
pool: sonicbld-armhf
timeoutInMinutes: 2880
variables:
PLATFORM_ARCH: armhf

View File

@ -44,3 +44,5 @@ stages:
parameters:
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
jobFilters: none
${{ if contains(variables['Build.DefinitionName'], 'cross') }}:
qemuOrCrossBuild: true