@@ -4,103 +4,126 @@ 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 }}
1515 AUTOMATICS_PASSCODE : ${{ secrets.AUTOMATICS_PASSCODE }}
1616
1717jobs :
1818 build-and-test-l1 :
19- runs-on : ubuntu-latest
19+ runs-on : ubuntu-22.04
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 freeglut3 freeglut3-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 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+ #wget http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb
57+ #sudo dpkg -i libffi7_3.3-4_amd64.deb
58+ #sudo ldconfig
59+
60+ - name : Setup externals folder in main repo
5961 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
62+ pwd
63+ cp -a rdkNativeScript_tests/externals externals
64+
65+ - name : Make build.sh and scripts executable
7566 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
67+ pwd
68+ chmod +x externals/build.sh
69+ find externals -type f -name "preparedashpc.sh" -exec chmod +x {} \;
70+ find externals -type f -name "copydashheaders.sh" -exec chmod +x {} \;
7971
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
72+ - name : Run build.sh to build externals (from tests repo)
8873 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
74+ cd externals
75+ ./build.sh
10076
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
77+ - name : Fix JavaScriptCore library symlinks
78+ run : |
79+ cd externals/extlibs/lib
80+ rm -f libJavaScriptCore.so libJavaScriptCore.so.1
81+ ln -s libJavaScriptCore.so.1.0.0 libJavaScriptCore.so.1
82+ ln -s libJavaScriptCore.so.1 libJavaScriptCore.so
83+
84+ rm -f libessos.so libessos.so.0
85+ ln -s libessos.so.0.0.0 libessos.so.0
86+ ln -s libessos.so.0 libessos.so
87+
88+ rm -f libessosrmgr.so libessosrmgr.so.0
89+ ln -s libessosrmgr.so.0.0.0 libessosrmgr.so.0
90+ ln -s libessosrmgr.so.0 libessosrmgr.so
91+
92+ rm -f libuv.so libuv.so.1
93+ ln -s libuv.so.1.0.0 libuv.so.1
94+ ln -s libuv.so.1 libuv.so
95+
96+ - name : Fix symlinks for x86_64-linux-gnu libraries
97+ run : |
98+ cd externals/extlibs/lib/x86_64-linux-gnu
99+ rm -f libglib-2.0.so libglib-2.0.so.0
100+ ln -s libglib-2.0.so.0.6200.4 libglib-2.0.so.0
101+ ln -s libglib-2.0.so.0 libglib-2.0.so
102+
103+ rm -f libgio-2.0.so libgio-2.0.so.0
104+ ln -s libgio-2.0.so.0.6200.4 libgio-2.0.so.0
105+ ln -s libgio-2.0.so.0 libgio-2.0.so
106+
107+ rm -f libgmodule-2.0.so libgmodule-2.0.so.0
108+ ln -s libgmodule-2.0.so.0.6200.4 libgmodule-2.0.so.0
109+ ln -s libgmodule-2.0.so.0 libgmodule-2.0.so
110+
111+ rm -f libgobject-2.0.so libgobject-2.0.so.0
112+ ln -s libgobject-2.0.so.0.6200.4 libgobject-2.0.so.0
113+ ln -s libgobject-2.0.so.0 libgobject-2.0.so
114+
115+ rm -f libgthread-2.0.so libgthread-2.0.so.0
116+ ln -s libgthread-2.0.so.0.6200.4 libgthread-2.0.so.0
117+ ln -s libgthread-2.0.so.0 libgthread-2.0.so
118+
119+ - name : Configure and build main repo (use CMakeLists.txt from @rdkcentral/rdkNativeScript)
120+ run : |
121+ mkdir -p build
122+ cd build
123+ cmake .. \
124+ -DENABLE_JSRUNTIME_ESSOS=ON \
125+ -DJSRUNTIME_ENGINE_NAME=jsc \
126+ -DENABLE_JSRUNTIME_PLAYER=ON \
127+ -DENABLE_AAMP_JSBINDINGS_DYNAMIC=ON \
128+ -DCMAKE_CXX_FLAGS="-I../externals/extlibs/include/rtcore"
129+ cmake --build .
0 commit comments