|
| 1 | +name: Unit tests |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: [ develop, main ] |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + |
| 11 | + |
| 12 | + - name: Install dependencies |
| 13 | + run: | |
| 14 | + sudo apt -y install build-essential pkg-config cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev |
| 15 | + sudo apt -y install nodejs npm |
| 16 | +
|
| 17 | + - name: Install GStreamer |
| 18 | + run: | |
| 19 | + sudo apt update |
| 20 | + sudo apt install -y libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev |
| 21 | +
|
| 22 | + - name: Set up Python |
| 23 | + uses: actions/setup-python@v4 |
| 24 | + with: |
| 25 | + python-version: '3.x' |
| 26 | + - run: pip install jsonref |
| 27 | + |
| 28 | + - name: Checkout ThunderTools |
| 29 | + uses: actions/checkout@v3 |
| 30 | + with: |
| 31 | + repository: rdkcentral/ThunderTools |
| 32 | + ref: R5_1 |
| 33 | + path: ThunderTools |
| 34 | + |
| 35 | + - name: Build ThunderTools |
| 36 | + run: > |
| 37 | + cmake -G Ninja -S ThunderTools -B build/ThunderTools -DCMAKE_INSTALL_PREFIX="install" |
| 38 | + cmake --build build/ThunderTools --target install |
| 39 | +
|
| 40 | + - name: Checkout Thunder |
| 41 | + uses: actions/checkout@v3 |
| 42 | + with: |
| 43 | + repository: rdkcentral/Thunder |
| 44 | + ref: R5_1 |
| 45 | + path: Thunder |
| 46 | + |
| 47 | + - name: Build Thunder |
| 48 | + run: > |
| 49 | + cmake -G Ninja -S Thunder -B build/Thunder \ |
| 50 | + -DBINDING="127.0.0.1" \ |
| 51 | + -DCMAKE_BUILD_TYPE="Debug" \ |
| 52 | + -DCMAKE_INSTALL_PREFIX="install" \ |
| 53 | + -DPORT="55555" \ |
| 54 | + -DTOOLS_SYSROOT="${PWD}" \ |
| 55 | + -DINITV_SCRIPT=OFF |
| 56 | + cmake --build build/Thunder --target install |
| 57 | +
|
| 58 | + - name: Checkout ThunderInterfaces |
| 59 | + uses: actions/checkout@v3 |
| 60 | + with: |
| 61 | + repository: rdkcentral/ThunderInterfaces |
| 62 | + ref: R5_1 |
| 63 | + path: ThunderInterfaces |
| 64 | + |
| 65 | + - name: Build ThunderInterfaces |
| 66 | + run: > |
| 67 | + cmake -G Ninja -S ThunderInterfaces -B build/ThunderInterfaces \ |
| 68 | + -DCMAKE_INSTALL_PREFIX="install" |
| 69 | + cmake --build build/ThunderInterfaces --target install |
| 70 | +
|
| 71 | + - name: Checkout ThunderNanoServices |
| 72 | + uses: actions/checkout@v3 |
| 73 | + with: |
| 74 | + repository: rdkcentral/ThunderNanoServices |
| 75 | + ref: R5_1 |
| 76 | + path: ThunderNanoServices |
| 77 | + |
| 78 | + - name: Build ThunderNanoServices |
| 79 | + run: > |
| 80 | + cmake -G Ninja -S ThunderNanoServices -B build/ThunderNanoServices \ |
| 81 | + -DCMAKE_INSTALL_PREFIX="install" \ |
| 82 | + -DPLUGIN_COMMANDER=ON \ |
| 83 | + -DPLUGIN_DIALSERVER=ON \ |
| 84 | + -DPLUGIN_DICTIONARY=ON \ |
| 85 | + -DPLUGIN_FILETRANSFER=ON \ |
| 86 | + -DPLUGIN_INPUTSWITCH=ON \ |
| 87 | + -DPLUGIN_PROCESSMONITOR=ON \ |
| 88 | + -DPLUGIN_RESOURCEMONITOR=ON \ |
| 89 | + -DPLUGIN_SYSTEMCOMMANDS=ON \ |
| 90 | + -DPLUGIN_SWITCHBOARD=ON \ |
| 91 | + -DPLUGIN_WEBPROXY=ON \ |
| 92 | + -DPLUGIN_WEBSHELL=ON |
| 93 | + cmake --build build/ThunderNanoServices --target install |
| 94 | +
|
| 95 | + - name: Checkout ThunderNanoServicesRDK |
| 96 | + uses: actions/checkout@v3 |
| 97 | + with: |
| 98 | + repository: rdkcentral/ThunderNanoServicesRDK |
| 99 | + ref: R5_1 |
| 100 | + path: ThunderNanoServicesRDK |
| 101 | + |
| 102 | + - name: Build ThunderNanoServicesRDK |
| 103 | + run: > |
| 104 | + cmake -G Ninja -S ThunderNanoServicesRDK -B build/ThunderNanoServicesRDK \ |
| 105 | + -DCMAKE_INSTALL_PREFIX="install" \ |
| 106 | + -DPLUGIN_DEVICEINFO=ON \ |
| 107 | + -DPLUGIN_MESSAGECONTROL=ON \ |
| 108 | + -DPLUGIN_MESSENGER=ON \ |
| 109 | + -DPLUGIN_MONITOR=ON \ |
| 110 | + -DPLUGIN_OPENCDMI=ON \ |
| 111 | + -DPLUGIN_PERFORMANCEMETRICS=ON |
| 112 | + cmake --build build/ThunderNanoServicesRDK --target install |
| 113 | +
|
| 114 | + - name: Checkout ThunderClientLibraries |
| 115 | + uses: actions/checkout@v3 |
| 116 | + with: |
| 117 | + repository: rdkcentral/ThunderClientLibraries |
| 118 | + ref: R5_1 |
| 119 | + path: ThunderClientLibraries |
| 120 | + |
| 121 | + - name: Build ThunderClientLibraries |
| 122 | + run: > |
| 123 | + cmake -G Ninja -S ThunderClientLibraries -B build/ThunderClientLibraries \ |
| 124 | + -DCMAKE_INSTALL_PREFIX="install" \ |
| 125 | + -DBLUETOOTHAUDIOSINK=ON \ |
| 126 | + -DDEVICEINFO=ON \ |
| 127 | + -DDISPLAYINFO=ON \ |
| 128 | + -DSECURITYAGENT=ON \ |
| 129 | + -DPLAYERINFO=ON \ |
| 130 | + -DPROTOCOLS=ON \ |
| 131 | + -DVIRTUALINPUT=ON \ |
| 132 | + -DCDMI=ON \ |
| 133 | + -DL1_TESTS=ON \ |
| 134 | + -DL2_TESTS=ON |
| 135 | + cmake --build build/ThunderClientLibraries --target install |
| 136 | +
|
| 137 | + - name: Export path |
| 138 | + run: > |
| 139 | + export LD_LIBRARY_PATH=${PWD}/install/lib:${LD_LIBRARY_PATH} |
| 140 | + export PATH=${PWD}/install/bin:${PATH} |
| 141 | +
|
| 142 | + - name: Run unit tests |
| 143 | + run: /bin/bash ThunderClientLibraries/run.sh -c |
| 144 | + |
| 145 | + - name: Upload test results to automatic test result management system |
| 146 | + run: > |
| 147 | + gtest-json-result-push.py ${{github.workspace}}/ThunderClientLibraries/TestReport.json https://rdkeorchestrationservice.as-g8.cf.comcast.net/rdke_orchestration_api/push_unit_test_results `pwd` |
| 148 | +
|
0 commit comments