Skip to content

Commit

Permalink
Merge branch 'master' into development/adjust-containers
Browse files Browse the repository at this point in the history
  • Loading branch information
pwielders authored Aug 15, 2024
2 parents 53fa166 + 7cb1a05 commit 013e1ec
Show file tree
Hide file tree
Showing 30 changed files with 358 additions and 130 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/Linux build template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ jobs:
strategy:
matrix:
build_type: [Debug, Release, MinSizeRel]
architecture: [32, 64]

name: Build type - ${{matrix.build_type}}
name: Build type - ${{matrix.build_type}}${{matrix.architecture == '32' && ' x86' || ''}}
steps:
# --------- Packages & artifacts ---------
- name: Install necessary packages
Expand All @@ -23,21 +24,23 @@ jobs:
command: |
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
echo "deb http://archive.ubuntu.com/ubuntu/ jammy main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt install python3-pip
pip install jsonref
sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev
sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev zlib1g-dev:i386 libssl-dev gcc-11-multilib g++-11-multilib
sudo pip install jsonref
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ThunderInterfaces-${{matrix.build_type}}-artifact
name: ThunderInterfaces-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact
path: ${{matrix.build_type}}

- name: Unpack files
run: |
tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz
rm ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz
tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz
rm ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz
# ----- Regex & checkout -----
- name: Checkout ThunderNanoServices
Expand All @@ -59,7 +62,8 @@ jobs:
- name: Build ThunderNanoServices
run: |
cmake -G Ninja -S ThunderNanoServices -B ${{matrix.build_type}}/build/ThunderNanoServices \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror" \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \
-DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \
-DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \
-DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" \
-DEXAMPLE_COMRPCCLIENT=ON \
Expand Down Expand Up @@ -92,10 +96,10 @@ jobs:
cmake --build ${{matrix.build_type}}/build/ThunderNanoServices --target install
- name: Tar files
run: tar -czvf ${{matrix.build_type}}.tar.gz ${{matrix.build_type}}
run: tar -czvf ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz ${{matrix.build_type}}

- name: Upload
uses: actions/upload-artifact@v4
with:
name: ThunderNanoServices-${{matrix.build_type}}-artifact
path: ${{matrix.build_type}}.tar.gz
name: ThunderNanoServices-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact
path: ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz
8 changes: 8 additions & 0 deletions Compositor/lib/RPI/RPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ namespace Plugin {
_handler.Revoke(element);
}

virtual void Dangling(const Core::IUnknown* element, const uint32_t interfaceID)
{
if (interfaceID == Exchange::IComposition::IClient::ID) {
_handler.Revoke(element);
}
}

private:
CompositorImplementation::ClientHandler _handler;
};
Expand Down Expand Up @@ -374,6 +381,7 @@ namespace Plugin {
client->Release();

} else {
client->Release();
_adminLock.Unlock();
}

Expand Down
14 changes: 13 additions & 1 deletion Doggo/Doggo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@
namespace Thunder {
namespace Plugin {

SERVICE_REGISTRATION(Doggo, 1, 0)
namespace {

static Metadata<Doggo> metadata(
// Version
1, 0, 0,
// Preconditions
{},
// Terminations
{},
// Controls
{}
);
}

const string Doggo::Initialize(PluginHost::IShell* service)
{
Expand Down
19 changes: 15 additions & 4 deletions examples/COMRPCClient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,34 @@
# See the License for the specific language governing permissions and
# limitations under the License.

project(COMRPCClient)

cmake_minimum_required(VERSION 3.15)

find_package(Thunder)

project_version(1.0.0)

set(MODULE_NAME ${PROJECT_NAME})

message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")

find_package(${NAMESPACE}COM REQUIRED)
find_package(${NAMESPACE}Core REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)

add_executable(COMRPCClient COMRPCClient.cpp)
add_executable(${MODULE_NAME} COMRPCClient.cpp)

set_target_properties(COMRPCClient PROPERTIES
set_target_properties(${MODULE_NAME} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
)

target_link_libraries(COMRPCClient
target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}COM::${NAMESPACE}COM
${NAMESPACE}Core::${NAMESPACE}Core
CompileSettingsDebug::CompileSettingsDebug
)

install(TARGETS COMRPCClient DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime)
13 changes: 11 additions & 2 deletions examples/ConfigUpdateExample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set(PLUGIN_NAME ConfigUpdateExample)
set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})
project(ConfigUpdateExample)

cmake_minimum_required(VERSION 3.15)

find_package(Thunder)

project_version(1.0.0)

set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME})

message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
Expand Down
13 changes: 9 additions & 4 deletions examples/DynamicLoading/Yang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.15)

project(Yang)

cmake_minimum_required(VERSION 3.15)

find_package(Thunder)

project_version(1.0.0)

set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME})

message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")

find_package(${NAMESPACE}Core REQUIRED)
find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(${NAMESPACE}Messaging REQUIRED)
find_package(CompileSettingsDebug REQUIRED)

set(PLUGIN_NAME Yang)
set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})
set(PLUGIN_YANG_IMPLEMENTATION "${MODULE_NAME}Impl" CACHE STRING "Library with implementation of yang")

set(PLUGIN_YANG_STARTMODE "Deactivated" CACHE STRING "Controls automatic start of the Yang plugin")
Expand Down
14 changes: 9 additions & 5 deletions examples/DynamicLoading/Yin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.15)

project(Yin)

cmake_minimum_required(VERSION 3.15)

find_package(Thunder)

project_version(1.0.0)

set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME})

message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")

find_package(${NAMESPACE}Core REQUIRED)
find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(${NAMESPACE}Messaging REQUIRED)
find_package(CompileSettingsDebug REQUIRED)

set(PLUGIN_NAME Yin)

set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})
set(PLUGIN_YIN_IMPLEMENTATION "${MODULE_NAME}Impl" CACHE STRING "Library with the implementation of yin")

set(PLUGIN_YIN_STARTMODE "Deactivated" CACHE STRING "Controls automatic start of the Yin plugin")
Expand Down
22 changes: 16 additions & 6 deletions examples/FileTransferClient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,33 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set(PLUGIN_NAME FileTransferClient)
project(FileTransferClient)

cmake_minimum_required(VERSION 3.15)

find_package(Thunder)

project_version(1.0.0)

set(MODULE_NAME ${PROJECT_NAME})

message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")

find_package(${NAMESPACE}Core REQUIRED)

add_executable(${PLUGIN_NAME} FileTransferClient.cpp)
add_executable(${MODULE_NAME} FileTransferClient.cpp)

set_target_properties(${PLUGIN_NAME} PROPERTIES
set_target_properties(${MODULE_NAME} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
)

target_link_libraries(${PLUGIN_NAME}
target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}Core::${NAMESPACE}Core)

target_include_directories(${PLUGIN_NAME}
target_include_directories(${MODULE_NAME}
PRIVATE
${NAMESPACE}Core::${NAMESPACE}Core)

install(TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime)
26 changes: 21 additions & 5 deletions examples/IOConnectorTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,43 @@
# See the License for the specific language governing permissions and
# limitations under the License.

project(IOConnectorTest)

cmake_minimum_required(VERSION 3.15)

find_package(Thunder)

project_version(1.0.0)

set(MODULE_NAME ${PROJECT_NAME})

message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")

find_package(${NAMESPACE}COM REQUIRED)
find_package(${NAMESPACE}Core REQUIRED)
find_package(${NAMESPACE}Messaging REQUIRED)
find_package(${NAMESPACE}WebSocket REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)

add_executable(IOConnectorTest IOConnectorTest.cpp)
add_executable(${MODULE_NAME} IOConnectorTest.cpp)

set_target_properties(IOConnectorTest PROPERTIES
set_target_properties(${MODULE_NAME} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
)

target_link_libraries(IOConnectorTest
target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}COM::${NAMESPACE}COM
${NAMESPACE}Core::${NAMESPACE}Core
${NAMESPACE}WebSocket::${NAMESPACE}WebSocket
${NAMESPACE}Messaging::${NAMESPACE}Messaging
CompileSettingsDebug::CompileSettingsDebug
)

target_include_directories(IOConnectorTest
target_include_directories(${MODULE_NAME}
PRIVATE
"${PROJECT_SOURCE_DIR}/tests"
)

install(TARGETS IOConnectorTest DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Test)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Test)
1 change: 0 additions & 1 deletion examples/IOConnectorTest/IOConnectorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ int main(int argc, char** argv)
Core::ProxyType<RPC::CommunicatorClient>::Create(
comChannel,
Core::ProxyType<Core::IIPCServer>(engine)));
engine->Announcements(client->Announcement());

ASSERT(client.IsValid() == true);

Expand Down
26 changes: 19 additions & 7 deletions examples/JSONRPCClient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

project(JSONRPCClient)

cmake_minimum_required(VERSION 3.15)

find_package(Thunder)

project_version(1.0.0)

set(MODULE_NAME ${PROJECT_NAME})

message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")

find_package(Thunder)
find_package(${NAMESPACE}COM REQUIRED)
find_package(${NAMESPACE}WebSocket REQUIRED)
Expand All @@ -23,14 +35,14 @@ find_package(${NAMESPACE}Core REQUIRED)
find_package(securityagent QUIET)
find_package(CompileSettingsDebug CONFIG REQUIRED)

add_executable(JSONRPCClient Module.cpp JSONRPCClient.cpp)
add_executable(${MODULE_NAME} Module.cpp JSONRPCClient.cpp)

set_target_properties(JSONRPCClient PROPERTIES
set_target_properties(${MODULE_NAME} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
)

target_link_libraries(JSONRPCClient
target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}COM::${NAMESPACE}COM
${NAMESPACE}WebSocket::${NAMESPACE}WebSocket
Expand All @@ -40,18 +52,18 @@ target_link_libraries(JSONRPCClient
)

if (securityagent_FOUND)
target_link_libraries(JSONRPCClient
target_link_libraries(${MODULE_NAME}
PRIVATE
securityagent::securityagent
)
target_compile_definitions(JSONRPCClient
target_compile_definitions(${MODULE_NAME}
PRIVATE
ENABLE_SECURITY_AGENT=1)
endif()

target_include_directories(JSONRPCClient
target_include_directories(${MODULE_NAME}
PRIVATE
"${PROJECT_SOURCE_DIR}/tests"
)

install(TARGETS JSONRPCClient DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime)
Loading

0 comments on commit 013e1ec

Please sign in to comment.