Release: cut over Echoion 2.0 components
Modular container CI / release-build (push) Has been cancelled
Modular container CI / release-build (push) Has been cancelled
This commit is contained in:
169 files changed
+3069
-32261
No files matched your search
+174
-22
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 4.0.0)
|
||||
project(Echoion VERSION 1.0.7 LANGUAGES CXX)
|
||||
project(Echoion VERSION 2.0.0 LANGUAGES CXX)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(cmake/DependencyLock.cmake)
|
||||
@@ -8,15 +8,8 @@ include(cmake/DependencyLock.cmake)
|
||||
# component project consumes this value when orchestrated by Echoion; their
|
||||
# standalone fallback is intentionally 0.0.0 and is never used for a product
|
||||
# release.
|
||||
if(DEFINED ECHOION_RELEASE_VERSION AND
|
||||
NOT ECHOION_RELEASE_VERSION STREQUAL "")
|
||||
set(ECHOION_COMPONENT_VERSION "${ECHOION_RELEASE_VERSION}")
|
||||
string(REGEX REPLACE "[-+].*$" ""
|
||||
ECHOION_PRODUCT_VERSION "${ECHOION_RELEASE_VERSION}")
|
||||
else()
|
||||
set(ECHOION_PRODUCT_VERSION "${PROJECT_VERSION}")
|
||||
set(ECHOION_COMPONENT_VERSION "${PROJECT_VERSION}")
|
||||
endif()
|
||||
set(ECHOION_PRODUCT_VERSION "${PROJECT_VERSION}")
|
||||
set(ECHOION_COMPONENT_VERSION "${PROJECT_VERSION}")
|
||||
|
||||
# Default to a Release build when the developer/CI did not pick a config.
|
||||
# Without this, single-config generators leave CMAKE_BUILD_TYPE empty and GCC
|
||||
@@ -113,7 +106,7 @@ CPMAddPackage(
|
||||
# which CPM honours over the git checkout below.
|
||||
CPMAddPackage(
|
||||
NAME Void
|
||||
GIT_REPOSITORY https://git.faumaray.ru/void/voidlibrary.git
|
||||
GIT_REPOSITORY ssh://gitea@git.faumaray.ru/void/voidlibrary.git
|
||||
# Keep clean/container releases reproducible. CPM_Void_SOURCE still
|
||||
# overrides this revision for local dependency development.
|
||||
GIT_TAG ${ECHOION_VOID_REVISION}
|
||||
@@ -126,7 +119,7 @@ CPMAddPackage(
|
||||
# -DCPM_VoidTeamspeak_SOURCE=$HOME/Project/Personal/VoidTeamspeak
|
||||
CPMAddPackage(
|
||||
NAME VoidTeamspeak
|
||||
GIT_REPOSITORY https://git.faumaray.ru/void/voidteamspeak.git
|
||||
GIT_REPOSITORY ssh://gitea@git.faumaray.ru/void/voidteamspeak.git
|
||||
# This revision supplies the typed administration API used by Standalone.
|
||||
GIT_TAG ${ECHOION_VOID_TEAMSPEAK_REVISION}
|
||||
OPTIONS
|
||||
@@ -182,12 +175,17 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Options
|
||||
option(BUILD_API "Build EchoionApi" ON)
|
||||
option(BUILD_HOST "Build EchoionHost module loader" ON)
|
||||
option(BUILD_CORE "Build EchoionCore" ON)
|
||||
option(BUILD_DESKTOP "Build EchoionDesktop" ON)
|
||||
option(BUILD_WEB "Build EchoionWeb browser dashboard" ON)
|
||||
option(BUILD_STANDALONE "Build EchoionStandalone daemon with native TeamSpeak client" ON)
|
||||
option(BUILD_UPDATER "Build EchoionUpdater lifecycle helper" ON)
|
||||
option(BUILD_FIRST_PARTY_PLUGINS "Build bundled Echoion extension plugins" ON)
|
||||
option(BUILD_TESTS "Build tests" OFF)
|
||||
set(ECHOION_COMPONENT_WORKSPACE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/.."
|
||||
CACHE PATH "Directory containing permanent Echoion component repositories")
|
||||
|
||||
if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
@@ -196,17 +194,22 @@ endif()
|
||||
# Find packages
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# Add subdirectories
|
||||
# All component source directories come from CPM. Local development can set
|
||||
# CPM_<Component>_SOURCE; normal development follows main; release builds use
|
||||
# exact components.lock.json revisions.
|
||||
set(ECHOION_ORCHESTRATOR_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
if(BUILD_API)
|
||||
echoion_add_component(EchoionApi)
|
||||
endif()
|
||||
|
||||
if(BUILD_FIRST_PARTY_PLUGINS)
|
||||
add_subdirectory(plugins)
|
||||
echoion_add_component(EchoionPluginUrlShortenerInternal)
|
||||
echoion_add_component(EchoionPluginUrlShortenerExternal)
|
||||
endif()
|
||||
|
||||
if(BUILD_STANDALONE)
|
||||
add_subdirectory(EchoionHost)
|
||||
if(BUILD_HOST OR BUILD_STANDALONE)
|
||||
echoion_add_component(EchoionHost)
|
||||
endif()
|
||||
|
||||
if(BUILD_CORE)
|
||||
@@ -217,7 +220,7 @@ endif()
|
||||
# targets Core discovers. Core owns and starts the web server, so link them
|
||||
# here (both targets now exist) and flag Core so the wiring compiles in.
|
||||
if(BUILD_WEB AND BUILD_CORE)
|
||||
add_subdirectory(EchoionWeb)
|
||||
echoion_add_component(EchoionWeb)
|
||||
if(TARGET EchoionCore AND TARGET EchoionWeb)
|
||||
target_link_libraries(EchoionCore PRIVATE EchoionWeb)
|
||||
target_compile_definitions(EchoionCore PRIVATE ECHOION_WITH_WEB)
|
||||
@@ -231,13 +234,13 @@ endif()
|
||||
# It validates and journals local operations but leaves network/feed work to
|
||||
# the daemon through typed request files. Define it before Standalone so the
|
||||
# Linux release-staging test can use the real helper binary.
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_subdirectory(packaging/updater)
|
||||
if(BUILD_UPDATER AND UNIX AND NOT APPLE)
|
||||
echoion_add_component(EchoionUpdater)
|
||||
endif()
|
||||
|
||||
# EchoionStandalone links the host-common loader and native protocol client.
|
||||
if(BUILD_STANDALONE)
|
||||
add_subdirectory(EchoionStandalone)
|
||||
echoion_add_component(EchoionStandalone)
|
||||
endif()
|
||||
|
||||
if(BUILD_DESKTOP)
|
||||
@@ -274,7 +277,7 @@ if(ECHOION_INSTALL_RUNTIME_BUNDLE)
|
||||
endif()
|
||||
|
||||
if(TARGET EchoionWeb)
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/EchoionWeb/frontend/web-dist/"
|
||||
install(DIRECTORY "${EchoionWeb_SOURCE_DIR}/frontend/web-dist/"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/echoion/web"
|
||||
COMPONENT Runtime)
|
||||
endif()
|
||||
@@ -282,6 +285,11 @@ if(ECHOION_INSTALL_RUNTIME_BUNDLE)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/config.example.json"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/echoion"
|
||||
COMPONENT Runtime)
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/components.json"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/components.lock.json"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/echoion"
|
||||
COMPONENT Runtime)
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/service/echoion.service.in"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/service/echoion-updater.service.in"
|
||||
@@ -301,6 +309,112 @@ if(ECHOION_INSTALL_RUNTIME_BUNDLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Independent component package staging. Each named install component contains
|
||||
# only that component's first-party payload; release tooling adds its private
|
||||
# runtime dependency closure and a signed-feed manifest afterwards.
|
||||
option(ECHOION_INSTALL_COMPONENT_PACKAGES
|
||||
"Provide one install component for every independently released component"
|
||||
ON)
|
||||
if(ECHOION_INSTALL_COMPONENT_PACKAGES)
|
||||
if(TARGET EchoionApiPluginSdk)
|
||||
install(TARGETS EchoionApiPluginSdk
|
||||
ARCHIVE DESTINATION lib
|
||||
COMPONENT PackageEchoionApi)
|
||||
install(DIRECTORY "${EchoionApi_SOURCE_DIR}/include/"
|
||||
DESTINATION include
|
||||
COMPONENT PackageEchoionApi)
|
||||
install(FILES
|
||||
"${EchoionApi_SOURCE_DIR}/abi/echoion-module-v1.json"
|
||||
DESTINATION abi
|
||||
COMPONENT PackageEchoionApi)
|
||||
endif()
|
||||
|
||||
if(TARGET EchoionHost)
|
||||
install(TARGETS EchoionHost
|
||||
LIBRARY DESTINATION lib
|
||||
COMPONENT PackageEchoionHost
|
||||
RUNTIME DESTINATION bin
|
||||
COMPONENT PackageEchoionHost)
|
||||
install(FILES "${EchoionHost_SOURCE_DIR}/abi/module.json"
|
||||
DESTINATION abi
|
||||
COMPONENT PackageEchoionHost)
|
||||
endif()
|
||||
|
||||
if(TARGET EchoionCore)
|
||||
install(TARGETS EchoionCore
|
||||
LIBRARY DESTINATION lib
|
||||
COMPONENT PackageEchoionCore
|
||||
RUNTIME DESTINATION bin
|
||||
COMPONENT PackageEchoionCore)
|
||||
install(FILES "${EchoionCore_SOURCE_DIR}/abi/module.json"
|
||||
DESTINATION abi
|
||||
COMPONENT PackageEchoionCore)
|
||||
endif()
|
||||
|
||||
if(TARGET EchoionWeb)
|
||||
install(TARGETS EchoionWeb
|
||||
LIBRARY DESTINATION lib
|
||||
COMPONENT PackageEchoionWeb
|
||||
RUNTIME DESTINATION bin
|
||||
COMPONENT PackageEchoionWeb)
|
||||
install(FILES "${EchoionWeb_SOURCE_DIR}/abi/module.json"
|
||||
DESTINATION abi
|
||||
COMPONENT PackageEchoionWeb)
|
||||
install(DIRECTORY "${EchoionWeb_SOURCE_DIR}/frontend/web-dist/"
|
||||
DESTINATION share/echoion/web
|
||||
COMPONENT PackageEchoionWeb)
|
||||
endif()
|
||||
|
||||
if(TARGET EchoionStandalone)
|
||||
install(TARGETS EchoionStandalone
|
||||
RUNTIME DESTINATION bin
|
||||
COMPONENT PackageEchoionStandalone)
|
||||
endif()
|
||||
|
||||
if(TARGET EchoionUpdater)
|
||||
install(TARGETS EchoionUpdater
|
||||
RUNTIME DESTINATION bin
|
||||
COMPONENT PackageEchoionUpdater)
|
||||
endif()
|
||||
|
||||
if(TARGET EchoionDesktop)
|
||||
install(TARGETS EchoionDesktop
|
||||
RUNTIME DESTINATION bin
|
||||
COMPONENT PackageEchoionDesktop
|
||||
BUNDLE DESTINATION bin
|
||||
COMPONENT PackageEchoionDesktop)
|
||||
if(TARGET Qt6::QXcbIntegrationPlugin)
|
||||
install(IMPORTED_RUNTIME_ARTIFACTS Qt6::QXcbIntegrationPlugin
|
||||
LIBRARY DESTINATION plugins/platforms
|
||||
COMPONENT PackageEchoionDesktop)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TARGET EchoionUrlShortenerInternalPlugin)
|
||||
install(TARGETS EchoionUrlShortenerInternalPlugin
|
||||
LIBRARY DESTINATION lib
|
||||
COMPONENT PackageEchoionPluginUrlShortenerInternal
|
||||
RUNTIME DESTINATION lib
|
||||
COMPONENT PackageEchoionPluginUrlShortenerInternal)
|
||||
install(FILES
|
||||
"${EchoionPluginUrlShortenerInternal_SOURCE_DIR}/abi/module.json"
|
||||
DESTINATION abi
|
||||
COMPONENT PackageEchoionPluginUrlShortenerInternal)
|
||||
endif()
|
||||
|
||||
if(TARGET EchoionUrlShortenerExternalPlugin)
|
||||
install(TARGETS EchoionUrlShortenerExternalPlugin
|
||||
LIBRARY DESTINATION lib
|
||||
COMPONENT PackageEchoionPluginUrlShortenerExternal
|
||||
RUNTIME DESTINATION lib
|
||||
COMPONENT PackageEchoionPluginUrlShortenerExternal)
|
||||
install(FILES
|
||||
"${EchoionPluginUrlShortenerExternal_SOURCE_DIR}/abi/module.json"
|
||||
DESTINATION abi
|
||||
COMPONENT PackageEchoionPluginUrlShortenerExternal)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Bundling and deployment helpers
|
||||
# Function to bundle Qt dependencies
|
||||
function(bundle_qt_dependencies target)
|
||||
@@ -376,10 +490,46 @@ if(BUILD_CORE AND TARGET EchoionCore)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTS AND UNIX)
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
add_test(NAME echoion_prepare_release_tests
|
||||
COMMAND "${Python3_EXECUTABLE}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test_prepare_release.py")
|
||||
add_test(NAME echoion_component_package_tests
|
||||
COMMAND "${Python3_EXECUTABLE}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test_package_components.py")
|
||||
add_test(NAME echoion_component_feed_tests
|
||||
COMMAND "${Python3_EXECUTABLE}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test_publish_component_feeds.py")
|
||||
|
||||
if(NOT COMMAND void_add_tests AND DEFINED Void_SOURCE_DIR)
|
||||
include("${Void_SOURCE_DIR}/cmake/VoidTesting.cmake")
|
||||
endif()
|
||||
if(COMMAND void_add_tests AND
|
||||
TARGET EchoionHost AND TARGET EchoionCore AND TARGET EchoionWeb AND
|
||||
TARGET EchoionUrlShortenerInternalPlugin AND
|
||||
TARGET EchoionUrlShortenerExternalPlugin)
|
||||
add_executable(EchoionModuleTests tests/ModuleDescriptors.cpp)
|
||||
target_compile_features(EchoionModuleTests PRIVATE cxx_std_26)
|
||||
target_link_libraries(EchoionModuleTests PRIVATE
|
||||
Echoion::ApiModuleAbi
|
||||
Void::Testing
|
||||
${CMAKE_DL_LIBS})
|
||||
target_compile_definitions(EchoionModuleTests PRIVATE
|
||||
"ECHOION_TEST_HOST=\"$<TARGET_FILE:EchoionHost>\""
|
||||
"ECHOION_TEST_CORE=\"$<TARGET_FILE:EchoionCore>\""
|
||||
"ECHOION_TEST_WEB=\"$<TARGET_FILE:EchoionWeb>\""
|
||||
"ECHOION_TEST_PLUGIN_INTERNAL=\"$<TARGET_FILE:EchoionUrlShortenerInternalPlugin>\""
|
||||
"ECHOION_TEST_PLUGIN_EXTERNAL=\"$<TARGET_FILE:EchoionUrlShortenerExternalPlugin>\"")
|
||||
void_add_tests(EchoionModuleTests)
|
||||
add_test(NAME echoion_module_descriptor_tests
|
||||
COMMAND EchoionModuleTests)
|
||||
endif()
|
||||
|
||||
add_test(NAME echoion_release_manifest_packaging_tests
|
||||
COMMAND bash
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test-release-packaging.sh"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${ECHOION_COMPONENT_WORKSPACE}")
|
||||
add_test(NAME echoion_runtime_dependency_packaging_tests
|
||||
COMMAND bash
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test-runtime-dependencies.sh"
|
||||
@@ -428,11 +578,13 @@ if(DEFINED ECHOION_RUNTIME_VERSION)
|
||||
endif()
|
||||
message(STATUS " C++ Standard: ${CMAKE_CXX_STANDARD}")
|
||||
message(STATUS " Build API: ${BUILD_API}")
|
||||
message(STATUS " Build Host: ${BUILD_HOST}")
|
||||
message(STATUS " Build first-party plugins: ${BUILD_FIRST_PARTY_PLUGINS}")
|
||||
message(STATUS " Build Core: ${BUILD_CORE}")
|
||||
message(STATUS " Build Desktop: ${BUILD_DESKTOP}")
|
||||
message(STATUS " Build Web: ${BUILD_WEB}")
|
||||
message(STATUS " Build Standalone: ${BUILD_STANDALONE}")
|
||||
message(STATUS " Build Updater: ${BUILD_UPDATER}")
|
||||
message(STATUS " Build Tests: ${BUILD_TESTS}")
|
||||
message(STATUS " Static Link: ${ECHOION_STATIC_LINK}")
|
||||
message(STATUS " Runtime install component: ${ECHOION_INSTALL_RUNTIME_BUNDLE}")
|
||||
|
||||
Reference in new issue
Block a user