From 240a31aacc28291de869f9583e2ed22aa8b620cc Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Sat, 13 Jun 2026 16:00:14 -0700 Subject: [PATCH] [ci] Install libyang python bindings in coverage build (#1208) The coverage build job (build-template.yml) generates common/cfg_schema.h via gen_cfg_schema.py, which imports sonic_yang -> libyang. The job only installed the libyang3 C libraries (dpkg -i) but not the Python bindings, causing 'ModuleNotFoundError: No module named libyang' and a build failure. The inline amd64 job in azure-pipelines.yml already installs the bindings via pip (commit 1431c3d), but build-template.yml was missed. Add the same python3-cffi + 'pip3 install libyang==3.3.0' step here, gated off trixie to match the existing pattern. Signed-off-by: Ying Xie --- .azure-pipelines/build-template.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index 0402ea4..0999b24 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -108,6 +108,13 @@ jobs: sudo dpkg -i $(find ./download -name *.deb) workingDirectory: $(Build.ArtifactStagingDirectory) displayName: "Install libyang from common lib" + - script: | + set -ex + sudo apt-get install -y python3-cffi + sudo pip3 install --no-build-isolation 'libyang==3.3.0' + workingDirectory: $(Build.ArtifactStagingDirectory) + displayName: "Install libyang python bindings" + condition: ne('${{ parameters.debian_version }}', 'trixie') - task: DownloadPipelineArtifact@2 inputs: source: specific