From 0b5cb389f1fada84d92549dbd567fe87eaa3209d Mon Sep 17 00:00:00 2001 From: Andrew Gresyk Date: Sat, 25 May 2024 15:15:51 +0300 Subject: [PATCH] 2.5.1 Maintenance update --- .github/workflows/cmake.yml | 14 +++++++++-- CMakeLists.txt | 6 +++++ README.md | 13 +++++------ development/ffsm2/detail/config.hpp | 28 +++++++++++----------- development/ffsm2/machine_dev.hpp | 10 ++++---- include/ffsm2/machine.hpp | 36 ++++++++++++++--------------- 6 files changed, 62 insertions(+), 45 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 687d5eb..c378a56 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -43,6 +43,16 @@ jobs: CC: gcc-12, CXX: g++-12 } + - { + OS: ubuntu-22.04, + CC: gcc-13, + CXX: g++-13 + } + - { + OS: ubuntu-22.04, + CC: gcc-14, + CXX: g++-14 + } - { OS: ubuntu-20.04, CC: clang-6.0, @@ -101,12 +111,12 @@ jobs: VERSION: '15' } - { - OS: macos-11, + OS: macos-14, CC: clang, CXX: clang++ } - { - OS: macos-12, + OS: macos-14-large, CC: clang, CXX: clang++ } diff --git a/CMakeLists.txt b/CMakeLists.txt index 4cb533a..2d05a03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.5) +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM) + message(STATUS "Found ccache in ${CCACHE_PROGRAM}") + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") +endif() + project(ffsm2_test) file(GLOB SOURCE_FILES "test/*.cpp" "test/shared/*.cpp") diff --git a/README.md b/README.md index b817d40..9c90ac2 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,12 @@ Header-only flat FSM framework in C++11, with fully statically-defined structure ## Compiler Support -- Visual Studio: 2015, **2017, 2019, 2022** -- GCC: 5, 6, 7, **8, 9, 10, 11, 12** -- ARM GCC: **9** -- Clang: 3.9, 4, 5, **6, 7, 8, 9, 10, 11, 12, 13, 14, 15** -- AppleClang: 12, **13, 13** - -(Currently CI-tested toolchains in **bold**) +- Visual Studio: **2017, 2019, 2022** +- GCC: **8, 9, 10, 11, 12, 13, 14** +- GCC (ARM): **9** +- Clang: **6, 7, 8, 9, 10, 11, 12, 13, 14, 15** +- AppleClang: **14** +- AppleClang (ARM): **14** --- diff --git a/development/ffsm2/detail/config.hpp b/development/ffsm2/detail/config.hpp index 283fb52..f9ad88e 100644 --- a/development/ffsm2/detail/config.hpp +++ b/development/ffsm2/detail/config.hpp @@ -17,10 +17,6 @@ struct G_ final { using Context = TContext; using Activation = TActivation; -#if FFSM2_LOG_INTERFACE_AVAILABLE() - using LoggerInterface = LoggerInterfaceT; -#endif - static constexpr Short SUBSTITUTION_LIMIT = NSubstitutionLimit; #if FFSM2_PLANS_AVAILABLE() @@ -34,8 +30,12 @@ struct G_ final { using Task = TaskT; #endif +#if FFSM2_LOG_INTERFACE_AVAILABLE() + using LoggerInterface = LoggerInterfaceT; +#endif + /// @brief Set Context type - /// @tparam T Context type for data shared between states and/or data interface between FSM and external code + /// @tparam `T` Context type for data shared between states and/or data interface between FSM and external code template using ContextT = G_; @@ -46,21 +46,21 @@ struct G_ final { #endif /// @brief Set Substitution limit - /// @tparam N Maximum number times 'guard()' methods can substitute their states for others - template + /// @tparam `N` Maximum number times 'guard()' methods can substitute their states for others + template using SubstitutionLimitN = G_; #if FFSM2_PLANS_AVAILABLE() /// @brief Set Task capacity - /// @tparam N Maximum number of tasks across all plans + /// @tparam `N` Maximum number of tasks across all plans template using TaskCapacityN = G_; #endif /// @brief Set Transition Payload type - /// @tparam T Utility type for 'TUtility State::utility() const' method + /// @tparam `T` Payload type template using PayloadT = G_; }; @@ -116,13 +116,13 @@ struct M_< // COMMON /// @brief Root - /// @tparam THead Head state - /// @tparam TSubStates Sub-states + /// @tparam `THead` Head state + /// @tparam `TSubStates` Sub-states template using Root = RF_>; /// @brief Headless root - /// @tparam TSubStates Sub-states + /// @tparam `TSubStates` Sub-states template < typename... TSubStates> using PeerRoot = RF_>; @@ -148,8 +148,8 @@ using Config = detail::G_< >; /// @brief 'Template namespace' for FSM classes -/// @tparam TConfig 'ConfigT<>' type configuration for MachineT<> -/// @see ConfigT<> +/// @tparam `TConfig` `ConfigT<>` type configuration for MachineT<> +/// @see `ConfigT<>` template using MachineT = detail::M_; diff --git a/development/ffsm2/machine_dev.hpp b/development/ffsm2/machine_dev.hpp index ae22dd9..00455c0 100644 --- a/development/ffsm2/machine_dev.hpp +++ b/development/ffsm2/machine_dev.hpp @@ -1,5 +1,5 @@ // FFSM2 (flat state machine for games and interactive applications) -// 2.4.0 (2023-12-25) +// 2.5.1 (2024-05-25) // // Created by Andrew Gresyk // @@ -9,7 +9,7 @@ // // MIT License // -// Copyright (c) 2023 +// Copyright (c) 2024 // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -32,11 +32,13 @@ #pragma once #define FFSM2_VERSION_MAJOR 2 -#define FFSM2_VERSION_MINOR 4 -#define FFSM2_VERSION_PATCH 0 +#define FFSM2_VERSION_MINOR 5 +#define FFSM2_VERSION_PATCH 1 #define FFSM2_VERSION (10000 * FFSM2_VERSION_MAJOR + 100 * FFSM2_VERSION_MINOR + FFSM2_VERSION_PATCH) +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + #include // uint32_t, uint64_t #include // memcpy_s() diff --git a/include/ffsm2/machine.hpp b/include/ffsm2/machine.hpp index 8cd136f..776ad6b 100644 --- a/include/ffsm2/machine.hpp +++ b/include/ffsm2/machine.hpp @@ -1,5 +1,5 @@ // FFSM2 (flat state machine for games and interactive applications) -// 2.4.0 (2023-12-25) +// 2.5.1 (2024-05-25) // // Created by Andrew Gresyk // @@ -9,7 +9,7 @@ // // MIT License // -// Copyright (c) 2023 +// Copyright (c) 2024 // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -32,8 +32,8 @@ #pragma once #define FFSM2_VERSION_MAJOR 2 -#define FFSM2_VERSION_MINOR 4 -#define FFSM2_VERSION_PATCH 0 +#define FFSM2_VERSION_MINOR 5 +#define FFSM2_VERSION_PATCH 1 #define FFSM2_VERSION (10000 * FFSM2_VERSION_MAJOR + 100 * FFSM2_VERSION_MINOR + FFSM2_VERSION_PATCH) @@ -6483,10 +6483,6 @@ struct G_ final { using Context = TContext; using Activation = TActivation; -#if FFSM2_LOG_INTERFACE_AVAILABLE() - using LoggerInterface = LoggerInterfaceT; -#endif - static constexpr Short SUBSTITUTION_LIMIT = NSubstitutionLimit; #if FFSM2_PLANS_AVAILABLE() @@ -6500,8 +6496,12 @@ struct G_ final { using Task = TaskT; #endif +#if FFSM2_LOG_INTERFACE_AVAILABLE() + using LoggerInterface = LoggerInterfaceT; +#endif + /// @brief Set Context type - /// @tparam T Context type for data shared between states and/or data interface between FSM and external code + /// @tparam `T` Context type for data shared between states and/or data interface between FSM and external code template using ContextT = G_; @@ -6512,21 +6512,21 @@ struct G_ final { #endif /// @brief Set Substitution limit - /// @tparam N Maximum number times 'guard()' methods can substitute their states for others - template + /// @tparam `N` Maximum number times 'guard()' methods can substitute their states for others + template using SubstitutionLimitN = G_; #if FFSM2_PLANS_AVAILABLE() /// @brief Set Task capacity - /// @tparam N Maximum number of tasks across all plans + /// @tparam `N` Maximum number of tasks across all plans template using TaskCapacityN = G_; #endif /// @brief Set Transition Payload type - /// @tparam T Utility type for 'TUtility State::utility() const' method + /// @tparam `T` Payload type template using PayloadT = G_; }; @@ -6577,13 +6577,13 @@ struct M_< #endif /// @brief Root - /// @tparam THead Head state - /// @tparam TSubStates Sub-states + /// @tparam `THead` Head state + /// @tparam `TSubStates` Sub-states template using Root = RF_>; /// @brief Headless root - /// @tparam TSubStates Sub-states + /// @tparam `TSubStates` Sub-states template < typename... TSubStates> using PeerRoot = RF_>; @@ -6604,8 +6604,8 @@ using Config = detail::G_< >; /// @brief 'Template namespace' for FSM classes -/// @tparam TConfig 'ConfigT<>' type configuration for MachineT<> -/// @see ConfigT<> +/// @tparam `TConfig` `ConfigT<>` type configuration for MachineT<> +/// @see `ConfigT<>` template using MachineT = detail::M_;