forked from rdkcentral/networkmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f83b94
commit 67fc951
Showing
1 changed file
with
205 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
name: l1-tests | ||
|
||
on: | ||
push: | ||
branches: [ main, 'release/**'] | ||
pull_request: | ||
branches: [ main, 'release/**'] | ||
|
||
env: | ||
BUILD_TYPE: Debug | ||
THUNDER_REF: "5e7c0b1ed3c3dd0fc31c86518a364388dc24273b" | ||
INTERFACES_REF: "930e01ec9aec8aa60254dec0be3beca932df63cd" | ||
|
||
jobs: | ||
l1-tests: | ||
name: Build and run unit tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
compiler: [ gcc, clang ] | ||
coverage: [ with-coverage, without-coverage ] | ||
exclude: | ||
- compiler: clang | ||
coverage: with-coverage | ||
- compiler: clang | ||
coverage: without-coverage | ||
- compiler: gcc | ||
coverage: without-coverage | ||
|
||
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 | ||
with: | ||
path: | | ||
build/Thunder | ||
build/ThunderInterfaces | ||
build/ThunderTools | ||
install | ||
!install/etc/WPEFramework/plugins | ||
!install/usr/bin/RdkServicesL1Test | ||
!install/usr/include/gmock | ||
!install/usr/include/gtest | ||
!install/usr/lib/libgmockd.a | ||
!install/usr/lib/libgmock_maind.a | ||
!install/usr/lib/libgtestd.a | ||
!install/usr/lib/libgtest_maind.a | ||
!install/usr/lib/cmake/GTest | ||
!install/usr/lib/pkgconfig/gmock.pc | ||
!install/usr/lib/pkgconfig/gmock_main.pc | ||
!install/usr/lib/pkgconfig/gtest.pc | ||
!install/usr/lib/pkgconfig/gtest_main.pc | ||
!install/usr/lib/wpeframework/plugins | ||
key: ${{ runner.os }}-${{ env.THUNDER_REF }}-${{ env.INTERFACES_REF }}-3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- run: pip install jsonref | ||
|
||
- name: Set up CMake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.16.x' | ||
|
||
- name: Install packages | ||
run: > | ||
sudo apt update | ||
&& | ||
sudo apt install -y libsqlite3-dev libcurl4-openssl-dev valgrind lcov clang libsystemd-dev libboost-all-dev libwebsocketpp-dev meson libcunit1 libcunit1-dev | ||
- name: Install build tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential cmake | ||
- name: Checkout Thunder | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: rdkcentral/Thunder | ||
path: Thunder | ||
ref: ${{env.THUNDER_REF}} | ||
|
||
- name: Build Thunder | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: > | ||
cmake | ||
-S "${{github.workspace}}/Thunder/Tools" | ||
-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 | ||
&& | ||
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=9998 | ||
-DEXCEPTIONS_ENABLE=ON | ||
&& | ||
cmake --build build/Thunder -j8 | ||
&& | ||
cmake --install build/Thunder | ||
- 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: 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" | ||
&& | ||
cmake --build build/ThunderInterfaces -j8 | ||
&& | ||
cmake --install build/ThunderInterfaces | ||
- name: Checkout networkmanager | ||
uses: actions/checkout@v3 | ||
with: | ||
path: networkmanager | ||
|
||
- name: Generate external headers | ||
run: | | ||
mkdir -p "${{github.workspace}}/rdkservices/Tests/headers/audiocapturemgr" | ||
mkdir -p "${{github.workspace}}/rdkservices/Tests/headers/rdk/ds" | ||
mkdir -p "${{github.workspace}}/rdkservices/Tests/headers/rdk/iarmbus" | ||
mkdir -p "${{github.workspace}}/rdkservices/Tests/headers/rdk/iarmmgrs-hal" | ||
mkdir -p "${{github.workspace}}/rdkservices/Tests/headers/ccec/drivers" | ||
mkdir -p "${{github.workspace}}/rdkservices/Tests/headers/network" | ||
cd "${{github.workspace}}/rdkservices/Tests/headers" | ||
touch audiocapturemgr/audiocapturemgr_iarm.h | ||
touch ccec/drivers/CecIARMBusMgr.h | ||
touch rdk/ds/audioOutputPort.hpp | ||
touch rdk/ds/compositeIn.hpp | ||
touch rdk/ds/dsDisplay.h | ||
touch rdk/ds/dsError.h | ||
touch rdk/ds/dsMgr.h | ||
touch rdk/ds/dsTypes.h | ||
touch rdk/ds/dsUtl.h | ||
touch rdk/ds/exception.hpp | ||
touch rdk/iarmbus/libIARM.h | ||
touch rdk/iarmbus/libIBus.h | ||
touch rdk/iarmbus/libIBusDaemon.h | ||
touch rdk/iarmmgrs-hal/deepSleepMgr.h | ||
touch rdk/iarmmgrs-hal/mfrMgr.h | ||
touch rdk/iarmmgrs-hal/pwrMgr.h | ||
touch rdk/iarmmgrs-hal/sysMgr.h | ||
touch network/wifiSrvMgrIarmIf.h | ||
touch network/netsrvmgrIarm.h | ||
touch libudev.h | ||
touch rfcapi.h | ||
touch rbus.h | ||
touch telemetry_busmessage_sender.h | ||
touch maintenanceMGR.h | ||
touch pkg.h | ||
touch secure_wrapper.h | ||
touch wpa_ctrl.h | ||
- name: Set clang toolchain | ||
if: ${{ matrix.compiler == 'clang' }} | ||
run: echo "TOOLCHAIN_FILE=${{github.workspace}}/rdkservices/Tests/clang.cmake" >> $GITHUB_ENV | ||
|
||
- name: Set gcc/with-coverage toolchain | ||
if: ${{ matrix.compiler == 'gcc' && matrix.coverage == 'with-coverage' && !env.ACT }} | ||
run: echo "TOOLCHAIN_FILE=${{github.workspace}}/rdkservices/Tests/gcc-with-coverage.cmake" >> $GITHUB_ENV | ||
|
||
- name: Build networkmanager | ||
run: > | ||
cmake | ||
-Hnetworkmanager | ||
-B build/networkmanager | ||
-DCMAKE_INSTALL_PREFIX=install/usr | ||
-DCMAKE_MODULE_PATH=${PWD}/install/tools/cmake | ||
-DENABLE_GNOME_NETWORKMANAGER=ON | ||
&& | ||
cmake --build build/networkmanager --target install -j8 | ||
|