|
| 1 | + |
| 2 | +#!/bin/bash |
| 3 | +set -x |
| 4 | +############################## |
| 5 | +GITHUB_WORKSPACE="${PWD}" |
| 6 | +ls -la ${GITHUB_WORKSPACE} |
| 7 | +cd ${GITHUB_WORKSPACE} |
| 8 | + |
| 9 | +# # ############################# |
| 10 | +#1. Install Dependencies and packages |
| 11 | + |
| 12 | +apt update |
| 13 | +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 |
| 14 | +pip install jsonref |
| 15 | + |
| 16 | +############################ |
| 17 | +# Build trevor-base64 |
| 18 | +if [ ! -d "trower-base64" ]; then |
| 19 | +git clone https://github.com/xmidt-org/trower-base64.git |
| 20 | +fi |
| 21 | +cd trower-base64 |
| 22 | +meson setup --warnlevel 3 --werror build |
| 23 | +ninja -C build |
| 24 | +ninja -C build install |
| 25 | +cd .. |
| 26 | +########################################### |
| 27 | +# Clone the required repositories |
| 28 | + |
| 29 | + |
| 30 | +git clone --branch R4.4.3 https://github.com/rdkcentral/ThunderTools.git |
| 31 | + |
| 32 | +git clone --branch R4.4.1 https://github.com/rdkcentral/Thunder.git |
| 33 | + |
| 34 | +git clone --branch main https://github.com/rdkcentral/entservices-apis.git |
| 35 | + |
| 36 | +git clone https://$GITHUB_TOKEN@github.com/rdkcentral/entservices-testframework.git |
| 37 | + |
| 38 | +############################ |
| 39 | +# Build Thunder-Tools |
| 40 | +echo "======================================================================================" |
| 41 | +echo "buliding thunderTools" |
| 42 | +cd ThunderTools |
| 43 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/patches/00010-R4.4-Add-support-for-project-dir.patch |
| 44 | +cd - |
| 45 | + |
| 46 | + |
| 47 | +cmake -G Ninja -S ThunderTools -B build/ThunderTools \ |
| 48 | + -DEXCEPTIONS_ENABLE=ON \ |
| 49 | + -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" \ |
| 50 | + -DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ |
| 51 | + -DGENERIC_CMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ |
| 52 | + |
| 53 | +cmake --build build/ThunderTools --target install |
| 54 | + |
| 55 | + |
| 56 | +############################ |
| 57 | +# Build Thunder |
| 58 | +echo "======================================================================================" |
| 59 | +echo "buliding thunder" |
| 60 | + |
| 61 | +cd Thunder |
| 62 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L2Tests/patches/Use_Legact_Alt_Based_On_ThunderTools_R4.4.3.patch |
| 63 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L2Tests/patches/error_code_R4_4.patch |
| 64 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/patches/1004-Add-support-for-project-dir.patch |
| 65 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/patches/RDKEMW-733-Add-ENTOS-IDS.patch |
| 66 | +cd - |
| 67 | + |
| 68 | +cmake -G Ninja -S Thunder -B build/Thunder \ |
| 69 | + -DMESSAGING=ON \ |
| 70 | + -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" \ |
| 71 | + -DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ |
| 72 | + -DGENERIC_CMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ |
| 73 | + -DBUILD_TYPE=Debug \ |
| 74 | + -DBINDING=127.0.0.1 \ |
| 75 | + -DPORT=55555 \ |
| 76 | + -DEXCEPTIONS_ENABLE=ON \ |
| 77 | + |
| 78 | +cmake --build build/Thunder --target install |
| 79 | + |
| 80 | + |
| 81 | +############################ |
| 82 | +# Build entservices-apis |
| 83 | +echo "======================================================================================" |
| 84 | +echo "buliding entservices-apis" |
| 85 | +cd entservices-apis |
| 86 | +rm -rf jsonrpc/DTV.json |
| 87 | +cd .. |
| 88 | + |
| 89 | +cmake -G Ninja -S entservices-apis -B build/entservices-apis \ |
| 90 | + -DEXCEPTIONS_ENABLE=ON \ |
| 91 | + -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" \ |
| 92 | + -DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ |
| 93 | + |
| 94 | +cmake --build build/entservices-apis --target install |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +############################ |
| 99 | +# generating extrnal headers |
| 100 | +cd $GITHUB_WORKSPACE |
| 101 | +cd entservices-testframework/Tests |
| 102 | +echo " Empty mocks creation to avoid compilation errors" |
| 103 | +echo "======================================================================================" |
| 104 | +mkdir -p headers |
| 105 | +mkdir -p headers/audiocapturemgr |
| 106 | +mkdir -p headers/rdk/ds |
| 107 | +mkdir -p headers/rdk/iarmbus |
| 108 | +mkdir -p headers/rdk/iarmmgrs-hal |
| 109 | +mkdir -p headers/ccec/drivers |
| 110 | +mkdir -p headers/ccec/host |
| 111 | +mkdir -p headers/network |
| 112 | +mkdir -p headers/proc |
| 113 | +mkdir -p headers/websocket |
| 114 | +echo "dir created successfully" |
| 115 | +echo "======================================================================================" |
| 116 | + |
| 117 | +echo "======================================================================================" |
| 118 | +echo "empty headers creation" |
| 119 | +cd headers |
| 120 | +touch audiocapturemgr/audiocapturemgr_iarm.h |
| 121 | +touch ccec/drivers/CecIARMBusMgr.h |
| 122 | +touch ccec/FrameListener.hpp |
| 123 | +touch ccec/Connection.hpp |
| 124 | +touch ccec/Assert.hpp |
| 125 | +touch ccec/Messages.hpp |
| 126 | +touch ccec/MessageDecoder.hpp |
| 127 | +touch ccec/MessageProcessor.hpp |
| 128 | +touch ccec/CECFrame.hpp |
| 129 | +touch ccec/MessageEncoder.hpp |
| 130 | +touch ccec/host/RDK.hpp |
| 131 | +touch dsRpc.h |
| 132 | +touch websocket/URL.h |
| 133 | +touch rdk/ds/audioOutputPort.hpp |
| 134 | +touch rdk/ds/compositeIn.hpp |
| 135 | +touch rdk/ds/dsDisplay.h |
| 136 | +touch rdk/ds/dsError.h |
| 137 | +touch rdk/ds/dsMgr.h |
| 138 | +touch rdk/ds/dsTypes.h |
| 139 | +touch rdk/ds/dsUtl.h |
| 140 | +touch rdk/ds/exception.hpp |
| 141 | +touch rdk/ds/hdmiIn.hpp |
| 142 | +touch rdk/ds/host.hpp |
| 143 | +touch rdk/ds/list.hpp |
| 144 | +touch rdk/ds/manager.hpp |
| 145 | +touch rdk/ds/sleepMode.hpp |
| 146 | +touch rdk/ds/videoDevice.hpp |
| 147 | +touch rdk/ds/videoOutputPort.hpp |
| 148 | +touch rdk/ds/videoOutputPortConfig.hpp |
| 149 | +touch rdk/ds/videoOutputPortType.hpp |
| 150 | +touch rdk/ds/videoResolution.hpp |
| 151 | +touch rdk/iarmbus/libIARM.h |
| 152 | +touch rdk/iarmbus/libIBus.h |
| 153 | +touch rdk/iarmbus/libIBusDaemon.h |
| 154 | +touch rdk/iarmmgrs-hal/deepSleepMgr.h |
| 155 | +touch rdk/iarmmgrs-hal/mfrMgr.h |
| 156 | +touch rdk/iarmmgrs-hal/pwrMgr.h |
| 157 | +touch rdk/iarmmgrs-hal/sysMgr.h |
| 158 | +touch network/wifiSrvMgrIarmIf.h |
| 159 | +touch network/netsrvmgrIarm.h |
| 160 | +touch libudev.h |
| 161 | +touch rfcapi.h |
| 162 | +touch rbus.h |
| 163 | +touch telemetry_busmessage_sender.h |
| 164 | +touch maintenanceMGR.h |
| 165 | +touch pkg.h |
| 166 | +touch secure_wrapper.h |
| 167 | +touch wpa_ctrl.h |
| 168 | +touch btmgr.h |
| 169 | +touch rdk_logger_milestone.h |
| 170 | +echo "files created successfully" |
| 171 | +echo "======================================================================================" |
| 172 | + |
| 173 | +cd ../../ |
| 174 | +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 . |
| 175 | + |
| 176 | +ls -la ${GITHUB_WORKSPACE} |
0 commit comments