From 0304ad9b7f746100434203aa36aadec6f8c3c201 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Mon, 24 Jun 2024 08:15:07 +1000 Subject: [PATCH 01/15] Updating next release version to be v6.3.4 --- lib/include/commsdsl/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/include/commsdsl/version.h b/lib/include/commsdsl/version.h index fcb30a7c..4b0b3534 100644 --- a/lib/include/commsdsl/version.h +++ b/lib/include/commsdsl/version.h @@ -26,7 +26,7 @@ #define COMMSDSL_MINOR_VERSION 3U /// @brief Patch level of the library -#define COMMSDSL_PATCH_VERSION 3U +#define COMMSDSL_PATCH_VERSION 4U /// @brief Macro to create numeric version as single unsigned number #define COMMSDSL_MAKE_VERSION(major_, minor_, patch_) \ From 2238710ed7c97601431fe684d5c2e8f47a8085a8 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Wed, 3 Jul 2024 08:12:59 +1000 Subject: [PATCH 02/15] Using custom BUILD_COMMAND when building libxml to allow control of the build type. --- lib/src/CMakeLists.txt | 6 +++++- script/env_dev.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/src/CMakeLists.txt b/lib/src/CMakeLists.txt index 727bc2f7..3c32acec 100644 --- a/lib/src/CMakeLists.txt +++ b/lib/src/CMakeLists.txt @@ -46,8 +46,12 @@ while (TRUE) SOURCE_DIR "${LIBXML2_SRC_DIR}" BINARY_DIR "${LIBXML2_BIN_DIR}" INSTALL_DIR "${LIBXML2_INSTALL_DIR}" - # BUILD_BYPRODUCTS needed by Ninja + + # BUILD_BYPRODUCTS are needed by Ninja BUILD_BYPRODUCTS /lib/${LIBXML2_LIB_NAME} + + # On Windows CMAKE_BUILD_TYPE in the configuration can get ignored, requires seperate build command + BUILD_COMMAND ${CMAKE_COMMAND} --build "${LIBXML2_BIN_DIR}" --config ${CMAKE_BUILD_TYPE} --target all ) set (LIBXML2_FOUND TRUE) diff --git a/script/env_dev.sh b/script/env_dev.sh index e50689a4..51099cee 100755 --- a/script/env_dev.sh +++ b/script/env_dev.sh @@ -23,6 +23,6 @@ cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=${COMMON_BUILD_TYPE} ${COMMON_CXX_STANDARD:+"-DCMAKE_CXX_STANDARD=${COMMON_CXX_STANDARD}"} \ -DCOMMSDSL_USE_CCACHE=ON -DCOMMSDSL_BUILD_UNIT_TESTS=ON -DCOMMSDSL_TEST_BUILD_DOC=ON \ -DCOMMSDSL_BUILD_COMMSDSL2TEST=ON -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT=ON -DCOMMSDSL_BUILD_COMMSDSL2SWIG=ON \ - -DCOMMSDSL_BUILD_COMMSDSL2EMSCRIPTEN=ON -DCOMMSDSL_BUILD_WITH_SANITIZERS=ON"$@" + -DCOMMSDSL_BUILD_COMMSDSL2EMSCRIPTEN=ON -DCOMMSDSL_BUILD_WITH_SANITIZERS=ON "$@" From d262ddb486f3771f8fc40134b9d1e10d413d4fbf Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Wed, 3 Jul 2024 08:44:39 +1000 Subject: [PATCH 03/15] Restoring original libxml2 build command. --- lib/src/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/src/CMakeLists.txt b/lib/src/CMakeLists.txt index 3c32acec..4732bc20 100644 --- a/lib/src/CMakeLists.txt +++ b/lib/src/CMakeLists.txt @@ -49,9 +49,6 @@ while (TRUE) # BUILD_BYPRODUCTS are needed by Ninja BUILD_BYPRODUCTS /lib/${LIBXML2_LIB_NAME} - - # On Windows CMAKE_BUILD_TYPE in the configuration can get ignored, requires seperate build command - BUILD_COMMAND ${CMAKE_COMMAND} --build "${LIBXML2_BIN_DIR}" --config ${CMAKE_BUILD_TYPE} --target all ) set (LIBXML2_FOUND TRUE) From 0a18f287cb4aebc43d8a759ddf86a0f9eef5bcd0 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Fri, 13 Sep 2024 08:08:03 +1000 Subject: [PATCH 04/15] Require v5.2.7 of the comms library and v5.3.3 of the cc_tools_qt. --- .github/workflows/actions_build.yml | 4 ++-- app/commsdsl2comms/src/CommsGenerator.cpp | 2 +- app/commsdsl2tools_qt/src/ToolsQtGenerator.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/actions_build.yml b/.github/workflows/actions_build.yml index 08588ca3..1d0be705 100644 --- a/.github/workflows/actions_build.yml +++ b/.github/workflows/actions_build.yml @@ -3,8 +3,8 @@ name: Github Actions Build on: [push] env: - COMMS_TAG: v5.2.5 - CC_TOOLS_QT_TAG: v5.3.1 + COMMS_TAG: develop + CC_TOOLS_QT_TAG: develop jobs: build_gcc_old_ubuntu_20_04: diff --git a/app/commsdsl2comms/src/CommsGenerator.cpp b/app/commsdsl2comms/src/CommsGenerator.cpp index 31cba33f..bb341dee 100644 --- a/app/commsdsl2comms/src/CommsGenerator.cpp +++ b/app/commsdsl2comms/src/CommsGenerator.cpp @@ -68,7 +68,7 @@ namespace util = commsdsl::gen::util; namespace commsdsl2comms { -const std::string MinCommsVersion("5.2.5"); +const std::string MinCommsVersion("5.2.7"); const std::string& CommsGenerator::commsFileGeneratedComment() { diff --git a/app/commsdsl2tools_qt/src/ToolsQtGenerator.cpp b/app/commsdsl2tools_qt/src/ToolsQtGenerator.cpp index 2bee2406..d4fd7af0 100644 --- a/app/commsdsl2tools_qt/src/ToolsQtGenerator.cpp +++ b/app/commsdsl2tools_qt/src/ToolsQtGenerator.cpp @@ -66,7 +66,7 @@ namespace commsdsl2tools_qt namespace { -const std::string MinToolsQtVersion("5.3.1"); +const std::string MinToolsQtVersion("5.3.3"); } // namespace From 9b64858384e93bfa9168b2ba3ee1f44f0670eab6 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Fri, 13 Sep 2024 08:50:14 +1000 Subject: [PATCH 05/15] Minimizing genrated doxygen configuration. --- app/commsdsl2comms/src/CommsDoxygen.cpp | 116 ------------------------ 1 file changed, 116 deletions(-) diff --git a/app/commsdsl2comms/src/CommsDoxygen.cpp b/app/commsdsl2comms/src/CommsDoxygen.cpp index e05d1ed4..7bb93908 100644 --- a/app/commsdsl2comms/src/CommsDoxygen.cpp +++ b/app/commsdsl2comms/src/CommsDoxygen.cpp @@ -92,147 +92,31 @@ bool CommsDoxygen::commsWriteConfInternal() const { const std::string FileName = "doxygen.conf"; const std::string Templ = - "DOXYFILE_ENCODING = UTF-8\n" "PROJECT_NAME = \"#^#PROJ_NAME#$#\"\n" "PROJECT_BRIEF = \"Documentation for generated code of \\\"#^#PROJ_NAME#$#\\\" protocol.\"\n" "OUTPUT_DIRECTORY = \n" - "CREATE_SUBDIRS = NO\n" - "ALLOW_UNICODE_NAMES = NO\n" "OUTPUT_LANGUAGE = English\n" - "OUTPUT_TEXT_DIRECTION = None\n" - "BRIEF_MEMBER_DESC = YES\n" - "REPEAT_BRIEF = YES\n" - "ALWAYS_DETAILED_SEC = NO\n" "INLINE_INHERITED_MEMB = YES\n" - "FULL_PATH_NAMES = YES\n" - "SHORT_NAMES = NO\n" - "INHERIT_DOCS = YES\n" - "SEPARATE_MEMBER_PAGES = NO\n" - "TAB_SIZE = 4\n" - "OPTIMIZE_OUTPUT_FOR_C = NO\n" - "OPTIMIZE_OUTPUT_JAVA = NO\n" - "OPTIMIZE_FOR_FORTRAN = NO\n" - "OPTIMIZE_OUTPUT_VHDL = NO\n" - "MARKDOWN_SUPPORT = YES\n" - "AUTOLINK_SUPPORT = YES\n" "BUILTIN_STL_SUPPORT = YES\n" - "CPP_CLI_SUPPORT = NO\n" - "SIP_SUPPORT = NO\n" - "IDL_PROPERTY_SUPPORT = YES\n" - "DISTRIBUTE_GROUP_DOC = NO\n" - "GROUP_NESTED_COMPOUNDS = NO\n" - "SUBGROUPING = YES\n" - "INLINE_GROUPED_CLASSES = NO\n" - "INLINE_SIMPLE_STRUCTS = NO\n" - "TYPEDEF_HIDES_STRUCT = NO\n" - "LOOKUP_CACHE_SIZE = 0\n" "NUM_PROC_THREADS = 0\n" - "EXTRACT_ALL = NO\n" - "EXTRACT_PRIVATE = NO\n" - "EXTRACT_PRIV_VIRTUAL = NO\n" - "EXTRACT_PACKAGE = NO\n" - "EXTRACT_STATIC = NO\n" - "EXTRACT_LOCAL_CLASSES = YES\n" - "EXTRACT_LOCAL_METHODS = NO\n" - "EXTRACT_ANON_NSPACES = NO\n" - "RESOLVE_UNNAMED_PARAMS = YES\n" "HIDE_UNDOC_MEMBERS = YES\n" "HIDE_UNDOC_CLASSES = YES\n" - "HIDE_FRIEND_COMPOUNDS = NO\n" - "HIDE_IN_BODY_DOCS = NO\n" - "INTERNAL_DOCS = NO\n" "CASE_SENSE_NAMES = YES\n" - "HIDE_SCOPE_NAMES = NO\n" - "HIDE_COMPOUND_REFERENCE= NO\n" - "SHOW_INCLUDE_FILES = YES\n" - "SHOW_GROUPED_MEMB_INC = NO\n" "FORCE_LOCAL_INCLUDES = YES\n" "INLINE_INFO = NO\n" - "SORT_MEMBER_DOCS = YES\n" "SORT_BRIEF_DOCS = YES\n" "SORT_MEMBERS_CTORS_1ST = YES\n" - "SORT_GROUP_NAMES = NO\n" "SORT_BY_SCOPE_NAME = YES\n" - "STRICT_PROTO_MATCHING = NO\n" - "GENERATE_TODOLIST = YES\n" - "GENERATE_TESTLIST = YES\n" - "GENERATE_BUGLIST = YES\n" - "GENERATE_DEPRECATEDLIST= YES\n" - "MAX_INITIALIZER_LINES = 30\n" - "SHOW_USED_FILES = YES\n" - "SHOW_FILES = YES\n" - "SHOW_NAMESPACES = YES\n" "LAYOUT_FILE = doc/layout.xml\n" "QUIET = YES\n" - "WARNINGS = YES\n" "WARN_IF_UNDOCUMENTED = NO\n" "WARN_IF_DOC_ERROR = YES\n" "WARN_NO_PARAMDOC = YES\n" "WARN_AS_ERROR = YES\n" - "WARN_FORMAT = \"$file:$line: $text\"\n" - "INPUT_ENCODING = UTF-8\n" "RECURSIVE = YES\n" "EXCLUDE = \n" - "EXCLUDE_SYMLINKS = NO\n" "EXCLUDE_SYMBOLS = *details\n" - "EXAMPLE_RECURSIVE = NO\n" - "FILTER_SOURCE_FILES = NO\n" - "SOURCE_BROWSER = NO\n" - "INLINE_SOURCES = NO\n" - "STRIP_CODE_COMMENTS = YES\n" - "REFERENCED_BY_RELATION = NO\n" - "REFERENCES_RELATION = NO\n" - "REFERENCES_LINK_SOURCE = YES\n" - "SOURCE_TOOLTIPS = YES\n" - "USE_HTAGS = NO\n" - "VERBATIM_HEADERS = YES\n" - "CLANG_ASSISTED_PARSING = NO\n" - "CLANG_ADD_INC_PATHS = YES\n" - "CLANG_OPTIONS =\n" - "ALPHABETICAL_INDEX = YES\n" - "GENERATE_HTML = YES\n" - "HTML_OUTPUT = html\n" - "HTML_FILE_EXTENSION = .html\n" - "HTML_COLORSTYLE_HUE = 220\n" - "HTML_COLORSTYLE_SAT = 100\n" - "HTML_COLORSTYLE_GAMMA = 80\n" - "HTML_TIMESTAMP = NO\n" - "HTML_DYNAMIC_SECTIONS = NO\n" - "HTML_INDEX_NUM_ENTRIES = 100\n" - "GENERATE_DOCSET = NO\n" - "GENERATE_HTMLHELP = NO\n" - "GENERATE_QHP = NO\n" - "GENERATE_ECLIPSEHELP = NO\n" - "DISABLE_INDEX = NO\n" - "GENERATE_TREEVIEW = NO\n" - "ENUM_VALUES_PER_LINE = 4\n" - "TREEVIEW_WIDTH = 250\n" - "EXT_LINKS_IN_WINDOW = NO\n" - "FORMULA_FONTSIZE = 10\n" - "FORMULA_TRANSPARENT = YES\n" - "USE_MATHJAX = NO\n" - "SEARCHENGINE = NO\n" - "SERVER_BASED_SEARCH = NO\n" - "EXTERNAL_SEARCH = NO\n" - "SEARCHDATA_FILE = searchdata.xml\n" - "GENERATE_LATEX = NO\n" - "GENERATE_RTF = NO\n" - "GENERATE_MAN = NO\n" - "GENERATE_XML = NO\n" - "GENERATE_DOCBOOK = NO\n" - "GENERATE_AUTOGEN_DEF = NO\n" - "GENERATE_PERLMOD = NO\n" - "ENABLE_PREPROCESSING = YES\n" - "MACRO_EXPANSION = YES\n" - "EXPAND_ONLY_PREDEF = YES\n" - "SEARCH_INCLUDES = YES\n" "PREDEFINED = FOR_DOXYGEN_DOC_ONLY COMMS_MSVC_WARNING_PUSH= COMMS_MSVC_WARNING_POP= COMMS_MSVC_WARNING_DISABLE(x)=\n" - "SKIP_FUNCTION_MACROS = YES\n" - "ALLEXTERNALS = NO\n" - "EXTERNAL_GROUPS = YES\n" - "EXTERNAL_PAGES = YES\n" - "CLASS_DIAGRAMS = YES\n" - "HIDE_UNDOC_RELATIONS = YES\n" "HAVE_DOT = NO\n" "#^#APPEND#$#\n" "\n"; From 83bf5ad1a0ebd88771f81286d73648312a18e664 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Fri, 13 Sep 2024 08:50:40 +1000 Subject: [PATCH 06/15] Testing C++23 on github actions. --- .github/workflows/actions_build.yml | 152 +++++++++++++++++++++++++++- 1 file changed, 149 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions_build.yml b/.github/workflows/actions_build.yml index 1d0be705..abafd7ee 100644 --- a/.github/workflows/actions_build.yml +++ b/.github/workflows/actions_build.yml @@ -92,7 +92,7 @@ jobs: run: sudo apt-get update --fix-missing - name: Install Packages - run: sudo apt install libqt5gui5 qtbase5-dev libxml2-dev doxygen gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} + run: sudo apt install libqt5gui5 qtbase5-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build @@ -117,7 +117,7 @@ jobs: run: | cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \ -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCOMMSDSL_TESTS_CXX_STANDARD=${{matrix.cpp}} \ - -DCOMMSDSL_BUILD_UNIT_TESTS=ON -DCOMMSDSL_TEST_BUILD_DOC=ON \ + -DCOMMSDSL_BUILD_UNIT_TESTS=ON \ -DCOMMSDSL_BUILD_COMMSDSL2TEST=ON -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT=ON \ -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT_TESTS=${{env.BUILD_TOOLS_QT_UNIT_TESTS}} \ -DCOMMSDSL_BUILD_WITH_SANITIZERS=ON @@ -151,6 +151,78 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Prepare Install + run: sudo apt-get update --fix-missing + + - name: Install Packages + run: | + sudo apt install libqt${{matrix.qt_ver}}gui${{matrix.qt_ver}} qtbase5-dev qt6-base-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} \ + python3 libpython3-dev swig default-jdk default-jre emscripten nodejs + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Prepare externals + shell: bash + run: $GITHUB_WORKSPACE/script/prepare_externals.sh + env: + BUILD_DIR: ${{runner.workspace}}/build + CC: gcc-${{matrix.cc_ver}} + CXX: g++-${{matrix.cc_ver}} + EXTERNALS_DIR: ${{runner.workspace}}/externals + COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install + COMMON_BUILD_TYPE: ${{matrix.type}} + COMMON_CXX_STANDARD: ${{matrix.cpp}} + COMMS_TAG: ${{env.COMMS_TAG}} + CC_TOOLS_QT_TAG: ${{env.CC_TOOLS_QT_TAG}} + CC_TOOLS_QT_MAJOR_QT_VERSION: ${{matrix.qt_ver}} + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \ + -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCOMMSDSL_TESTS_CXX_STANDARD=${{matrix.cpp}} \ + -DCMAKE_CXX_STANDARD=${{env.TOOLS_CXX_STANDARD}} -DCOMMSDSL_TESTS_QT_VERSION=${{matrix.qt_ver}} \ + -DCOMMSDSL_BUILD_UNIT_TESTS=ON -DCMAKE_IGNORE_PATH=/usr/local/bin \ + -DCOMMSDSL_BUILD_COMMSDSL2TEST=ON -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT=ON \ + -DCOMMSDSL_BUILD_COMMSDSL2SWIG=ON -DCOMMSDSL_BUILD_COMMSDSL2EMSCRIPTEN=ON \ + -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT_TESTS=${{env.BUILD_TOOLS_QT_UNIT_TESTS}} \ + -DCOMMSDSL_BUILD_WITH_SANITIZERS=ON + env: + CC: gcc-${{matrix.cc_ver}} + CXX: g++-${{matrix.cc_ver}} + BUILD_TOOLS_QT_UNIT_TESTS: "${{ matrix.cpp >= 17 && 'ON' || 'OFF' }}" + TOOLS_CXX_STANDARD: "${{ matrix.cpp >= 17 && matrix.cpp || '17' }}" + + - name: Build Target + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --config ${{matrix.type}} --target install + env: + VERBOSE: 1 + + - name: Testing + working-directory: ${{runner.workspace}}/build + shell: bash + run: ctest -V + + build_gcc_ubuntu_24_04: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + type: [Debug, Release, MinSizeRel] + cc_ver: [13, 14] + cpp: [11, 14, 17, 20, 23] + qt_ver: [5, 6] + exclude: + - cc_ver: 13 + cpp: 23 + + steps: + - uses: actions/checkout@v4 + - name: Prepare Install run: sudo apt-get update --fix-missing @@ -207,7 +279,6 @@ jobs: shell: bash run: ctest -V - build_clang_old_ubuntu_20_04: runs-on: ubuntu-20.04 strategy: @@ -425,6 +496,81 @@ jobs: shell: bash run: ctest -V + build_clang_ubuntu_24_04: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + type: [Debug, Release, MinSizeRel] + cc_ver: [16, 17, 18] + cpp: [11, 14, 17, 20, 23] + qt_ver: [5, 6] + exclude: + - cc_ver: 16 + cpp: 23 + - cc_ver: 17 + cpp: 23 + + steps: + - uses: actions/checkout@v4 + + - name: Prepare Install + run: sudo apt-get update --fix-missing + + - name: Install Packages + run: | + sudo apt install libqt${{matrix.qt_ver}}gui${{matrix.qt_ver}} qtbase5-dev qt6-base-dev libxml2-dev clang-${{matrix.cc_ver}} \ + python3 libpython3-dev swig default-jdk default-jre emscripten nodejs + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Prepare externals + shell: bash + run: $GITHUB_WORKSPACE/script/prepare_externals.sh + env: + BUILD_DIR: ${{runner.workspace}}/build + CC: clang-${{matrix.cc_ver}} + CXX: clang++-${{matrix.cc_ver}} + EXTERNALS_DIR: ${{runner.workspace}}/externals + COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install + COMMON_BUILD_TYPE: ${{matrix.type}} + COMMON_CXX_STANDARD: ${{matrix.cpp}} + COMMS_TAG: ${{env.COMMS_TAG}} + CC_TOOLS_QT_TAG: ${{env.CC_TOOLS_QT_TAG}} + CC_TOOLS_QT_MAJOR_QT_VERSION: ${{matrix.qt_ver}} + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \ + -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCOMMSDSL_TESTS_CXX_STANDARD=${{matrix.cpp}} \ + -DCMAKE_CXX_STANDARD=${{env.TOOLS_CXX_STANDARD}} -DCOMMSDSL_TESTS_QT_VERSION=${{matrix.qt_ver}} \ + -DCOMMSDSL_BUILD_UNIT_TESTS=ON -DCMAKE_IGNORE_PATH=/usr/local/bin \ + -DCOMMSDSL_BUILD_COMMSDSL2TEST=ON -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT=ON \ + -DCOMMSDSL_BUILD_COMMSDSL2SWIG=ON -DCOMMSDSL_BUILD_COMMSDSL2EMSCRIPTEN=ON \ + -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT_TESTS=${{env.BUILD_TOOLS_QT_UNIT_TESTS}} \ + -DCOMMSDSL_BUILD_WITH_SANITIZERS=ON + + env: + CC: clang-${{matrix.cc_ver}} + CXX: clang++-${{matrix.cc_ver}} + BUILD_TOOLS_QT_UNIT_TESTS: "${{ matrix.cpp >= 17 && 'ON' || 'OFF' }}" + TOOLS_CXX_STANDARD: "${{ matrix.cpp >= 17 && matrix.cpp || '17' }}" + + - name: Build Target + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --config ${{matrix.type}} --target install + env: + VERBOSE: 1 + + - name: Testing + working-directory: ${{runner.workspace}}/build + shell: bash + run: ctest -V + build_msvc_2019: runs-on: windows-2019 strategy: From eaec4d33c1a768c6761045c1a182e3187009ccbc Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Mon, 16 Sep 2024 08:01:43 +1000 Subject: [PATCH 07/15] Fixing doxygen build of the generated projects. --- app/commsdsl2comms/src/CommsDoxygen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/app/commsdsl2comms/src/CommsDoxygen.cpp b/app/commsdsl2comms/src/CommsDoxygen.cpp index 7bb93908..15ba8073 100644 --- a/app/commsdsl2comms/src/CommsDoxygen.cpp +++ b/app/commsdsl2comms/src/CommsDoxygen.cpp @@ -116,6 +116,7 @@ bool CommsDoxygen::commsWriteConfInternal() const "RECURSIVE = YES\n" "EXCLUDE = \n" "EXCLUDE_SYMBOLS = *details\n" + "GENERATE_LATEX = NO\n" "PREDEFINED = FOR_DOXYGEN_DOC_ONLY COMMS_MSVC_WARNING_PUSH= COMMS_MSVC_WARNING_POP= COMMS_MSVC_WARNING_DISABLE(x)=\n" "HAVE_DOT = NO\n" "#^#APPEND#$#\n" From 64fe0e382a71a85b654ea99c9156cfa5a6ba3eda Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Mon, 16 Sep 2024 09:18:18 +1000 Subject: [PATCH 08/15] Fixing emscripted unit-testing invocation. --- app/commsdsl2emscripten/test/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/commsdsl2emscripten/test/CMakeLists.txt b/app/commsdsl2emscripten/test/CMakeLists.txt index 70b783dc..7ba558cf 100644 --- a/app/commsdsl2emscripten/test/CMakeLists.txt +++ b/app/commsdsl2emscripten/test/CMakeLists.txt @@ -26,6 +26,15 @@ file(GLOB tests RELATIVE ${tests_path} ${tests_path}/test*) find_program (NODE_EXECUTABLE NAMES node nodejs REQUIRED) message (STATUS "Found node: ${NODE_EXECUTABLE}") +execute_process( + COMMAND ${NODE_EXECUTABLE} --version + OUTPUT_VARIABLE NODE_VERSION_OUT) + +string(REGEX REPLACE "^v" "" NODE_VERSION ${NODE_VERSION_OUT}) +set (extra_node_params) +if ("${NODE_VERSION}" VERSION_GREATER_EQUAL "18") + list (APPEND extra_node_params "--no-experimental-fetch") +endif () foreach (name ${tests}) set (test_dir "${tests_path}/${name}") @@ -102,7 +111,7 @@ foreach (name ${tests}) if (EXISTS ${this_test_dir}/emscripten_${name}.js) add_test( NAME ${APP_NAME}.${name} - COMMAND ${NODE_EXECUTABLE} ${this_test_dir}/emscripten_${name}.js + COMMAND ${NODE_EXECUTABLE} ${extra_node_params} ${this_test_dir}/emscripten_${name}.js WORKING_DIRECTORY ${build_dir} ) From f03e17839935f157a6ef596804a83e4f75fcc41a Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Tue, 17 Sep 2024 08:19:21 +1000 Subject: [PATCH 09/15] Fixing doxygen generation in github actions. --- app/commsdsl2comms/src/CommsDoxygen.cpp | 1 + app/commsdsl2comms/test/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/commsdsl2comms/src/CommsDoxygen.cpp b/app/commsdsl2comms/src/CommsDoxygen.cpp index 15ba8073..335036ef 100644 --- a/app/commsdsl2comms/src/CommsDoxygen.cpp +++ b/app/commsdsl2comms/src/CommsDoxygen.cpp @@ -113,6 +113,7 @@ bool CommsDoxygen::commsWriteConfInternal() const "WARN_IF_DOC_ERROR = YES\n" "WARN_NO_PARAMDOC = YES\n" "WARN_AS_ERROR = YES\n" + "INPUT = doc include\n" "RECURSIVE = YES\n" "EXCLUDE = \n" "EXCLUDE_SYMBOLS = *details\n" diff --git a/app/commsdsl2comms/test/CMakeLists.txt b/app/commsdsl2comms/test/CMakeLists.txt index e3acb90a..e21b9333 100644 --- a/app/commsdsl2comms/test/CMakeLists.txt +++ b/app/commsdsl2comms/test/CMakeLists.txt @@ -40,8 +40,8 @@ function (test_func name) endif () set (build_tgt ${APP_NAME}.${name}_build_tgt) - set (build_dir ${output_dir}/build) - set (install_dir ${build_dir}/install) + set (build_dir ${output_dir}_build) + set (install_dir ${build_dir}_install) execute_process ( COMMAND ${CMAKE_COMMAND} -E make_directory "${build_dir}") From 479695aaac2bb59826de8ca42b41646aebfb559e Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Tue, 17 Sep 2024 08:20:48 +1000 Subject: [PATCH 10/15] Temporarily disable some of github actions builds. --- .github/workflows/actions_build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/actions_build.yml b/.github/workflows/actions_build.yml index abafd7ee..1d97ae75 100644 --- a/.github/workflows/actions_build.yml +++ b/.github/workflows/actions_build.yml @@ -8,6 +8,7 @@ env: jobs: build_gcc_old_ubuntu_20_04: + if: false runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -77,6 +78,7 @@ jobs: run: ctest build_gcc_ubuntu_20_04: + if: false runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -139,6 +141,7 @@ jobs: run: ctest build_gcc_ubuntu_22_04: + if: false runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -280,6 +283,7 @@ jobs: run: ctest -V build_clang_old_ubuntu_20_04: + if: false runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -352,6 +356,7 @@ jobs: run: ctest build_clang_ubuntu_20_04: + if: false runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -420,6 +425,7 @@ jobs: run: ctest build_clang_ubuntu_22_04: + if: false runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -497,6 +503,7 @@ jobs: run: ctest -V build_clang_ubuntu_24_04: + if: false runs-on: ubuntu-24.04 strategy: fail-fast: false @@ -572,6 +579,7 @@ jobs: run: ctest -V build_msvc_2019: + if: false runs-on: windows-2019 strategy: fail-fast: false @@ -641,6 +649,7 @@ jobs: run: ctest -V build_msvc_2022: + if: false runs-on: windows-2022 strategy: fail-fast: false From 5ecfcadeb8b32fa7739d4f191d187d2e97f853fe Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Tue, 17 Sep 2024 08:57:19 +1000 Subject: [PATCH 11/15] Fixing build. --- app/commsdsl2comms/test/CMakeLists.txt | 2 +- app/commsdsl2emscripten/test/CMakeLists.txt | 2 +- app/commsdsl2swig/test/CMakeLists.txt | 2 +- app/commsdsl2test/test/CMakeLists.txt | 2 +- app/commsdsl2tools_qt/test/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/commsdsl2comms/test/CMakeLists.txt b/app/commsdsl2comms/test/CMakeLists.txt index e21b9333..fa2243ae 100644 --- a/app/commsdsl2comms/test/CMakeLists.txt +++ b/app/commsdsl2comms/test/CMakeLists.txt @@ -41,7 +41,7 @@ function (test_func name) set (build_tgt ${APP_NAME}.${name}_build_tgt) set (build_dir ${output_dir}_build) - set (install_dir ${build_dir}_install) + set (install_dir ${output_dir}_install) execute_process ( COMMAND ${CMAKE_COMMAND} -E make_directory "${build_dir}") diff --git a/app/commsdsl2emscripten/test/CMakeLists.txt b/app/commsdsl2emscripten/test/CMakeLists.txt index 7ba558cf..02ccfd83 100644 --- a/app/commsdsl2emscripten/test/CMakeLists.txt +++ b/app/commsdsl2emscripten/test/CMakeLists.txt @@ -75,7 +75,7 @@ foreach (name ${tests}) set (build_tgt ${APP_NAME}.${name}_build_tgt) set (build_dir ${output_dir}_build) set (install_dir ${build_dir}/install) - set (prot_include_dir "${PROJECT_BINARY_DIR}/app/commsdsl2comms/test/${name}/build/install/include") + set (prot_include_dir "${PROJECT_BINARY_DIR}/app/commsdsl2comms/test/${name}_install/include") set (extra_includes_path ${prot_include_dir} ${comms_include_dirs}) string (REPLACE ";" "|" extra_includes_path_str "${extra_includes_path}") diff --git a/app/commsdsl2swig/test/CMakeLists.txt b/app/commsdsl2swig/test/CMakeLists.txt index 63cb07bc..d9182efc 100644 --- a/app/commsdsl2swig/test/CMakeLists.txt +++ b/app/commsdsl2swig/test/CMakeLists.txt @@ -67,7 +67,7 @@ foreach (name ${tests}) set (build_tgt ${APP_NAME}.${name}_build_tgt) set (build_dir ${output_dir}_build) set (install_dir ${build_dir}/install) - set (prot_install_dir "${PROJECT_BINARY_DIR}/app/commsdsl2comms/test/${name}/build/install") + set (prot_install_dir "${PROJECT_BINARY_DIR}/app/commsdsl2comms/test/${name}_install") set (build_prefix_path ${CMAKE_PREFIX_PATH} ${prot_install_dir}) string (REPLACE ";" "|" build_prefix_path_str "${build_prefix_path}") string (REPLACE ";" "|" languages_str "${languages}") diff --git a/app/commsdsl2test/test/CMakeLists.txt b/app/commsdsl2test/test/CMakeLists.txt index eca4be96..b205ed7b 100644 --- a/app/commsdsl2test/test/CMakeLists.txt +++ b/app/commsdsl2test/test/CMakeLists.txt @@ -65,7 +65,7 @@ foreach (name ${tests}) set (options_param "-DOPT_TEST_OPTIONS=TestDefaultOptions") endif() - set (dep_install_dir ${dep_prefix_path}/${name}/build/install) + set (dep_install_dir ${dep_prefix_path}/${name}_install) set (build_prefix_path ${CMAKE_PREFIX_PATH} ${dep_install_dir}) string (REPLACE ";" "|" build_prefix_path_str "${build_prefix_path}") diff --git a/app/commsdsl2tools_qt/test/CMakeLists.txt b/app/commsdsl2tools_qt/test/CMakeLists.txt index 06f2dc87..81201a81 100644 --- a/app/commsdsl2tools_qt/test/CMakeLists.txt +++ b/app/commsdsl2tools_qt/test/CMakeLists.txt @@ -84,7 +84,7 @@ foreach (name ${tests}) COMMAND ${CMAKE_COMMAND} -E touch "${output_dir}/dummy.txt") set (prot_tgt "commsdsl2comms.${name}_build_tgt") - set (prot_install_dir "${PROJECT_BINARY_DIR}/app/commsdsl2comms/test/${name}/build/install") + set (prot_install_dir "${PROJECT_BINARY_DIR}/app/commsdsl2comms/test/${name}_install") set (build_prefix_path ${CMAKE_PREFIX_PATH} ${prot_install_dir}) string (REPLACE ";" "|" build_prefix_path_str "${build_prefix_path}") From 4dbf647a7b9e7182d0358ffec96b4f0dfc1c9969 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Tue, 17 Sep 2024 08:57:43 +1000 Subject: [PATCH 12/15] Revert "Temporarily disable some of github actions builds." This reverts commit 479695aaac2bb59826de8ca42b41646aebfb559e. --- .github/workflows/actions_build.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/actions_build.yml b/.github/workflows/actions_build.yml index 1d97ae75..abafd7ee 100644 --- a/.github/workflows/actions_build.yml +++ b/.github/workflows/actions_build.yml @@ -8,7 +8,6 @@ env: jobs: build_gcc_old_ubuntu_20_04: - if: false runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -78,7 +77,6 @@ jobs: run: ctest build_gcc_ubuntu_20_04: - if: false runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -141,7 +139,6 @@ jobs: run: ctest build_gcc_ubuntu_22_04: - if: false runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -283,7 +280,6 @@ jobs: run: ctest -V build_clang_old_ubuntu_20_04: - if: false runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -356,7 +352,6 @@ jobs: run: ctest build_clang_ubuntu_20_04: - if: false runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -425,7 +420,6 @@ jobs: run: ctest build_clang_ubuntu_22_04: - if: false runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -503,7 +497,6 @@ jobs: run: ctest -V build_clang_ubuntu_24_04: - if: false runs-on: ubuntu-24.04 strategy: fail-fast: false @@ -579,7 +572,6 @@ jobs: run: ctest -V build_msvc_2019: - if: false runs-on: windows-2019 strategy: fail-fast: false @@ -649,7 +641,6 @@ jobs: run: ctest -V build_msvc_2022: - if: false runs-on: windows-2022 strategy: fail-fast: false From e4f8aa23a7ddd580a16f19d81e2cb1f55d39b103 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Mon, 23 Sep 2024 10:22:34 +1000 Subject: [PATCH 13/15] Added an ability for the generated tools and test projects to be build with sanitizers. --- app/commsdsl2test/src/TestCmake.cpp | 6 +++++- app/commsdsl2tools_qt/src/ToolsQtCmake.cpp | 6 +++++- ...release_build_gcc-12.sh => full_release_build_gcc.sh} | 9 +++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) rename script/{full_release_build_gcc-12.sh => full_release_build_gcc.sh} (57%) diff --git a/app/commsdsl2test/src/TestCmake.cpp b/app/commsdsl2test/src/TestCmake.cpp index ce870ac5..134e477e 100644 --- a/app/commsdsl2test/src/TestCmake.cpp +++ b/app/commsdsl2test/src/TestCmake.cpp @@ -89,7 +89,8 @@ bool TestCmake::testWriteInternal() const "cmake_minimum_required (VERSION 3.10)\n" "project (\"#^#PROJ_NAME#$#_test\")\n\n" "option (OPT_WARN_AS_ERR \"Treat warning as error\" ON)\n" - "option (OPT_USE_CCACHE \"Use of ccache\" OFF)\n\n" + "option (OPT_USE_CCACHE \"Use of ccache\" OFF)\n" + "option (OPT_WITH_DEFAULT_SANITIZERS \"Build with sanitizers\" OFF)\n\n" "# Other parameters:\n" "# OPT_TEST_RENAME - Rename the final test application.\n" "# OPT_TEST_OPTIONS - Class name of the options for test applications,\n" @@ -175,6 +176,9 @@ bool TestCmake::testWriteInternal() const " list(APPEND extra_opts CCACHE_EXECUTABLE \"${OPT_CCACHE_EXECUTABLE}\")\n" " endif()\n" "endif()\n\n" + "if (OPT_WITH_DEFAULT_SANITIZERS)\n" + " list(APPEND extra_opts DEFAULT_SANITIZERS)\n" + "endif()\n\n" "include(${LibComms_DIR}/CC_Compile.cmake)\n" "cc_compile(${extra_opts})\n" "cc_msvc_force_warn_opt(/W4)\n\n" diff --git a/app/commsdsl2tools_qt/src/ToolsQtCmake.cpp b/app/commsdsl2tools_qt/src/ToolsQtCmake.cpp index 4918e1e1..4395ccdd 100644 --- a/app/commsdsl2tools_qt/src/ToolsQtCmake.cpp +++ b/app/commsdsl2tools_qt/src/ToolsQtCmake.cpp @@ -62,6 +62,7 @@ bool ToolsQtCmake::testWriteInternal() const "# Build options:\n" "option (OPT_WARN_AS_ERR \"Treat warnings as errors\" ON)\n" "option (OPT_USE_CCACHE \"Use ccache\" OFF)\n" + "option (OPT_WITH_DEFAULT_SANITIZERS \"Build with sanitizers\" OFF)\n" "option (OPT_INSTALL_DEFAULT_CONFIG \"Install default plugin configuration\" ON)\n\n" "# Configuration variables:\n" "# OPT_QT_MAJOR_VERSION - The major Qt version, defaults to 5\n" @@ -92,7 +93,10 @@ bool ToolsQtCmake::testWriteInternal() const " if (NOT \"${OPT_CCACHE_EXECUTABLE}\" STREQUAL \"\")\n" " list(APPEND extra_opts CCACHE_EXECUTABLE \"${OPT_CCACHE_EXECUTABLE}\")\n" " endif()\n" - "endif()\n\n" + "endif()\n\n" + "if (OPT_WITH_DEFAULT_SANITIZERS)\n" + " list(APPEND extra_opts DEFAULT_SANITIZERS)\n" + "endif()\n\n" "include(${LibComms_DIR}/CC_Compile.cmake)\n" "cc_compile(${extra_opts})\n" "cc_msvc_force_warn_opt(/W4)\n\n" diff --git a/script/full_release_build_gcc-12.sh b/script/full_release_build_gcc.sh similarity index 57% rename from script/full_release_build_gcc-12.sh rename to script/full_release_build_gcc.sh index 84f2c80f..f185ef76 100755 --- a/script/full_release_build_gcc-12.sh +++ b/script/full_release_build_gcc.sh @@ -1,7 +1,12 @@ #!/bin/bash -export CC=gcc-12 -export CXX=g++-12 +if [ -z "${CC}" ]; then + export CC=gcc +fi + +if [ -z "${CXX}" ]; then + export CXX=g++ +fi SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source ${SCRIPT_DIR}/full_release_build.sh "$@" From caa525099088d5f5d391ee40df49181034f1ec38 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Wed, 25 Sep 2024 14:20:49 +1000 Subject: [PATCH 14/15] Improving clang flags in the generated projects. --- app/commsdsl2swig/src/SwigCmake.cpp | 2 +- app/commsdsl2tools_qt/src/ToolsQtCmake.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/commsdsl2swig/src/SwigCmake.cpp b/app/commsdsl2swig/src/SwigCmake.cpp index 6884ccd8..50cffb43 100644 --- a/app/commsdsl2swig/src/SwigCmake.cpp +++ b/app/commsdsl2swig/src/SwigCmake.cpp @@ -113,7 +113,7 @@ bool SwigCmake::swigWriteInternal() const " target_link_libraries(#^#PROJ_NAME#$#_swig_${lang} ${OPT_PROTOCOL_TARGET} cc::comms)\n" " target_compile_options(#^#PROJ_NAME#$#_swig_${lang} PRIVATE\n" " $<$:-ftemplate-depth=2048 -fconstexpr-depth=4096>\n" - " $<$:-ftemplate-depth=2048 -fconstexpr-depth=4096>\n" + " $<$:-ftemplate-depth=2048 -fconstexpr-depth=4096 -fbracket-depth=2048>\n" " )\n" "endforeach()\n\n" "#^#APPEND#$#" diff --git a/app/commsdsl2tools_qt/src/ToolsQtCmake.cpp b/app/commsdsl2tools_qt/src/ToolsQtCmake.cpp index 4395ccdd..7c9404e1 100644 --- a/app/commsdsl2tools_qt/src/ToolsQtCmake.cpp +++ b/app/commsdsl2tools_qt/src/ToolsQtCmake.cpp @@ -114,7 +114,7 @@ bool ToolsQtCmake::testWriteInternal() const " target_compile_options(${name} PRIVATE\n" " $<$:/bigobj /wd4127 /wd5054>\n" " $<$:-ftemplate-depth=2048 -fconstexpr-depth=4096 -Wno-unused-local-typedefs>\n" - " $<$:-ftemplate-depth=2048 -fconstexpr-depth=4096 -Wno-unused-local-typedefs>\n" + " $<$:-ftemplate-depth=2048 -fconstexpr-depth=4096 -fbracket-depth=2048 -Wno-unused-local-typedefs>\n" " )\n\n" "endfunction()\n\n" "######################################################################\n\n" @@ -149,7 +149,7 @@ bool ToolsQtCmake::testWriteInternal() const " target_compile_options(${name} PRIVATE\n" " $<$:/bigobj /wd4127 /wd5054>\n" " $<$:-ftemplate-depth=2048 -fconstexpr-depth=4096>\n" - " $<$:-ftemplate-depth=2048 -fconstexpr-depth=4096>\n" + " $<$:-ftemplate-depth=2048 -fconstexpr-depth=4096 -fbracket-depth=2048>\n" " )\n\n" " install (\n" " TARGETS ${name}\n" From 7b0ac9f435f0f68160da6406eacfb59d694bc45f Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Sat, 28 Sep 2024 12:41:13 +1000 Subject: [PATCH 15/15] Using comms v5.2.7 and cc_tools_qt v5.3.3 in github actions. --- .github/workflows/actions_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions_build.yml b/.github/workflows/actions_build.yml index abafd7ee..38d88584 100644 --- a/.github/workflows/actions_build.yml +++ b/.github/workflows/actions_build.yml @@ -3,8 +3,8 @@ name: Github Actions Build on: [push] env: - COMMS_TAG: develop - CC_TOOLS_QT_TAG: develop + COMMS_TAG: v5.2.7 + CC_TOOLS_QT_TAG: v5.3.3 jobs: build_gcc_old_ubuntu_20_04: