Merge pull request #5322 from filipe-norte-red/sprint-24Q2-service-wo… #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: L2-PersistentStore | |
on: | |
push: | |
paths: | |
- PersistentStore/** | |
pull_request: | |
paths: | |
- PersistentStore/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: ${{github.repository}} | |
- name: Install cmake, sqlite, protoc, grpc_cpp_plugin, grpc | |
run: | | |
sudo apt update | |
sudo apt install -y cmake libsqlite3-dev protobuf-compiler protobuf-compiler-grpc libgrpc++-dev | |
- name: Build Thunder | |
working-directory: ${{github.workspace}} | |
run: sh +x ${GITHUB_REPOSITORY}/.github/workflows/BuildThunder.sh | |
- 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 --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 | |
# (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 |