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
4aa1695
commit bc548d5
Showing
1 changed file
with
94 additions
and
36 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 |
---|---|---|
@@ -1,19 +1,20 @@ | ||
name: l1-tests | ||
|
||
name: l1-test | ||
|
||
on: | ||
push: | ||
branches: [ main, develop] | ||
branches: [ main, develop, 'topic/**'] | ||
pull_request: | ||
branches: [ main, develop] | ||
|
||
env: | ||
BUILD_TYPE: Debug | ||
THUNDER_REF: "R4.4.1" | ||
THUNDER_TOOLS_REF: "R4.4.1" | ||
INTERFACES_REF: "R4.4.1" | ||
TOOLS_REF: "R4.4.1" | ||
|
||
jobs: | ||
l1-tests: | ||
l1-tests: | ||
name: Build and run unit tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -69,34 +70,20 @@ jobs: | |
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 libnm-dev pkg-config | ||
sudo apt install -y libnm0 git pkg-config ninja-build libssl-dev libglib2.0-dev libnm-dev libcurl4-openssl-dev valgrind lcov clang | ||
- name: Install build tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential cmake | ||
- name: Checkout ThunderTools | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: rdkcentral/ThunderTools | ||
path: ThunderTools | ||
ref: ${{env.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}} | ||
|
||
ref: ${{env.THUNDER_TOOLS_REF}} | ||
- name: Build ThunderTools | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: > | ||
|
@@ -112,22 +99,31 @@ jobs: | |
&& | ||
cmake --install build/ThunderTools | ||
- 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" | ||
-B build/Thunder | ||
-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" | ||
-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 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v3 | ||
|
@@ -154,20 +150,82 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
path: networkmanager | ||
|
||
- name: Build networkmanager | ||
|
||
- name: Generate external headers | ||
# Empty headers to mute errors | ||
run: > | ||
cmake | ||
-Hnetworkmanager | ||
-B build/networkmanager | ||
-DCMAKE_INSTALL_PREFIX=install/usr | ||
-DCMAKE_MODULE_PATH=${PWD}/install/tools/cmake | ||
-DENABLE_GNOME_NETWORKMANAGER=ON | ||
cd "${{github.workspace}}/networkmanager/Tests/" | ||
&& | ||
cmake --build build/networkmanager -j8 | ||
mkdir -p | ||
headers | ||
headers/rdk/iarmbus | ||
headers/network | ||
&& | ||
cmake --install build/networkmanager | ||
cd headers | ||
&& | ||
touch | ||
rdk/iarmbus/libIARM.h | ||
rdk/iarmbus/libIBus.h | ||
rdk/iarmbus/libIBusDaemon.h | ||
network/wifiSrvMgrIarmIf.h | ||
network/netsrvmgrIarm.h | ||
- name: Set clang toolchain | ||
if: ${{ matrix.compiler == 'clang' }} | ||
run: echo "TOOLCHAIN_FILE=${{github.workspace}}/networkmanager/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}}/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}}/networkmanagerTests/headers | ||
-I ${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus | ||
-I ${{github.workspace}}/networkmanager/Tests/headers/network | ||
-Wall -Werror -Wno-error=format= | ||
-Wl,-wrap,system -Wl,-wrap,popen -Wl,-wrap,syslog" | ||
-DCMAKE_DISABLE_FIND_PACKAGE_IARMBus=ON | ||
-DENABLE_GNOME_NETWORKMANAGER=OFF | ||
-DENABLE_NETWORKMANAGER_UNIT_TEST=ON | ||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
&& | ||
cmake --build build/RDKNetworkmanager -j16 | ||
&& | ||
cmake --install build/RDKNetworkmanager | ||
- name: Build networkmanager with Gnome Proxy | ||
run: > | ||
cmake | ||
-S "${{github.workspace}}/networkmanager" | ||
-B build/GnomeNetworkmanager | ||
-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}}/networkmanagerTests/headers | ||
-I ${{github.workspace}}/networkmanager/Tests/headers/rdk/iarmbus | ||
-I ${{github.workspace}}/networkmanager/Tests/headers/network | ||
-Wall -Wno-error=format= | ||
-Wl,-wrap,system -Wl,-wrap,popen -Wl,-wrap,syslog" | ||
-DCMAKE_DISABLE_FIND_PACKAGE_IARMBus=ON | ||
-DENABLE_GNOME_NETWORKMANAGER=ON | ||
-DENABLE_NETWORKMANAGER_UNIT_TEST=OFF | ||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
&& | ||
cmake --build build/GnomeNetworkmanager -j16 | ||
&& | ||
cmake --install build/GnomeNetworkmanager |