From 9210a6b67075dff44398664a4ff0ec9f70d1e8a4 Mon Sep 17 00:00:00 2001 From: Anand Kandasamy <37086488+anand-ky@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:10:58 -0400 Subject: [PATCH] Merge pull request #5444 from npoltorapavlo/fix_Thunder_masterbranch_support Fix workflows Thunder master branch support --- .github/workflows/BuildThunder.sh | 16 +++++----------- .github/workflows/L0-PersistentStore-grpc.yml | 10 ++++++---- .github/workflows/L0-PersistentStore.yml | 6 ++++-- .github/workflows/L1-PersistentStore-sqlite.yml | 10 ++++++---- .github/workflows/L1-PersistentStore.yml | 6 ++++-- .github/workflows/L2-PersistentStore-grpc.yml | 16 ++++++++-------- .github/workflows/L2-PersistentStore.yml | 15 +++++---------- 7 files changed, 38 insertions(+), 41 deletions(-) diff --git a/.github/workflows/BuildThunder.sh b/.github/workflows/BuildThunder.sh index 2d0975bd2c..f6621cc266 100755 --- a/.github/workflows/BuildThunder.sh +++ b/.github/workflows/BuildThunder.sh @@ -17,7 +17,7 @@ pip install jsonref git clone https://github.com/rdkcentral/ThunderTools.git -cmake -G Ninja -S ThunderTools -B build/ThunderTools -DCMAKE_INSTALL_PREFIX="install/usr" +cmake -G Ninja -S ThunderTools -B build/ThunderTools -DCMAKE_INSTALL_PREFIX="install" cmake --build build/ThunderTools --target install @@ -27,17 +27,12 @@ cmake --build build/ThunderTools --target install git clone https://github.com/rdkcentral/Thunder.git cmake -G Ninja -S Thunder -B build/Thunder \ - -DBUILD_SHARED_LIBS=ON \ -DBINDING="127.0.0.1" \ -DCMAKE_BUILD_TYPE="Debug" \ - -DCMAKE_INSTALL_PREFIX="install/usr" \ - -DCMAKE_MODULE_PATH="${PWD}/install/usr/include/WPEFramework/Modules" \ - -DDATA_PATH="${PWD}/install/usr/share/WPEFramework" \ - -DPERSISTENT_PATH="${PWD}/install/var/wpeframework" \ + -DCMAKE_INSTALL_PREFIX="install" \ -DPORT="55555" \ - -DPROXYSTUB_PATH="${PWD}/install/usr/lib/wpeframework/proxystubs" \ - -DSYSTEM_PATH="${PWD}/install/usr/lib/wpeframework/plugins" \ - -DVOLATILE_PATH="tmp" + -DTOOLS_SYSROOT="${PWD}" \ + -DINITV_SCRIPT=OFF cmake --build build/Thunder --target install @@ -47,7 +42,6 @@ cmake --build build/Thunder --target install git clone https://github.com/rdkcentral/ThunderInterfaces.git cmake -G Ninja -S ThunderInterfaces -B build/ThunderInterfaces \ - -DCMAKE_INSTALL_PREFIX="install/usr" \ - -DCMAKE_MODULE_PATH="${PWD}/install/usr/include/WPEFramework/Modules" + -DCMAKE_INSTALL_PREFIX="install" cmake --build build/ThunderInterfaces --target install diff --git a/.github/workflows/L0-PersistentStore-grpc.yml b/.github/workflows/L0-PersistentStore-grpc.yml index 769021aa4e..b58268a672 100644 --- a/.github/workflows/L0-PersistentStore-grpc.yml +++ b/.github/workflows/L0-PersistentStore-grpc.yml @@ -3,10 +3,12 @@ name: L0-PersistentStore-grpc on: push: paths: - - PersistentStore/grpc/** + - PersistentStore/** + - .github/workflows/*PersistentStore*.yml pull_request: paths: - - PersistentStore/grpc/** + - PersistentStore/** + - .github/workflows/*PersistentStore*.yml jobs: build: @@ -29,12 +31,12 @@ jobs: - name: Build working-directory: ${{github.workspace}} run: | - cmake -S ${GITHUB_REPOSITORY}/PersistentStore/grpc/l0test -B build/grpcl0test -DCMAKE_INSTALL_PREFIX="install/usr" -DCMAKE_CXX_FLAGS="--coverage -Wall -Werror" + cmake -S ${GITHUB_REPOSITORY}/PersistentStore/grpc/l0test -B build/grpcl0test -DCMAKE_INSTALL_PREFIX="install" -DCMAKE_CXX_FLAGS="--coverage -Wall -Werror" cmake --build build/grpcl0test --target install - name: Run working-directory: ${{github.workspace}} - run: PATH=${PWD}/install/usr/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/usr/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try grpcl0test + run: PATH=${PWD}/install/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try grpcl0test - name: Generate coverage working-directory: ${{github.workspace}} diff --git a/.github/workflows/L0-PersistentStore.yml b/.github/workflows/L0-PersistentStore.yml index 1b68bf704f..2931c97600 100644 --- a/.github/workflows/L0-PersistentStore.yml +++ b/.github/workflows/L0-PersistentStore.yml @@ -4,9 +4,11 @@ on: push: paths: - PersistentStore/** + - .github/workflows/*PersistentStore*.yml pull_request: paths: - PersistentStore/** + - .github/workflows/*PersistentStore*.yml jobs: build: @@ -29,12 +31,12 @@ jobs: - name: Build working-directory: ${{github.workspace}} run: | - cmake -S ${GITHUB_REPOSITORY}/PersistentStore/l0test -B build/persistentstorel0test -DCMAKE_INSTALL_PREFIX="install/usr" -DCMAKE_CXX_FLAGS="--coverage -Wall -Werror" + cmake -S ${GITHUB_REPOSITORY}/PersistentStore/l0test -B build/persistentstorel0test -DCMAKE_INSTALL_PREFIX="install" -DCMAKE_CXX_FLAGS="--coverage -Wall -Werror" cmake --build build/persistentstorel0test --target install - name: Run working-directory: ${{github.workspace}} - run: PATH=${PWD}/install/usr/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/usr/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try persistentstorel0test + run: PATH=${PWD}/install/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try persistentstorel0test - name: Generate coverage working-directory: ${{github.workspace}} diff --git a/.github/workflows/L1-PersistentStore-sqlite.yml b/.github/workflows/L1-PersistentStore-sqlite.yml index 52912a79ee..a414e5fbfc 100644 --- a/.github/workflows/L1-PersistentStore-sqlite.yml +++ b/.github/workflows/L1-PersistentStore-sqlite.yml @@ -3,10 +3,12 @@ name: L1-PersistentStore-sqlite on: push: paths: - - PersistentStore/sqlite/** + - PersistentStore/** + - .github/workflows/*PersistentStore*.yml pull_request: paths: - - PersistentStore/sqlite/** + - PersistentStore/** + - .github/workflows/*PersistentStore*.yml jobs: build: @@ -29,12 +31,12 @@ jobs: - name: Build working-directory: ${{github.workspace}} run: | - cmake -S ${GITHUB_REPOSITORY}/PersistentStore/sqlite/l1test -B build/sqlitel1test -DCMAKE_INSTALL_PREFIX="install/usr" -DCMAKE_CXX_FLAGS="--coverage -Wall -Werror" + cmake -S ${GITHUB_REPOSITORY}/PersistentStore/sqlite/l1test -B build/sqlitel1test -DCMAKE_INSTALL_PREFIX="install" -DCMAKE_CXX_FLAGS="--coverage -Wall -Werror" cmake --build build/sqlitel1test --target install - name: Run working-directory: ${{github.workspace}} - run: PATH=${PWD}/install/usr/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/usr/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try sqlitel1test + run: PATH=${PWD}/install/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try sqlitel1test - name: Generate coverage working-directory: ${{github.workspace}} diff --git a/.github/workflows/L1-PersistentStore.yml b/.github/workflows/L1-PersistentStore.yml index 1766744bc4..63e4ac47c2 100644 --- a/.github/workflows/L1-PersistentStore.yml +++ b/.github/workflows/L1-PersistentStore.yml @@ -4,9 +4,11 @@ on: push: paths: - PersistentStore/** + - .github/workflows/*PersistentStore*.yml pull_request: paths: - PersistentStore/** + - .github/workflows/*PersistentStore*.yml jobs: build: @@ -29,12 +31,12 @@ jobs: - name: Build working-directory: ${{github.workspace}} run: | - cmake -S ${GITHUB_REPOSITORY}/PersistentStore/l1test -B build/persistentstorel1test -DCMAKE_INSTALL_PREFIX="install/usr" -DCMAKE_CXX_FLAGS="--coverage -Wall -Werror" + cmake -S ${GITHUB_REPOSITORY}/PersistentStore/l1test -B build/persistentstorel1test -DCMAKE_INSTALL_PREFIX="install" -DCMAKE_CXX_FLAGS="--coverage -Wall -Werror" cmake --build build/persistentstorel1test --target install - name: Run working-directory: ${{github.workspace}} - run: PATH=${PWD}/install/usr/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/usr/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try persistentstorel1test + run: PATH=${PWD}/install/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try persistentstorel1test - name: Generate coverage working-directory: ${{github.workspace}} diff --git a/.github/workflows/L2-PersistentStore-grpc.yml b/.github/workflows/L2-PersistentStore-grpc.yml index c2ca2eaf45..6488f5ec99 100644 --- a/.github/workflows/L2-PersistentStore-grpc.yml +++ b/.github/workflows/L2-PersistentStore-grpc.yml @@ -3,10 +3,12 @@ name: L2-PersistentStore-grpc on: push: paths: - - PersistentStore/grpc/** + - PersistentStore/** + - .github/workflows/*PersistentStore*.yml pull_request: paths: - - PersistentStore/grpc/** + - PersistentStore/** + - .github/workflows/*PersistentStore*.yml jobs: build: @@ -25,11 +27,9 @@ jobs: - name: Build working-directory: ${{github.workspace}} run: | - cmake -S ${GITHUB_REPOSITORY}/PersistentStore/grpc/l2test -B build/grpcl2test -DCMAKE_INSTALL_PREFIX="install/usr" -DCMAKE_CXX_FLAGS="-Wall -Werror" + cmake -S ${GITHUB_REPOSITORY}/PersistentStore/grpc/l2test -B build/grpcl2test -DCMAKE_INSTALL_PREFIX="install" -DCMAKE_CXX_FLAGS="-Wall -Werror" cmake --build build/grpcl2test --target install -# (Optional) -# Rebuild with real token (here: kToken = "Bearer TOKEN"): -# cmake --build build/grpcl2test --target install -# Run: -# PATH=${PWD}/install/usr/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/usr/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try grpcl2test +# Usage: +# Build with real token (here: "Bearer TOKEN")!!! +# PATH=${PWD}/install/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try grpcl2test diff --git a/.github/workflows/L2-PersistentStore.yml b/.github/workflows/L2-PersistentStore.yml index 415fade572..6dc09ba171 100644 --- a/.github/workflows/L2-PersistentStore.yml +++ b/.github/workflows/L2-PersistentStore.yml @@ -4,9 +4,11 @@ on: push: paths: - PersistentStore/** + - .github/workflows/*PersistentStore*.yml pull_request: paths: - PersistentStore/** + - .github/workflows/*PersistentStore*.yml jobs: build: @@ -29,17 +31,10 @@ jobs: - name: Build working-directory: ${{github.workspace}} run: | - cmake -S ${GITHUB_REPOSITORY}/PersistentStore -B build/PersistentStore -DCMAKE_INSTALL_PREFIX="install/usr" -DCMAKE_CXX_FLAGS="-Wall -Werror" -DPLUGIN_PERSISTENTSTORE_PATH="/tmp/persistentstore/l2test/test" + cmake -S ${GITHUB_REPOSITORY}/PersistentStore -B build/PersistentStore -DCMAKE_INSTALL_PREFIX="install" -DCMAKE_CXX_FLAGS="-Wall -Werror" -DPLUGIN_PERSISTENTSTORE_PATH="/tmp/persistentstore/l2test/test" cmake --build build/PersistentStore --target install -# (Optional) -# Thunder startup: -# PATH=${PWD}/install/usr/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/usr/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try WPEFramework -f -c ${PWD}/install/etc/WPEFramework/config.json +# Usage: +# PATH=${PWD}/install/bin:${PATH} LD_LIBRARY_PATH=${PWD}/install/lib:${LD_LIBRARY_PATH} valgrind --tool=memcheck --log-file=valgrind_log --leak-check=yes --show-reachable=yes --track-fds=yes --fair-sched=try Thunder -f -c ${PWD}/install/etc/Thunder/config.json # (to stop press q & enter) -# API test: # curl -d '{"jsonrpc":"2.0","id":0,"method":"org.rdk.PersistentStore.setValue","params":{"namespace":"test","key":"key1","value":"1","ttl":100}}' http://localhost:55555/jsonrpc -# curl -d '{"jsonrpc":"2.0","id":0,"method":"org.rdk.PersistentStore.getValue","params":{"namespace":"test","key":"key1"}}' http://localhost:55555/jsonrpc -# Crash test: -# kill -SIGFPE $(pidof WPEProcess) -# Deactivate test: -# curl -d '{"jsonrpc":"2.0","id":0,"method":"Controller.1.deactivate", "params":{"callsign":"org.rdk.PersistentStore"}}' http://localhost:55555/jsonrpc