diff --git a/.github/workflows/native_full_build.yml b/.github/workflows/native_full_build.yml new file mode 100644 index 00000000..9f7b90e1 --- /dev/null +++ b/.github/workflows/native_full_build.yml @@ -0,0 +1,26 @@ +name: Build Component in Native Environment + +on: + push: + branches: [ main, 'sprint/**', 'release/**', develop ] + pull_request: + branches: [ main, 'sprint/**', 'release/**', topic/RDK*, develop ] + +jobs: + build-xdial-on-pr: + name: Build xdial component in github rdkcentral + runs-on: ubuntu-latest + container: + image: ghcr.io/rdkcentral/docker-rdk-ci:latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: native build + run: | + chmod +x build_dependencies.sh cov_build.sh + sh -e build_dependencies.sh + sh -e cov_build.sh + env: + GITHUB_TOKEN: ${{ secrets.RDKCM_RDKE }} \ No newline at end of file diff --git a/build_dependencies.sh b/build_dependencies.sh new file mode 100644 index 00000000..d5a0d3e8 --- /dev/null +++ b/build_dependencies.sh @@ -0,0 +1,58 @@ +#!/bin/bash +set -e +set -x +############################## +GITHUB_WORKSPACE="${PWD}" +ls -la ${GITHUB_WORKSPACE} +cd ${GITHUB_WORKSPACE} + +# # ############################# +#1. Install Dependencies and packages + +apt update +apt install -y libsqlite3-dev libcurl4-openssl-dev valgrind lcov clang libsystemd-dev libboost-all-dev libwebsocketpp-dev meson libcunit1 libcunit1-dev curl protobuf-compiler-grpc libgrpc-dev libgrpc++-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev +pip install jsonref + +############################ +# Build trevor-base64 +if [ ! -d "trower-base64" ]; then +git clone https://github.com/xmidt-org/trower-base64.git +fi +cd trower-base64 +meson setup --warnlevel 3 --werror build +ninja -C build +ninja -C build install +cd .. +########################################### +# Clone the required repositories + +############################ +# generating extrnal headers +cd $GITHUB_WORKSPACE +cd tests +echo " Empty mocks creation to avoid compilation errors" +echo "======================================================================================" +mkdir -p headers +#mkdir -p headers/audiocapturemgr +#mkdir -p headers/rdk/ds +#mkdir -p headers/rdk/iarmbus +#mkdir -p headers/rdk/iarmmgrs-hal +#mkdir -p headers/rdk/halif/ +#mkdir -p headers/rdk/halif/deepsleep-manager +#mkdir -p headers/ccec/drivers +#mkdir -p headers/network +#mkdir -p headers/proc +echo "dir created successfully" +echo "======================================================================================" + +echo "======================================================================================" +echo "empty headers creation" +cd headers +echo "current working dir: "${PWD} +echo "files created successfully" +echo "======================================================================================" + +cd ../../ +#cp -r /usr/include/gstreamer-1.0/gst /usr/include/glib-2.0/* /usr/lib/x86_64-linux-gnu/glib-2.0/include/* /usr/local/include/trower-base64/base64.h . + +ls -la ${GITHUB_WORKSPACE} \ No newline at end of file diff --git a/cov_build.sh b/cov_build.sh new file mode 100644 index 00000000..ad903664 --- /dev/null +++ b/cov_build.sh @@ -0,0 +1,38 @@ +#!/bin/bash +set -e +set -x +############################## +GITHUB_WORKSPACE="${PWD}" +ls -la ${GITHUB_WORKSPACE} +############################ +# Build xdialserver +echo "======================================================================================" +echo "building xdialserver" + +cd ${GITHUB_WORKSPACE} +cmake -G Ninja -S "$GITHUB_WORKSPACE" -B build/xdialserver \ +-DUSE_THUNDER_R4=ON \ +-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" \ +-DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ +-DCMAKE_VERBOSE_MAKEFILE=ON \ +-DCMAKE_DISABLE_FIND_PACKAGE_IARMBus=ON \ +-DCMAKE_DISABLE_FIND_PACKAGE_RFC=ON \ +-DCMAKE_DISABLE_FIND_PACKAGE_DS=ON \ +-DCOMCAST_CONFIG=OFF \ +-DRDK_SERVICES_COVERITY=ON \ +-DRDK_SERVICES_L1_TEST=ON \ +-DDS_FOUND=ON \ +-DPLUGIN_FIRMWAREUPDATE=ON \ +-DPLUGIN_MAINTENANCEMANAGER=ON \ +-DCMAKE_CXX_FLAGS="-DEXCEPTIONS_ENABLE=ON \ +--coverage -Wall -Werror -Wno-error=format \ +-Wl,-wrap,system -Wl,-wrap,popen -Wl,-wrap,syslog -Wl,-wrap,wpa_ctrl_open -Wl,-wrap,wpa_ctrl_request -Wl,-wrap,wpa_ctrl_close -Wl,-wrap,wpa_ctrl_pending -Wl,-wrap,wpa_ctrl_recv -Wl,-wrap,wpa_ctrl_attach \ +-DENABLE_TELEMETRY_LOGGING -DUSE_IARMBUS \ +-DENABLE_SYSTEM_GET_STORE_DEMO_LINK -DENABLE_DEEP_SLEEP \ +-DENABLE_SET_WAKEUP_SRC_CONFIG -DENABLE_THERMAL_PROTECTION \ +-DUSE_DRM_SCREENCAPTURE -DHAS_API_SYSTEM -DHAS_API_POWERSTATE \ +-DHAS_RBUS -DDISABLE_SECURITY_TOKEN -DENABLE_DEVICE_MANUFACTURER_INFO -DUSE_THUNDER_R4=ON -DTHUNDER_VERSION=4 -DTHUNDER_VERSION_MAJOR=4 -DTHUNDER_VERSION_MINOR=4" + +cmake --build build/xdialserver --target install +echo "======================================================================================" +exit 0 \ No newline at end of file