From 9e183a650cf38e0d5af46adc1342dcde85ecb84d Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Tue, 16 Apr 2024 17:26:42 -0500 Subject: [PATCH] Add bookworm build to the PR checkers (#3114) What I did Add a Bookworm build to the PR checkers. Also fix some Bookworm build errors that crept in. Why I did it Buildimage now builds swss for Bookworm, so the build needs to succeed. --- azure-pipelines.yml | 39 +++++++++++++++++++++ orchagent/p4orch/tests/acl_manager_test.cpp | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 083fb1047c..e3255ba15b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -92,6 +92,45 @@ stages: artifact_name: sonic-swss.arm64 archive_gcov: false +- stage: BuildBookworm + dependsOn: BuildArm + condition: succeeded('BuildArm') + jobs: + - template: .azure-pipelines/build-template.yml + parameters: + arch: amd64 + pool: sonicbld + sonic_slave: sonic-slave-bookworm + common_lib_artifact_name: common-lib + swss_common_artifact_name: sonic-swss-common-bookworm + sairedis_artifact_name: sonic-sairedis-bookworm + artifact_name: sonic-swss-bookworm + archive_gcov: false + + - template: .azure-pipelines/build-template.yml + parameters: + arch: armhf + timeout: 240 + pool: sonicbld-armhf + sonic_slave: sonic-slave-bookworm-armhf + common_lib_artifact_name: common-lib.armhf + swss_common_artifact_name: sonic-swss-common-bookworm.armhf + sairedis_artifact_name: sonic-sairedis-bookworm.armhf + artifact_name: sonic-swss-bookworm.armhf + archive_gcov: false + + - template: .azure-pipelines/build-template.yml + parameters: + arch: arm64 + timeout: 240 + pool: sonicbld-arm64 + sonic_slave: sonic-slave-bookworm-arm64 + common_lib_artifact_name: common-lib.arm64 + swss_common_artifact_name: sonic-swss-common-bookworm.arm64 + sairedis_artifact_name: sonic-sairedis-bookworm.arm64 + artifact_name: sonic-swss-bookworm.arm64 + archive_gcov: false + - stage: BuildDocker dependsOn: Build condition: succeeded('Build') diff --git a/orchagent/p4orch/tests/acl_manager_test.cpp b/orchagent/p4orch/tests/acl_manager_test.cpp index 107dfdfde5..13856c07ea 100644 --- a/orchagent/p4orch/tests/acl_manager_test.cpp +++ b/orchagent/p4orch/tests/acl_manager_test.cpp @@ -240,7 +240,7 @@ std::string BuildMatchFieldJsonStrKindComposite(std::vector elem { nlohmann::json match_json; match_json[kAclMatchFieldKind] = kAclMatchFieldKindComposite; - for (const auto element : elements) + for (const auto &element : elements) { match_json[kAclMatchFieldElements].push_back(element); }