You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by rl...@apache.org on 2019/09/12 18:16:14 UTC

[celix] branch develop updated (8f1bc79 -> d082aaf)

This is an automated email from the ASF dual-hosted git repository.

rlenferink pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git.


    from 8f1bc79  Fixes an deadlock issue in the dm
     new 31362ad  Added GitHub actions workflow
     new d082aaf  Updated FindFFI

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/build.yml | 107 ++++++++++++++++++++++++++++++++++++++++++++
 cmake/Modules/FindFFI.cmake |  58 ++++++++++++++----------
 2 files changed, 141 insertions(+), 24 deletions(-)
 create mode 100644 .github/workflows/build.yml


[celix] 01/02: Added GitHub actions workflow

Posted by rl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rlenferink pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 31362ada96538fdd25e5e8e856c93949bd31b5f9
Author: Roy Lenferink <le...@gmail.com>
AuthorDate: Thu Sep 5 19:38:30 2019 +0200

    Added GitHub actions workflow
---
 .github/workflows/build.yml | 107 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..b028d0c
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,107 @@
+name: Celix
+
+on: [push, pull_request]
+
+jobs:
+  Build:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-18.04, ubuntu-16.04, macOS-10.14]
+        compiler: [gcc, clang]
+        include:
+          - os: ubuntu-18.04
+            compiler: gcc
+            sanitize: true
+    timeout-minutes: 120
+    steps:
+    - uses: actions/checkout@master
+    - name: Install dependencies
+      run: |
+        if [[ "${{ matrix.os }}" == "ubuntu"* ]]; then
+          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
+          sudo apt-get -qq update
+          sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev libcurl4-openssl-dev gcc-4.8 g++-4.8
+        fi
+        if [[ "${{ matrix.os }}" == "macOS"* ]]; then
+          brew update
+          brew install lcov libffi zeromq czmq openssl
+          brew link --force libffi
+          brew unlink openssl && brew link openssl --force
+        fi
+        wget https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.tar.gz -O /tmp/cpputest.tar.gz
+        tar -xzvf /tmp/cpputest.tar.gz -C /tmp
+        cd /tmp/cpputest-* && ./configure --prefix=/usr/local && make && sudo make install && cd -
+        if [[ "${{ matrix.os }}" == "ubuntu"* ]]; then
+          wget https://github.com/zeromq/libzmq/releases/download/v4.3.1/zeromq-4.3.1.tar.gz -O /tmp/zeromq.tar.gz
+          tar -xzvf /tmp/zeromq.tar.gz -C /tmp && cd /tmp/zeromq-* && mkdir build && cd build
+          cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_CURVE=ON .. && make && sudo make install
+          wget https://github.com/zeromq/czmq/releases/download/v4.2.0/czmq-4.2.0.tar.gz -O /tmp/czmq.tar.gz
+          tar -xzvf /tmp/czmq.tar.gz -C /tmp && cd /tmp/czmq-* && mkdir build && cd build
+          cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && make && sudo make install
+        fi
+        cd /tmp && git clone https://github.com/akheron/jansson.git jansson-build
+        cd jansson-build && git checkout 2.7
+        cmake -DJANSSON_BUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local . && make && sudo make install
+        cd $GITHUB_WORKSPACE
+    - name: Build
+      env:
+        CC: ${{ matrix.compiler }}
+        BUILD_OPTIONS: |
+          -DBUILD_DEPLOYMENT_ADMIN=ON
+          -DBUILD_DEPENDENCY_MANAGER=ON
+          -DBUILD_EXAMPLES=ON -DBUILD_LOG_SERVICE=ON
+          -DBUILD_LOG_WRITER=ON
+          -DBUILD_REMOTE_SERVICE_ADMIN=OFF
+          -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=OFF
+          -DBUILD_RSA_DISCOVERY_CONFIGURED=ON
+          -DBUILD_RSA_DISCOVERY_ETCD=ON
+          -DBUILD_RSA_EXAMPLES=ON
+          -DBUILD_REMOTE_SHELL=ON
+          -DBUILD_SHELL=ON
+          -DBUILD_SHELL_TUI=ON -DBUILD_DEVICE_ACCESS=ON
+          -DBUILD_DEVICE_ACCESS_EXAMPLE=ON
+          -DBUILD_HTTP_ADMIN=ON
+        BUILD_OPTIONS_LINUX: |
+          -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=ON
+          -DBUILD_PUBSUB=ON
+          -DBUILD_PUBSUB_PSA_ZMQ=ON
+          -DBUILD_PUBSUB_TESTS=ON
+          -DBUILD_RSA_DISCOVERY_SHM=ON
+        BUILD_OPTIONS_OSX: |
+          -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=OFF
+          -DBUILD_PUBSUB=OFF
+          -DBUILD_RSA_DISCOVERY_SHM=OFF
+        BUILD_OPTIONS_SANITIZE: |
+          -DENABLE_ADDRESS_SANITIZER=ON
+      run: |
+        mkdir build install
+        cd build
+        if [[ "${{ matrix.sanitize }}" == "true" ]]; then
+          export BUILD_OPTIONS="${BUILD_OPTIONS} ${BUILD_OPTIONS_SANITIZE}"
+        fi
+        if [[ "${{ matrix.os }}" == "ubuntu"* ]]; then
+          cmake -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS} ${BUILD_OPTIONS_LINUX} \
+              -DBUILD_FRAMEWORK_TESTS=ON \
+              -DBUILD_UTILS-TESTS=ON \
+              -DENABLE_TESTING=ON ${BUILD_OPTS} \
+              -DCMAKE_INSTALL_PREFIX=../install ..
+        fi
+        if [[ "${{ matrix.os }}" == "macOS"* ]]; then
+          cmake -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS} ${BUILD_OPTIONS_OSX} \
+              -DBUILD_FRAMEWORK_TESTS=ON \
+              -DBUILD_UTILS-TESTS=ON \
+              -DENABLE_TESTING=ON \
+              -DFFI_INCLUDE_DIR=/usr/local/opt/libffi/lib/libffi-3.2.1/include \
+              -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib \
+              ${BUILD_OPTS} \
+              -DCMAKE_INSTALL_PREFIX=../install ..
+        fi
+        make all && make deploy && make install
+    - name: Test
+      run: |
+        cd $GITHUB_WORKSPACE/build
+        export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:$(pwd)/utils:$(pwd)/framework:$(pwd)/dfi
+        make test ARGS="-V"
+


[celix] 02/02: Updated FindFFI

Posted by rl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rlenferink pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git

commit d082aaf145710c753e6e98553ada0d338a4ea8fe
Author: Roy Lenferink <le...@gmail.com>
AuthorDate: Sat Sep 7 09:51:46 2019 +0200

    Updated FindFFI
---
 cmake/Modules/FindFFI.cmake | 58 ++++++++++++++++++++++++++-------------------
 1 file changed, 34 insertions(+), 24 deletions(-)

diff --git a/cmake/Modules/FindFFI.cmake b/cmake/Modules/FindFFI.cmake
index 9bdabf2..2da10d1 100644
--- a/cmake/Modules/FindFFI.cmake
+++ b/cmake/Modules/FindFFI.cmake
@@ -1,4 +1,4 @@
-
+# Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
 # regarding copyright ownership.  The ASF licenses this file
@@ -15,7 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-
 # - Try to find libffi define the variables for the binaries/headers and include 
 #
 # Once done this will define
@@ -30,51 +29,62 @@ if (PkgConfig_FOUND)
         #set brew location for pkg-config
         set(ENV{PKG_CONFIG_PATH} "/usr/local/opt/libffi/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
     endif ()
-    pkg_check_modules(LIBFFI REQUIRED libffi)
+    pkg_check_modules(PC_LIBFFI QUIET libffi>=3.2.1)
 
     #use found LIBFFI pkg config info to search for the abs path fo the libffi lib.
     #Note that the abs path info  is not present in the pkg-config results (only the -l and -L arguments)
-    find_library(FFI_ABS_LIB NAMES ffi PATHS ${LIBFFI_LIBRARY_DIRS} ${LIBFFI_LIBDIR} NO_DEFAULT_PATH NO_PACKAGE_ROOT_PATH NO_CMAKE_PATH NO_CMAKE_SYSTEM_PATH)
-    if (NOT FFI_ABS_LIB)
-	    message(FATAL_ERROR "Cannot find abs path of libffi based on pkgconfig results. Tried to find libffi @ '${LIBFFI_LIBRARY_DIRS}' and '${LIBFFI_LIBDIR}'")
-    endif ()
-
-    add_library(ffi::lib SHARED IMPORTED)
-    set_target_properties(ffi::lib PROPERTIES
-        IMPORTED_LOCATION "${FFI_ABS_LIB}"
-        INTERFACE_INCLUDE_DIRECTORIES "${LIBFFI_INCLUDE_DIRS}"
+    find_library(FFI_ABS_LIB NAMES ffi 
+        PATHS ${PC_LIBFFI_LIBRARY_DIRS} ${PC_LIBFFI_LIBDIR} 
+        NO_DEFAULT_PATH 
+        NO_PACKAGE_ROOT_PATH 
+        NO_CMAKE_PATH 
+        NO_CMAKE_SYSTEM_PATH
     )
 
+    if (NOT FFI_ABS_LIB)
+        message(WARNING "Cannot find abs path of libffi based on pkgconfig results. Tried to find libffi @ '${PC_LIBFFI_LIBRARY_DIRS}' and '${PC_LIBFFI_LIBDIR}'")
+    else()    
+        set(LIBFFI_LIB_ADDED TRUE)
+        add_library(ffi::lib SHARED IMPORTED)
+        set_target_properties(ffi::lib PROPERTIES
+            IMPORTED_LOCATION "${FFI_ABS_LIB}"
+            INTERFACE_INCLUDE_DIRECTORIES "${PC_LIBFFI_INCLUDE_DIRS}"
+        )
+    endif()
+
     unset(FFI_ABS_LIB)
-else()
+endif()
+
+if (NOT LIBFFI_LIB_ADDED)
     mark_as_advanced(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
 
     find_library(FFI_LIBRARY NAMES ffi libffi
-            PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
-            PATH_SUFFIXES lib lib64 x86_64-linux-gnu lib/x86_64-linux-gnu
-            HINTS ${PC_LIBFFI_LIBDIR} ${PC_LIBFFI_LIBRARY_DIRS}
+        PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
+        PATH_SUFFIXES lib lib64 x86_64-linux-gnu lib/x86_64-linux-gnu
+        HINTS ${PC_LIBFFI_LIBDIR} ${PC_LIBFFI_LIBRARY_DIRS}
     )
 
     find_path(FFI_INCLUDE_DIR ffi.h
-            PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
-            PATH_SUFFIXES include include/ffi include/x86_64-linux-gnu x86_64-linux-gnu
-            HINTS ${PC_LIBFFI_INCLUDEDIR} ${PC_LIBFFI_INCLUDE_DIRS}
+         PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local 
+         PATH_SUFFIXES include include/ffi include/x86_64-linux-gnu x86_64-linux-gnu
+         HINTS ${PC_LIBFFI_INCLUDEDIR} ${PC_LIBFFI_INCLUDE_DIRS}
     )
 
     include(FindPackageHandleStandardArgs)
     # handle the QUIETLY and REQUIRED arguments and set FFI_FOUND to TRUE
     # if all listed variables are TRUE
-    find_package_handle_standard_args(FFI  DEFAULT_MSG
+    find_package_handle_standard_args(FFI DEFAULT_MSG
                                       FFI_LIBRARY FFI_INCLUDE_DIR)
-    mark_as_advanced(FFI_INCLUDE_DIR FFI_LIBRARY)
+    mark_as_advanced(FFI_INCLUDE_DIR FFI_LIBRARY) 
 
     if(FFI_FOUND)
         set(FFI_LIBRARIES ${FFI_LIBRARY})
         set(FFI_INCLUDE_DIRS ${FFI_INCLUDE_DIR})
+
         add_library(ffi::lib SHARED IMPORTED)
         set_target_properties(ffi::lib PROPERTIES
-                IMPORTED_LOCATION "${FFI_LIBRARY}"
-                INTERFACE_INCLUDE_DIRECTORIES "${FFI_INCLUDE_DIR}"
+            IMPORTED_LOCATION "${FFI_LIBRARY}"
+            INTERFACE_INCLUDE_DIRECTORIES "${FFI_INCLUDE_DIR}"
         )
     endif()
-endif ()
+endif()