[Build]: Enable arm pr check #9362

Support marvell-armhf dpkg cache and the azp check.
Waiting for merging PR #9381 to 202012 branch, so only azp template change in this PR.

Move the VS build to a new stage BuildVS, change the Test stage only depending on BuildVS, running the BuildVS and the other platform's build in parallel. The Test stage do not has dependency on the marvel-armhf build, reduce the overall build time caused by longer build time of marvel-armhf build.
This commit is contained in:
xumia 2021-12-04 09:31:53 +08:00 committed by GitHub
parent 1e8fe7dd6c
commit 05351731d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

View File

@ -28,7 +28,7 @@ jobs:
- template: cleanup.yml
- ${{ parameters.preSteps }}
- script: |
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox)$"; then
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf)$"; then
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)"
BUILD_OPTIONS="$(BUILD_OPTIONS) $CACHE_OPTIONS"
echo "##vso[task.setvariable variable=BUILD_OPTIONS]$BUILD_OPTIONS"

View File

@ -31,7 +31,7 @@ resources:
endpoint: build
stages:
- stage: Build
- stage: BuildVS
pool: sonicbld
variables:
CACHE_MODE: rcache
@ -43,10 +43,29 @@ stages:
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
jobGroups:
- name: vs
- stage: Build
pool: sonicbld
dependsOn: []
variables:
CACHE_MODE: rcache
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
jobs:
- template: .azure-pipelines/azure-pipelines-build.yml
parameters:
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
jobGroups:
- name: broadcom
- name: mellanox
- name: marvell-armhf
pool: sonicbld-armhf
timeoutInMinutes: 1200
variables:
PLATFORM_ARCH: armhf
- stage: Test
dependsOn: BuildVS
variables:
- name: inventory
value: veos_vtb