@@ -4,11 +4,11 @@ permissions:
44 checks : write
55
66on :
7+ workflow_dispatch :
78 push :
8- branches : [develop ]
9+ branches : [topic/RDKEMW-9461 ]
910 pull_request :
10- branches : [develop]
11- workflow_dispatch :
11+ branches : [topic/RDKEMW-9461]
1212
1313env :
1414 AUTOMATICS_UNAME : ${{ secrets.AUTOMATICS_UNAME }}
@@ -19,88 +19,108 @@ jobs:
1919 runs-on : ubuntu-latest
2020
2121 steps :
22- - name : Checkout source repository
22+ - name : Checkout main source repository (rdkNativeScript)
2323 uses : actions/checkout@v3
2424
25- - name : Checkout rdkNativeScript_tests repository
25+ - name : Checkout rdkNativeScript_tests repository (externals/build.sh and dependencies)
2626 uses : actions/checkout@v3
2727 with :
2828 repository : rdk-e/rdkNativeScript_tests
29- ref : topic/RDKEMW-5610
29+ ref : topic/RDKEMW-9461
3030 path : rdkNativeScript_tests
3131 token : ${{ secrets.GH_PAT }}
3232
3333 - name : Install dependencies
3434 run : |
3535 sudo apt-get update && sudo apt-get install -y \
36- g++ \
37- cmake \
38- build-essential \
39- libcurl4-openssl-dev \
40- libcjson-dev \
41- libgtest-dev \
42- libssl-dev \
43- zlib1g-dev \
44- libuv1-dev \
45- lcov \
46- libglib2.0-dev
47-
48- - name : Build Google Test and Google Mock
36+ git cmake gperf ruby-dev libglew-dev libglut-dev \
37+ libglib2.0-dev g++ meson bison libjpeg-dev libpng-dev \
38+ libfreetype6-dev libicu-dev autoconf libtool libxml2-dev \
39+ libcurl4-openssl-dev libexpat1-dev doxygen vim libcjson-dev \
40+ libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
41+ libwayland-bin libwayland-dev wayland-protocols \
42+ libreadline-dev net-tools libffi7 libmount1 libpcre3 libselinux1 zlib1g \
43+ libunwind-dev
44+
45+ - name : Install ICU 66 and compatibility libs
4946 run : |
50- cd /usr/src/googletest
51- sudo cmake -S . -B build
52- sudo cmake --build build
53- sudo cp build/lib/libgmock.a /usr/lib
54- sudo cp build/lib/libgmock_main.a /usr/lib
55- sudo cp build/lib/libgtest.a /usr/lib
56- sudo cp build/lib/libgtest_main.a /usr/lib
57-
58- - name : Configure and Build L1
47+ sudo apt-get update
48+ wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu66_66.1-2ubuntu2_amd64.deb
49+ sudo dpkg -i libicu66_66.1-2ubuntu2_amd64.deb
50+ wget http://archive.ubuntu.com/ubuntu/pool/main/p/pcre3/libpcre3_8.39-13ubuntu0.22.04.1_amd64.deb
51+ sudo dpkg -i libpcre3_8.39-13ubuntu0.22.04.1_amd64.deb
52+ sudo ldconfig
53+ wget http://archive.ubuntu.com/ubuntu/pool/main/g/glib2.0/libglib2.0-0_2.64.6-1~ubuntu20.04.9_amd64.deb
54+ sudo dpkg -i libglib2.0-0_2.64.6-1~ubuntu20.04.9_amd64.deb
55+ sudo ldconfig
56+
57+ - name : Setup externals folder in main repo
5958 run : |
60- mkdir -p build_l1
61- cd build_l1
62- cmake -DCMAKE_BUILD_TYPE=Debug \
63- -DRUN_L1=ON \
64- -DRUN_L2=OFF \
65- -DENABLE_JSRUNTIME_ESSOS=ON \
66- -DENABLE_JSRUNTIME_PLAYER=ON \
67- -DENABLE_AAMP_JSBINDINGS=ON \
68- -DENABLE_AAMP_JSBINDINGS_DYNAMIC=ON \
69- -DENABLE_AAMP_JSBINDINGS_STATIC=OFF \
70- -DJSRUNTIME_ENGINE_NAME=jsc \
71- -Djsruntime_source=.. ../rdkNativeScript_tests
72- make -j$(nproc)
73-
74- - name : Run L1 Tests and Generate JUnit Results
59+ pwd
60+ cp -a rdkNativeScript_tests/externals externals
61+
62+ - name : Make build.sh and scripts executable
7563 run : |
76- cd build_l1
77- #ctest -R RunL1Tests --output-on-failure --no-compress-output --output-junit ctest-results.xml
78- ./L1_tests --gtest_output=xml:ctest-results.xml
64+ pwd
65+ chmod +x externals/build.sh
66+ find externals -type f -name "preparedashpc.sh" -exec chmod +x {} \;
67+ find externals -type f -name "copydashheaders.sh" -exec chmod +x {} \;
7968
80- - name : Publish L1 test results
81- uses : dorny/test-reporter@v1
82- with :
83- name : Unit Test Results
84- path : build_l1/ctest-results.xml
85- reporter : java-junit
86-
87- - name : Generate coverage report
69+ - name : Run build.sh to build externals (from tests repo)
8870 run : |
89- cd build_l1
90- lcov --capture --directory . --output-file coverage.info --ignore-errors mismatch --rc geninfo_unexecuted_blocks=1
91- lcov --remove coverage.info '/usr/*' '*/test/*' '*/tests/*' '*/L1/*' '*/mocks/*' '*/gtest/*' '*/gmock/*' '*/googletest/*' '*/include/*' --output-file coverage.cleaned.info --ignore-errors unused
92- lcov --extract coverage.cleaned.info '*/src/*' --output-file coverage.final.info
93- genhtml coverage.final.info --output-directory html_coverage_report
94-
95- - name : Upload test result file (JUnit XML)
96- uses : actions/upload-artifact@v4
97- with :
98- name : ctest-results-l1-${{ github.run_id }}
99- path : build_l1/ctest-results.xml
71+ cd externals
72+ ./build.sh
10073
101- - name : Upload coverage report
102- uses : actions/upload-artifact@v4
103- with :
104- name : l1-html-coverage-report
105- path : build_l1/html_coverage_report
106- if-no-files-found : warn
74+ - name : Fix JavaScriptCore library symlinks
75+ run : |
76+ cd externals/extlibs/lib
77+ rm -f libJavaScriptCore.so libJavaScriptCore.so.1
78+ ln -s libJavaScriptCore.so.1.0.0 libJavaScriptCore.so.1
79+ ln -s libJavaScriptCore.so.1 libJavaScriptCore.so
80+
81+ rm -f libessos.so libessos.so.0
82+ ln -s libessos.so.0.0.0 libessos.so.0
83+ ln -s libessos.so.0 libessos.so
84+
85+ rm -f libessosrmgr.so libessosrmgr.so.0
86+ ln -s libessosrmgr.so.0.0.0 libessosrmgr.so.0
87+ ln -s libessosrmgr.so.0 libessosrmgr.so
88+
89+ rm -f libuv.so libuv.so.1
90+ ln -s libuv.so.1.0.0 libuv.so.1
91+ ln -s libuv.so.1 libuv.so
92+
93+ - name : Fix symlinks for x86_64-linux-gnu libraries
94+ run : |
95+ cd externals/extlibs/lib/x86_64-linux-gnu
96+ rm -f libglib-2.0.so libglib-2.0.so.0
97+ ln -s libglib-2.0.so.0.6200.4 libglib-2.0.so.0
98+ ln -s libglib-2.0.so.0 libglib-2.0.so
99+
100+ rm -f libgio-2.0.so libgio-2.0.so.0
101+ ln -s libgio-2.0.so.0.6200.4 libgio-2.0.so.0
102+ ln -s libgio-2.0.so.0 libgio-2.0.so
103+
104+ rm -f libgmodule-2.0.so libgmodule-2.0.so.0
105+ ln -s libgmodule-2.0.so.0.6200.4 libgmodule-2.0.so.0
106+ ln -s libgmodule-2.0.so.0 libgmodule-2.0.so
107+
108+ rm -f libgobject-2.0.so libgobject-2.0.so.0
109+ ln -s libgobject-2.0.so.0.6200.4 libgobject-2.0.so.0
110+ ln -s libgobject-2.0.so.0 libgobject-2.0.so
111+
112+ rm -f libgthread-2.0.so libgthread-2.0.so.0
113+ ln -s libgthread-2.0.so.0.6200.4 libgthread-2.0.so.0
114+ ln -s libgthread-2.0.so.0 libgthread-2.0.so
115+
116+ - name : Configure and build main repo (use CMakeLists.txt from @rdkcentral/rdkNativeScript)
117+ run : |
118+ mkdir -p build
119+ cd build
120+ cmake .. \
121+ -DENABLE_JSRUNTIME_ESSOS=ON \
122+ -DJSRUNTIME_ENGINE_NAME=jsc \
123+ -DENABLE_JSRUNTIME_PLAYER=ON \
124+ -DENABLE_AAMP_JSBINDINGS_DYNAMIC=ON \
125+ -DCMAKE_CXX_FLAGS="-I../externals/extlibs/include/rtcore"
126+ cmake --build .
0 commit comments