Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 10 additions & 25 deletions .github/workflows/ci-cd-multi-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,36 @@ jobs:
name: "Windows MSVC x64",
os: windows-latest,
shell: "powershell",
generator: "Visual Studio 18 2026",
arch: "x64",
cc: "cl",
cxx: "cl",
cmake_args: '-G "Visual Studio 18 2026" -A x64 -DCMAKE_TOOLCHAIN_FILE=./toolchain/optmization-options-msvc.toolchain',
initial_cache: ".github/workflows/windows_msvc_x64_initial_cache.txt",
}
- {
name: "Windows MSVC x86",
os: windows-latest,
shell: "powershell",
generator: "Visual Studio 18 2026",
arch: "Win32",
cc: "cl",
cxx: "cl",
cmake_args: '-G "Visual Studio 18 2026" -A Win32 -DCMAKE_TOOLCHAIN_FILE=./toolchain/optmization-options-msvc.toolchain',
initial_cache: ".github/workflows/windows_msvc_x86_initial_cache.txt",
}
- {
name: "Windows MinGW",
os: windows-latest,
shell: "msys2",
generator: "Ninja",
cc: "gcc",
cxx: "g++",
cmake_args: "-GNinja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_TOOLCHAIN_FILE=./toolchain/optmization-options-mingw.toolchain",
initial_cache: ".github/workflows/windows_mingw_initial_cache.txt",
}
- {
name: "Ubuntu GCC",
os: ubuntu-latest,
shell: "bash",
generator: "Unix Makefiles",
cc: "gcc",
cxx: "g++",
cmake_args: '-G "Unix Makefiles" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_TOOLCHAIN_FILE=./toolchain/optmization-options-gnu-clang.toolchain',
jobs_count: 4,
initial_cache: ".github/workflows/linux_initial_cache.txt",
}
- {
name: "macOS Clang",
os: macos-latest,
shell: "bash",
generator: "Unix Makefiles",
cc: "clang",
cxx: "clang++",
cmake_args: '-G "Unix Makefiles" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_TOOLCHAIN_FILE=./toolchain/optmization-options-apple.toolchain',
jobs_count: 4,
initial_cache: ".github/workflows/macos_initial_cache.txt",
}
Expand All @@ -81,12 +69,12 @@ jobs:
- { name: "Sodium", user_config: "./config/user_config_sodium.h" }

steps:
- name: Set Windows enviroment
if: ${{ (matrix.config.os == 'windows-latest' && matrix.config.cc == 'cl') }}
- name: Set Windows environment
if: ${{ (matrix.config.os == 'windows-latest' && matrix.config.shell == 'powershell') }}
uses: ilammy/msvc-dev-cmd@v1

- name: Set MinGW enviroment
if: ${{ (matrix.config.os == 'windows-latest' && matrix.config.cc == 'gcc') }}
- name: Set MinGW environment
if: ${{ (matrix.config.os == 'windows-latest' && matrix.config.shell == 'msys2') }}
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
Expand All @@ -108,10 +96,7 @@ jobs:
- name: Configure CMake
run: >
cmake -B build
-G "${{ matrix.config.generator }}"
-A "${{ matrix.config.arch }}"
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }}
-DCMAKE_C_COMPILER=${{ matrix.config.cc }}
${{ matrix.config.cmake_args }}
-DCMAKE_BUILD_TYPE=Release
-DUSER_CONFIG="${{ matrix.platforms.user_config }}"
-C "${{ matrix.config.initial_cache }}"
Expand Down
59 changes: 10 additions & 49 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ option(AE_BUILD_EXAMPLES "Build examples" ${AE_ROOT_PORJECT})
option(AE_BUILD_TESTS "Build tests" ${AE_ROOT_PORJECT})
option(AE_BUILD_ANDROID_SMOKE "Build Android NDK smoke shared library and runner" Off)
option(AE_ADDRESS_SANITIZE "Enable address sanitizer" Off)
option(AE_NO_STRIP_ALL "Do not apply --strip_all, useful for bloaty and similar tools " Off)

