-
Notifications
You must be signed in to change notification settings - Fork 6
118 lines (104 loc) · 4.08 KB
/
rdk_unit_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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-latest
steps:
- name: Configure cache
if: ${{ !env.ACT }}
id: cache
uses: actions/cache@v3
with:
path: |
build/Thunder
build/ThunderInterfaces
build/ThunderTools
install
!install/etc/WPEFramework/plugins
!install/usr/lib/wpeframework/plugins
key: ${{ runner.os }}-${{ env.THUNDER_REF }}
- name: Install packages
run: |
sudo apt update
sudo apt-get install -y pkg-config libglib2.0-dev libnm-dev libcurl4-openssl-dev ninja-build
- name: Configure Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install jsonref
- name: Configure CMake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.16.x'
- name: Checkout thunder repositories
if: steps.cache.outputs.cache-hit != 'true'
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: Build ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
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
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=Debug
-DBINDING=127.0.0.1
-DPORT=9998
&&
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
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr"
-DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake"
&&
cmake --build build/ThunderInterfaces --target install -j8
- name: Checkout networkmanager
uses: actions/checkout@v3
with:
path: networkmanager
- 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
"
&&
cmake --build build/RDKNetworkmanager --target install -j8