Skip to content

W test 2 revert to check build issue #1004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
48afa3a
1. finish gen cfg_schema.h during build
wen587 Mar 7, 2025
216f100
2. remove from make, add in deb build
wen587 Mar 7, 2025
1d185f4
1.1 should add py early
wen587 Mar 7, 2025
b44f76b
3. remove common lib and include to schema.h
wen587 Mar 10, 2025
e00fbed
remove op in debian/rules
wen587 Mar 19, 2025
c443f48
rm comment and dist
wen587 Mar 21, 2025
f7eea16
remove duplicate in schema.h
wen587 Mar 25, 2025
ad7b3ec
remove cfg_schema.h in git, update comment
wen587 Mar 31, 2025
4848464
fix yang dep
wen587 Apr 1, 2025
21efcf0
1
wen587 Apr 1, 2025
b380d57
download new deb
wen587 Apr 1, 2025
e46ba5b
libyang-cpp0.16
wen587 Apr 1, 2025
30e6678
debian/control
wen587 Apr 1, 2025
5f01dc8
fix whl first,rever 0.16
wen587 Apr 2, 2025
2155759
change artifact
wen587 Apr 2, 2025
861da39
-p
wen587 Apr 2, 2025
842bbab
test for 20.04
wen587 Apr 2, 2025
ea2a047
rm yang0.16 use 1.0.73
wen587 Apr 2, 2025
fb940d7
update libc from ubuntu22
wen587 Apr 2, 2025
1511c33
flag to skip cfg_schema.h
wen587 Apr 2, 2025
3170499
remoev 22 0.16yang
wen587 Apr 2, 2025
d125228
put the skip in dpkg instead of make
wen587 Apr 2, 2025
54992a5
use py3
wen587 Apr 2, 2025
ce04ee2
install yang
wen587 Apr 2, 2025
3bc183d
fix bug
wen587 Apr 2, 2025
c66e87e
remove skip
wen587 Apr 3, 2025
9bd9760
install whl in 22
wen587 Apr 3, 2025
df25288
fix test
wen587 Apr 3, 2025
294a29d
inden
wen587 Apr 7, 2025
fc8662b
why not download
wen587 Apr 7, 2025
6521e37
update dir
wen587 Apr 7, 2025
0ab7d5e
force lib1.0.73
wen587 Apr 8, 2025
7e2b3e2
Revert "force lib1.0.73"
wen587 Apr 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,32 @@ jobs:
patterns: |
target/debs/${{ parameters.debian_version }}/libyang-*.deb
target/debs/${{ parameters.debian_version }}/libyang_*.deb
target/debs/${{ parameters.debian_version }}/libyang-cpp_*.deb
target/debs/${{ parameters.debian_version }}/python3-yang_*.deb
displayName: "Download libyang from ${{ parameters.arch }} common lib"
- script: |
set -ex
sudo dpkg -i $(find ./download -name *.deb)
workingDirectory: $(Build.ArtifactStagingDirectory)
displayName: "Install libyang from common lib"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 142
artifact: sonic-buildimage.vs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
patterns: |
target/python-wheels/${{ parameters.debian_version }}/sonic_yang_mgmt-1.0-py3-none-any.whl
target/python-wheels/${{ parameters.debian_version }}/sonic_yang_models-1.0-py3-none-any.whl
displayName: "Download yang wheel from latest sonic-buildimage build"
- script: |
set -ex
sudo pip3 install $(find ./download -name *.whl)
workingDirectory: $(Build.ArtifactStagingDirectory)
displayName: "Install yang wheel from common lib"
- script: |
set -ex
rm ../*.deb || true
Expand All @@ -107,7 +127,7 @@ jobs:
sudo sed -ri 's/^unixsocketperm .../unixsocketperm 777/' /etc/redis/redis.conf
sudo sed -ri 's/redis-server.sock/redis.sock/' /etc/redis/redis.conf
sudo service redis-server restart
sudo mkdir /usr/local/yang-models
sudo mkdir -p /usr/local/yang-models

sudo dpkg -i libswsscommon_*.deb
sudo dpkg -i libswsscommon-dev_*.deb
Expand Down
20 changes: 19 additions & 1 deletion .azure-pipelines/test-docker-sonic-vs-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ parameters:
type: string
default: '$(BUILD_BRANCH)'

- name: debian_version
type: string
default: bookworm

jobs:
- job:
displayName: vstest
Expand Down Expand Up @@ -49,12 +53,26 @@ jobs:
runBranch: 'refs/heads/${{ parameters.sonic_buildimage_ubuntu20_04 }}'
path: $(Build.ArtifactStagingDirectory)/download
displayName: "Download sonic buildimage ubuntu20.04 deb packages"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: Azure.sonic-buildimage.common_libs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
artifact: common-lib
patterns: |
target/debs/${{ parameters.debian_version }}/libyang_*.deb
displayName: "Download yang deb from amd64 common lib"

- script: |
set -ex
find $(Build.ArtifactStagingDirectory)/download -name "*.deb" -type f
sudo sonic-swss-common/.azure-pipelines/build_and_install_module.sh

sudo apt-get install -y libhiredis0.14 libyang0.16
sudo apt-get install -y libhiredis0.14
sudo dpkg -i $(Build.ArtifactStagingDirectory)/download/target/debs/${{ parameters.debian_version }}/libyang_*.deb
sudo dpkg -i $(Build.ArtifactStagingDirectory)/download/libprotobuf*_amd64.deb $(Build.ArtifactStagingDirectory)/download/libprotobuf-lite*_amd64.deb $(Build.ArtifactStagingDirectory)/download/python3-protobuf*_amd64.deb
sudo dpkg -i $(Build.ArtifactStagingDirectory)/download/libdashapi*.deb
sudo dpkg -i --force-confask,confnew $(Build.ArtifactStagingDirectory)/download/libswsscommon_1.0.0_amd64.deb || apt-get install -f
Expand Down
92 changes: 90 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,64 @@ stages:
sudo apt-get install -y python3-pip
sudo pip3 install pytest
sudo apt-get install -y python
sudo apt-get install cmake libgtest-dev libgmock-dev libyang-dev
sudo apt-get install cmake libgtest-dev libgmock-dev
cd /usr/src/gtest && sudo cmake . && sudo make
ARCH=$(dpkg --print-architecture)
set -x
sudo curl -fsSL -o /usr/local/bin/bazel \
https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH}
sudo chmod 755 /usr/local/bin/bazel
displayName: "Install dependencies"
- script: |
echo "deb http://archive.ubuntu.com/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/jammy.list
sudo apt-get update
sudo apt-get install -y libc6 -t jammy
sudo rm /etc/apt/sources.list.d/jammy.list
sudo apt-get update
displayName: "Upgrade libyang prerequisite libc from ubuntu22"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: Azure.sonic-buildimage.common_libs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
artifact: common-lib
patterns: |
target/debs/${{ parameters.debian_version }}/libyang_*.deb
target/debs/${{ parameters.debian_version }}/libyang-*.deb
target/debs/${{ parameters.debian_version }}/libyang-cpp_*.deb
target/debs/${{ parameters.debian_version }}/python3-yang_*.deb
displayName: "Download yang deb from amd64 common lib"
- script: |
set -ex
sudo dpkg -i $(find ./download -name *.deb)
workingDirectory: $(Build.ArtifactStagingDirectory)
displayName: "Install yang deb from common lib"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 142
artifact: sonic-buildimage.vs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
patterns: |
target/python-wheels/${{ parameters.debian_version }}/sonic_yang_mgmt-1.0-py3-none-any.whl
target/python-wheels/${{ parameters.debian_version }}/sonic_yang_models-1.0-py3-none-any.whl
displayName: "Download yang wheel from latest sonic-buildimage build"
- script: |
set -ex
sudo pip3 install $(find ./download -name *.whl)
sudo apt install wget -y
wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-12/libstdc++6_12.3.0-1ubuntu1~22.04_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-12/gcc-12-base_12.3.0-1ubuntu1~22.04_amd64.deb
sudo dpkg -i gcc-12-base_12.3.0-1ubuntu1~22.04_amd64.deb
sudo dpkg -i libstdc++6_12.3.0-1ubuntu1~22.04_amd64.deb
workingDirectory: $(Build.ArtifactStagingDirectory)
displayName: "Install yang wheel from common lib"
- script: |
./autogen.sh
dpkg-buildpackage -rfakeroot -us -uc -b -j$(nproc) && cp ../*.deb .
Expand Down Expand Up @@ -104,14 +154,52 @@ stages:
sudo apt-get install -y python3-pip
sudo pip3 install pytest
sudo apt-get install -y python
sudo apt-get install cmake libgtest-dev libgmock-dev libyang-dev
sudo apt-get install cmake libgtest-dev libgmock-dev
cd /usr/src/gtest && sudo cmake . && sudo make
ARCH=$(dpkg --print-architecture)
set -x
sudo curl -fsSL -o /usr/local/bin/bazel \
https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH}
sudo chmod 755 /usr/local/bin/bazel
displayName: "Install dependencies"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: Azure.sonic-buildimage.common_libs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
artifact: common-lib
patterns: |
target/debs/${{ parameters.debian_version }}/libyang_*.deb
target/debs/${{ parameters.debian_version }}/libyang-*.deb
target/debs/${{ parameters.debian_version }}/libyang-cpp_*.deb
target/debs/${{ parameters.debian_version }}/python3-yang_*.deb
displayName: "Download yang deb from amd64 common lib"
- script: |
set -ex
sudo dpkg -i $(find ./download -name *.deb)
workingDirectory: $(Build.ArtifactStagingDirectory)
displayName: "Install yang deb from common lib"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 142
artifact: sonic-buildimage.vs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
patterns: |
target/python-wheels/${{ parameters.debian_version }}/sonic_yang_mgmt-1.0-py3-none-any.whl
target/python-wheels/${{ parameters.debian_version }}/sonic_yang_models-1.0-py3-none-any.whl
displayName: "Download yang wheel from latest sonic-buildimage build"
- script: |
set -ex
sudo pip3 install $(find ./download -name *.whl)
workingDirectory: $(Build.ArtifactStagingDirectory)
displayName: "Install yang wheel from common lib"
- script: |
./autogen.sh
dpkg-buildpackage -rfakeroot -us -uc -Pnopython2 -b -j$(nproc) && cp ../*.deb .
Expand Down
11 changes: 10 additions & 1 deletion common/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

lib_LTLIBRARIES += common/libswsscommon.la

dist_swss_DATA = \
Expand All @@ -17,6 +16,16 @@ swsscommondir = /var/run/redis/sonic-db

bin_PROGRAMS += common/swssloglevel

# Generate cfg_schema.h before building the library
BUILT_SOURCES = common/cfg_schema.h

common/cfg_schema.h: FORCE
$(AM_V_GEN)$(PYTHON3) $(srcdir)/gen_cfg_schema.py -o $@

# FORCE target to ensure cfg_schema.h is always regenerated
.PHONY: FORCE
FORCE:

common_libswsscommon_la_SOURCES = \
common/events_common.cpp \
common/events_service.cpp \
Expand Down
Loading
Loading