Skip to content

Commit

Permalink
new edit
Browse files Browse the repository at this point in the history
  • Loading branch information
parvathinew authored and parvathinew committed Sep 12, 2024
1 parent 40d85c5 commit 90306bb
Showing 1 changed file with 69 additions and 35 deletions.
104 changes: 69 additions & 35 deletions .github/workflows/rdk_unit_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

name: rdk_unit_test

on:
Expand Down Expand Up @@ -30,6 +31,10 @@ jobs:

steps:
- name: Set up cache
# Cache Thunder/ThunderInterfaces.
# https://github.com/actions/cache
# https://docs.github.com/en/rest/actions/cache
# Modify the key if changing the list.
if: ${{ !env.ACT }}
id: cache
uses: actions/cache@v3
Expand Down Expand Up @@ -67,8 +72,9 @@ jobs:
cmake-version: '3.16.x'

- name: Install packages
run: |
run: >
sudo apt update
&&
sudo apt install -y libnm0 git pkg-config ninja-build libssl-dev libglib2.0-dev libnm-dev libcurl4-openssl-dev valgrind lcov clang
- name: Checkout ThunderTools
Expand All @@ -78,12 +84,19 @@ jobs:
repository: rdkcentral/ThunderTools
path: ThunderTools
ref: ${{env.THUNDER_TOOLS_REF}}

- name: Build ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
run: |
cmake -S "${{github.workspace}}/ThunderTools" -B build/ThunderTools -DEXCEPTIONS_ENABLE=ON -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" -DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake"
run: >
cmake
-S "${{github.workspace}}/ThunderTools"
-B build/ThunderTools
-DEXCEPTIONS_ENABLE=ON
-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 -j8
&&
cmake --install build/ThunderTools
- name: Checkout Thunder
Expand All @@ -96,9 +109,19 @@ jobs:

- name: Build Thunder
if: steps.cache.outputs.cache-hit != 'true'
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=${{env.BUILD_TYPE}} -DBINDING=127.0.0.1 -DPORT=55555 -DEXCEPTIONS_ENABLE=ON
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=${{env.BUILD_TYPE}}
-DBINDING=127.0.0.1
-DPORT=55555
-DEXCEPTIONS_ENABLE=ON
&&
cmake --build build/Thunder -j8
&&
cmake --install build/Thunder
- name: Checkout ThunderInterfaces
Expand All @@ -111,9 +134,16 @@ jobs:

- name: Build ThunderInterfaces
if: steps.cache.outputs.cache-hit != 'true'
run: |
cmake -S "${{github.workspace}}/ThunderInterfaces" -B build/ThunderInterfaces -DEXCEPTIONS_ENABLE=ON -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" -DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake"
run: >
cmake
-S "${{github.workspace}}/ThunderInterfaces"
-B build/ThunderInterfaces
-DEXCEPTIONS_ENABLE=ON
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr"
-DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake"
&&
cmake --build build/ThunderInterfaces -j8
&&
cmake --install build/ThunderInterfaces
- name: Checkout networkmanager
Expand All @@ -122,20 +152,20 @@ jobs:
path: networkmanager

- name: Generate external headers
run: |
mkdir -p "${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus"
mkdir -p "${{github.workspace}}/networkmanager/Tests/headers/network"
touch "${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus/libIARM.h"
touch "${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus/libIBus.h"
touch "${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus/libIBusDaemon.h"
touch "${{github.workspace}}/networkmanager/Tests/headers/network/wifiSrvMgrIarmIf.h"
touch "${{github.workspace}}/networkmanager/Tests/headers/network/netsrvmgrIarm.h"
- name: Set up environment variables for CMake
run: |
echo "IARMBUS_INCLUDE_DIRS=${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus" >> $GITHUB_ENV
echo "IARMBUS_LIBRARIES=${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus/libIARM.h" >> $GITHUB_ENV
run: >
cd "${{github.workspace}}/networkmanager/Tests/"
&&
mkdir -p
headers
headers/rdk/iarmbus
&&
cd headers
&&
touch
rdk/iarmbus/libIARM.h
rdk/iarmbus/libIBus.h
rdk/iarmbus/libIBusDaemon.h
- name: Set clang toolchain
if: ${{ matrix.compiler == 'clang' }}
run: echo "TOOLCHAIN_FILE=${{github.workspace}}/networkmanager/Tests/clang.cmake" >> $GITHUB_ENV
Expand All @@ -145,22 +175,26 @@ jobs:
run: echo "TOOLCHAIN_FILE=${{github.workspace}}/networkmanager/Tests/gcc-with-coverage.cmake" >> $GITHUB_ENV

- 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="-fprofile-arcs -ftest-coverage -
DEXCEPTIONS_ENABLE=ON
-I ${{github.workspace}}/networkmanager/Tests/headers
-I ${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus
-I ${{github.workspace}}/networkmanager/Tests/headers/network"
-DENABLE_GNOME_NETWORKMANAGER=OFF
-DENABLE_NETWORKMANAGER_UNIT_TEST=ON
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="
-fprofile-arcs
-ftest-coverage
-DEXCEPTIONS_ENABLE=ON
-I ${{github.workspace}}/networkmanager/Tests/headers
-I ${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus
-DENABLE_GNOME_NETWORKMANAGER=OFF
-DENABLE_NETWORKMANAGER_UNIT_TEST=ON
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
&&
cmake --build build/RDKNetworkmanager -j16
&&
cmake --install build/RDKNetworkmanager

0 comments on commit 90306bb

Please sign in to comment.