Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
94 changes: 55 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -283,7 +253,6 @@ jobs:
./configure
make -j2
sudo make install
if: ${{ matrix.config.name != 'DEB Package' }}

- name: Deps-MbedTLS
shell: bash
Expand All @@ -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
Expand All @@ -313,12 +281,60 @@ 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
working-directory: ${{ github.workspace }}/build
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
2 changes: 1 addition & 1 deletion distro/pkg/rpm/libnetconf2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading