RDK-56182 - NetworkManager Thunder Plugin - Report WiFi SNR #354
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rdk_unit_test | |
on: | |
push: | |
branches: [ main, develop, 'release/**'] | |
pull_request: | |
branches: [ main, develop, 'release/**'] | |
env: | |
THUNDER_REF: "R4.4.1" | |
jobs: | |
unit-tests: | |
name: Build and run unit tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install packages | |
run: | | |
sudo apt update | |
sudo apt-get install -y pkg-config libglib2.0-dev libnm-dev libcurl4-openssl-dev lcov ninja-build | |
- name: Configure Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- run: pip install jsonref | |
- name: Configure CMake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.16.x' | |
- name: Checkout thunder repositories | |
run: | | |
git clone https://github.com/rdkcentral/ThunderTools ThunderTools --branch ${{ env.THUNDER_REF }} | |
git clone https://github.com/rdkcentral/Thunder Thunder --branch ${{ env.THUNDER_REF }} | |
git clone https://github.com/rdkcentral/ThunderInterfaces ThunderInterfaces --branch ${{ env.THUNDER_REF }} | |
- name: Checkout networkmanager | |
uses: actions/checkout@v3 | |
with: | |
path: networkmanager | |
- name: Apply Thunder Patches | |
run: | | |
cd ${{github.workspace}}/Thunder | |
git apply ${{github.workspace}}/networkmanager/Tests/patches/thunder/Remove-SmartLinkType.patch | |
- name: Build ThunderTools | |
run: > | |
cmake | |
-S "${{github.workspace}}/ThunderTools" -B build/ThunderTools | |
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" | |
-DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | |
-DGENERIC_CMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | |
&& | |
cmake --build build/ThunderTools --target install -j8 | |
- name: Build Thunder | |
run: > | |
cmake | |
-S "${{github.workspace}}/Thunder" -B build/Thunder | |
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" | |
-DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | |
-DBUILD_TYPE=Debug | |
-DBINDING=127.0.0.1 | |
-DPORT=9998 | |
&& | |
cmake --build build/Thunder --target install -j8 | |
- name: Build ThunderInterfaces | |
run: > | |
cmake | |
-S "${{github.workspace}}/ThunderInterfaces" -B build/ThunderInterfaces | |
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" | |
-DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | |
&& | |
cmake --build build/ThunderInterfaces --target install -j8 | |
- name: Generate IARM headers | |
run: | | |
touch install/usr/lib/libIARMBus.so | |
mkdir -p install/usr/include/rdk/iarmbus | |
touch install/usr/include/rdk/iarmbus/libIARM.h | |
cd "${{github.workspace}}/networkmanager/Tests/" | |
mkdir -p headers/rdk/iarmbus | |
cd headers | |
touch rdk/iarmbus/libIARM.h rdk/iarmbus/libIBus.h | |
- name: Build networkmanager with RDK Proxy | |
run: > | |
cmake | |
-S "${{github.workspace}}/networkmanager" | |
-B build/RDKNetworkmanager | |
-DCMAKE_TOOLCHAIN_FILE="${{ env.TOOLCHAIN_FILE }}" | |
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" | |
-DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | |
-DCMAKE_CXX_FLAGS=" | |
-I ${{github.workspace}}/networkmanager/Tests/headers | |
-I ${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus | |
--include ${{github.workspace}}/networkmanager/Tests/mocks/Iarm.h | |
" | |
-DENABLE_UNIT_TESTING=ON | |
&& | |
cmake --build build/RDKNetworkmanager --target install -j8 | |
- name: Run unit tests for common class | |
run: > | |
PATH=${{github.workspace}}/install/usr/bin:${PATH} | |
LD_LIBRARY_PATH=${{github.workspace}}/install/usr/lib:${{github.workspace}}/install/usr/lib/wpeframework/plugins:${LD_LIBRARY_PATH} | |
common_class_tests | |
- name: Run unit tests for rdk proxy | |
run: > | |
PATH=${{github.workspace}}/install/usr/bin:${PATH} | |
LD_LIBRARY_PATH=${{github.workspace}}/install/usr/lib:${{github.workspace}}/install/usr/lib/wpeframework/plugins:${LD_LIBRARY_PATH} | |
rdkproxy_tests | |
- name: Run unit tests for Legacy_WiFi | |
run: > | |
PATH=${{github.workspace}}/install/usr/bin:${PATH} | |
LD_LIBRARY_PATH=${{github.workspace}}/install/usr/lib:${{github.workspace}}/install/usr/lib/wpeframework/plugins:${LD_LIBRARY_PATH} | |
legacywifi_tests | |
- name: Run unit tests for Legacy_Network | |
run: > | |
PATH=${{github.workspace}}/install/usr/bin:${PATH} | |
LD_LIBRARY_PATH=${{github.workspace}}/install/usr/lib:${{github.workspace}}/install/usr/lib/wpeframework/plugins:${LD_LIBRARY_PATH} | |
legacynetwork_tests | |
- name: Generate coverage | |
run: | | |
lcov -c -o coverage.info -d build/RDKNetworkmanager | |
lcov -r coverage.info '/usr/include/*' '*/build/RDKNetworkmanager/*' \ | |
'*/install/usr/include/*' '*/Tests/*' 'googlemock/*' 'googletest/*' \ | |
-o filtered_coverage.info | |
- name: Generate the html report | |
run: | | |
genhtml filtered_coverage.info --output-directory /tmp/coverage_report | |
- name: Upload the coverage report to Pull request using actions | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: /tmp/coverage_report | |