Skip to content

Commit

Permalink
Merge devel into master as release 1.0.184
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrejci authored Jul 21, 2020
2 parents bf5e182 + 9bc379f commit afbd607
Show file tree
Hide file tree
Showing 49 changed files with 6,655 additions and 4,771 deletions.
49 changes: 32 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
language: c

cache:
pip: true

matrix:
include:
- arch: amd64
Expand Down Expand Up @@ -38,26 +41,45 @@ branches:
- master
- devel

addons:
apt:
packages:
- abi-dumper
- abi-compliance-checker
- pkg-config
- w3m
- curl
- valgrind
- libcmocka-dev
- libpcre3-dev
- python3-dev
- python3-cffi
- python3-setuptools
- python3-pip
- swig
update: true
homebrew:
packages:
- curl
- cmocka
update: true

before_install:
- git clone git://git.cryptomilk.org/projects/cmocka.git
- cd cmocka && mkdir build && cd build
- cmake .. && make -j2 && sudo make install
- cd ../..
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- 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
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then pip3 install --user codecov==2.0.22 twine==3.1.1; export CFLAGS="-coverage"; fi
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then sudo snap install universal-ctags; fi
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then pip3 install --user codecov==2.0.22; export CFLAGS="-coverage"; fi

script:
- mkdir build && cd build
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DENABLE_VALGRIND_TESTS=OFF ..; fi
- 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
- 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
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_ARCH" = "amd64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_STATIC=${ENABLE_STATIC:-OFF} ..; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_ARCH" = "arm64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_VALGRIND_TESTS=OFF ..; fi
- make -j2 && ctest --output-on-failure
- cd -
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then ./tools/abi-check.sh; fi

deploy:
- provider: script
script: codecov
script: bash <(curl -s https://codecov.io/bash)
skip_cleanup: true
verbose: true
on:
Expand All @@ -70,10 +92,3 @@ deploy:
on:
branch: master
condition: $DEPLOY_BUILD = TRUE
- provider: script
script: twine upload --skip-existing build/python/dist/*
skip_cleanup: true
verbose: true
on:
branch: master
condition: $DEPLOY_BUILD = TRUE
18 changes: 6 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ set(CMAKE_MACOSX_RPATH TRUE)
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(LIBYANG_MAJOR_VERSION 1)
set(LIBYANG_MINOR_VERSION 0)
set(LIBYANG_MICRO_VERSION 176)
set(LIBYANG_MICRO_VERSION 184)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})

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

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

# options
if((CMAKE_BUILD_TYPE STREQUAL debug) OR (CMAKE_BUILD_TYPE STREQUAL Package))
Expand Down Expand Up @@ -106,9 +106,8 @@ set(USER_TYPES_PLUGINS_DIR_MACRO "${PLUGINS_DIR}/user_types")
set(GEN_LANGUAGE_BINDINGS 0 CACHE BOOL "Enable language bindings generation.")
set(GEN_CPP_BINDINGS 1 CACHE BOOL "Enable C++ bindings.")
# Python bindings depend on C++ bindings because of SWIG
set(GEN_PYTHON_BINDINGS 1 CACHE BOOL "Enable Python SWIG bindings.")
set(GEN_PYTHON_BINDINGS 1 CACHE BOOL "Enable Python bindings.")
set(GEN_PYTHON_VERSION "3" CACHE STRING "Python version")
set(GEN_PYTHON_CFFI_BINDINGS 0 CACHE BOOL "Enable Python CFFI bindings.")
set(GEN_JAVASCRIPT_BINDINGS 0 CACHE BOOL "Enable JavaScript bindings.")
set(GEN_JAVA_BINDINGS 0 CACHE BOOL "Enable Java bindings.")

Expand Down Expand Up @@ -195,8 +194,6 @@ set(headers
# link compat
use_compat()

set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)

# create static libyang library
if(ENABLE_STATIC)
add_definitions(-DSTATIC)
Expand All @@ -217,6 +214,7 @@ if(ENABLE_STATIC)
set(ENABLE_VALGRIND_TESTS OFF)
endif(ENABLE_VALGRIND_TESTS)
else()
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
add_library(yangobj OBJECT ${libsrc})
add_library(yang SHARED $<TARGET_OBJECTS:yangobj> $<TARGET_OBJECTS:compat>)

Expand Down Expand Up @@ -377,7 +375,3 @@ endif()
if(GEN_LANGUAGE_BINDINGS AND GEN_CPP_BINDINGS)
add_subdirectory(swig)
endif()

if(GEN_PYTHON_CFFI_BINDINGS)
add_subdirectory(python)
endif()
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,8 @@ Currently supported bindings are:
* Python SWIG (uses SWIG, enabled by default if `GEN_LANGUAGE_BINDINGS` is set)
- cmake option: `GEN_PYTHON_BINDINGS` (depends on `GEN_CPP_BINDINGS`)
- [README](./swig/python/README.md)
* Python CFFI (more "pythonic" API, not enabled by default)
- cmake option: `GEN_PYTHON_CFFI_BINDINGS`
- [README](./python/README.md)
* Python CFFI (more "pythonic" API)
- Hosted in a separate project: https://github.com/CESNET/libyang-python

## Project Information

Expand Down
Loading

0 comments on commit afbd607

Please sign in to comment.