set(UTM_ID "0" CACHE STRING "User Tracking Measurement ID, must be a uint32 value")
set(USER_CONFIG "" CACHE PATH "Path to user provided configuration header file")
Expand All @@ -80,7 +79,6 @@ message(STATUS "Aether build options:
AE_BUILD_TESTS=${AE_BUILD_TESTS}
AE_BUILD_ANDROID_SMOKE=${AE_BUILD_ANDROID_SMOKE}
AE_ADDRESS_SANITIZE=${AE_ADDRESS_SANITIZE}
AE_NO_STRIP_ALL=${AE_NO_STRIP_ALL}
UTM_ID=${UTM_ID}
USER_CONFIG=${USER_CONFIG}
FS_INIT=${FS_INIT}
Expand Down Expand Up @@ -155,6 +153,14 @@ CPMAddPackage(
"AE_TELE_BUILD_TESTS ${AE_BUILD_TESTS}"
EXCLUDE_FROM_ALL FALSE
)
CPMAddPackage(
NAME aether-objects
GIT_REPOSITORY "https://github.com/aethernetio/aether-objects.git"
GIT_TAG "main"
OPTIONS "AE_TELE_INSTALL ${AE_INSTALL}"
"AE_TELE_BUILD_TESTS ${AE_BUILD_TESTS}"
EXCLUDE_FROM_ALL FALSE
)
CPMAddPackage(
NAME etl
GIT_REPOSITORY "https://github.com/ETLCPP/etl.git"
Expand Down Expand Up @@ -189,7 +195,8 @@ target_link_libraries(${TARGET_NAME} PUBLIC
etl
stdexec
ae-numeric
aether::miscpp)
aether::miscpp
aether::objects)

message(STATUS "Aether build for CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux"
Expand Down Expand Up @@ -324,52 +331,6 @@ target_compile_options(${TARGET_NAME} PUBLIC
>
)

# setup release build options
if (CMAKE_BUILD_TYPE STREQUAL "Release")
if (NOT MINGW AND
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))

target_compile_options(${TARGET_NAME} PUBLIC
-ffast-math
-fno-math-errno
-funsafe-math-optimizations
-fassociative-math
-freciprocal-math
-ffinite-math-only
-fno-signed-zeros
-fno-trapping-math)
# clang does not support this
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(${TARGET_NAME} PUBLIC
-fsingle-precision-constant
-fno-fp-int-builtin-inexact)
endif()

# TODO: make this options configurable from user side
target_compile_options(${TARGET_NAME} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>)
target_compile_options(${TARGET_NAME} PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>)


if (GCC_VERSION VERSION_GREATER 12.1 OR GCC_VERSION VERSION_EQUAL 12.1)
target_compile_options(${TARGET_NAME} PUBLIC -Oz -DNDEBUG)
else()
target_compile_options(${TARGET_NAME} PUBLIC -Os -DNDEBUG)
endif()

# size optimizations
target_compile_options(${TARGET_NAME} PUBLIC -fdata-sections -ffunction-sections)
target_link_options(${TARGET_NAME} PUBLIC -fdata-sections -ffunction-sections)
target_compile_options(${TARGET_NAME} PUBLIC -flto=auto -ffat-lto-objects)
target_link_options(${TARGET_NAME} PUBLIC -flto=auto)

if(NOT AE_NO_STRIP_ALL )
target_link_options(${TARGET_NAME} PUBLIC -Wl,--gc-sections,--strip-all)
endif()

endif()
endif()

if(AE_BUILD_TOOLS)
message(STATUS "Aether builds tools!")
add_subdirectory(tools/registrator)
Expand Down
16 changes: 0 additions & 16 deletions aether/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@ list(APPEND aether_srcs
"dns/dns_c_ares.cpp"
"dns/esp32_dns_resolve.cpp")

list(APPEND aether_srcs
"obj/obj.cpp"
"obj/domain.cpp"
"obj/obj_id.cpp"
"obj/registry.cpp"
"obj/obj_ptr_base.cpp"
)

list(APPEND aether_srcs
"ptr/ptr.cpp"
"ptr/ptr_view.cpp"
"ptr/ref_tree.cpp"
)

list(APPEND aether_srcs
"ae_actions/get_servers.cpp"
"ae_actions/ping.cpp"
Expand Down Expand Up @@ -218,9 +204,7 @@ list(APPEND aether_srcs
"domain_storage/domain_storage_factory.cpp"
"domain_storage/registrar_domain_storage.cpp"
"domain_storage/static_domain_storage.cpp"
"domain_storage/ram_domain_storage.cpp"
"domain_storage/spifs_domain_storage.cpp"
"domain_storage/file_system_std_storage.cpp"
"domain_storage/sync_domain_storage.cpp")

list(APPEND aether_srcs
Expand Down
4 changes: 2 additions & 2 deletions aether/access_points/access_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#include <vector>

#include "aether/obj/obj.h"
#include "aether/obj/obj_ptr.h"
#include "aether-objects/obj/obj.h"
#include "aether-objects/obj/obj_ptr.h"

namespace ae {
class Channel;
Expand Down
4 changes: 2 additions & 2 deletions aether/access_points/ethernet_access_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#include "aether/access_points/access_point.h"

#include "aether/obj/obj.h"
#include "aether/obj/obj_ptr.h"
#include "aether-objects/obj/obj.h"
#include "aether-objects/obj/obj_ptr.h"

namespace ae {
class Aether;
Expand Down
2 changes: 1 addition & 1 deletion aether/access_points/lora_module_access_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
#include "aether/config.h"

#if AE_SUPPORT_LORA
# include "aether-objects/obj/obj.h"
# include "aether/access_points/access_point.h"
# include "aether/actions/action.h"
# include "aether/actions/action_ptr.h"
# include "aether/adapters/lora_module_adapter.h"
# include "aether/events/event_subscription.h"
# include "aether/lora_modules/ilora_module_driver.h"
# include "aether/obj/obj.h"
# include "aether/types/state_machine.h"

namespace ae {
Expand Down
2 changes: 1 addition & 1 deletion aether/access_points/modem_access_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
#include "aether/config.h"
#if AE_SUPPORT_MODEMS

# include "aether-objects/obj/obj.h"
# include "aether/access_points/access_point.h"
# include "aether/actions/action.h"
# include "aether/adapters/modem_adapter.h"
# include "aether/ae_context.h"
# include "aether/events/event_subscription.h"
# include "aether/events/events.h"
# include "aether/obj/obj.h"

namespace ae {
class Aether;
Expand Down
2 changes: 1 addition & 1 deletion aether/access_points/wifi_access_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
#include "aether/config.h"

#if AE_SUPPORT_WIFIS
# include "aether-objects/obj/obj_ptr.h"
# include "aether/actions/action.h"
# include "aether/ae_context.h"
# include "aether/events/events.h"
# include "aether/obj/obj_ptr.h"

# include "aether/access_points/access_point.h"
# include "aether/wifi/wifi_driver.h"
Expand Down
2 changes: 1 addition & 1 deletion aether/adapter_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef AETHER_ADAPTER_REGISTRY_H_
#define AETHER_ADAPTER_REGISTRY_H_

#include "aether/obj/obj.h"
#include "aether-objects/obj/obj.h"

#include "aether/adapters/adapter.h"

Expand Down
2 changes: 1 addition & 1 deletion aether/adapters/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <vector>

#include "aether/obj/obj.h"
#include "aether-objects/obj/obj.h"
#include "aether/events/events.h"

#include "aether/access_points/access_point.h"
Expand Down
6 changes: 3 additions & 3 deletions aether/adapters/ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#ifndef AETHER_ADAPTERS_ETHERNET_H_
#define AETHER_ADAPTERS_ETHERNET_H_

#include "aether/poller/poller.h"
#include "aether/obj/dummy_obj.h" // IWYU pragma: keep
#include "aether/dns/dns_resolve.h" // IWYU pragma: keep
#include "aether-objects/obj/dummy_obj.h" // IWYU pragma: keep
#include "aether/adapters/adapter.h"
#include "aether/dns/dns_resolve.h" // IWYU pragma: keep
#include "aether/poller/poller.h"

#include "aether/access_points/ethernet_access_point.h"

Expand Down
2 changes: 1 addition & 1 deletion aether/adapters/proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef AETHER_ADAPTERS_PROXY_H_
#define AETHER_ADAPTERS_PROXY_H_

#include "aether/obj/obj.h"
#include "aether-objects/obj/obj.h"
#include "aether/types/address.h"

namespace ae {
Expand Down
2 changes: 1 addition & 1 deletion aether/ae_actions/select_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

#include "aether-miscpp/types/result.h"

#include "aether-objects/obj/obj_ptr.h"
#include "aether/actions/action.h"
#include "aether/ae_context.h"
#include "aether/config.h"
#include "aether/events/event_subscription.h"
#include "aether/events/events.h"
#include "aether/obj/obj_ptr.h"

namespace ae {
class Aether;
Expand Down
2 changes: 1 addition & 1 deletion aether/aether.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include <utility>

#include "aether-objects/obj/obj_ptr.h"
#include "aether/client.h"
#include "aether/obj/obj_ptr.h"
#include "aether/registration_cloud.h"
#include "aether/server.h"

Expand Down
2 changes: 1 addition & 1 deletion aether/aether.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include <map>
#include <string>

#include "aether-objects/obj/obj.h"
#include "aether/clock.h"
#include "aether/memory.h"
#include "aether/obj/obj.h"
#include "aether/types/client_config.h"

#include "aether/ae_actions/select_client.h"
Expand Down
2 changes: 1 addition & 1 deletion aether/aether_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void AetherAppContext::InitComponentContext() {
domain_storage.CleanUp();
#endif // AE_DISTILLATION

return std::make_unique<Domain>(Now(), domain_storage);
return std::make_unique<Domain>(domain_storage);
});

if (!aether_) {
Expand Down
4 changes: 2 additions & 2 deletions aether/aether_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#include <optional>
#include <type_traits>

#include "aether-objects/obj/domain.h"
#include "aether-objects/ptr/ptr.h"
#include "aether/common.h"
#include "aether/config.h"
#include "aether/memory.h"
#include "aether/obj/domain.h"
#include "aether/ptr/ptr.h"

#include "aether/actions/action.h" // IWYU pragma: keep
#include "aether/events/events.h" // IWYU pragma: keep
Expand Down
8 changes: 4 additions & 4 deletions aether/aether_c/aether_capi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#include "aether/aether_c/c_errors.h"
#include "aether/aether_c/extern_c.h"

#include "aether-objects/obj/obj_ptr.h"
#include "aether-objects/ptr/ptr.h"
#include "aether/actions/actions_queue.h"
#include "aether/memory.h"
#include "aether/obj/obj_ptr.h"
#include "aether/ptr/ptr.h"
#include "aether/types/data_buffer.h"

#include "aether/aether_app.h"
Expand All @@ -36,9 +36,9 @@
// IWYU pragma: begin_keeps
#include "aether/wifi/wifi_driver_types.h"

#include "aether-objects/domain_storage/file_system_std_storage.h"
#include "aether-objects/domain_storage/ram_domain_storage.h"
#include "aether/domain_storage/domain_storage_factory.h"
#include "aether/domain_storage/file_system_std_storage.h"
#include "aether/domain_storage/ram_domain_storage.h"
#include "aether/domain_storage/spifs_domain_storage.h"

#include "aether/adapter_registry.h"
Expand Down
Loading
Loading