diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1257932e..b46c581b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -219,19 +219,6 @@ jobs: make-prepend: "", make-target: "" } - - { - name: "DEB Package", - os: "ubuntu-latest", - build-type: "Release", - dep-build-type: "Release", - cc: "gcc", - options: "", - tls-lib: "OpenSSL", - packages: "cmake debhelper valgrind python3-pip", - snaps: "", - make-prepend: "", - make-target: "" - } steps: - uses: actions/checkout@main @@ -246,34 +233,17 @@ jobs: if ${{ matrix.config.snaps != '' }} then sudo snap refresh; sudo snap install ${{ matrix.config.snaps }} fi - if ${{ matrix.config.name == 'DEB Package' }}; then - pip install apkg - apkg system-setup - fi - name: Deps-libyang shell: bash run: | git clone -b ${{ needs.git-branch.outputs.branch-name }} https://github.com/CESNET/libyang.git cd libyang - if ${{ matrix.config.name == 'DEB Package' }}; then - apkg build - apkg install - else - mkdir build - cd build - CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.dep-build-type }} -DENABLE_TESTS=OFF .. - make -j2 - sudo make install - fi - - - name: Build-and-install-package - shell: bash - working-directory: ${{ github.workspace }} - run: | - apkg build - apkg install - if: ${{ matrix.config.name == 'DEB Package' }} + mkdir build + cd build + CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.dep-build-type }} -DENABLE_TESTS=OFF .. + make -j2 + sudo make install - name: Deps-libval shell: bash @@ -283,7 +253,6 @@ jobs: ./configure make -j2 sudo make install - if: ${{ matrix.config.name != 'DEB Package' }} - name: Deps-MbedTLS shell: bash @@ -304,7 +273,6 @@ jobs: mkdir build cd build CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} ${{ matrix.config.options }} .. - if: ${{ matrix.config.name != 'DEB Package' }} - name: Build shell: bash @@ -313,7 +281,6 @@ jobs: export LC_ALL=C.UTF-8 export PATH=/snap/bin:${{ github.workspace }}/coverity-tools/bin:$PATH ${{ matrix.config.make-prepend }} make ${{ matrix.config.make-target }} - if: ${{ matrix.config.name != 'DEB Package' }} - name: Test shell: bash @@ -321,4 +288,53 @@ jobs: run: | export LSAN_OPTIONS=suppressions=${{ github.workspace }}/tests/library_lsan.supp ctest -j4 --output-on-failure - if: ${{ matrix.config.name != 'DEB Package' }} + + build-packages: + name: ${{ matrix.config.name }} + runs-on: ubuntu-latest + needs: git-branch + strategy: + fail-fast: false + matrix: + config: + - { + name: "RPM build, Rocky Linux 9", + image: "rockylinux:9", + pkg-setup: "", + pkg-cmd: "dnf -y --enablerepo=crb --enablerepo=devel install", + pkg-packages: "python3-pip cmake gcc git doxygen libcmocka-devel pcre2-devel libcbor-devel xxhash-devel libssh-devel openssl-devel pam-devel libcurl-devel", + pipx-install: "python3 -m pip install pipx" + } + - { + name: "DEB build, Debian 13", + image: "debian:13", + pkg-setup: "apt-get update -q", + pkg-cmd: "apt-get install -yq", + pkg-packages: "pipx cmake git debhelper pkg-config libcmocka-dev libpcre2-dev libcbor-dev libxxhash-dev zlib1g-dev libssh-dev libssl-dev libpam0g-dev libcurl4-openssl-dev", + pipx-install: "" + } + container: + image: ${{ matrix.config.image }} + steps: + - name: Deps-packages + run: | + ${{ matrix.config.pkg-setup }} + ${{ matrix.config.pkg-cmd }} ${{ matrix.config.pkg-packages }} + ${{ matrix.config.pipx-install }} + echo "$HOME/.local/bin" >> $GITHUB_PATH + pipx install apkg + $HOME/.local/bin/apkg system-setup + + - name: Deps-libyang + run: | + git clone -b ${{ needs.git-branch.outputs.branch-name }} https://github.com/CESNET/libyang.git + cd libyang + apkg build + apkg install + + - name: Build-and-install-package + run: | + git clone -b ${{ needs.git-branch.outputs.branch-name }} https://github.com/CESNET/libnetconf2.git + cd libnetconf2 + apkg build + apkg install diff --git a/distro/pkg/rpm/libnetconf2.spec b/distro/pkg/rpm/libnetconf2.spec index d300906c..4b9d77ca 100644 --- a/distro/pkg/rpm/libnetconf2.spec +++ b/distro/pkg/rpm/libnetconf2.spec @@ -12,7 +12,7 @@ BuildRequires: libssh-devel BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: pkgconfig(libyang) >= 5 -BuildRequires: libcurl-devel +BuildRequires: libcurl-devel %package devel Summary: Headers of libnetconf2 library