|
| 1 | +# # #!/bin/bash |
| 2 | +set -e |
| 3 | +#GITHUB_TOKEN="${RDKCM_RDKE}" |
| 4 | +#GITHUB_TOKEN="${{ secrets.RDKCM_RDKE }}" |
| 5 | + |
| 6 | + |
| 7 | +# # ############################ |
| 8 | +# # # EXPERIMENTAL |
| 9 | +# # # DO NOT MODIFY |
| 10 | + |
| 11 | +# # ############################ |
| 12 | +# # # # 1. Install Dependencies |
| 13 | + |
| 14 | +GITHUB_WORKSPACE=$(pwd) |
| 15 | +echo "akshay GITHUB_WORKSPACE: $GITHUB_WORKSPACE" |
| 16 | +GITHUB_WORKSPACE="$(pwd)" |
| 17 | +echo "akshay Current Directory: $GITHUB_WORKSPACE" |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +apt update |
| 22 | +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 |
| 23 | +pip install jsonref |
| 24 | + |
| 25 | +############################# |
| 26 | +# cloning the repo |
| 27 | + |
| 28 | +apt update |
| 29 | +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 |
| 30 | +pip install jsonref |
| 31 | + |
| 32 | +############################ |
| 33 | +# Build trevor-base64 |
| 34 | +if [ ! -d "trower-base64" ]; then |
| 35 | +git clone https://github.com/xmidt-org/trower-base64.git |
| 36 | +fi |
| 37 | +cd trower-base64 |
| 38 | +meson setup --warnlevel 3 --werror build |
| 39 | +ninja -C build |
| 40 | +ninja -C build install |
| 41 | +cd .. |
| 42 | +############################ |
| 43 | + |
| 44 | +git clone --branch R4.4.3 https://github.com/rdkcentral/ThunderTools.git |
| 45 | + |
| 46 | +git clone --branch R4.4.1 https://github.com/rdkcentral/Thunder.git |
| 47 | + |
| 48 | +git clone --branch main https://github.com/rdkcentral/entservices-apis.git |
| 49 | + |
| 50 | +#git clone https://github.com/rdkcentral/entservices-deviceanddisplay.git |
| 51 | +#git clone https://github.com/rdkcentral/entservices-casting.git |
| 52 | +#git clone https://github.com/rdkcentral/entservices-infra.git |
| 53 | +git clone https://github.com/rdkcentral/entservices-inputoutput.git |
| 54 | + |
| 55 | +git clone https://$GITHUB_TOKEN@github.com/rdkcentral/entservices-testframework.git |
| 56 | + |
| 57 | +############################ |
| 58 | +# Build Thunder-Tools |
| 59 | +echo "======================================================================================" |
| 60 | +echo "buliding thunderTools" |
| 61 | +cd ThunderTools |
| 62 | +echo "akshay current working dir: "$(pwd) |
| 63 | +echo "akshay applying patch in thunder tools" |
| 64 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/patches/00010-R4.4-Add-support-for-project-dir.patch |
| 65 | +cd - |
| 66 | + |
| 67 | + |
| 68 | +cmake -G Ninja -S ThunderTools -B build/ThunderTools \ |
| 69 | + -DEXCEPTIONS_ENABLE=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 | + |
| 74 | +cmake --build build/ThunderTools --target install |
| 75 | + |
| 76 | + |
| 77 | +############################ |
| 78 | +# Build Thunder |
| 79 | +echo "======================================================================================" |
| 80 | +echo "buliding thunder" |
| 81 | + |
| 82 | +cd Thunder |
| 83 | +echo "akshay current working dir: "$(pwd) |
| 84 | +echo "akshay applying patch in thunder" |
| 85 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L2Tests/patches/Use_Legact_Alt_Based_On_ThunderTools_R4.4.3.patch |
| 86 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L2Tests/patches/error_code_R4_4.patch |
| 87 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/patches/1004-Add-support-for-project-dir.patch |
| 88 | +patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/patches/RDKEMW-733-Add-ENTOS-IDS.patch |
| 89 | +cd - |
| 90 | + |
| 91 | +cmake -G Ninja -S Thunder -B build/Thunder \ |
| 92 | + -DMESSAGING=ON \ |
| 93 | + -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" \ |
| 94 | + -DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ |
| 95 | + -DGENERIC_CMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ |
| 96 | + -DBUILD_TYPE=Debug \ |
| 97 | + -DBINDING=127.0.0.1 \ |
| 98 | + -DPORT=55555 \ |
| 99 | + -DEXCEPTIONS_ENABLE=ON \ |
| 100 | + |
| 101 | +cmake --build build/Thunder --target install |
| 102 | + |
| 103 | + |
| 104 | +############################ |
| 105 | +# Build entservices-apis |
| 106 | +echo "======================================================================================" |
| 107 | +echo "buliding entservices-apis" |
| 108 | +cd entservices-apis |
| 109 | +rm -rf jsonrpc/DTV.json |
| 110 | +cd .. |
| 111 | + |
| 112 | +cmake -G Ninja -S entservices-apis -B build/entservices-apis \ |
| 113 | + -DEXCEPTIONS_ENABLE=ON \ |
| 114 | + -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" \ |
| 115 | + -DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ |
| 116 | + |
| 117 | +cmake --build build/entservices-apis --target install |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | +############################ |
| 122 | +# generating extrnal headers |
| 123 | +cd $GITHUB_WORKSPACE |
| 124 | +cd entservices-testframework/Tests |
| 125 | +echo " Empty mocks creation to avoid compilation errors" |
| 126 | +echo "======================================================================================" |
| 127 | +mkdir -p headers |
| 128 | +mkdir -p headers/audiocapturemgr |
| 129 | +mkdir -p headers/rdk/ds |
| 130 | +mkdir -p headers/rdk/iarmbus |
| 131 | +mkdir -p headers/rdk/iarmmgrs-hal |
| 132 | +mkdir -p headers/ccec/drivers |
| 133 | +mkdir -p headers/network |
| 134 | +echo "dir created successfully" |
| 135 | +echo "======================================================================================" |
| 136 | + |
| 137 | +echo "======================================================================================" |
| 138 | +echo "empty headers creation" |
| 139 | +cd headers |
| 140 | +echo "current working dir: "$(pwd) |
| 141 | +touch audiocapturemgr/audiocapturemgr_iarm.h |
| 142 | +touch ccec/drivers/CecIARMBusMgr.h |
| 143 | +touch rdk/ds/audioOutputPort.hpp |
| 144 | +touch rdk/ds/compositeIn.hpp |
| 145 | +touch rdk/ds/dsDisplay.h |
| 146 | +touch rdk/ds/dsError.h |
| 147 | +touch rdk/ds/dsMgr.h |
| 148 | +touch rdk/ds/dsTypes.h |
| 149 | +touch rdk/ds/dsUtl.h |
| 150 | +touch rdk/ds/exception.hpp |
| 151 | +touch rdk/ds/hdmiIn.hpp |
| 152 | +touch rdk/ds/host.hpp |
| 153 | +touch rdk/ds/list.hpp |
| 154 | +touch rdk/ds/manager.hpp |
| 155 | +touch rdk/ds/sleepMode.hpp |
| 156 | +touch rdk/ds/videoDevice.hpp |
| 157 | +touch rdk/ds/videoOutputPort.hpp |
| 158 | +touch rdk/ds/videoOutputPortConfig.hpp |
| 159 | +touch rdk/ds/videoOutputPortType.hpp |
| 160 | +touch rdk/ds/videoResolution.hpp |
| 161 | +touch rdk/iarmbus/libIARM.h |
| 162 | +touch rdk/iarmbus/libIBus.h |
| 163 | +touch rdk/iarmbus/libIBusDaemon.h |
| 164 | +touch rdk/iarmmgrs-hal/deepSleepMgr.h |
| 165 | +touch rdk/iarmmgrs-hal/mfrMgr.h |
| 166 | +touch rdk/iarmmgrs-hal/pwrMgr.h |
| 167 | +touch rdk/iarmmgrs-hal/sysMgr.h |
| 168 | +touch network/wifiSrvMgrIarmIf.h |
| 169 | +touch network/netsrvmgrIarm.h |
| 170 | +touch libudev.h |
| 171 | +touch rfcapi.h |
| 172 | +touch rbus.h |
| 173 | +touch telemetry_busmessage_sender.h |
| 174 | +touch maintenanceMGR.h |
| 175 | +touch pkg.h |
| 176 | +touch secure_wrapper.h |
| 177 | +touch wpa_ctrl.h |
| 178 | +touch btmgr.h |
| 179 | +touch rdk_logger_milestone.h |
| 180 | +echo "files created successfully" |
| 181 | +echo "======================================================================================" |
| 182 | + |
| 183 | +cd ../../ |
| 184 | +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 . |
| 185 | + |
| 186 | +############################ |
| 187 | +# Build entservices-deviceanddisplay |
| 188 | +echo "======================================================================================" |
| 189 | +echo "buliding entservices-deviceanddisplay" |
| 190 | +cd $GITHUB_WORKSPACE |
| 191 | +ls -al |
| 192 | +cmake -G Ninja -S entservices-inputoutput -B build/entservices-inputoutput \ |
| 193 | + -DUSE_THUNDER_R4=ON \ |
| 194 | + -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" \ |
| 195 | + -DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ |
| 196 | + -DCMAKE_VERBOSE_MAKEFILE=ON \ |
| 197 | + -DCMAKE_DISABLE_FIND_PACKAGE_IARMBus=ON \ |
| 198 | + -DCMAKE_DISABLE_FIND_PACKAGE_RFC=ON \ |
| 199 | + -DCMAKE_DISABLE_FIND_PACKAGE_DS=ON \ |
| 200 | + -DCMAKE_CXX_FLAGS="-DEXCEPTIONS_ENABLE=ON \ |
| 201 | + -I ${PWD}/entservices-testframework/Tests/headers \ |
| 202 | + -I ${PWD}/entservices-testframework/Tests/headers/audiocapturemgr \ |
| 203 | + -I ${PWD}/entservices-testframework/Tests/headers/rdk/ds \ |
| 204 | + -I ${PWD}/entservices-testframework/Tests/headers/rdk/iarmbus \ |
| 205 | + -I ${PWD}/entservices-testframework/Tests/headers/rdk/iarmmgrs-hal \ |
| 206 | + -I ${PWD}/entservices-testframework/Tests/headers/ccec/drivers \ |
| 207 | + -I ${PWD}/entservices-testframework/Tests/headers/network \ |
| 208 | + -include ${PWD}/entservices-testframework/Tests/mocks/devicesettings.h \ |
| 209 | + -include ${PWD}/entservices-testframework/Tests/mocks/Iarm.h \ |
| 210 | + -include ${PWD}/entservices-testframework/Tests/mocks/Rfc.h \ |
| 211 | + -include ${PWD}/entservices-testframework/Tests/mocks/RBus.h \ |
| 212 | + -include ${PWD}/entservices-testframework/Tests/mocks/Telemetry.h \ |
| 213 | + -include ${PWD}/entservices-testframework/Tests/mocks/Udev.h \ |
| 214 | + -include ${PWD}/entservices-testframework/Tests/mocks/pkg.h \ |
| 215 | + -include ${PWD}/entservices-testframework/Tests/mocks/maintenanceMGR.h \ |
| 216 | + -include ${PWD}/entservices-testframework/Tests/mocks/secure_wrappermock.h \ |
| 217 | + --coverage -Wall -Werror -Wno-error=format \ |
| 218 | + -Wl,-wrap,system -Wl,-wrap,popen -Wl,-wrap,syslog \ |
| 219 | + -DENABLE_TELEMETRY_LOGGING -DUSE_IARMBUS \ |
| 220 | + -DENABLE_SYSTEM_GET_STORE_DEMO_LINK -DENABLE_DEEP_SLEEP \ |
| 221 | + -DENABLE_SET_WAKEUP_SRC_CONFIG -DENABLE_THERMAL_PROTECTION \ |
| 222 | + -DUSE_DRM_SCREENCAPTURE -DHAS_API_SYSTEM -DHAS_API_POWERSTATE \ |
| 223 | + -DHAS_RBUS -DDISABLE_SECURITY_TOKEN -DENABLE_DEVICE_MANUFACTURER_INFO -DUSE_THUNDER_R4 -DTHUNDER_VERSION=4 -DTHUNDER_VERSION_MAJOR=4 -DTHUNDER_VERSION_MINOR=4" \ |
| 224 | + -DCOMCAST_CONFIG=OFF \ |
| 225 | + -DRDK_SERVICES_COVERITY=ON \ |
| 226 | + -DRDK_SERVICES_L1_TEST=ON \ |
| 227 | + -DDS_FOUND=ON \ |
| 228 | + -DPLUGIN_HDCPPROFILE=ON \ |
| 229 | + |
| 230 | + |
| 231 | +cmake --build build/entservices-inputoutput --target install |
| 232 | +echo "======================================================================================" |
| 233 | +echo "path of so files" |
| 234 | +find . -iname "*.so*" |
| 235 | +exit 0 |
| 236 | + |
| 237 | + |
0 commit comments