Skip to content

Commit afbd607

Browse files
authored
Merge devel into master as release 1.0.184
2 parents bf5e182 + 9bc379f commit afbd607

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6655
-4771
lines changed

.travis.yml

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
language: c
22

3+
cache:
4+
pip: true
5+
36
matrix:
47
include:
58
- arch: amd64
@@ -38,26 +41,45 @@ branches:
3841
- master
3942
- devel
4043

44+
addons:
45+
apt:
46+
packages:
47+
- abi-dumper
48+
- abi-compliance-checker
49+
- pkg-config
50+
- w3m
51+
- curl
52+
- valgrind
53+
- libcmocka-dev
54+
- libpcre3-dev
55+
- python3-dev
56+
- python3-cffi
57+
- python3-setuptools
58+
- python3-pip
59+
- swig
60+
update: true
61+
homebrew:
62+
packages:
63+
- curl
64+
- cmocka
65+
update: true
66+
4167
before_install:
42-
- git clone git://git.cryptomilk.org/projects/cmocka.git
43-
- cd cmocka && mkdir build && cd build
44-
- cmake .. && make -j2 && sudo make install
45-
- cd ../..
46-
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
47-
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y valgrind libpcre3-dev python3-dev swig python3-cffi python3-setuptools python3-pip; fi
48-
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then pip3 install --user codecov==2.0.22 twine==3.1.1; export CFLAGS="-coverage"; fi
68+
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then sudo snap install universal-ctags; fi
69+
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then pip3 install --user codecov==2.0.22; export CFLAGS="-coverage"; fi
4970

5071
script:
5172
- mkdir build && cd build
5273
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DENABLE_VALGRIND_TESTS=OFF ..; fi
53-
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$TRAVIS_ARCH" = "amd64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_STATIC=${ENABLE_STATIC:-OFF} -DGEN_PYTHON_CFFI_BINDINGS=ON ..; fi
54-
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$TRAVIS_ARCH" = "arm64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_VALGRIND_TESTS=OFF -DGEN_PYTHON_CFFI_BINDINGS=ON ..; fi
74+
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_ARCH" = "amd64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_STATIC=${ENABLE_STATIC:-OFF} ..; fi
75+
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_ARCH" = "arm64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_VALGRIND_TESTS=OFF ..; fi
5576
- make -j2 && ctest --output-on-failure
5677
- cd -
78+
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then ./tools/abi-check.sh; fi
5779

5880
deploy:
5981
- provider: script
60-
script: codecov
82+
script: bash <(curl -s https://codecov.io/bash)
6183
skip_cleanup: true
6284
verbose: true
6385
on:
@@ -70,10 +92,3 @@ deploy:
7092
on:
7193
branch: master
7294
condition: $DEPLOY_BUILD = TRUE
73-
- provider: script
74-
script: twine upload --skip-existing build/python/dist/*
75-
skip_cleanup: true
76-
verbose: true
77-
on:
78-
branch: master
79-
condition: $DEPLOY_BUILD = TRUE

CMakeLists.txt

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ set(CMAKE_MACOSX_RPATH TRUE)
2525
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
2626
set(LIBYANG_MAJOR_VERSION 1)
2727
set(LIBYANG_MINOR_VERSION 0)
28-
set(LIBYANG_MICRO_VERSION 176)
28+
set(LIBYANG_MICRO_VERSION 184)
2929
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
3030

3131
# Version of the library
3232
# Major version is changed with every backward non-compatible API/ABI change in libyang, minor version changes
3333
# with backward compatible change and micro version is connected with any internal change of the library.
3434
set(LIBYANG_MAJOR_SOVERSION 1)
35-
set(LIBYANG_MINOR_SOVERSION 8)
36-
set(LIBYANG_MICRO_SOVERSION 4)
35+
set(LIBYANG_MINOR_SOVERSION 9)
36+
set(LIBYANG_MICRO_SOVERSION 2)
3737
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
3838
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
3939

@@ -50,7 +50,7 @@ endif()
5050
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=gnu99")
5151
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
5252
set(CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG")
53-
set(CMAKE_C_FLAGS_DEBUG "-g -O0")
53+
set(CMAKE_C_FLAGS_DEBUG "-g -Og")
5454

5555
# options
5656
if((CMAKE_BUILD_TYPE STREQUAL debug) OR (CMAKE_BUILD_TYPE STREQUAL Package))
@@ -106,9 +106,8 @@ set(USER_TYPES_PLUGINS_DIR_MACRO "${PLUGINS_DIR}/user_types")
106106
set(GEN_LANGUAGE_BINDINGS 0 CACHE BOOL "Enable language bindings generation.")
107107
set(GEN_CPP_BINDINGS 1 CACHE BOOL "Enable C++ bindings.")
108108
# Python bindings depend on C++ bindings because of SWIG
109-
set(GEN_PYTHON_BINDINGS 1 CACHE BOOL "Enable Python SWIG bindings.")
109+
set(GEN_PYTHON_BINDINGS 1 CACHE BOOL "Enable Python bindings.")
110110
set(GEN_PYTHON_VERSION "3" CACHE STRING "Python version")
111-
set(GEN_PYTHON_CFFI_BINDINGS 0 CACHE BOOL "Enable Python CFFI bindings.")
112111
set(GEN_JAVASCRIPT_BINDINGS 0 CACHE BOOL "Enable JavaScript bindings.")
113112
set(GEN_JAVA_BINDINGS 0 CACHE BOOL "Enable Java bindings.")
114113

@@ -195,8 +194,6 @@ set(headers
195194
# link compat
196195
use_compat()
197196

198-
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
199-
200197
# create static libyang library
201198
if(ENABLE_STATIC)
202199
add_definitions(-DSTATIC)
@@ -217,6 +214,7 @@ if(ENABLE_STATIC)
217214
set(ENABLE_VALGRIND_TESTS OFF)
218215
endif(ENABLE_VALGRIND_TESTS)
219216
else()
217+
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
220218
add_library(yangobj OBJECT ${libsrc})
221219
add_library(yang SHARED $<TARGET_OBJECTS:yangobj> $<TARGET_OBJECTS:compat>)
222220

@@ -377,7 +375,3 @@ endif()
377375
if(GEN_LANGUAGE_BINDINGS AND GEN_CPP_BINDINGS)
378376
add_subdirectory(swig)
379377
endif()
380-
381-
if(GEN_PYTHON_CFFI_BINDINGS)
382-
add_subdirectory(python)
383-
endif()

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,8 @@ Currently supported bindings are:
263263
* Python SWIG (uses SWIG, enabled by default if `GEN_LANGUAGE_BINDINGS` is set)
264264
- cmake option: `GEN_PYTHON_BINDINGS` (depends on `GEN_CPP_BINDINGS`)
265265
- [README](./swig/python/README.md)
266-
* Python CFFI (more "pythonic" API, not enabled by default)
267-
- cmake option: `GEN_PYTHON_CFFI_BINDINGS`
268-
- [README](./python/README.md)
266+
* Python CFFI (more "pythonic" API)
267+
- Hosted in a separate project: https://github.com/CESNET/libyang-python
269268

270269
## Project Information
271270

0 commit comments

Comments
 (0)