diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 167ce24fdc..a211188953 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,21 @@ on: - devel jobs: + git-branch: + name: Get git branch + runs-on: ubuntu-latest + outputs: + branch-name: ${{ steps.get-git-branch.outputs.branch-name }} + steps: + - id: get-git-branch + run: | + if ${{ github.event_name == 'push' }} + then export GIT_BRANCH=`echo ${{ github.ref }} | cut -d'/' -f 3` + else + export GIT_BRANCH=${{ github.base_ref }} + fi + echo "branch-name=$GIT_BRANCH" >> $GITHUB_OUTPUT + build-unix: name: ${{ matrix.config.name }} runs-on: ${{ matrix.config.os }} @@ -335,3 +350,26 @@ jobs: cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON .. make ctest --output-on-failure + + build-rpm: + name: RPM build, Rocky 9 + runs-on: ubuntu-latest + needs: git-branch + container: + image: rockylinux:9 + steps: + - name: Deps-packages + run: | + dnf -y --enablerepo=crb --enablerepo=devel install pip cmake gcc git doxygen libcmocka-devel pcre2-devel libcbor-devel + pip install apkg + + - name: Clone-repo + run: | + git clone -b ${{ needs.git-branch.outputs.branch-name }} https://github.com/CESNET/libyang.git + + - name: Build-and-install-package + run: | + apkg system-setup + cd libyang + apkg build + apkg install diff --git a/distro/pkg/deb/control b/distro/pkg/deb/control index 23bcc01316..48b4a17675 100644 --- a/distro/pkg/deb/control +++ b/distro/pkg/deb/control @@ -8,6 +8,7 @@ Build-Depends: cmake, debhelper (>= 10), libcmocka-dev , libpcre2-dev, + libcbor-dev, pkg-config Vcs-Browser: https://github.com/CESNET/libyang/tree/master Vcs-Git: https://github.com/CESNET/libyang.git @@ -23,6 +24,7 @@ Description: parser toolkit for IETF YANG data modeling - runtime Package: libyang-dev Depends: libpcre2-dev, + libcbor-dev, libyang5 (= ${binary:Version}), ${misc:Depends} Conflicts: libyang2-dev diff --git a/distro/pkg/rpm/libyang.spec b/distro/pkg/rpm/libyang.spec index 91257f375d..093bfb6bde 100644 --- a/distro/pkg/rpm/libyang.spec +++ b/distro/pkg/rpm/libyang.spec @@ -19,6 +19,7 @@ Summary: YANG modules for libyang Summary: Development files for libyang Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pcre2-devel +Requires: libcbor-devel %package devel-doc Summary: Documentation of libyang API