Skip to content

Commit

Permalink
Fix workflows Thunder master branch support
Browse files Browse the repository at this point in the history
  • Loading branch information
npoltorapavlo committed Jun 21, 2024
1 parent 0cf430c commit fdb2a87
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 35 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/BuildThunder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/L0-PersistentStore-grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,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}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/L0-PersistentStore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,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}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/L1-PersistentStore-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,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}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/L1-PersistentStore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,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}}
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/L2-PersistentStore-grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,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
13 changes: 3 additions & 10 deletions .github/workflows/L2-PersistentStore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,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

0 comments on commit fdb2a87

Please sign in to comment.