Skip to content

Commit

Permalink
interfaces-plugin: update libyang API functions (transition from liby…
Browse files Browse the repository at this point in the history
…ang 1.x to 2.x)
  • Loading branch information
feelqah committed Jul 22, 2021
1 parent 11f43fd commit 07911a7
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 158 deletions.
19 changes: 17 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@ image: "debian:sid"

before_script:
- apt-get update
- apt-get -y install clang cmake libcmocka0 libcmocka-dev valgrind libyang1 libyang-dev sysrepo libsysrepo-dev libnl-3-200 libnl-3-dev libnl-genl-3-dev libnl-nf-3-dev
- apt-get -y install clang cmake libcmocka0 libcmocka-dev valgrind libnl-3-200 libnl-3-dev libnl-genl-3-dev libnl-nf-3-dev

# prepare for building debian packages
- apt-get -y install git build-essential fakeroot devscripts

# TODO: when libyang2 is available in Debian unstable
- git clone --depth=1 https://github.com/jpetrina/libyang -b debian/v2.0.7 && cd libyang
- mk-build-deps --install --tool 'apt-get --yes --no-install-recommends' --remove
- dpkg-buildpackage -j$(nproc) --build=binary --root-command=fakeroot --unsigned-source --unsigned-changes
- (dpkg -i ../libyang2*.deb || apt-get -y install -f) && cd ..

# TODO: when libyang2 is available in Debian unstable
- git clone --depth=1 https://github.com/jpetrina/sysrepo -b debian/v2.0.1 && cd sysrepo
- mk-build-deps --install --tool 'apt-get --yes --no-install-recommends' --remove
- dpkg-buildpackage -j$(nproc) --build=binary --root-command=fakeroot --unsigned-source --unsigned-changes
- (dpkg -i ../sysrepo*.deb ../libsysrepo*.deb || apt-get -y install -f) && cd ..

# resolve time issues
- ln -snf /usr/share/zoneinfo/Europe/Zagreb /etc/localtime && echo 'Europe/Zagreb' > /etc/timezone
Expand All @@ -16,7 +31,7 @@ build:default:
script:
- mkdir build && cd build
- CC=clang cmake -DENABLE_BUILD_TESTS=ON ..
- make
- make
artifacts:
paths:
- build/
Expand Down
Loading

0 comments on commit 07911a7

Please sign in to comment.