Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuhammedrafi committed Sep 24, 2024
1 parent bf61126 commit a6ca05c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 66 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/gnome_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ on:
branches: [ main, develop, 'release/**']

env:
BUILD_TYPE: Debug
THUNDER_REF: "R4.4.1"
THUNDER_TOOLS_REF: "R4.4.1"
INTERFACES_REF: "R4.4.1"

jobs:
unit-tests:
Expand All @@ -30,7 +27,7 @@ jobs:
install
!install/etc/WPEFramework/plugins
!install/usr/lib/wpeframework/plugins
key: ${{ runner.os }}-${{ env.THUNDER_REF }}-${{ env.INTERFACES_REF }}
key: ${{ runner.os }}-${{ env.THUNDER_REF }}

- name: Install packages
run: |
Expand All @@ -51,9 +48,9 @@ jobs:
- name: Checkout thunder repositories
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/rdkcentral/ThunderTools ThunderTools --branch ${{ env.THUNDER_TOOLS_REF }}
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.INTERFACES_REF }}
git clone https://github.com/rdkcentral/ThunderInterfaces ThunderInterfaces --branch ${{ env.THUNDER_REF }}
- name: Build ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
Expand Down
85 changes: 25 additions & 60 deletions .github/workflows/rdk_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@ on:
branches: [ main, develop, 'release/**']

env:
BUILD_TYPE: Debug
THUNDER_REF: "R4.4.1"
THUNDER_TOOLS_REF: "R4.4.1"
INTERFACES_REF: "R4.4.1"

jobs:
unit-tests:
name: Build and run unit tests
runs-on: ubuntu-latest

steps:
- name: Set up cache
- name: Configure cache
if: ${{ !env.ACT }}
id: cache
uses: actions/cache@v3
Expand All @@ -30,98 +27,69 @@ jobs:
install
!install/etc/WPEFramework/plugins
!install/usr/lib/wpeframework/plugins
key: ${{ runner.os }}-${{ env.THUNDER_REF }}-${{ env.INTERFACES_REF }}
key: ${{ runner.os }}-${{ env.THUNDER_REF }}

- name: Install packages
run: |
sudo apt update
sudo apt install -y pkg-config ninja-build libssl-dev libcurl4-openssl-dev
sudo apt-get install -y pkg-config libglib2.0-dev libnm-dev libcurl4-openssl-dev ninja-build
- name: Set up Python
- name: Configure Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install jsonref

- name: Set up CMake
- name: Configure CMake
uses: jwlawson/[email protected]
with:
cmake-version: '3.16.x'

- name: Checkout ThunderTools
- name: Checkout thunder repositories
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: rdkcentral/ThunderTools
path: ThunderTools
ref: ${{env.THUNDER_TOOLS_REF}}

- name: Checkout Thunder
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: rdkcentral/Thunder
path: Thunder
ref: ${{env.THUNDER_REF}}
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 ThunderInterfaces
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: rdkcentral/ThunderInterfaces
path: ThunderInterfaces
ref: ${{env.INTERFACES_REF}}

- name: Checkout networkmanager
uses: actions/checkout@v3
with:
path: networkmanager

- name: Build ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake
-S "${{github.workspace}}/ThunderTools"
-B build/ThunderTools
-DEXCEPTIONS_ENABLE=ON
-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 -j8
&&
cmake --install build/ThunderTools
cmake --build build/ThunderTools --target install -j8
- name: Build Thunder
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake
-S "${{github.workspace}}/Thunder"
-B build/Thunder
-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}}
-DBUILD_TYPE=Debug
-DBINDING=127.0.0.1
-DPORT=55555
-DEXCEPTIONS_ENABLE=ON
-DPORT=9998
&&
cmake --build build/Thunder -j8
&&
cmake --install build/Thunder
cmake --build build/Thunder --target install -j8
- name: Build ThunderInterfaces
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake
-S "${{github.workspace}}/ThunderInterfaces"
-B build/ThunderInterfaces
-DEXCEPTIONS_ENABLE=ON
-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 -j8
&&
cmake --install build/ThunderInterfaces
cmake --build build/ThunderInterfaces --target install -j8
- name: Checkout networkmanager
uses: actions/checkout@v3
with:
path: networkmanager

- name: Generate external headers
run: |
Expand All @@ -141,13 +109,10 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE="${{ env.TOOLCHAIN_FILE }}"
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr"
-DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake"
-DENABLE_NETWORKMANAGER_UNIT_TEST=ON
-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
"
&&
cmake --build build/RDKNetworkmanager -j16
&&
cmake --install build/RDKNetworkmanager
cmake --build build/RDKNetworkmanager --target install -j8

0 comments on commit a6ca05c

Please sign in to comment.