Skip to content

fix(interface): properly set VLAN interfaces type in running datastore #40

fix(interface): properly set VLAN interfaces type in running datastore

fix(interface): properly set VLAN interfaces type in running datastore #40

Workflow file for this run

#
# telekom / sysrepo-plugins
#
# This program is made available under the terms of the
# BSD 3-Clause license which is available at
# https://opensource.org/licenses/BSD-3-Clause
#
# SPDX-FileCopyrightText: 2025 Deutsche Telekom AG
# SPDX-FileContributor: Sartura d.d.
#
# SPDX-License-Identifier: BSD-3-Clause
#
name: sysrepo-plugins CI
on:
push:
branches: [ "main", "devel" ]
pull_request:
branches: [ "main", "devel" ]
jobs:
build:
name: ${{matrix.config.name}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {
name: "Release, gcc",
build-type: "Release",
cc: "gcc",
cxx: "g++",
options: "-DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=OFF -DENABLE_VALGRIND_TESTS=OFF -DBUILD_SYSTEM_PLUGIN=ON -DSYSTEMD_IFINDEX=1",
packager: "sudo apt-get",
# no expect because stdout seems to be redirected
packages: "libcmocka-dev libsystemd-dev ntp ssh libsdbus-c++-dev libnl-3-dev libnl-route-3-dev libnl-nf-3-dev libnl-genl-3-dev",
}
- {
name: "Release, clang",
build-type: "Release",
cc: "clang",
cxx: "clang",
options: "-DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=OFF -DENABLE_VALGRIND_TESTS=OFF -DBUILD_SYSTEM_PLUGIN=ON -DSYSTEMD_IFINDEX=1",
packager: "sudo apt-get",
packages: "libcmocka-dev libsystemd-dev ntp ssh libnl-3-dev libnl-route-3-dev libnl-nf-3-dev libnl-genl-3-dev",
}
- {
name: "Debug, gcc",
build-type: "Debug",
cc: "gcc",
cxx: "g++",
options: "-DENABLE_TESTS=OFF -DENABLE_VALGRIND_TESTS=OFF -DBUILD_SYSTEM_PLUGIN=ON -DSYSTEMD_IFINDEX=1",
packager: "sudo apt-get",
packages: "libcmocka-dev libsystemd-dev ntp ssh libnl-3-dev libnl-route-3-dev libnl-nf-3-dev libnl-genl-3-dev",
}
- {
name: "Debug, clang",
build-type: "Debug",
cc: "clang",
cxx: "clang",
options: "-DENABLE_TESTS=OFF -DENABLE_VALGRIND_TESTS=OFF -DBUILD_SYSTEM_PLUGIN=ON -DSYSTEMD_IFINDEX=1",
packager: "sudo apt-get",
packages: "libcmocka-dev libsystemd-dev ntp ssh libnl-3-dev libnl-route-3-dev libnl-nf-3-dev libnl-genl-3-dev",
}
- {
name: "ASAN and UBSAN",
build-type: "Debug",
cc: "clang",
cxx: "clang",
options: "-DCMAKE_C_FLAGS=-fsanitize=address,undefined -DCMAKE_CXX_FLAGS=-fsanitize=address,undefined -DENABLE_TESTS=OFF -DENABLE_VALGRIND_TESTS=OFF -DBUILD_SYSTEM_PLUGIN=ON -DSYSTEMD_IFINDEX=1",
packager: "sudo apt-get",
packages: "libcmocka-dev libsystemd-dev ntp ssh libnl-3-dev libnl-route-3-dev libnl-nf-3-dev libnl-genl-3-dev",
}
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Deps-packages
shell: bash
run: |
${{matrix.config.packager}} update
if ${{matrix.config.packages != ''}}
then ${{matrix.config.packager}} install ${{matrix.config.packages}}
fi
- name: Deps-libyang
shell: bash
run: |
git clone https://github.com/cesnet/libyang
cd libyang
git checkout v2.1.148
CC=${{matrix.config.cc}} cmake -B build -DBUILD_TESTING=OFF
cmake --build build
sudo cmake --install build
sudo ldconfig
- name: Deps-libyang-cpp
shell: bash
run: |
git clone https://github.com/cesnet/libyang-cpp
cd libyang-cpp
git checkout a7837cbc99766746d8381313d77ed7d5bfebe7b5
CC=${{matrix.config.cxx}} cmake -B build -DBUILD_TESTING=OFF
cmake --build build
sudo cmake --install build
sudo ldconfig
- name: Deps-sysrepo
shell: bash
run: |
git clone https://github.com/sysrepo/sysrepo
cd sysrepo
git checkout v2.2.150
CC=${{matrix.config.cc}} cmake -B build -DBUILD_TESTING=OFF
cmake --build build
sudo cmake --install build
sudo ldconfig
- name: Deps-sysrepo-cpp
shell: bash
run: |
git clone https://github.com/sysrepo/sysrepo-cpp
cd sysrepo-cpp
git checkout 430ae8ce0c4e47fbdcaa4433d2c4e7a8ed94fb1e
CC=${{matrix.config.cxx}} cmake -B build -DBUILD_TESTING=OFF
cmake --build build
sudo cmake --install build
sudo ldconfig
- name: Deps-srpc
shell: bash
run: |
git clone --recurse-submodules https://github.com/telekom/sysrepo-plugins-common
cd sysrepo-plugins-common
CC=${{matrix.config.cc}} cmake -B build
cmake --build build
sudo cmake --install build
sudo ldconfig
- name: Deps-umgmt
shell: bash
run: |
git clone --recurse-submodules https://github.com/sartura/umgmt
cd umgmt
CC=${{matrix.config.cc}} cmake -B build
cmake --build build
sudo cmake --install build
sudo ldconfig
# - name: Deps-robot
# shell: bash
# run: |
# git clone https://github.com/telekom/sysrepo-library-robot-framework
# cd sysrepo-library-robot-framework
# sudo python3 -m pip install --upgrade pip setuptools wheel build
# sudo python3 -m pip install .
# sudo python3 -m pip install rpaframework
# sudo sysctl -e fs.protected_regular=0
- name: Deps-sdbus-cpp
shell: bash
run: |
git clone --recurse-submodules https://github.com/Kistler-Group/sdbus-cpp
cd sdbus-cpp
CC=${{matrix.config.cc}} cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
sudo cmake --install build
sudo ldconfig
- name: Configure
shell: bash
working-directory: ${{github.workspace}}
run: |
CC=${{matrix.config.cc}} cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.config.build-type}} ${{matrix.config.options}}
- name: Build
shell: bash
working-directory: ${{github.workspace}}
run: |
cmake --build ${{github.workspace}}/build
- name: Install YANG models
shell: bash
working-directory: ${{github.workspace}}
run: |
sysrepoctl -i plugins/ietf-system-plugin/yang/[email protected]
sysrepoctl -i plugins/ietf-system-plugin/yang/[email protected]
sysrepoctl -c ietf-system -e timezone-name
sysrepoctl -c ietf-system -e ntp
sysrepoctl -c ietf-system -e authentication
sysrepoctl -c ietf-system -e local-users
sysrepoctl -i plugins/ietf-interfaces-plugin/yang/[email protected]
sysrepoctl -i plugins/ietf-interfaces-plugin/yang/[email protected]
sysrepoctl -i plugins/ietf-interfaces-plugin/yang/[email protected]
sysrepoctl -i plugins/ietf-interfaces-plugin/yang/[email protected]
sysrepoctl -i plugins/ietf-interfaces-plugin/yang/ieee802-dot1q-types.yang
sysrepoctl -i plugins/ietf-interfaces-plugin/yang/[email protected]
sysrepoctl -c ietf-interfaces -e if-mib
sysrepoctl -c ietf-if-extensions -e sub-interfaces
sysrepoctl -i plugins/ietf-routing-plugin/yang/[email protected]
sysrepoctl -i plugins/ietf-routing-plugin/yang/[email protected]
sysrepoctl -i plugins/ietf-routing-plugin/yang/[email protected] -s plugins/ietf-routing-plugin/yang/
sysrepoctl -i plugins/ieee802-dot1q-bridge-plugin/yang/ieee802-types.yang
sysrepoctl -i plugins/ieee802-dot1q-bridge-plugin/yang/ieee802-dot1q-types.yang
sysrepoctl -i plugins/ieee802-dot1q-bridge-plugin/yang/ieee802-dot1q-bridge.yang
sysrepoctl -i plugins/ieee802-dot1q-bridge-plugin/yang/ieee802-dot1q-tpmr.yang
sysrepoctl -i plugins/ieee802-dot1q-bridge-plugin/yang/ieee802-got1q-pb.yang
sysrepoctl -i plugins/ieee802-dot1q-bridge-plugin/yang/ieee802-dot1q-vlan-bridge.yang
sysrepoctl -i plugins/ietf-access-control-list-plugin/yang/[email protected]
sysrepoctl -i plugins/ietf-access-control-list-plugin/yang/[email protected]
sysrepoctl -i plugins/ietf-access-control-list-plugin/yang/[email protected]
- name: Test
shell: bash
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure