diff --git a/.github/scripts/rtrouted.sh b/.github/scripts/rtrouted.sh new file mode 100755 index 00000000..7c35d464 --- /dev/null +++ b/.github/scripts/rtrouted.sh @@ -0,0 +1,16 @@ +#!/bin/bash +export RBUS_ROOT=${HOME}/rbus +export RBUS_INSTALL_DIR=${RBUS_ROOT}/install +export RBUS_BRANCH=main +mkdir -p $RBUS_INSTALL_DIR +cd $RBUS_ROOT +git clone https://github.com/rdkcentral/rbus +cmake -Hrbus -Bbuild/rbus -DCMAKE_INSTALL_PREFIX=${RBUS_INSTALL_DIR}/usr -DBUILD_FOR_DESKTOP=ON -DCMAKE_BUILD_TYPE=Debug +make -C build/rbus && make -C build/rbus install +export PATH=${RBUS_INSTALL_DIR}/usr/bin:${PATH} && \ +export LD_LIBRARY_PATH=${RBUS_INSTALL_DIR}/usr/lib:${LD_LIBRARY_PATH} +nohup rtrouted -f -l DEBUG > /tmp/rtrouted_log.txt & +mkdir ${RBUS_INSTALL_DIR}/usr/lib/rbus_temp_lib +cp ${RBUS_INSTALL_DIR}/usr/lib/librbuscore.so* ${RBUS_INSTALL_DIR}/usr/lib/rbus_temp_lib/ +cp ${RBUS_INSTALL_DIR}/usr/lib/librtMessage.so* ${RBUS_INSTALL_DIR}/usr/lib/rbus_temp_lib/ +cp ${RBUS_INSTALL_DIR}/usr/lib/libcjson.so ${RBUS_INSTALL_DIR}/usr/lib/rbus_temp_lib/ diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index bc9d74e0..6a09a518 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -44,14 +44,31 @@ jobs: - name: CMake working-directory: build run: | - cmake .. -DINTEGRATION_TESTING:BOOL=false -DDISABLE_VALGRIND:BOOL=${DISABLE_VALGRIND} -DENABLE_SESHAT:BOOL=true -DFEATURE_DNS_QUERY:BOOL=true + cmake .. -DBUILD_GIT:BOOL=true -DENABLE_WEBCFGBIN:BOOL=true -DINTEGRATION_TESTING:BOOL=false -DDISABLE_VALGRIND:BOOL=${DISABLE_VALGRIND} -DENABLE_SESHAT:BOOL=true -DFEATURE_DNS_QUERY:BOOL=true + - name: Get rtrouted Binary + working-directory: build + run: | + ../.github/scripts/rtrouted.sh + - name: Build working-directory: build run: | + ps aux + export RBUS_ROOT=${HOME}/rbus + export RBUS_INSTALL_DIR=${RBUS_ROOT}/install && \ + export LD_LIBRARY_PATH=${RBUS_INSTALL_DIR}/usr/lib/rbus_temp_lib:${LD_LIBRARY_PATH} + export C_INCLUDE_PATH=${RBUS_INSTALL_DIR}/usr/include:${RBUS_INSTALL_DIR}/usr/include/rbus + mkdir _install + mkdir _install/lib + cp ${RBUS_INSTALL_DIR}/usr/lib/librbus* _install/lib build-wrapper-linux-x86-64 --out-dir bw-output make all test + - name: Stop rtrouted + run: | + killall -9 rtrouted + - name: Merge GCOV Reports for Sonarcloud working-directory: build run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 60468772..4c335200 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,7 @@ ExternalProject_Add(msgpack CMAKE_ARGS += -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DMSGPACK_ENABLE_CXX=OFF -DMSGPACK_BUILD_EXAMPLES=OFF + -DMSGPACK_BUILD_TESTS=OFF ) add_library(libmsgpack STATIC SHARED IMPORTED) add_dependencies(libmsgpack msgpack) @@ -243,7 +244,8 @@ include_directories(${INCLUDE_DIR} endif (FEATURE_DNS_QUERY) -if (ENABLE_WEBCFGBIN) +#This RBUS already build from github actions rtrouted.sh script, So disabled in github workflow +if (( NOT BUILD_GIT) AND ENABLE_WEBCFGBIN) # rbus external dependency #------------------------------------------------------------------------------- ExternalProject_Add(rbus @@ -261,7 +263,7 @@ add_dependencies(librtMessage rtMessage) add_library(librbus STATIC SHARED IMPORTED) add_dependencies(librbus rbus) -endif (ENABLE_WEBCFGBIN) +endif () if (BUILD_TESTING) # cmocka external dependency