From b76f83ba8fc2d64cc28925de073f12d21e948d4b Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Mon, 9 Oct 2023 21:25:09 +0200 Subject: [PATCH 001/101] multi config build - update build instructions --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 25cc87f25..91470bd04 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ cd python3 -m venv .venv # Create a Python virtual env source ./.venv/bin/activate # Activate the virtual env for bash by source. pip install conan # Install latest conan (conan=>2.0) +pip install ninja # Install ninja for multi-config build conan profile detect --force # Generate a default configuration with the local machine settings conan config install ./.conan # Install supported build profiles from ./.conan to ./conan2 ``` @@ -77,6 +78,7 @@ cmake --build --preset conan-debug Multi-config builds allow you to create a build folder containing sub-folders for different build configurations and build them side-by-side. Once again starting with the repository clone and Conan configured run the install stage, but this time we specity the Conan cmake tools use Ninja multi-config to generate `Release, Debug, RelWithDebInfo` configurations. To generate all 3 configuration we run the `conan-default` preset which configures CMake for these configurations. ```bash conan install ./ -pr:h .conan2/profiles/msvc/193/x64-release -pr:b .conan2/profiles/msvc/193/x64-release --build missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" +source build/generators/conanbuild.sh # Access the environment variables needed to use the Mold linker with gcc and clang cmake --preset conan-default # The configure stage for multi-config builds is conan-default ``` From 69f0e86907617a240587e352e5548cee5e7337b4 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Mon, 9 Oct 2023 23:32:31 +0200 Subject: [PATCH 002/101] CCache build support --- CMakeLists.txt | 1 + cmake/ccache.cmake | 29 +++++++++++++++++++++++++++++ conanfile.py | 18 ++++++++++++++++-- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 cmake/ccache.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index c7c94275f..7371f0422 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}") #------------------------------------------------------------------------------------------------------------------------------------------ # Custom CMake Includes +include(ccache) include(coverage) include(compiler) include(documentation) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake new file mode 100644 index 000000000..860bb1690 --- /dev/null +++ b/cmake/ccache.cmake @@ -0,0 +1,29 @@ +#[[ +Copyright 2023 Antony Peacock + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +]] + +include_guard(GLOBAL) + +if (${MORPHEUS_BUILD_WITH_CCACHE}) + find_program(CCACHE_BIN ccache REQUIRED) + if(CCACHE_BIN) + message(STATUS "Morpheus: CCache found: ${CCACHE_BIN}. Enabling ccache as compiler cache tool.") + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_BIN}") + else() + message(STATUS "Morpheus: CCache not found. Rebuilding all the source files.") + message(DEBUG "Morpheus: If CCache compiler cache is desired then ensure this is a supported platform and ensure the Conan buildenv is active") + endif() +endif() diff --git a/conanfile.py b/conanfile.py index 572978be0..9693f64d3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -57,14 +57,16 @@ class Morpheus(ConanFile): "fPIC": [True, False], "tools": [True, False], "build_docs": [True, False], - "link_with_mold": [True, False] + "link_with_mold": [True, False], + "build_with_ccache": [True, False] } default_options = { "shared": False, "fPIC": True, "tools": True, "build_docs": False, - "link_with_mold": True + "link_with_mold": True, + "build_with_ccache": True } exports_sources = ["CMakeLists.txt", "LICENSE", "version.txt", "cmake/*", "examples/*" "libraries/*"] requires = ( @@ -95,10 +97,18 @@ def set_version(self): def checkMoldIsSupported(self): """ Mold is only tested on Linux with gcc and clang. In future support for icc may be added. """ return self.settings.os == "Linux" and (self.settings.compiler == "clang" or self.settings.compiler == "gcc") + + def checkCCacheIsSupported(self): + """ CCache is fully supported on Linux and macOS with gcc and clang. """ + return (self.settings.os == "Macos" or self.settings.os == "Linux") and \ + (self.settings.compiler == "clang" or self.settings.compiler == "gcc") def config_options(self): if not self.checkMoldIsSupported(): self.options.rm_safe("link_with_mold") + + if not self.checkCCacheIsSupported(): + self.options.rm_safe("build_with_ccache") def build_requirements(self): self.tool_requires("ninja/1.11.1") @@ -113,6 +123,9 @@ def build_requirements(self): if self.options.get_safe("link_with_mold", False): self.build_requires("mold/1.11.0") self.build_requires("openssl/3.1.2", override=True) + + if self.options.get_safe("build_with_ccache", False): + self.build_requires("ccache/4.8.3") def requirements(self): if self.settings.os in ["Macos", "iOS", "tvOS"] and self.settings.compiler == "apple-clang": @@ -164,6 +177,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["MORPHEUS_BUILD_DOCS"] = self.options.build_docs tc.variables["MORPHEUS_LINK_WITH_MOLD"] = self.options.get_safe("link_with_mold", False) + tc.variables["MORPHEUS_BUILD_WITH_CCACHE"] = self.options.get_safe("build_with_ccache", False) tc.generate() deps = CMakeDeps(self) deps.generate() From 83251d4bb11a8a9e05f6cce34f823810ece2c430 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Mon, 9 Oct 2023 23:51:56 +0200 Subject: [PATCH 003/101] update readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 91470bd04..4db518db6 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,14 @@ To enable Mold linker usage for gcc and clang with Linux: conan install ./ -pr:h .conan2/profiles/gcc/12/x64-libstdc++11-debug -pr:b .conan2/profiles/gcc/12/x64-libstdc++11-debug --build missing source build/Debug/generators/conanbuild.sh # Access the environment variables needed to use the Mold linker with gcc and clang ``` -To disable Mold linker usage for gcc and clang with Linux: +To disable Mold linker usage for compilers gcc and clang with Linux: ```bash conan install ./ -pr:h .conan2/profiles/gcc/12/x64-libstdc++11-debug -pr:b .conan2/profiles/gcc/12/x64-libstdc++11-debug --build missing -o link_with_mold=False ``` +To disable CCache usage for compilers gcc and clang with Linux and macOS: +```bash +conan install ./ -pr:h .conan2/profiles/gcc/12/x64-libstdc++11-debug -pr:b .conan2/profiles/gcc/12/x64-libstdc++11-debug --build missing -o build_with_ccache=False +``` Use the preset generated by Conan ```bash cmake --preset conan-debug From 2dda5dcc65f1c3e3276c5ebdca7081d31286ed6f Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Wed, 11 Oct 2023 17:47:34 +0100 Subject: [PATCH 004/101] Move to function and enable option --- CMakeLists.txt | 5 +++++ cmake/ccache.cmake | 39 +++++++++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7371f0422..e61f2f1c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ include(GNUInstallDirs) include(CMakeDependentOption) include(CMakePackageConfigHelpers) +option(MORPHEUS_BUILD_WITH_CCACHE "Enable the the CCache compiler caching" ON) option(MORPHEUS_LINK_WITH_MOLD "Enable the mold linker" ON) cmake_dependent_option(MORPHEUS_CODE_COVERAGE "Enable code coverage" ON "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\" OR \"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"GNU\"" OFF) cmake_dependent_option(MORPHEUS_INCLUDE_NATVIS "Enable inclusion of a natvis files for debugging" ON "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"MSVC\"" OFF) @@ -95,6 +96,10 @@ endif() add_subdirectory(libraries) add_subdirectory(examples) +if (MORPHEUS_BUILD_WITH_CCACHE) + enable_ccache() +endif() + if (ENABLE_CODE_COVERAGE) enable_code_coverage() endif() diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 860bb1690..786134704 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -17,13 +17,40 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR include_guard(GLOBAL) -if (${MORPHEUS_BUILD_WITH_CCACHE}) + +#[=======================================================================[.rst: +enable_ccacche +------------------ + +Overview +^^^^^^^^ + +Enable use of Ccache for compiler caching during the build process. + +.. code-block:: cmake + + enable_ccacche( + [QUIET] + ) + -- Searches for the ccache executable, and if found enables it for supported + language with specified options. + + ``QUIET`` Silent output from this method. + +#]=======================================================================] +function(enable_ccache) + set(options QUIET) + set(oneValueArgs) + set(multiValueArgs) + cmake_parse_arguments(CCACHE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + find_program(CCACHE_BIN ccache REQUIRED) - if(CCACHE_BIN) - message(STATUS "Morpheus: CCache found: ${CCACHE_BIN}. Enabling ccache as compiler cache tool.") - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_BIN}") - else() + if(NOT CCACHE_BIN) message(STATUS "Morpheus: CCache not found. Rebuilding all the source files.") message(DEBUG "Morpheus: If CCache compiler cache is desired then ensure this is a supported platform and ensure the Conan buildenv is active") + return() endif() -endif() + + message(STATUS "Morpheus: CCache found: ${CCACHE_BIN}. Enabling ccache as compiler cache tool.") + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_BIN}") +endfunction() From f62ff16bc2ae632b4546ad5658cf0a81921fcf48 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Wed, 11 Oct 2023 21:33:52 +0200 Subject: [PATCH 005/101] conanfile.py options in alphabetic order --- conanfile.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/conanfile.py b/conanfile.py index 9693f64d3..1b9d2f6ae 100644 --- a/conanfile.py +++ b/conanfile.py @@ -53,20 +53,20 @@ class Morpheus(ConanFile): settings = "os", "compiler", "build_type", "arch" no_copy_source = True options = { - "shared": [True, False], - "fPIC": [True, False], - "tools": [True, False], "build_docs": [True, False], + "build_with_ccache": [True, False], + "fPIC": [True, False], "link_with_mold": [True, False], - "build_with_ccache": [True, False] + "shared": [True, False], + "tools": [True, False] } default_options = { - "shared": False, - "fPIC": True, - "tools": True, "build_docs": False, + "build_with_ccache": True, + "fPIC": True, "link_with_mold": True, - "build_with_ccache": True + "shared": False, + "tools": True } exports_sources = ["CMakeLists.txt", "LICENSE", "version.txt", "cmake/*", "examples/*" "libraries/*"] requires = ( From 8c84341fc099b8e54deb85a2f445d246eca2fd89 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Wed, 11 Oct 2023 23:30:01 +0200 Subject: [PATCH 006/101] ccache.make looping all supported languages --- CMakeLists.txt | 1 + cmake/ccache.cmake | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e61f2f1c3..2fa4649ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,7 @@ add_subdirectory(libraries) add_subdirectory(examples) if (MORPHEUS_BUILD_WITH_CCACHE) + set(MORPHEUS_LANGUAGES CXX) enable_ccache() endif() diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 786134704..34091813b 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -52,5 +52,7 @@ function(enable_ccache) endif() message(STATUS "Morpheus: CCache found: ${CCACHE_BIN}. Enabling ccache as compiler cache tool.") - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_BIN}") + foreach(lang IN ITEMS ${MORPHEUS_LANGUAGES}) + set(CMAKE_${lang}_COMPILER_LAUNCHER ${CCACHE_BIN}) + endforeach() endfunction() From 85010f27ef6aee24d5227d5d61ec30203dce2d68 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Thu, 12 Oct 2023 12:26:27 +0200 Subject: [PATCH 007/101] attempt support different generators --- cmake/ccache.cmake | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 34091813b..dfaed1ba4 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -51,8 +51,43 @@ function(enable_ccache) return() endif() + message(STATUS "Morpheus Generator: ${CMAKE_GENERATOR}") #debug message(STATUS "Morpheus: CCache found: ${CCACHE_BIN}. Enabling ccache as compiler cache tool.") - foreach(lang IN ITEMS ${MORPHEUS_LANGUAGES}) - set(CMAKE_${lang}_COMPILER_LAUNCHER ${CCACHE_BIN}) - endforeach() + if(${CMAKE_GENERATOR} MATCHES "Ninja|Makefiles") + message(STATUS "found generator Ninja|Makefiles") #debug + foreach(lang IN ITEMS ${MORPHEUS_LANGUAGES}) + set(CMAKE_${lang}_COMPILER_LAUNCHER ${CCACHE_BIN}) + endforeach() + elseif(${CMAKE_GENERATOR} STREQUAL "Xcode") + message(STATUS "found generator Xcode") #debug + foreach(lang IN ITEMS ${MORPHEUS_LANGUAGES}) + set(launch${lang} ${CMAKE_BINARY_DIR}/launch-${lang}) + file(WRITE ${launch${lang}} + "#!/bin/bash\n\n" + "exec \"${CCACHE_BIN}\" \"${CMAKE_${lang}_COMPILER}\" \"$@\"\n" + ) + execute_process(COMMAND chmod a+rx ${launch${lang}}) + set(${CMAKE_XCODE_ATTRIBUTE_${lang}} ${launch${lang}}) + if(lang STREQUAL "C") + set(CMAKE_XCODE_ATTRIBUTE_LD ${launchC}) + elseif(lang STREQUAL "CXX") + set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS ${launchCXX}) + endif() + endforeach() + elseif(${CMAKE_GENERATOR} MATCHES "Visual Studio") + message(STATUS "found generator Visual Studio") #debug + cmake_path(NATIVE_PATH CCACHE_BIN ccache_exe) + file(WRITE ${CMAKE_BINARY_DIR}/launch-cl.cmd + "@echo off\n" + "\"${ccache_exe}\" \"${CMAKE_C_COMPILER}\" %*\n" + ) + list(FILTER CMAKE_VS_GLOBALS EXCLUDE + REGEX "^(CLTool(Path|Exe)|TrackFileAccess)=.*$" + ) + list(APPEND CMAKE_VS_GLOBALS + CLToolPath=${CMAKE_BINARY_DIR} + CLToolExe=launch-cl.cmd + TrackFileAccess=false + ) + endif() endfunction() From 93bc43efe295194769f00f0e28a21ffdf8b35eef Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Mon, 16 Oct 2023 23:26:55 +0200 Subject: [PATCH 008/101] ccache support adjustments --- CMakeLists.txt | 25 +++++++++++++++-- cmake/ccache.cmake | 70 +++++++++++++++++++++++++++++++--------------- cmake/linker.cmake | 2 +- 3 files changed, 71 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fa4649ae..29945fb0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,8 @@ include(CMakePackageConfigHelpers) option(MORPHEUS_BUILD_WITH_CCACHE "Enable the the CCache compiler caching" ON) option(MORPHEUS_LINK_WITH_MOLD "Enable the mold linker" ON) +# Icecream will be used only with CCache +cmake_dependent_option(MORPHEUS_BUILD_WITH_ICECC "Enable build with Icecream" ON "MORPHEUS_BUILD_WITH_CCACHE" OFF) cmake_dependent_option(MORPHEUS_CODE_COVERAGE "Enable code coverage" ON "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\" OR \"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"GNU\"" OFF) cmake_dependent_option(MORPHEUS_INCLUDE_NATVIS "Enable inclusion of a natvis files for debugging" ON "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"MSVC\"" OFF) @@ -78,7 +80,7 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) set(CMAKE_SKIP_BUILD_RPATH FALSE) get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTI_CONFIG) +if (IS_MULTI_CONFIG) set(RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$) set(LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$) file(RELATIVE_PATH MORPHEUS_RELATIVE_BUILD_RPATH ${RUNTIME_OUTPUT_DIRECTORY} ${LIBRARY_OUTPUT_DIRECTORY}) @@ -96,9 +98,26 @@ endif() add_subdirectory(libraries) add_subdirectory(examples) +# CCache / Icecream options management +set(LANGUAGES CXX) if (MORPHEUS_BUILD_WITH_CCACHE) - set(MORPHEUS_LANGUAGES CXX) - enable_ccache() + option(CCACHE_DEBUG "CCache debug enabled" ON) + if (MORPHEUS_BUILD_WITH_ICECC) + option(CCACHE_ICECC "CCache build with Icecream" ON) + endif() + option(CCACHE_SLOPPINESS "CCache sloppiness enabled" ON) + + if (CCACHE_DEBUG) + list(APPEND OPTIONS DEBUG) + endif() + if (CCACHE_ICECC) + list(APPEND OPTIONS ICECC) + endif() + if (CCACHE_SLOPPINESS) + list(APPEND OPTIONS SLOPPINESS) + endif() + + enable_ccache(LANGUAGES OPTIONS) endif() if (ENABLE_CODE_COVERAGE) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index dfaed1ba4..140245a54 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -41,31 +41,53 @@ Enable use of Ccache for compiler caching during the build process. function(enable_ccache) set(options QUIET) set(oneValueArgs) - set(multiValueArgs) + set(multiValueArgs LANGUAGES OPTIONS) cmake_parse_arguments(CCACHE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) - find_program(CCACHE_BIN ccache REQUIRED) - if(NOT CCACHE_BIN) + if (CCACHE_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Morpheus: enable_ccache invalid arguments ${CCACHE_UNPARSED_ARGUMENTS}") + endif() + + find_program(CCACHE_BIN ccache) + if (NOT CCACHE_BIN) message(STATUS "Morpheus: CCache not found. Rebuilding all the source files.") message(DEBUG "Morpheus: If CCache compiler cache is desired then ensure this is a supported platform and ensure the Conan buildenv is active") return() endif() - - message(STATUS "Morpheus Generator: ${CMAKE_GENERATOR}") #debug message(STATUS "Morpheus: CCache found: ${CCACHE_BIN}. Enabling ccache as compiler cache tool.") - if(${CMAKE_GENERATOR} MATCHES "Ninja|Makefiles") - message(STATUS "found generator Ninja|Makefiles") #debug - foreach(lang IN ITEMS ${MORPHEUS_LANGUAGES}) - set(CMAKE_${lang}_COMPILER_LAUNCHER ${CCACHE_BIN}) + + if (CCACHE_DEBUG) + message(STATUS "Morpheus: Create CCache debug files") + list(APPEND ccacheEnv "CCACHE_DEBUG=1") + endif() + if (CCACHE_ICECC) + find_program(ICECC_BIN icecc) + if (ICECC_BIN) + message(STATUS "Morpheus: build with Icecream ${ICECC_BIN}") + list(APPEND ccacheEnv "CCACHE_PREFIX=icecc") + endif() + endif() + if (CCACHE_SLOPPINESS) + message(STATUS "Morpheus: Enable CCache sloppiness") + list(APPEND ccacheEnv "CCACHE_SLOPPINESS=pch_defines,time_macros") + endif() + string(REPLACE ";" " " ccacheEnvString "${ccacheEnv}") + + if (${CMAKE_GENERATOR} MATCHES "Ninja|Makefiles") + message(STATUS "Morpheus: found generator Ninja|Makefiles") + foreach(lang IN ITEMS ${LANGUAGES}) + set(CMAKE_${lang}_COMPILER_LAUNCHER + ${CMAKE_COMMAND} -E env ${ccacheEnvString} ${CCACHE_BIN}) endforeach() - elseif(${CMAKE_GENERATOR} STREQUAL "Xcode") - message(STATUS "found generator Xcode") #debug - foreach(lang IN ITEMS ${MORPHEUS_LANGUAGES}) + elseif (${CMAKE_GENERATOR} STREQUAL "Xcode") + message(STATUS "Morpheus: found generator Xcode") + foreach(lang IN ITEMS ${LANGUAGES}) set(launch${lang} ${CMAKE_BINARY_DIR}/launch-${lang}) - file(WRITE ${launch${lang}} - "#!/bin/bash\n\n" - "exec \"${CCACHE_BIN}\" \"${CMAKE_${lang}_COMPILER}\" \"$@\"\n" - ) + file(WRITE ${launch${lang}} "#!/bin/bash\n\n") + foreach(envVal IN ITEMS ${ccacheEnv}) + file(APPEND ${launch${lang}} "export ${envVal}\n") + endforeach() + file(APPEND ${launch${lang}} "exec \"${CCACHE_BIN}\" \"${CMAKE_${lang}_COMPILER}\" \"$@\"\n") execute_process(COMMAND chmod a+rx ${launch${lang}}) set(${CMAKE_XCODE_ATTRIBUTE_${lang}} ${launch${lang}}) if(lang STREQUAL "C") @@ -74,13 +96,17 @@ function(enable_ccache) set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS ${launchCXX}) endif() endforeach() - elseif(${CMAKE_GENERATOR} MATCHES "Visual Studio") - message(STATUS "found generator Visual Studio") #debug + elseif (${CMAKE_GENERATOR} MATCHES "Visual Studio" and + (${LANGUAGES} STREQUAL "C" or + ${LANGUAGES} STREQUAL "CXX" or + ${LANGUAGES} STREQUAL "CUDA")) + message(STATUS "Morpheus: found generator Visual Studio") cmake_path(NATIVE_PATH CCACHE_BIN ccache_exe) - file(WRITE ${CMAKE_BINARY_DIR}/launch-cl.cmd - "@echo off\n" - "\"${ccache_exe}\" \"${CMAKE_C_COMPILER}\" %*\n" - ) + file(WRITE ${CMAKE_BINARY_DIR}/launch-cl.cmd "@echo off\n") + foreach(envVal IN ITEMS ${ccacheEnv}) + file(APPEND ${CMAKE_BINARY_DIR}/launch-cl.cmd "set ${envVal}\n") + endforeach() + file(APPEND ${CMAKE_BINARY_DIR}/launch-cl.cmd "\"${ccache_exe}\" \"${CMAKE_C_COMPILER}\" %*\n") list(FILTER CMAKE_VS_GLOBALS EXCLUDE REGEX "^(CLTool(Path|Exe)|TrackFileAccess)=.*$" ) diff --git a/cmake/linker.cmake b/cmake/linker.cmake index 6d9871aad..b9d765b43 100644 --- a/cmake/linker.cmake +++ b/cmake/linker.cmake @@ -18,7 +18,7 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR include_guard(GLOBAL) if (${MORPHEUS_LINK_WITH_MOLD}) - find_program(MOLD_BIN mold REQUIRED) + find_program(MOLD_BIN mold) if(MOLD_BIN) message(STATUS "Morpheus: Mold linker found: ${MOLD_BIN}. Enabling mold as active linker.") target_link_options(MorpheusConfig From c1e1922a4d8139c3caa63ce9d67cac7fc3c24493 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 26 Oct 2023 21:48:38 +0200 Subject: [PATCH 009/101] Windows Visual Studio with MSVC and open folder functionality --- cmake/ccache.cmake | 52 +++++++++++++++++++++++++++++++++++++++------- conanfile.py | 6 +++--- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 140245a54..39451be0b 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -73,14 +73,15 @@ function(enable_ccache) endif() string(REPLACE ";" " " ccacheEnvString "${ccacheEnv}") - if (${CMAKE_GENERATOR} MATCHES "Ninja|Makefiles") - message(STATUS "Morpheus: found generator Ninja|Makefiles") + if (${CMAKE_GENERATOR} MATCHES "Ninja|Makefiles" AND + ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux") + message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") foreach(lang IN ITEMS ${LANGUAGES}) set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnvString} ${CCACHE_BIN}) endforeach() elseif (${CMAKE_GENERATOR} STREQUAL "Xcode") - message(STATUS "Morpheus: found generator Xcode") + message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR}") foreach(lang IN ITEMS ${LANGUAGES}) set(launch${lang} ${CMAKE_BINARY_DIR}/launch-${lang}) file(WRITE ${launch${lang}} "#!/bin/bash\n\n") @@ -96,11 +97,14 @@ function(enable_ccache) set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS ${launchCXX}) endif() endforeach() - elseif (${CMAKE_GENERATOR} MATCHES "Visual Studio" and - (${LANGUAGES} STREQUAL "C" or - ${LANGUAGES} STREQUAL "CXX" or + elseif (${CMAKE_GENERATOR} MATCHES "Visual Studio|Ninja" AND + ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows" AND + (${LANGUAGES} STREQUAL "C" OR + ${LANGUAGES} STREQUAL "CXX" OR ${LANGUAGES} STREQUAL "CUDA")) - message(STATUS "Morpheus: found generator Visual Studio") + message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") + + #[[ cmake_path(NATIVE_PATH CCACHE_BIN ccache_exe) file(WRITE ${CMAKE_BINARY_DIR}/launch-cl.cmd "@echo off\n") foreach(envVal IN ITEMS ${ccacheEnv}) @@ -108,12 +112,44 @@ function(enable_ccache) endforeach() file(APPEND ${CMAKE_BINARY_DIR}/launch-cl.cmd "\"${ccache_exe}\" \"${CMAKE_C_COMPILER}\" %*\n") list(FILTER CMAKE_VS_GLOBALS EXCLUDE - REGEX "^(CLTool(Path|Exe)|TrackFileAccess)=.*$" + REGEX "^(CLTool(Path|Exe)|TrackFileAccess|UseMultiToolTask|DebugInformationFormat)=.*$" ) list(APPEND CMAKE_VS_GLOBALS CLToolPath=${CMAKE_BINARY_DIR} CLToolExe=launch-cl.cmd TrackFileAccess=false + UseMultiToolTask=true + DebugInformationFormat=OldStyle ) + ]] + + #[[ + file(COPY_FILE + ${CCACHE_BIN} ${CMAKE_BINARY_DIR}/cl.exe + ONLY_IF_DIFFERENT) + # By default Visual Studio generators will use /Zi which is not compatible + # with ccache, so tell Visual Studio to use /Z7 instead. + message(STATUS "Morpheus: Setting MSVC debug information format to 'Embedded'") + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>") + set(CMAKE_VS_GLOBALS + "CLToolExe=cl.exe" + "CLToolPath=${CMAKE_BINARY_DIR}" + "TrackFileAccess=false" + "UseMultiToolTask=true" + "DebugInformationFormat=OldStyle") + ]] + + # this works with the Visual Studio Open Folder functionality + foreach(lang IN ITEMS ${LANGUAGES}) + set(CMAKE_${lang}_COMPILER_LAUNCHER ${CCACHE_BIN} CACHE STRING "${lang} Morpheus compiler launcher" FORCE) + endforeach() + foreach(config DEBUG RELWITHDEBINFO) + foreach(lang IN ITEMS ${LANGUAGES}) + set(flags_var "CMAKE_${lang}_FLAGS_${config}") + string(REPLACE "/Zi" "/Z7" ${flags_var} "${${flags_var}}") + set(${flags_var} "${${flags_var}}" PARENT_SCOPE) + endforeach() + endforeach() + endif() endfunction() diff --git a/conanfile.py b/conanfile.py index 1b9d2f6ae..582854839 100644 --- a/conanfile.py +++ b/conanfile.py @@ -99,9 +99,9 @@ def checkMoldIsSupported(self): return self.settings.os == "Linux" and (self.settings.compiler == "clang" or self.settings.compiler == "gcc") def checkCCacheIsSupported(self): - """ CCache is fully supported on Linux and macOS with gcc and clang. """ - return (self.settings.os == "Macos" or self.settings.os == "Linux") and \ - (self.settings.compiler == "clang" or self.settings.compiler == "gcc") + """ CCache is fully supported on Linux and macOS with gcc and clang and on Windows msvc. """ + return (self.settings.os == "Macos" or self.settings.os == "Linux" or self.settings.os == "Windows") and \ + (self.settings.compiler == "clang" or self.settings.compiler == "gcc" or self.settings.compiler == "msvc") def config_options(self): if not self.checkMoldIsSupported(): From 7dae5447094448d4c376f1e63d6d269428861256 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sun, 29 Oct 2023 09:23:58 +0100 Subject: [PATCH 010/101] reorganize code and logfile activation --- CMakeLists.txt | 3 +- cmake/ccache.cmake | 96 +++++++++++++++++++++++----------------------- 2 files changed, 50 insertions(+), 49 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 29945fb0e..21339b416 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ include(GNUInstallDirs) include(CMakeDependentOption) include(CMakePackageConfigHelpers) -option(MORPHEUS_BUILD_WITH_CCACHE "Enable the the CCache compiler caching" ON) +option(MORPHEUS_BUILD_WITH_CCACHE "Enable the CCache compiler caching" ON) option(MORPHEUS_LINK_WITH_MOLD "Enable the mold linker" ON) # Icecream will be used only with CCache cmake_dependent_option(MORPHEUS_BUILD_WITH_ICECC "Enable build with Icecream" ON "MORPHEUS_BUILD_WITH_CCACHE" OFF) @@ -106,6 +106,7 @@ if (MORPHEUS_BUILD_WITH_CCACHE) option(CCACHE_ICECC "CCache build with Icecream" ON) endif() option(CCACHE_SLOPPINESS "CCache sloppiness enabled" ON) + option(CCACHE_LOGFILE "CCache logfile enabled" ON) if (CCACHE_DEBUG) list(APPEND OPTIONS DEBUG) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 39451be0b..0ba329d20 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -71,17 +71,49 @@ function(enable_ccache) message(STATUS "Morpheus: Enable CCache sloppiness") list(APPEND ccacheEnv "CCACHE_SLOPPINESS=pch_defines,time_macros") endif() - string(REPLACE ";" " " ccacheEnvString "${ccacheEnv}") + if (CCACHE_LOGFILE) + message(STATUS "Morpheus: Enable CCache logfile") + list(APPEND ccacheEnv "CCACHE_LOGFILE=CCache_log.txt") + endif() - if (${CMAKE_GENERATOR} MATCHES "Ninja|Makefiles" AND - ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux") + foreach(lang IN ITEMS C CXX OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID MATCHES "Clang") + add_compile_options("$<$:SHELL:-Xclang -fno-pch-timestamp>") + endif() + endforeach() + + if (MSVC) + message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME} and MSVC ${MSVC}") + foreach(lang IN ITEMS C CXX) + foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES) + set(var CMAKE_${lang}_FLAGS) + if (NOT config STREQUAL "") + string(TOUPPER "${config}" config) + string(APPEND var "_${config}") + endif() + string(REGEX REPLACE "[-/]Z[iI]" "-Z7" ${var} "${${var}}") + #set(${var} "${${var}}" PARENT_SCOPE) + set(${var} "${${var}}" CACHE STRING "Compile flags for MSVC" FORCE) + endforeach() + endforeach() + if (DEFINED CMAKE_MSVC_DEBUG_INFORMATION_FORMAT) + string(REGEX REPLACE "ProgramDatabase|EditAndContinue" "Embedded" replaced "${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}") + #set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "${replaced}" PARENT_SCOPE) + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "${replaced}" CACHE STRING "Compile flags for MSVC" FORCE) + else() + #set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" PARENT_SCOPE) + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" CACHE STRING "Compile flags for MSVC XXX" FORCE) + endif() + endif() + + if (${CMAKE_GENERATOR} MATCHES "Ninja|Ninja Multi-Config|Makefiles") message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") foreach(lang IN ITEMS ${LANGUAGES}) - set(CMAKE_${lang}_COMPILER_LAUNCHER - ${CMAKE_COMMAND} -E env ${ccacheEnvString} ${CCACHE_BIN}) + #set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN}) + set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN} CACHE STRING "Morpheus compiler launcher" FORCE) endforeach() elseif (${CMAKE_GENERATOR} STREQUAL "Xcode") - message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR}") + message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") foreach(lang IN ITEMS ${LANGUAGES}) set(launch${lang} ${CMAKE_BINARY_DIR}/launch-${lang}) file(WRITE ${launch${lang}} "#!/bin/bash\n\n") @@ -97,59 +129,27 @@ function(enable_ccache) set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS ${launchCXX}) endif() endforeach() - elseif (${CMAKE_GENERATOR} MATCHES "Visual Studio|Ninja" AND - ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows" AND - (${LANGUAGES} STREQUAL "C" OR - ${LANGUAGES} STREQUAL "CXX" OR - ${LANGUAGES} STREQUAL "CUDA")) - message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") - - #[[ + elseif (${CMAKE_GENERATOR} MATCHES "Visual Studio") + message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") cmake_path(NATIVE_PATH CCACHE_BIN ccache_exe) file(WRITE ${CMAKE_BINARY_DIR}/launch-cl.cmd "@echo off\n") foreach(envVal IN ITEMS ${ccacheEnv}) file(APPEND ${CMAKE_BINARY_DIR}/launch-cl.cmd "set ${envVal}\n") endforeach() - file(APPEND ${CMAKE_BINARY_DIR}/launch-cl.cmd "\"${ccache_exe}\" \"${CMAKE_C_COMPILER}\" %*\n") - list(FILTER CMAKE_VS_GLOBALS EXCLUDE - REGEX "^(CLTool(Path|Exe)|TrackFileAccess|UseMultiToolTask|DebugInformationFormat)=.*$" + foreach(lang IN ITEMS ${LANGUAGES}) + file(APPEND ${CMAKE_BINARY_DIR}/launch-cl.cmd "\"${ccache_exe}\" \"${CMAKE_${lang}_COMPILER}\" %*\n") + endforeach() + list(FILTER CMAKE_VS_GLOBALS EXCLUDE REGEX "^(CLTool(Path|Exe)|TrackFileAccess|UseMultiToolTask|DebugInformationFormat|EnforceProcessCountAcrossBuilds)=.*$" ) list(APPEND CMAKE_VS_GLOBALS CLToolPath=${CMAKE_BINARY_DIR} CLToolExe=launch-cl.cmd + DebugInformationFormat=OldStyle + EnforceProcessCountAcrossBuilds=true TrackFileAccess=false UseMultiToolTask=true - DebugInformationFormat=OldStyle ) - ]] - - #[[ - file(COPY_FILE - ${CCACHE_BIN} ${CMAKE_BINARY_DIR}/cl.exe - ONLY_IF_DIFFERENT) - # By default Visual Studio generators will use /Zi which is not compatible - # with ccache, so tell Visual Studio to use /Z7 instead. - message(STATUS "Morpheus: Setting MSVC debug information format to 'Embedded'") - set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>") - set(CMAKE_VS_GLOBALS - "CLToolExe=cl.exe" - "CLToolPath=${CMAKE_BINARY_DIR}" - "TrackFileAccess=false" - "UseMultiToolTask=true" - "DebugInformationFormat=OldStyle") - ]] - - # this works with the Visual Studio Open Folder functionality - foreach(lang IN ITEMS ${LANGUAGES}) - set(CMAKE_${lang}_COMPILER_LAUNCHER ${CCACHE_BIN} CACHE STRING "${lang} Morpheus compiler launcher" FORCE) - endforeach() - foreach(config DEBUG RELWITHDEBINFO) - foreach(lang IN ITEMS ${LANGUAGES}) - set(flags_var "CMAKE_${lang}_FLAGS_${config}") - string(REPLACE "/Zi" "/Z7" ${flags_var} "${${flags_var}}") - set(${flags_var} "${${flags_var}}" PARENT_SCOPE) - endforeach() - endforeach() - + #set(CMAKE_VS_GLOBALS "${CMAKE_VS_GLOBALS}" PARENT_SCOPE) + set(CMAKE_VS_GLOBALS "${CMAKE_VS_GLOBALS}" CACHE STRING "Variables for Visual Studio XXX" FORCE) endif() endfunction() From 2f69610ddc70215f1e80d7560e632f38f5ad5bf8 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sun, 29 Oct 2023 12:09:27 +0100 Subject: [PATCH 011/101] recache switch enable --- CMakeLists.txt | 1 + cmake/ccache.cmake | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21339b416..14f340a3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,6 +107,7 @@ if (MORPHEUS_BUILD_WITH_CCACHE) endif() option(CCACHE_SLOPPINESS "CCache sloppiness enabled" ON) option(CCACHE_LOGFILE "CCache logfile enabled" ON) + option(CCACHE_RECACHE "CCache forced recache" OFF) if (CCACHE_DEBUG) list(APPEND OPTIONS DEBUG) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 0ba329d20..ff33dd3b2 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -75,6 +75,10 @@ function(enable_ccache) message(STATUS "Morpheus: Enable CCache logfile") list(APPEND ccacheEnv "CCACHE_LOGFILE=CCache_log.txt") endif() + if (CCACHE_RECACHE) + message(STATUS "Morpheus: Enable CCache forced recache") + list(APPEND ccacheEnv "CCACHE_RECACHE=1") + endif() foreach(lang IN ITEMS C CXX OBJC OBJCXX) if (CMAKE_${lang}_COMPILER_ID MATCHES "Clang") @@ -102,7 +106,7 @@ function(enable_ccache) set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "${replaced}" CACHE STRING "Compile flags for MSVC" FORCE) else() #set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" PARENT_SCOPE) - set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" CACHE STRING "Compile flags for MSVC XXX" FORCE) + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" CACHE STRING "Compile flags for MSVC" FORCE) endif() endif() @@ -150,6 +154,6 @@ function(enable_ccache) UseMultiToolTask=true ) #set(CMAKE_VS_GLOBALS "${CMAKE_VS_GLOBALS}" PARENT_SCOPE) - set(CMAKE_VS_GLOBALS "${CMAKE_VS_GLOBALS}" CACHE STRING "Variables for Visual Studio XXX" FORCE) + set(CMAKE_VS_GLOBALS "${CMAKE_VS_GLOBALS}" CACHE STRING "Variables for Visual Studio" FORCE) endif() endfunction() From 019d710806e4e73647966924c3cf3d776daa9393 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sun, 29 Oct 2023 14:33:33 +0100 Subject: [PATCH 012/101] update logic for Ninja* and Makefiles generators --- cmake/ccache.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index ff33dd3b2..130aa9e10 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -113,8 +113,8 @@ function(enable_ccache) if (${CMAKE_GENERATOR} MATCHES "Ninja|Ninja Multi-Config|Makefiles") message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") foreach(lang IN ITEMS ${LANGUAGES}) - #set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN}) - set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN} CACHE STRING "Morpheus compiler launcher" FORCE) + set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN} PARENT_SCOPE) + #set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN} CACHE STRING "Morpheus compiler launcher" FORCE) endforeach() elseif (${CMAKE_GENERATOR} STREQUAL "Xcode") message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") From 72d0eded1d58187727783b49594ec5d1a064b4b2 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sun, 29 Oct 2023 18:31:57 +0100 Subject: [PATCH 013/101] Code cleaning and options switches update --- CMakeLists.txt | 4 ++-- cmake/ccache.cmake | 15 +++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14f340a3c..a3123be4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,12 +101,12 @@ add_subdirectory(examples) # CCache / Icecream options management set(LANGUAGES CXX) if (MORPHEUS_BUILD_WITH_CCACHE) - option(CCACHE_DEBUG "CCache debug enabled" ON) + option(CCACHE_DEBUG "CCache debug enabled" OFF) if (MORPHEUS_BUILD_WITH_ICECC) option(CCACHE_ICECC "CCache build with Icecream" ON) endif() option(CCACHE_SLOPPINESS "CCache sloppiness enabled" ON) - option(CCACHE_LOGFILE "CCache logfile enabled" ON) + option(CCACHE_LOGFILE "CCache logfile enabled" OFF) option(CCACHE_RECACHE "CCache forced recache" OFF) if (CCACHE_DEBUG) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 130aa9e10..a6f6bc331 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -96,25 +96,21 @@ function(enable_ccache) string(APPEND var "_${config}") endif() string(REGEX REPLACE "[-/]Z[iI]" "-Z7" ${var} "${${var}}") - #set(${var} "${${var}}" PARENT_SCOPE) - set(${var} "${${var}}" CACHE STRING "Compile flags for MSVC" FORCE) + set(${var} "${${var}}" CACHE STRING "Morpheus: Compile flags for MSVC" FORCE) endforeach() endforeach() if (DEFINED CMAKE_MSVC_DEBUG_INFORMATION_FORMAT) string(REGEX REPLACE "ProgramDatabase|EditAndContinue" "Embedded" replaced "${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}") - #set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "${replaced}" PARENT_SCOPE) - set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "${replaced}" CACHE STRING "Compile flags for MSVC" FORCE) + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "${replaced}" CACHE STRING "Morpheus: Compile flags for MSVC" FORCE) else() - #set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" PARENT_SCOPE) - set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" CACHE STRING "Compile flags for MSVC" FORCE) + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" CACHE STRING "Morpheus: Compile flags for MSVC" FORCE) endif() endif() if (${CMAKE_GENERATOR} MATCHES "Ninja|Ninja Multi-Config|Makefiles") message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") foreach(lang IN ITEMS ${LANGUAGES}) - set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN} PARENT_SCOPE) - #set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN} CACHE STRING "Morpheus compiler launcher" FORCE) + set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN} CACHE STRING "Morpheus compiler launcher" FORCE) endforeach() elseif (${CMAKE_GENERATOR} STREQUAL "Xcode") message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") @@ -153,7 +149,6 @@ function(enable_ccache) TrackFileAccess=false UseMultiToolTask=true ) - #set(CMAKE_VS_GLOBALS "${CMAKE_VS_GLOBALS}" PARENT_SCOPE) - set(CMAKE_VS_GLOBALS "${CMAKE_VS_GLOBALS}" CACHE STRING "Variables for Visual Studio" FORCE) + set(CMAKE_VS_GLOBALS "${CMAKE_VS_GLOBALS}" CACHE STRING "Morpheus: Variables for Visual Studio" FORCE) endif() endfunction() From 5c82a1ff300bcda24261225ee94f16e73f22a173 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sun, 29 Oct 2023 21:02:34 +0100 Subject: [PATCH 014/101] CMake workflow update CCache --- .github/workflows/cmake.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 87610ac18..14f545588 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -104,6 +104,19 @@ jobs: ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}- ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}- + - name: Cache CCache data + uses: actions/cache@v3 + env: + cache-name: cache-ccache-data + with: + path: ${{ github.workspace }}/.ccache/** + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + restore-keys: | + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- + ccache-${{ matrix.settings.os }}- + # - uses: lhotari/action-upterm@v1 # with: # ## limits ssh access and adds the ssh public key for the user which triggered the workflow @@ -245,6 +258,9 @@ jobs: shell: bash run: echo "CONAN_PRESET=conan-$(echo ${{matrix.configuration}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + - name: Clear CCache stats + run: ccache --zero-stats + - name: Build if: matrix.settings.os == 'windows-latest' shell: cmd @@ -258,6 +274,9 @@ jobs: run: | source build/generators/conanbuild.sh cmake --build --preset ${{ env.CONAN_PRESET }} + + - name: Show CCache stats + run: ccache --show-stats --verbose - name: Test # Execute tests defined by the CMake configuration. From 5bd3a5a346e01c40689dc28e8554a73e87438555 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sun, 29 Oct 2023 22:35:55 +0100 Subject: [PATCH 015/101] CMake workflow: CCache add env for executable --- .github/workflows/cmake.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 14f545588..8e630d7ef 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -259,7 +259,18 @@ jobs: run: echo "CONAN_PRESET=conan-$(echo ${{matrix.configuration}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - name: Clear CCache stats - run: ccache --zero-stats + if: matrix.settings.os == 'windows-latest' + shell: cmd + run: | + call build\generators\conanbuild.bat + ccache --show-stats --verbose --zero-stats + + - name: Clear CCache stats + if: matrix.settings.os != 'windows-latest' + shell: bash + run: | + source build/generators/conanbuild.sh + ccache --show-stats --verbose --zero-stats - name: Build if: matrix.settings.os == 'windows-latest' @@ -276,7 +287,18 @@ jobs: cmake --build --preset ${{ env.CONAN_PRESET }} - name: Show CCache stats - run: ccache --show-stats --verbose + if: matrix.settings.os == 'windows-latest' + shell: cmd + run: | + call build\generators\conanbuild.bat + ccache --show-stats --verbose + + - name: Show CCache stats + if: matrix.settings.os != 'windows-latest' + shell: bash + run: | + source build/generators/conanbuild.sh + ccache --show-stats --verbose - name: Test # Execute tests defined by the CMake configuration. From dce4fd39027028a291c00b898c2c6cc8e2488242 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sun, 29 Oct 2023 22:54:59 +0100 Subject: [PATCH 016/101] CMake workflow update CCache: exclude macos-12 --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8e630d7ef..6f8cf3489 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -266,7 +266,7 @@ jobs: ccache --show-stats --verbose --zero-stats - name: Clear CCache stats - if: matrix.settings.os != 'windows-latest' + if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' shell: bash run: | source build/generators/conanbuild.sh @@ -294,7 +294,7 @@ jobs: ccache --show-stats --verbose - name: Show CCache stats - if: matrix.settings.os != 'windows-latest' + if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' shell: bash run: | source build/generators/conanbuild.sh From 77d3712129509f014973146149f3f742d59f5df4 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sun, 29 Oct 2023 23:09:18 +0100 Subject: [PATCH 017/101] CMake workflow update CCache: update CCache cache path --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6f8cf3489..486a41da6 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -109,7 +109,7 @@ jobs: env: cache-name: cache-ccache-data with: - path: ${{ github.workspace }}/.ccache/** + path: ${{ github.workspace }}/.ccache key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- From 637846b07e0e172e44d07263965667b298b3faf3 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sun, 29 Oct 2023 23:48:42 +0100 Subject: [PATCH 018/101] CMake workflow update CCache path --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 486a41da6..7b6eb515e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -109,7 +109,7 @@ jobs: env: cache-name: cache-ccache-data with: - path: ${{ github.workspace }}/.ccache + path: ~/.cache/ccache key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- From 81ed0b2b435c8fe927b13217474cbe297665b2e5 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Tue, 31 Oct 2023 01:05:28 +0100 Subject: [PATCH 019/101] CMake workflow update CCache path logic --- .github/workflows/cmake.yml | 44 ++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7b6eb515e..6a2648b35 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -104,19 +104,6 @@ jobs: ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}- ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}- - - name: Cache CCache data - uses: actions/cache@v3 - env: - cache-name: cache-ccache-data - with: - path: ~/.cache/ccache - key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} - restore-keys: | - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- - ccache-${{ matrix.settings.os }}- - # - uses: lhotari/action-upterm@v1 # with: # ## limits ssh access and adds the ssh public key for the user which triggered the workflow @@ -272,6 +259,37 @@ jobs: source build/generators/conanbuild.sh ccache --show-stats --verbose --zero-stats + - name: CCache get configuration + id: ccache-get-configuration + if: matrix.settings.os == 'windows-latest' + shell: cmd + run: | + call build\generators\conanbuild.bat + cachePath = $(ccache --get-config cache_dir) + echo "CachePath=$cachePath" >> $GITHUB_OUTPUT + + - name: CCache get configuration + id: ccache-get-configuration + if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' + shell: bash + run: | + source build/generators/conanbuild.sh + cachePath = $(ccache --get-config cache_dir) + echo "CachePath=$cachePath" >> $GITHUB_OUTPUT + + - name: Cache CCache data + uses: actions/cache@v3 + env: + cache_path: ${{ steps.ccache-get-configuration.outputs.CachePath }} + with: + path: ${{ env.cache_path}} + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + restore-keys: | + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- + ccache-${{ matrix.settings.os }}- + - name: Build if: matrix.settings.os == 'windows-latest' shell: cmd From bb52bf77fb46093ba2cd807ec18f2800096e9f14 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Tue, 31 Oct 2023 01:30:30 +0100 Subject: [PATCH 020/101] CMake workflow update CCache fix step id error --- .github/workflows/cmake.yml | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6a2648b35..f9fafd170 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -245,42 +245,57 @@ jobs: shell: bash run: echo "CONAN_PRESET=conan-$(echo ${{matrix.configuration}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - - name: Clear CCache stats + - name: Clear CCache stats Windows if: matrix.settings.os == 'windows-latest' shell: cmd run: | call build\generators\conanbuild.bat ccache --show-stats --verbose --zero-stats - - name: Clear CCache stats + - name: Clear CCache stats Linux if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' shell: bash run: | source build/generators/conanbuild.sh ccache --show-stats --verbose --zero-stats - - name: CCache get configuration - id: ccache-get-configuration + - name: CCache get configuration Windows if: matrix.settings.os == 'windows-latest' + id: ccache-get-configuration-windows shell: cmd run: | call build\generators\conanbuild.bat cachePath = $(ccache --get-config cache_dir) echo "CachePath=$cachePath" >> $GITHUB_OUTPUT - - name: CCache get configuration - id: ccache-get-configuration + - name: CCache get configuration Linux if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' + id: ccache-get-configuration-linux shell: bash run: | source build/generators/conanbuild.sh cachePath = $(ccache --get-config cache_dir) echo "CachePath=$cachePath" >> $GITHUB_OUTPUT - - name: Cache CCache data + - name: Cache CCache data Windows + if: matrix.settings.os == 'windows-latest' + uses: actions/cache@v3 + env: + cache_path: ${{ steps.ccache-get-configuration-windows.outputs.CachePath }} + with: + path: ${{ env.cache_path}} + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + restore-keys: | + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- + ccache-${{ matrix.settings.os }}- + + - name: Cache CCache data Linux + if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' uses: actions/cache@v3 env: - cache_path: ${{ steps.ccache-get-configuration.outputs.CachePath }} + cache_path: ${{ steps.ccache-get-configuration-linux.outputs.CachePath }} with: path: ${{ env.cache_path}} key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} @@ -304,14 +319,14 @@ jobs: source build/generators/conanbuild.sh cmake --build --preset ${{ env.CONAN_PRESET }} - - name: Show CCache stats + - name: Show CCache stats Windows if: matrix.settings.os == 'windows-latest' shell: cmd run: | call build\generators\conanbuild.bat ccache --show-stats --verbose - - name: Show CCache stats + - name: Show CCache stats Linux if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' shell: bash run: | From 334a6a96957a14e05732ed34945d8ba330af7eef Mon Sep 17 00:00:00 2001 From: "g.t" Date: Tue, 31 Oct 2023 16:37:25 +0100 Subject: [PATCH 021/101] CMake workflow update CCache fix shell command --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f9fafd170..d372cbc09 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -265,8 +265,8 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat - cachePath = $(ccache --get-config cache_dir) - echo "CachePath=$cachePath" >> $GITHUB_OUTPUT + for /f %x in ('ccache --get-config cache_dir') do set "cachePath=%x" + echo "CachePath=%cachePath%" >> $ENV:GITHUB_OUTPUT - name: CCache get configuration Linux if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' @@ -274,7 +274,7 @@ jobs: shell: bash run: | source build/generators/conanbuild.sh - cachePath = $(ccache --get-config cache_dir) + cachePath=$(ccache --get-config cache_dir) echo "CachePath=$cachePath" >> $GITHUB_OUTPUT - name: Cache CCache data Windows From 4b599058fb5305d52d9dfa6d2efeefc06686f389 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Tue, 31 Oct 2023 17:04:29 +0100 Subject: [PATCH 022/101] CMake workflow update CCache windows cmd update --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index d372cbc09..b7bfa6bb4 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -265,8 +265,8 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat - for /f %x in ('ccache --get-config cache_dir') do set "cachePath=%x" - echo "CachePath=%cachePath%" >> $ENV:GITHUB_OUTPUT + for /f %%x in ('ccache --get-config cache_dir') do set "cachePath=%%x" + echo "CachePath=%%cachePath%%" >> $ENV:GITHUB_OUTPUT - name: CCache get configuration Linux if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' From b57012ba5f00d8f5059d169de7aab63997fee7cd Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 1 Nov 2023 14:59:15 +0100 Subject: [PATCH 023/101] CCache update CMake workflow --- .github/workflows/cmake.yml | 92 +++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 40 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index b7bfa6bb4..88a0f7da8 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -199,6 +199,7 @@ jobs: # timeout-minutes: 15 # with: # detached: true + - name: Configure Install working-directory: ${{github.workspace}} shell: bash @@ -253,57 +254,68 @@ jobs: ccache --show-stats --verbose --zero-stats - name: Clear CCache stats Linux - if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' + if: matrix.settings.os != 'windows-latest' shell: bash run: | source build/generators/conanbuild.sh ccache --show-stats --verbose --zero-stats - - name: CCache get configuration Windows - if: matrix.settings.os == 'windows-latest' - id: ccache-get-configuration-windows - shell: cmd - run: | - call build\generators\conanbuild.bat - for /f %%x in ('ccache --get-config cache_dir') do set "cachePath=%%x" - echo "CachePath=%%cachePath%%" >> $ENV:GITHUB_OUTPUT - - - name: CCache get configuration Linux - if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' - id: ccache-get-configuration-linux - shell: bash - run: | - source build/generators/conanbuild.sh - cachePath=$(ccache --get-config cache_dir) - echo "CachePath=$cachePath" >> $GITHUB_OUTPUT - - - name: Cache CCache data Windows - if: matrix.settings.os == 'windows-latest' - uses: actions/cache@v3 - env: - cache_path: ${{ steps.ccache-get-configuration-windows.outputs.CachePath }} - with: - path: ${{ env.cache_path}} - key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} - restore-keys: | - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- - ccache-${{ matrix.settings.os }}- - - - name: Cache CCache data Linux - if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' - uses: actions/cache@v3 - env: - cache_path: ${{ steps.ccache-get-configuration-linux.outputs.CachePath }} +# - name: CCache get configuration Windows +# if: matrix.settings.os == 'windows-latest' +# id: ccache-get-configuration-windows +# shell: cmd +# run: | +# call build\generators\conanbuild.bat +# for /f %%x in ('ccache --get-config cache_dir') do set "cachePath=%%x" +# echo "CachePath=%%cachePath%%" >> $ENV:GITHUB_OUTPUT +# +# - name: CCache get configuration Linux +# if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' +# id: ccache-get-configuration-linux +# shell: bash +# run: | +# source build/generators/conanbuild.sh +# cachePath=$(ccache --get-config cache_dir) +# echo "CachePath=$cachePath" >> $GITHUB_OUTPUT +# +# - name: Cache CCache data Windows +# if: matrix.settings.os == 'windows-latest' +# uses: actions/cache@v3 +# env: +# cache_path: ${{ steps.ccache-get-configuration-windows.outputs.CachePath }} +# with: +# path: ${{ env.cache_path}} +# key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-#${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} +# restore-keys: | +# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-#${{ matrix.settings.compiler.version }}- +# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- +# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- +# ccache-${{ matrix.settings.os }}- +# +# - name: Cache CCache data Linux +# if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' +# uses: actions/cache@v3 +# env: +# cache_path: ${{ steps.ccache-get-configuration-linux.outputs.CachePath }} +# with: +# path: ${{ env.cache_path}} +# key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-#${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} +# restore-keys: | +# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-#${{ matrix.settings.compiler.version }}- +# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- +# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- +# ccache-${{ matrix.settings.os }}- + + - name: Cache CCache data + uses: hendrikmuhs/ccache-action@v1.2.10 with: - path: ${{ env.cache_path}} key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- ccache-${{ matrix.settings.os }}- + verbose: 2 - name: Build if: matrix.settings.os == 'windows-latest' @@ -327,7 +339,7 @@ jobs: ccache --show-stats --verbose - name: Show CCache stats Linux - if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' + if: matrix.settings.os != 'windows-latest' shell: bash run: | source build/generators/conanbuild.sh From 0dea958f4f1570370bea64a40d89a8518069d5b5 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 1 Nov 2023 15:18:23 +0100 Subject: [PATCH 024/101] Adding apple-clang compiler support --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 582854839..2b30c559a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -101,7 +101,7 @@ def checkMoldIsSupported(self): def checkCCacheIsSupported(self): """ CCache is fully supported on Linux and macOS with gcc and clang and on Windows msvc. """ return (self.settings.os == "Macos" or self.settings.os == "Linux" or self.settings.os == "Windows") and \ - (self.settings.compiler == "clang" or self.settings.compiler == "gcc" or self.settings.compiler == "msvc") + (self.settings.compiler == "clang" or self.settings.compiler == "gcc" or self.settings.compiler == "msvc" or self.settings.compiler == "apple-clang") def config_options(self): if not self.checkMoldIsSupported(): From 2974b695267b370aa14fc9a229d3528a9b80b376 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 1 Nov 2023 16:12:55 +0100 Subject: [PATCH 025/101] update workflow files --- .github/workflows/cmake.yml | 74 ----------------------------- .github/workflows/code_coverage.yml | 11 +++++ .github/workflows/documentation.yml | 11 +++++ cmake/ccache.cmake | 2 + 4 files changed, 24 insertions(+), 74 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 88a0f7da8..0c9a7d304 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -246,66 +246,6 @@ jobs: shell: bash run: echo "CONAN_PRESET=conan-$(echo ${{matrix.configuration}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - - name: Clear CCache stats Windows - if: matrix.settings.os == 'windows-latest' - shell: cmd - run: | - call build\generators\conanbuild.bat - ccache --show-stats --verbose --zero-stats - - - name: Clear CCache stats Linux - if: matrix.settings.os != 'windows-latest' - shell: bash - run: | - source build/generators/conanbuild.sh - ccache --show-stats --verbose --zero-stats - -# - name: CCache get configuration Windows -# if: matrix.settings.os == 'windows-latest' -# id: ccache-get-configuration-windows -# shell: cmd -# run: | -# call build\generators\conanbuild.bat -# for /f %%x in ('ccache --get-config cache_dir') do set "cachePath=%%x" -# echo "CachePath=%%cachePath%%" >> $ENV:GITHUB_OUTPUT -# -# - name: CCache get configuration Linux -# if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' -# id: ccache-get-configuration-linux -# shell: bash -# run: | -# source build/generators/conanbuild.sh -# cachePath=$(ccache --get-config cache_dir) -# echo "CachePath=$cachePath" >> $GITHUB_OUTPUT -# -# - name: Cache CCache data Windows -# if: matrix.settings.os == 'windows-latest' -# uses: actions/cache@v3 -# env: -# cache_path: ${{ steps.ccache-get-configuration-windows.outputs.CachePath }} -# with: -# path: ${{ env.cache_path}} -# key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-#${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} -# restore-keys: | -# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-#${{ matrix.settings.compiler.version }}- -# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- -# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- -# ccache-${{ matrix.settings.os }}- -# -# - name: Cache CCache data Linux -# if: matrix.settings.os != 'windows-latest' && matrix.settings.os != 'macos-12' -# uses: actions/cache@v3 -# env: -# cache_path: ${{ steps.ccache-get-configuration-linux.outputs.CachePath }} -# with: -# path: ${{ env.cache_path}} -# key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-#${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} -# restore-keys: | -# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-#${{ matrix.settings.compiler.version }}- -# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- -# ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- -# ccache-${{ matrix.settings.os }}- - - name: Cache CCache data uses: hendrikmuhs/ccache-action@v1.2.10 with: @@ -331,20 +271,6 @@ jobs: source build/generators/conanbuild.sh cmake --build --preset ${{ env.CONAN_PRESET }} - - name: Show CCache stats Windows - if: matrix.settings.os == 'windows-latest' - shell: cmd - run: | - call build\generators\conanbuild.bat - ccache --show-stats --verbose - - - name: Show CCache stats Linux - if: matrix.settings.os != 'windows-latest' - shell: bash - run: | - source build/generators/conanbuild.sh - ccache --show-stats --verbose - - name: Test # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 11956d5cc..e2d9fecea 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -144,6 +144,17 @@ jobs: source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh cmake --preset ${{ env.CONAN_PRESET }} -DENABLE_CODE_COVERAGE=1 + - name: Cache CCache data + uses: hendrikmuhs/ccache-action@v1.2.10 + with: + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + restore-keys: | + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- + ccache-${{ matrix.settings.os }}- + verbose: 2 + - name: Build # Build your program with the given configuration run: | diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 68fc8998e..6005d991b 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -101,6 +101,17 @@ jobs: run: | conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.3.2 -o build_docs=True + - name: Cache CCache data + uses: hendrikmuhs/ccache-action@v1.2.10 + with: + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + restore-keys: | + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- + ccache-${{ matrix.settings.os }}- + verbose: 2 + - name: Configure Conan Build shell: bash working-directory: ${{github.workspace}} diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index a6f6bc331..3f71f44ca 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -65,6 +65,8 @@ function(enable_ccache) if (ICECC_BIN) message(STATUS "Morpheus: build with Icecream ${ICECC_BIN}") list(APPEND ccacheEnv "CCACHE_PREFIX=icecc") + else() + message(STATUS "Morpheus: Icecream executable not found") endif() endif() if (CCACHE_SLOPPINESS) From b2977da855c1a0f4315c8aeac30e5bbe3530c6b5 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 1 Nov 2023 21:51:43 +0100 Subject: [PATCH 026/101] CCache CMake workflow --- .github/workflows/cmake.yml | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 0c9a7d304..55d2c2304 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -245,17 +245,36 @@ jobs: - name: Conan Preset shell: bash run: echo "CONAN_PRESET=conan-$(echo ${{matrix.configuration}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + + - name: CCache Configure + if: matrix.settings.os == 'windows-latest' + id: ccache-config-windows + shell: cmd + run: | + call build\generators\conanbuild.bat + mkdir %%HOMEPATH%%\.ccache + set GITHUB_ENV=%%GITHUB_ENV%%;CCACHE_HOME=%%HOMEPATH%%\.ccache + + - name: CCache Configure + if: matrix.settings.os != 'windows-latest' + id: ccache-config-linux + shell: bash + run: | + source build/generators/conanbuild.sh + mkdir $HOME/.ccache + CCACHE_DIR=$HOME/.ccache + echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV - name: Cache CCache data - uses: hendrikmuhs/ccache-action@v1.2.10 + uses: actions/cache@v3.3.2 with: + path: ${{ env.CCACHE_HOME }} key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- ccache-${{ matrix.settings.os }}- - verbose: 2 - name: Build if: matrix.settings.os == 'windows-latest' @@ -270,6 +289,20 @@ jobs: run: | source build/generators/conanbuild.sh cmake --build --preset ${{ env.CONAN_PRESET }} + + - name: CCache Stats + if: matrix.settings.os == 'windows-latest' + shell: cmd + run: | + call build\generators\conanbuild.bat + ccache -d %%HOMEPATH%%\.ccache -svvz + + - name: CCache Stats + if: matrix.settings.os != 'windows-latest' + shell: bash + run: | + source build/generators/conanbuild.sh + ccache -d $HOME/.ccache -svvz - name: Test # Execute tests defined by the CMake configuration. From 7a3585a96d6a0ad042b230eacea6281da3962d77 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 1 Nov 2023 23:03:48 +0100 Subject: [PATCH 027/101] CCache update workflow --- .github/workflows/cmake.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 55d2c2304..7192c325e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -253,7 +253,8 @@ jobs: run: | call build\generators\conanbuild.bat mkdir %%HOMEPATH%%\.ccache - set GITHUB_ENV=%%GITHUB_ENV%%;CCACHE_HOME=%%HOMEPATH%%\.ccache + set CCACHE_DIR=%%HOMEPATH%%\.ccache + echo "CCACHE_HOME=%%HOMEPATH%%\.ccache" >> $GITHUB_ENV - name: CCache Configure if: matrix.settings.os != 'windows-latest' @@ -269,8 +270,9 @@ jobs: uses: actions/cache@v3.3.2 with: path: ${{ env.CCACHE_HOME }} - key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} restore-keys: | + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- From 1fbd4c0ffe07ea212fd6cfb28e3844d28cd45aa5 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 1 Nov 2023 23:24:02 +0100 Subject: [PATCH 028/101] CCache update workflow --- .github/workflows/cmake.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7192c325e..66027f810 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -253,8 +253,8 @@ jobs: run: | call build\generators\conanbuild.bat mkdir %%HOMEPATH%%\.ccache - set CCACHE_DIR=%%HOMEPATH%%\.ccache - echo "CCACHE_HOME=%%HOMEPATH%%\.ccache" >> $GITHUB_ENV + #set CCACHE_DIR=%%HOMEPATH%%\.ccache + #echo "CCACHE_HOME=%%HOMEPATH%%\.ccache" >> $GITHUB_ENV - name: CCache Configure if: matrix.settings.os != 'windows-latest' @@ -267,6 +267,7 @@ jobs: echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV - name: Cache CCache data + if: matrix.settings.os != 'windows-latest' uses: actions/cache@v3.3.2 with: path: ${{ env.CCACHE_HOME }} @@ -278,6 +279,19 @@ jobs: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- ccache-${{ matrix.settings.os }}- + - name: Cache CCache data + if: matrix.settings.os == 'windows-latest' + uses: actions/cache@v3.3.2 + with: + path: C:\Users\runneradmin\AppData\Local\ccache\ + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} + restore-keys: | + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- + ccache-${{ matrix.settings.os }}- + - name: Build if: matrix.settings.os == 'windows-latest' shell: cmd @@ -297,7 +311,7 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat - ccache -d %%HOMEPATH%%\.ccache -svvz + ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz - name: CCache Stats if: matrix.settings.os != 'windows-latest' From 1a11d3e3ec5f047298514ee39917c097280bd397 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 1 Nov 2023 23:30:16 +0100 Subject: [PATCH 029/101] CCache workflow update --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 66027f810..24f74afea 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -253,8 +253,8 @@ jobs: run: | call build\generators\conanbuild.bat mkdir %%HOMEPATH%%\.ccache - #set CCACHE_DIR=%%HOMEPATH%%\.ccache - #echo "CCACHE_HOME=%%HOMEPATH%%\.ccache" >> $GITHUB_ENV +# set CCACHE_DIR=%%HOMEPATH%%\.ccache +# echo "CCACHE_HOME=%%HOMEPATH%%\.ccache" >> $GITHUB_ENV - name: CCache Configure if: matrix.settings.os != 'windows-latest' From 905ec009bfbb840cfab61646d3ea2cc72de8d0e7 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 1 Nov 2023 23:43:39 +0100 Subject: [PATCH 030/101] CCache workflow update --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 24f74afea..28c78ef4e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -240,7 +240,7 @@ jobs: shell: bash run: | source build/generators/conanbuild.sh - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Conan Preset shell: bash From 6b506c6e7c6d407e5adce73bfca553a740d3f55f Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 1 Nov 2023 23:55:26 +0100 Subject: [PATCH 031/101] CCache trigger workflow --- .github/workflows/cmake.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 28c78ef4e..bb1269d60 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -253,8 +253,6 @@ jobs: run: | call build\generators\conanbuild.bat mkdir %%HOMEPATH%%\.ccache -# set CCACHE_DIR=%%HOMEPATH%%\.ccache -# echo "CCACHE_HOME=%%HOMEPATH%%\.ccache" >> $GITHUB_ENV - name: CCache Configure if: matrix.settings.os != 'windows-latest' From a6d0f18d9892a5cee2c64e113ba902c7bcc099aa Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 00:13:43 +0100 Subject: [PATCH 032/101] CCache workflow update --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index bb1269d60..65106b1b2 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -233,7 +233,7 @@ jobs: run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Configure CMake if: matrix.settings.os != 'windows-latest' From 55f42d153ffdbad552a207a01b20266fafacebda Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 00:25:51 +0100 Subject: [PATCH 033/101] CCache workflow trigger --- .github/workflows/cmake.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 65106b1b2..6595032d6 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -288,7 +288,6 @@ jobs: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- - ccache-${{ matrix.settings.os }}- - name: Build if: matrix.settings.os == 'windows-latest' From 4761e74561c18681c57f16258923a6268c137a18 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 00:50:05 +0100 Subject: [PATCH 034/101] CCache update sloppiness --- .github/workflows/cmake.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6595032d6..e538d8b71 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -253,6 +253,10 @@ jobs: run: | call build\generators\conanbuild.bat mkdir %%HOMEPATH%%\.ccache + set CCACHE_DIR=%%HOMEPATH%%\.ccache + set CCACHE_SLOPPINESS=pch_defines,time_macros + echo "CCACHE_HOME=%%HOMEPATH%%\.ccache" >> $env:GITHUB_ENV + ccache -p - name: CCache Configure if: matrix.settings.os != 'windows-latest' @@ -262,7 +266,9 @@ jobs: source build/generators/conanbuild.sh mkdir $HOME/.ccache CCACHE_DIR=$HOME/.ccache + CCACHE_SLOPPINESS=pch_defines,time_macros echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV + ccache -p - name: Cache CCache data if: matrix.settings.os != 'windows-latest' @@ -281,7 +287,8 @@ jobs: if: matrix.settings.os == 'windows-latest' uses: actions/cache@v3.3.2 with: - path: C:\Users\runneradmin\AppData\Local\ccache\ +# path: C:\Users\runneradmin\AppData\Local\ccache\ + path: ${{ env.CCACHE_HOME }} key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- From 3d8a60ecaee4c8570b39e67c89e315fff995b21b Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 01:28:35 +0100 Subject: [PATCH 035/101] CCache update sloppiness --- .github/workflows/cmake.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e538d8b71..fb4154891 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -252,10 +252,10 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat - mkdir %%HOMEPATH%%\.ccache - set CCACHE_DIR=%%HOMEPATH%%\.ccache + mkdir %HOMEPATH%\.ccache + set CCACHE_DIR=%HOMEPATH%\.ccache set CCACHE_SLOPPINESS=pch_defines,time_macros - echo "CCACHE_HOME=%%HOMEPATH%%\.ccache" >> $env:GITHUB_ENV + echo "CCACHE_HOME=%HOMEPATH%\.ccache" >> $env:GITHUB_ENV ccache -p - name: CCache Configure @@ -265,8 +265,8 @@ jobs: run: | source build/generators/conanbuild.sh mkdir $HOME/.ccache - CCACHE_DIR=$HOME/.ccache - CCACHE_SLOPPINESS=pch_defines,time_macros + export CCACHE_DIR=$HOME/.ccache + export CCACHE_SLOPPINESS=pch_defines,time_macros echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p @@ -287,8 +287,8 @@ jobs: if: matrix.settings.os == 'windows-latest' uses: actions/cache@v3.3.2 with: -# path: C:\Users\runneradmin\AppData\Local\ccache\ - path: ${{ env.CCACHE_HOME }} + path: C:\Users\runneradmin\AppData\Local\ccache\ +# path: ${{ env.CCACHE_HOME }} key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- From 842c2886ee7289a81e3a000be4b93a30e82abcdb Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 01:46:19 +0100 Subject: [PATCH 036/101] CCache update workflow windows --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index fb4154891..630af8b7c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -252,10 +252,10 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat - mkdir %HOMEPATH%\.ccache - set CCACHE_DIR=%HOMEPATH%\.ccache +# mkdir %HOMEPATH%\.ccache +# set CCACHE_DIR=%HOMEPATH%\.ccache set CCACHE_SLOPPINESS=pch_defines,time_macros - echo "CCACHE_HOME=%HOMEPATH%\.ccache" >> $env:GITHUB_ENV +# echo "CCACHE_HOME=%HOMEPATH%\.ccache" >> $env:GITHUB_ENV ccache -p - name: CCache Configure From c38c636aa69040ecc03c597e0eaa196732b9268d Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 02:21:18 +0100 Subject: [PATCH 037/101] CCache windows workflow update --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 630af8b7c..9c0cc3146 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -252,11 +252,11 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat + set CCACHE_SLOPPINESS=pch_defines,time_macros + ccache -p # mkdir %HOMEPATH%\.ccache # set CCACHE_DIR=%HOMEPATH%\.ccache - set CCACHE_SLOPPINESS=pch_defines,time_macros # echo "CCACHE_HOME=%HOMEPATH%\.ccache" >> $env:GITHUB_ENV - ccache -p - name: CCache Configure if: matrix.settings.os != 'windows-latest' From 76c0481092352fa424056e29efeaa76de309ebaf Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 14:27:45 +0100 Subject: [PATCH 038/101] CCache update CMake workflow actions and restore keys --- .github/workflows/cmake.yml | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9c0cc3146..92c1c7404 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -87,12 +87,12 @@ jobs: lib: "libc++", } steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.1.1 - uses: seanmiddleditch/gha-setup-ninja@master - name: Cache Conan data - uses: actions/cache@v3 + uses: actions/cache@v3.3.2 env: cache-name: cache-conan-data with: @@ -133,7 +133,7 @@ jobs: - name: Install Clang if: matrix.settings.compiler.type == 'CLANG' - uses: egor-tensin/setup-clang@v1 + uses: egor-tensin/setup-clang@v1.4 with: version: ${{ matrix.settings.compiler.version }} platform: x64 @@ -146,7 +146,7 @@ jobs: - name: Select Xcode ${{matrix.settings.compiler.version}} if: matrix.settings.os == 'macos-latest' - uses: maxim-lobanov/setup-xcode@v1 + uses: maxim-lobanov/setup-xcode@v1.6.0 with: xcode-version: '${{matrix.settings.compiler.version}}' @@ -158,7 +158,7 @@ jobs: sudo apt-get -y install libglu1-mesa-dev - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4.7.1 with: python-version: '3.11' @@ -254,9 +254,6 @@ jobs: call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros ccache -p -# mkdir %HOMEPATH%\.ccache -# set CCACHE_DIR=%HOMEPATH%\.ccache -# echo "CCACHE_HOME=%HOMEPATH%\.ccache" >> $env:GITHUB_ENV - name: CCache Configure if: matrix.settings.os != 'windows-latest' @@ -271,30 +268,22 @@ jobs: ccache -p - name: Cache CCache data - if: matrix.settings.os != 'windows-latest' + if: matrix.settings.os == 'windows-latest' uses: actions/cache@v3.3.2 with: - path: ${{ env.CCACHE_HOME }} + path: C:\Users\runneradmin\AppData\Local\ccache\ key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- - ccache-${{ matrix.settings.os }}- - name: Cache CCache data - if: matrix.settings.os == 'windows-latest' + if: matrix.settings.os != 'windows-latest' uses: actions/cache@v3.3.2 with: - path: C:\Users\runneradmin\AppData\Local\ccache\ -# path: ${{ env.CCACHE_HOME }} + path: ${{ env.CCACHE_HOME }} key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- - name: Build if: matrix.settings.os == 'windows-latest' From e4f655fe5879c93da28da430875d554c64d6ddce Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 15:56:55 +0100 Subject: [PATCH 039/101] CCache update workflow files --- .github/workflows/cmake.yml | 6 +++--- .github/workflows/code_coverage.yml | 33 ++++++++++++++++++++--------- .github/workflows/documentation.yml | 21 +++++------------- 3 files changed, 31 insertions(+), 29 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 92c1c7404..c17652ec1 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -113,20 +113,20 @@ jobs: - name: Add msbuild to PATH if: matrix.settings.os == 'windows-latest' - uses: microsoft/setup-msbuild@v1.3 + uses: microsoft/setup-msbuild@v1.3.1 with: vs-version: "16.5" - name: Install Latest GCC if: matrix.settings.compiler.type == 'GCC' - uses: egor-tensin/setup-gcc@v1 + uses: egor-tensin/setup-gcc@v1.3 with: version: ${{ matrix.settings.compiler.version }} platform: x64 - name: Install Latest libstdC++11 if: matrix.settings.compiler.type == 'CLANG' && matrix.settings.lib == 'libstdc++11' - uses: egor-tensin/setup-gcc@v1 + uses: egor-tensin/setup-gcc@v1.3 with: version: 12 platform: x64 diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index e2d9fecea..27a3aebd8 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -42,12 +42,12 @@ jobs: os: [ "ubuntu-latest" ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.1.1 - uses: seanmiddleditch/gha-setup-ninja@master - name: Cache Conan data - uses: actions/cache@v3 + uses: actions/cache@v3.3.2 env: cache-name: cache-conan-data with: @@ -142,18 +142,25 @@ jobs: # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh - cmake --preset ${{ env.CONAN_PRESET }} -DENABLE_CODE_COVERAGE=1 + cmake --preset ${{ env.CONAN_PRESET }} -DENABLE_CODE_COVERAGE=1 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + + - name: CCache Configure + shell: bash + run: | + source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh + mkdir $HOME/.ccache + export CCACHE_DIR=$HOME/.ccache + export CCACHE_SLOPPINESS=pch_defines,time_macros + echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV + ccache -p - name: Cache CCache data - uses: hendrikmuhs/ccache-action@v1.2.10 + uses: actions/cache@v3.3.2 with: - key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + path: ${{ env.CCACHE_HOME }} + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} restore-keys: | - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- - ccache-${{ matrix.settings.os }}- - verbose: 2 + ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- - name: Build # Build your program with the given configuration @@ -161,6 +168,12 @@ jobs: source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh cmake --build --preset ${{ env.CONAN_PRESET }} + - name: CCache Stats + shell: bash + run: | + source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh + ccache -d $HOME/.ccache -svvz + - name: Test working-directory: ${{github.workspace}} # Execute tests defined by the CMake configuration. diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 6005d991b..63ac39a44 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -41,12 +41,12 @@ jobs: os: [ "ubuntu-latest" ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@4.1.1 - uses: seanmiddleditch/gha-setup-ninja@master - name: Cache Conan data - uses: actions/cache@v3 + uses: actions/cache@v3.3.2 env: cache-name: cache-conan-data with: @@ -59,7 +59,7 @@ jobs: ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}- - name: Install Latest GCC - uses: egor-tensin/setup-gcc@v1 + uses: egor-tensin/setup-gcc@v1.3 with: version: ${{ env.COMPILER_VERSION }} platform: x64 @@ -72,7 +72,7 @@ jobs: sudo apt-get -y install libglu1-mesa-dev - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4.7.1 with: python-version: '3.11' @@ -101,17 +101,6 @@ jobs: run: | conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.3.2 -o build_docs=True - - name: Cache CCache data - uses: hendrikmuhs/ccache-action@v1.2.10 - with: - key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} - restore-keys: | - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}- - ccache-${{ matrix.settings.os }}- - verbose: 2 - - name: Configure Conan Build shell: bash working-directory: ${{github.workspace}} @@ -134,7 +123,7 @@ jobs: - name: Deploy documentation if: github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v3.9.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build/documentation/sphinx From aaf5516931b503f08cfc9751ee0c59a9efea3b0d Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 16:00:18 +0100 Subject: [PATCH 040/101] CCache actions checkout fix --- .github/workflows/documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 63ac39a44..018a877e5 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -41,7 +41,7 @@ jobs: os: [ "ubuntu-latest" ] steps: - - uses: actions/checkout@4.1.1 + - uses: actions/checkout@v4.1.1 - uses: seanmiddleditch/gha-setup-ninja@master From ccb1f1c003f17489d9b619e9c3eb9a79aac89bf1 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 21:44:57 +0100 Subject: [PATCH 041/101] Update build instructions for Windows --- README.md | 1 + VisualStudioInstall.png | Bin 0 -> 14770 bytes WINDOWS.md | 58 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 VisualStudioInstall.png create mode 100644 WINDOWS.md diff --git a/README.md b/README.md index 154228f89..e9974952d 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ cmake --build --preset conan-debug ### Multi-Config Build Multi-config builds allow you to create a build folder containing sub-folders for different build configurations and build them side-by-side. Once again starting with the repository clone and Conan configured run the install stage, but this time we specity the Conan cmake tools use Ninja multi-config to generate `Release, Debug, RelWithDebInfo` configurations. To generate all 3 configuration we run the `conan-default` preset which configures CMake for these configurations. +Instructions about how to build the library with Visual Studio and Ninja Multi-Config can be found [here](./WINDOWS.md) ```bash conan install ./ -pr:h .conan2/profiles/msvc/193/x64-release -pr:b .conan2/profiles/msvc/193/x64-release --build missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" source build/generators/conanbuild.sh # Access the environment variables needed to use the Mold linker with gcc and clang diff --git a/VisualStudioInstall.png b/VisualStudioInstall.png new file mode 100644 index 0000000000000000000000000000000000000000..f366428c73bcc20bad53e9d4f9d563517a0802cd GIT binary patch literal 14770 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 literal 0 HcmV?d00001 diff --git a/WINDOWS.md b/WINDOWS.md new file mode 100644 index 000000000..9fa61efba --- /dev/null +++ b/WINDOWS.md @@ -0,0 +1,58 @@ +## Visual Studio and Ninja Multi-Config Build Instructions + +The build use CMake for build system generation and Conan 2 for dependency management. Prerequisites for building are: + - A supported C++ compiler + * GCC, 11.x and later + * Clang, 14.x and later + * MSCV, 2022 and later + - Python + - Git + +Visual Studio 2022 can be downloaded from Microsoft [website](https://visualstudio.microsoft.com/vs/community/) +A minimum working installation to support the project build will have the following details: +![](./VisualStudioInstall.png) + +In general you can use your own [Conan profile](https://docs.conan.io/2/reference/commands/profile.html) but the project ships with profiles for all supported configurations. I you use your own profile then ensure that if you are building again libstdc++ with GCC or Clang that you build on the C++11 and onwards version. To do so insert the following into your Conan profile under the `[settings]` section: + +``` +compiler.libcxx=libstdc++11 +``` + +However, preferably use one of the pre-installed configurations in `/.conan/profiles` (which are installed via the `conan config install ./conan` command to the local conan configuration folder ./.conan2 as specified in the ./.conanrc file) as these are tested and known to work. + +### Cloning the Repo + +To clone the repo use git to clone the repository to your local machine: + +```bash +git clone https://github.com/Twon/Morpheus.git +``` + +### Configuring Conan + +To set up Conan for the repository create a repository local virtual environment for Python and [activate the environment (note this step differs for different shells)](https://docs.python.org/3/library/venv.html#how-venvs-work) +For Windows build with Visual Studio run the [Developer Command Prompt for Visual Studio 2022](https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022#start-in-visual-studio) + +```bash +cd +python -m venv .venv # Create a Python virtual env +.venv\Scripts\activate.bat # Activate the virtual env for bash by source. +pip install -r ./requirements.txt # Install all Python dependecies +conan profile detect --force # Generate a default configuration with the local machine settings +conan config install ./.conan # Install supported build profiles from ./.conan to ./conan2 +``` + +### Multi-Config Build + +Multi-config builds allow you to create a build folder containing sub-folders for different build configurations and build them side-by-side. Once again starting with the repository clone and Conan configured run the install stage, but this time we specity the Conan cmake tools use Ninja multi-config to generate `Release, Debug, RelWithDebInfo` configurations. To generate all 3 configuration we run the `conan-default` preset which configures CMake for these configurations. + +```bash +conan install ./ -pr:h .conan2/profiles/msvc/193/x64-release -pr:b .conan2/profiles/msvc/193/x64-release --build missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" +source build/generators/conanbuild.sh # Access the environment variables needed to use the Mold linker with gcc and clang +cmake --preset conan-default # The configure stage for multi-config builds is conan-default +``` + +Now with CMake configured we select the preset conresponding to the configuration we want to build, in this case the `Release` configuration. +```bash +cmake --build --preset conan-release # The build stage for multi-config builds is the conan- +``` From d52391b6c3f5c9ff81dc337a2ccf3e03f85504f5 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 23:07:00 +0100 Subject: [PATCH 042/101] CCache fine tuning: increase the cache hit rate with CCACHE_NOHASHDIR option --- .github/workflows/cmake.yml | 2 ++ .github/workflows/code_coverage.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c17652ec1..50e9a5960 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -253,6 +253,7 @@ jobs: run: | call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros + set CCACHE_NOHASHDIR=1 ccache -p - name: CCache Configure @@ -264,6 +265,7 @@ jobs: mkdir $HOME/.ccache export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros + export CCACHE_NOHASHDIR=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 27a3aebd8..5bc55bbdf 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -151,6 +151,7 @@ jobs: mkdir $HOME/.ccache export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros + export CCACHE_NOHASHDIR=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p From f07199a65be4aac574697694a0f6de6d33b913bf Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 23:20:45 +0100 Subject: [PATCH 043/101] CCache NOHASHDIR switch update --- CMakeLists.txt | 6 +++++- cmake/ccache.cmake | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3123be4c..f8122a029 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,9 +105,10 @@ if (MORPHEUS_BUILD_WITH_CCACHE) if (MORPHEUS_BUILD_WITH_ICECC) option(CCACHE_ICECC "CCache build with Icecream" ON) endif() - option(CCACHE_SLOPPINESS "CCache sloppiness enabled" ON) option(CCACHE_LOGFILE "CCache logfile enabled" OFF) + option(CCACHE_NOHASHDIR "CCache do not hash current working directory" ON) option(CCACHE_RECACHE "CCache forced recache" OFF) + option(CCACHE_SLOPPINESS "CCache sloppiness enabled" ON) if (CCACHE_DEBUG) list(APPEND OPTIONS DEBUG) @@ -115,6 +116,9 @@ if (MORPHEUS_BUILD_WITH_CCACHE) if (CCACHE_ICECC) list(APPEND OPTIONS ICECC) endif() + if (CCACHE_NOHASHDIR) + list(APPEND OPTIONS NOHASHDIR) + endif() if (CCACHE_SLOPPINESS) list(APPEND OPTIONS SLOPPINESS) endif() diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 3f71f44ca..fa4deda94 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -77,6 +77,10 @@ function(enable_ccache) message(STATUS "Morpheus: Enable CCache logfile") list(APPEND ccacheEnv "CCACHE_LOGFILE=CCache_log.txt") endif() + if (CCACHE_NOHASDIR) + message(STATUS "Morpheus: CCache do not hash current working directory") + list(APPEND ccacheEnv "CCACHE_NOHASHDIR=1") + endif() if (CCACHE_RECACHE) message(STATUS "Morpheus: Enable CCache forced recache") list(APPEND ccacheEnv "CCACHE_RECACHE=1") From 5ee82877d7566c84b55c89e9f6926da20ad6a201 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 23:41:41 +0100 Subject: [PATCH 044/101] Trigger workflow recache --- .github/workflows/cmake.yml | 2 ++ .github/workflows/code_coverage.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 50e9a5960..891dfce95 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -254,6 +254,7 @@ jobs: call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 + set CCACHE_RECACHE=1 ccache -p - name: CCache Configure @@ -266,6 +267,7 @@ jobs: export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros export CCACHE_NOHASHDIR=1 + export CCACHE_RECACHE=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 5bc55bbdf..76770646b 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -152,6 +152,7 @@ jobs: export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros export CCACHE_NOHASHDIR=1 + export CCACHE_RECACHE=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p From 951645ca4aaf32993755c139a72f8cb7b272e226 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 2 Nov 2023 23:58:18 +0100 Subject: [PATCH 045/101] CCache workflow restore --- .github/workflows/cmake.yml | 4 ++-- .github/workflows/code_coverage.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 891dfce95..45c1625d9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -254,7 +254,7 @@ jobs: call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 - set CCACHE_RECACHE=1 + #set CCACHE_RECACHE=1 ccache -p - name: CCache Configure @@ -267,7 +267,7 @@ jobs: export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros export CCACHE_NOHASHDIR=1 - export CCACHE_RECACHE=1 + #export CCACHE_RECACHE=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 76770646b..628529292 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -152,7 +152,7 @@ jobs: export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros export CCACHE_NOHASHDIR=1 - export CCACHE_RECACHE=1 + #export CCACHE_RECACHE=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p From d53e37f6bc0e0668b6fb6dc9949bc171777c9066 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 3 Nov 2023 22:45:30 +0100 Subject: [PATCH 046/101] Ccache activate logfile to investigate cache miss --- .github/workflows/cmake.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 45c1625d9..906ca56ee 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -254,6 +254,7 @@ jobs: call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 + set CCACHE_LOGFILE=C:\Users\runneradmin\AppData\Local\ccache\CcacheLogFile.log #set CCACHE_RECACHE=1 ccache -p @@ -267,6 +268,7 @@ jobs: export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros export CCACHE_NOHASHDIR=1 + export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log #export CCACHE_RECACHE=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p @@ -309,6 +311,8 @@ jobs: run: | call build\generators\conanbuild.bat ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz + type C:\Users\runneradmin\AppData\Local\ccache\CcacheLogFile.log + rm C:\Users\runneradmin\AppData\Local\ccache\CcacheLogFile.log - name: CCache Stats if: matrix.settings.os != 'windows-latest' @@ -316,6 +320,8 @@ jobs: run: | source build/generators/conanbuild.sh ccache -d $HOME/.ccache -svvz + cat $HOME/.ccache/CcacheLogFile.log + rm $HOME/.ccache/CcacheLogFile.log - name: Test # Execute tests defined by the CMake configuration. From f6edb3e8259614191e72ca5606cd235265e6ee0a Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 3 Nov 2023 23:28:44 +0100 Subject: [PATCH 047/101] Ccache activate logfile --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 906ca56ee..cf63ddd4d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -254,7 +254,7 @@ jobs: call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 - set CCACHE_LOGFILE=C:\Users\runneradmin\AppData\Local\ccache\CcacheLogFile.log + set CCACHE_LOGFILE=C:\\Users\\runneradmin\\AppData\\Local\\ccache\\CcacheLogFile.log #set CCACHE_RECACHE=1 ccache -p @@ -278,7 +278,7 @@ jobs: uses: actions/cache@v3.3.2 with: path: C:\Users\runneradmin\AppData\Local\ccache\ - key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.run_number }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- @@ -287,7 +287,7 @@ jobs: uses: actions/cache@v3.3.2 with: path: ${{ env.CCACHE_HOME }} - key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} + key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.run_number }} restore-keys: | ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- From 3e5b0fb6edbd62aee763ff77e6a20ee68a59745b Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 3 Nov 2023 23:51:44 +0100 Subject: [PATCH 048/101] Ccache logfile update --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index cf63ddd4d..36977a75a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -254,7 +254,7 @@ jobs: call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 - set CCACHE_LOGFILE=C:\\Users\\runneradmin\\AppData\\Local\\ccache\\CcacheLogFile.log + set CCACHE_LOGFILE=D:/a/Morpheus/Morpheus/build/CcacheLogFile.log #set CCACHE_RECACHE=1 ccache -p @@ -311,8 +311,8 @@ jobs: run: | call build\generators\conanbuild.bat ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz - type C:\Users\runneradmin\AppData\Local\ccache\CcacheLogFile.log - rm C:\Users\runneradmin\AppData\Local\ccache\CcacheLogFile.log + type D:/a/Morpheus/Morpheus/build/CcacheLogFile.log + rm D:/a/Morpheus/Morpheus/build/CcacheLogFile.log - name: CCache Stats if: matrix.settings.os != 'windows-latest' From 22fdcd5b7f57ef31f254f8bc7c2b4db415b5cc80 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sat, 4 Nov 2023 00:51:42 +0100 Subject: [PATCH 049/101] Ccache logfile --- .github/workflows/cmake.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 36977a75a..20ce119bb 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -254,7 +254,7 @@ jobs: call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 - set CCACHE_LOGFILE=D:/a/Morpheus/Morpheus/build/CcacheLogFile.log + set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log #set CCACHE_RECACHE=1 ccache -p @@ -311,8 +311,7 @@ jobs: run: | call build\generators\conanbuild.bat ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz - type D:/a/Morpheus/Morpheus/build/CcacheLogFile.log - rm D:/a/Morpheus/Morpheus/build/CcacheLogFile.log + type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log - name: CCache Stats if: matrix.settings.os != 'windows-latest' @@ -321,7 +320,6 @@ jobs: source build/generators/conanbuild.sh ccache -d $HOME/.ccache -svvz cat $HOME/.ccache/CcacheLogFile.log - rm $HOME/.ccache/CcacheLogFile.log - name: Test # Execute tests defined by the CMake configuration. From 38a892e46ab5276f7405b2dc5cf8f644288e1d65 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sat, 4 Nov 2023 09:26:52 +0100 Subject: [PATCH 050/101] Ccache logfile --- .github/workflows/cmake.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 20ce119bb..9d7602e49 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -311,6 +311,7 @@ jobs: run: | call build\generators\conanbuild.bat ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz + dir D:\a\Morpheus\Morpheus\build type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log - name: CCache Stats @@ -319,6 +320,7 @@ jobs: run: | source build/generators/conanbuild.sh ccache -d $HOME/.ccache -svvz + ls -la $HOME/.ccache cat $HOME/.ccache/CcacheLogFile.log - name: Test From 98fefc5ce3a053698f88f47f1333ee86b4672518 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sat, 4 Nov 2023 09:45:29 +0100 Subject: [PATCH 051/101] Ccache logfile --- .github/workflows/cmake.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9d7602e49..2dae3aab7 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -313,6 +313,8 @@ jobs: ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz dir D:\a\Morpheus\Morpheus\build type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log + rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log + dir D:\a\Morpheus\Morpheus\build - name: CCache Stats if: matrix.settings.os != 'windows-latest' @@ -322,6 +324,8 @@ jobs: ccache -d $HOME/.ccache -svvz ls -la $HOME/.ccache cat $HOME/.ccache/CcacheLogFile.log + rm $HOME/.ccache/CcacheLogFile.log + ls -la $HOME/.ccache - name: Test # Execute tests defined by the CMake configuration. From d399324035e9bf710ccb0922c9aab397bb6c4a32 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sun, 19 Nov 2023 22:45:45 +0100 Subject: [PATCH 052/101] code simplification --- CMakeLists.txt | 41 ++++++++++++----------------------- cmake/ccache.cmake | 54 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 57 insertions(+), 38 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8122a029..e471b31f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,6 @@ include(CMakePackageConfigHelpers) option(MORPHEUS_BUILD_WITH_CCACHE "Enable the CCache compiler caching" ON) option(MORPHEUS_LINK_WITH_MOLD "Enable the mold linker" ON) -# Icecream will be used only with CCache -cmake_dependent_option(MORPHEUS_BUILD_WITH_ICECC "Enable build with Icecream" ON "MORPHEUS_BUILD_WITH_CCACHE" OFF) cmake_dependent_option(MORPHEUS_CODE_COVERAGE "Enable code coverage" ON "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\" OR \"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"GNU\"" OFF) cmake_dependent_option(MORPHEUS_INCLUDE_NATVIS "Enable inclusion of a natvis files for debugging" ON "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"MSVC\"" OFF) @@ -98,32 +96,21 @@ endif() add_subdirectory(libraries) add_subdirectory(examples) -# CCache / Icecream options management -set(LANGUAGES CXX) +#[[ +Ccache / Icecream options management +In order to add/remove configuration options for ccache call the function enable_ccache with the following parameters: +DEBUG to enable debugging +ICECC to enable Icecream build support +LOGFILE to enable ccache logging to file +NOHASHDIR to exclude the current working directory from the cache hash +QUIET Searches for the ccache executable, and if found enables it for supported language with specified options +RECACHE ccache will not use any previously stored result. New results will overwrite any pre-existing results +SLOPPINESS ccache to relax some checks in order to increase the hit rate of cache hits +reference documentation: https://ccache.dev/documentation.html +]] if (MORPHEUS_BUILD_WITH_CCACHE) - option(CCACHE_DEBUG "CCache debug enabled" OFF) - if (MORPHEUS_BUILD_WITH_ICECC) - option(CCACHE_ICECC "CCache build with Icecream" ON) - endif() - option(CCACHE_LOGFILE "CCache logfile enabled" OFF) - option(CCACHE_NOHASHDIR "CCache do not hash current working directory" ON) - option(CCACHE_RECACHE "CCache forced recache" OFF) - option(CCACHE_SLOPPINESS "CCache sloppiness enabled" ON) - - if (CCACHE_DEBUG) - list(APPEND OPTIONS DEBUG) - endif() - if (CCACHE_ICECC) - list(APPEND OPTIONS ICECC) - endif() - if (CCACHE_NOHASHDIR) - list(APPEND OPTIONS NOHASHDIR) - endif() - if (CCACHE_SLOPPINESS) - list(APPEND OPTIONS SLOPPINESS) - endif() - - enable_ccache(LANGUAGES OPTIONS) + set(LANGUAGES CXX) + enable_ccache(QUIET LANGUAGES ICECC NOHASHDIR SLOPPINESS) endif() if (ENABLE_CODE_COVERAGE) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index fa4deda94..2fdcd1c9c 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -30,19 +30,32 @@ Enable use of Ccache for compiler caching during the build process. .. code-block:: cmake enable_ccacche( + [DEBUG] + [ICECC] + [LOGFILE] + [NOHASDIR] [QUIET] + [RECACHE] + [SLOPPINESS] ) -- Searches for the ccache executable, and if found enables it for supported language with specified options. - ``QUIET`` Silent output from this method. + ``DEBUG`` to enable debugging. + ``ICECC`` to enable Icecream build support. + ``LOGFILE`` to enable ccache logging to file ${CMAKE_BINARY_DIR}/CCache_log.txt. + ``NOHASHDIR`` to exclude the current working directory from the cache hash. + ``QUIET`` Silent output from this method if ccache build is enabled. + ``RECACHE`` ccache will not use any previously stored result. New results will overwrite any pre-existing results. + ``SLOPPINESS`` ccache to relax some checks in order to increase the hit rate of cache hits: pch_defines,time_macros. + Please refer to `ccache documentation `_ for more details about options. #]=======================================================================] function(enable_ccache) - set(options QUIET) + set(options DEBUG ICECC LOGFILE NOHASHDIR QUIET RECACHE SLOPPINESS) set(oneValueArgs) - set(multiValueArgs LANGUAGES OPTIONS) - cmake_parse_arguments(CCACHE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + set(multiValueArgs LANGUAGES) + cmake_parse_arguments(CCACHE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if (CCACHE_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Morpheus: enable_ccache invalid arguments ${CCACHE_UNPARSED_ARGUMENTS}") @@ -54,12 +67,16 @@ function(enable_ccache) message(DEBUG "Morpheus: If CCache compiler cache is desired then ensure this is a supported platform and ensure the Conan buildenv is active") return() endif() - message(STATUS "Morpheus: CCache found: ${CCACHE_BIN}. Enabling ccache as compiler cache tool.") + + if (NOT CCACHE_QUIET) + message(STATUS "Morpheus: CCache found: ${CCACHE_BIN}. Enabling ccache as compiler cache tool.") + endif() if (CCACHE_DEBUG) message(STATUS "Morpheus: Create CCache debug files") list(APPEND ccacheEnv "CCACHE_DEBUG=1") endif() + if (CCACHE_ICECC) find_program(ICECC_BIN icecc) if (ICECC_BIN) @@ -69,23 +86,27 @@ function(enable_ccache) message(STATUS "Morpheus: Icecream executable not found") endif() endif() - if (CCACHE_SLOPPINESS) - message(STATUS "Morpheus: Enable CCache sloppiness") - list(APPEND ccacheEnv "CCACHE_SLOPPINESS=pch_defines,time_macros") - endif() + if (CCACHE_LOGFILE) message(STATUS "Morpheus: Enable CCache logfile") - list(APPEND ccacheEnv "CCACHE_LOGFILE=CCache_log.txt") + list(APPEND ccacheEnv "CCACHE_LOGFILE=${CMAKE_BINARY_DIR}/CCache_log.txt") endif() + if (CCACHE_NOHASDIR) message(STATUS "Morpheus: CCache do not hash current working directory") list(APPEND ccacheEnv "CCACHE_NOHASHDIR=1") endif() + if (CCACHE_RECACHE) message(STATUS "Morpheus: Enable CCache forced recache") list(APPEND ccacheEnv "CCACHE_RECACHE=1") endif() + if (CCACHE_SLOPPINESS) + message(STATUS "Morpheus: Enable CCache sloppiness") + list(APPEND ccacheEnv "CCACHE_SLOPPINESS=pch_defines,time_macros") + endif() + foreach(lang IN ITEMS C CXX OBJC OBJCXX) if (CMAKE_${lang}_COMPILER_ID MATCHES "Clang") add_compile_options("$<$:SHELL:-Xclang -fno-pch-timestamp>") @@ -94,6 +115,7 @@ function(enable_ccache) if (MSVC) message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME} and MSVC ${MSVC}") + foreach(lang IN ITEMS C CXX) foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES) set(var CMAKE_${lang}_FLAGS) @@ -105,6 +127,7 @@ function(enable_ccache) set(${var} "${${var}}" CACHE STRING "Morpheus: Compile flags for MSVC" FORCE) endforeach() endforeach() + if (DEFINED CMAKE_MSVC_DEBUG_INFORMATION_FORMAT) string(REGEX REPLACE "ProgramDatabase|EditAndContinue" "Embedded" replaced "${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}") set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "${replaced}" CACHE STRING "Morpheus: Compile flags for MSVC" FORCE) @@ -115,11 +138,13 @@ function(enable_ccache) if (${CMAKE_GENERATOR} MATCHES "Ninja|Ninja Multi-Config|Makefiles") message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") + foreach(lang IN ITEMS ${LANGUAGES}) set(CMAKE_${lang}_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_BIN} CACHE STRING "Morpheus compiler launcher" FORCE) endforeach() elseif (${CMAKE_GENERATOR} STREQUAL "Xcode") message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") + foreach(lang IN ITEMS ${LANGUAGES}) set(launch${lang} ${CMAKE_BINARY_DIR}/launch-${lang}) file(WRITE ${launch${lang}} "#!/bin/bash\n\n") @@ -136,17 +161,22 @@ function(enable_ccache) endif() endforeach() elseif (${CMAKE_GENERATOR} MATCHES "Visual Studio") - message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") + message(STATUS "Morpheus: found generator ${CMAKE_GENERATOR} and OS ${CMAKE_HOST_SYSTEM_NAME}") + cmake_path(NATIVE_PATH CCACHE_BIN ccache_exe) file(WRITE ${CMAKE_BINARY_DIR}/launch-cl.cmd "@echo off\n") + foreach(envVal IN ITEMS ${ccacheEnv}) file(APPEND ${CMAKE_BINARY_DIR}/launch-cl.cmd "set ${envVal}\n") endforeach() + foreach(lang IN ITEMS ${LANGUAGES}) file(APPEND ${CMAKE_BINARY_DIR}/launch-cl.cmd "\"${ccache_exe}\" \"${CMAKE_${lang}_COMPILER}\" %*\n") endforeach() + list(FILTER CMAKE_VS_GLOBALS EXCLUDE REGEX "^(CLTool(Path|Exe)|TrackFileAccess|UseMultiToolTask|DebugInformationFormat|EnforceProcessCountAcrossBuilds)=.*$" ) + list(APPEND CMAKE_VS_GLOBALS CLToolPath=${CMAKE_BINARY_DIR} CLToolExe=launch-cl.cmd @@ -155,6 +185,8 @@ function(enable_ccache) TrackFileAccess=false UseMultiToolTask=true ) + set(CMAKE_VS_GLOBALS "${CMAKE_VS_GLOBALS}" CACHE STRING "Morpheus: Variables for Visual Studio" FORCE) endif() + endfunction() From c4d2bade1a18023ec78cb0832e5732ecec8582a9 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Thu, 23 Nov 2023 22:52:46 +0100 Subject: [PATCH 053/101] replicate ccache env variables in CI build step --- .github/workflows/cmake.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2dae3aab7..56bdc2721 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -296,6 +296,14 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat + + call build\generators\conanbuild.bat + set CCACHE_SLOPPINESS=pch_defines,time_macros + set CCACHE_NOHASHDIR=1 + set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log + #set CCACHE_RECACHE=1 + ccache -p + cmake --build --preset ${{ env.CONAN_PRESET }} - name: Build @@ -303,6 +311,15 @@ jobs: shell: bash run: | source build/generators/conanbuild.sh + + export CCACHE_DIR=$HOME/.ccache + export CCACHE_SLOPPINESS=pch_defines,time_macros + export CCACHE_NOHASHDIR=1 + export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log + #export CCACHE_RECACHE=1 + echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV + ccache -p + cmake --build --preset ${{ env.CONAN_PRESET }} - name: CCache Stats From da773f47e1469e144029ff062a1dce0e4b8eb509 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Thu, 23 Nov 2023 23:03:16 +0100 Subject: [PATCH 054/101] retrigger CI --- .github/workflows/cmake.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 56bdc2721..fefa5f2f4 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -296,7 +296,6 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat - call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 @@ -319,7 +318,7 @@ jobs: #export CCACHE_RECACHE=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p - + cmake --build --preset ${{ env.CONAN_PRESET }} - name: CCache Stats From 0328d2e1abfdd46326645b9a7bf003ecb960eb3d Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sat, 25 Nov 2023 14:05:05 +0100 Subject: [PATCH 055/101] cmake workflow update --- .github/workflows/cmake.yml | 56 +++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index fefa5f2f4..7d0b7ad85 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -246,32 +246,32 @@ jobs: shell: bash run: echo "CONAN_PRESET=conan-$(echo ${{matrix.configuration}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - - name: CCache Configure - if: matrix.settings.os == 'windows-latest' - id: ccache-config-windows - shell: cmd - run: | - call build\generators\conanbuild.bat - set CCACHE_SLOPPINESS=pch_defines,time_macros - set CCACHE_NOHASHDIR=1 - set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log - #set CCACHE_RECACHE=1 - ccache -p - - - name: CCache Configure - if: matrix.settings.os != 'windows-latest' - id: ccache-config-linux - shell: bash - run: | - source build/generators/conanbuild.sh - mkdir $HOME/.ccache - export CCACHE_DIR=$HOME/.ccache - export CCACHE_SLOPPINESS=pch_defines,time_macros - export CCACHE_NOHASHDIR=1 - export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log - #export CCACHE_RECACHE=1 - echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV - ccache -p +# - name: CCache Configure +# if: matrix.settings.os == 'windows-latest' +# id: ccache-config-windows +# shell: cmd +# run: | +# call build\generators\conanbuild.bat +# set CCACHE_SLOPPINESS=pch_defines,time_macros +# set CCACHE_NOHASHDIR=1 +# set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log +# #set CCACHE_RECACHE=1 +# ccache -p + +# - name: CCache Configure +# if: matrix.settings.os != 'windows-latest' +# id: ccache-config-linux +# shell: bash +# run: | +# source build/generators/conanbuild.sh +# mkdir $HOME/.ccache +# export CCACHE_DIR=$HOME/.ccache +# export CCACHE_SLOPPINESS=pch_defines,time_macros +# export CCACHE_NOHASHDIR=1 +# export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log +# #export CCACHE_RECACHE=1 +# echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV +# ccache -p - name: Cache CCache data if: matrix.settings.os == 'windows-latest' @@ -295,14 +295,12 @@ jobs: if: matrix.settings.os == 'windows-latest' shell: cmd run: | - call build\generators\conanbuild.bat call build\generators\conanbuild.bat set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log #set CCACHE_RECACHE=1 ccache -p - cmake --build --preset ${{ env.CONAN_PRESET }} - name: Build @@ -310,7 +308,6 @@ jobs: shell: bash run: | source build/generators/conanbuild.sh - export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros export CCACHE_NOHASHDIR=1 @@ -318,7 +315,6 @@ jobs: #export CCACHE_RECACHE=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p - cmake --build --preset ${{ env.CONAN_PRESET }} - name: CCache Stats From 4c87ca177e414103a4d2544c8cb94acd6960c6a2 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sat, 25 Nov 2023 14:23:29 +0100 Subject: [PATCH 056/101] fix missing Linux ccache directory --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 1f56d5411..388f42d49 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -308,6 +308,7 @@ jobs: shell: bash run: | source build/generators/conanbuild.sh + mkdir $HOME/.ccache export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros export CCACHE_NOHASHDIR=1 From 460b9c2c89750f4cd0994c44765585c0c8e42064 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sat, 25 Nov 2023 15:09:30 +0100 Subject: [PATCH 057/101] Cmake workflow update --- .github/workflows/cmake.yml | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 388f42d49..de2a632fc 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -258,20 +258,13 @@ jobs: # #set CCACHE_RECACHE=1 # ccache -p -# - name: CCache Configure -# if: matrix.settings.os != 'windows-latest' -# id: ccache-config-linux -# shell: bash -# run: | -# source build/generators/conanbuild.sh -# mkdir $HOME/.ccache -# export CCACHE_DIR=$HOME/.ccache -# export CCACHE_SLOPPINESS=pch_defines,time_macros -# export CCACHE_NOHASHDIR=1 -# export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log -# #export CCACHE_RECACHE=1 -# echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV -# ccache -p + - name: CCache Configure + if: matrix.settings.os != 'windows-latest' + id: ccache-config-linux + shell: bash + run: | + mkdir $HOME/.ccache + echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV - name: Cache CCache data if: matrix.settings.os == 'windows-latest' @@ -308,13 +301,11 @@ jobs: shell: bash run: | source build/generators/conanbuild.sh - mkdir $HOME/.ccache export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros export CCACHE_NOHASHDIR=1 export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log #export CCACHE_RECACHE=1 - echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -324,10 +315,10 @@ jobs: run: | call build\generators\conanbuild.bat ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz - dir D:\a\Morpheus\Morpheus\build + #dir D:\a\Morpheus\Morpheus\build type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log - rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log - dir D:\a\Morpheus\Morpheus\build + #rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log + #dir D:\a\Morpheus\Morpheus\build - name: CCache Stats if: matrix.settings.os != 'windows-latest' @@ -335,10 +326,10 @@ jobs: run: | source build/generators/conanbuild.sh ccache -d $HOME/.ccache -svvz - ls -la $HOME/.ccache + #ls -la $HOME/.ccache cat $HOME/.ccache/CcacheLogFile.log - rm $HOME/.ccache/CcacheLogFile.log - ls -la $HOME/.ccache + #rm $HOME/.ccache/CcacheLogFile.log + #ls -la $HOME/.ccache - name: Setup tmate session uses: mxschmitt/action-tmate@v3 From 70e3cd75bf88467efd020ad0ff5b2e6fe3b1543c Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sat, 25 Nov 2023 15:22:06 +0100 Subject: [PATCH 058/101] code_coverage workflow update --- .github/workflows/code_coverage.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 628529292..8ae4bb9c0 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -149,12 +149,7 @@ jobs: run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh mkdir $HOME/.ccache - export CCACHE_DIR=$HOME/.ccache - export CCACHE_SLOPPINESS=pch_defines,time_macros - export CCACHE_NOHASHDIR=1 - #export CCACHE_RECACHE=1 echo "CCACHE_HOME=$HOME/.ccache" >> $GITHUB_ENV - ccache -p - name: Cache CCache data uses: actions/cache@v3.3.2 @@ -166,8 +161,15 @@ jobs: - name: Build # Build your program with the given configuration + shell: bash run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh + export CCACHE_DIR=$HOME/.ccache + export CCACHE_SLOPPINESS=pch_defines,time_macros + export CCACHE_NOHASHDIR=1 + export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log + #export CCACHE_RECACHE=1 + ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} - name: CCache Stats @@ -175,6 +177,10 @@ jobs: run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh ccache -d $HOME/.ccache -svvz + ls -la $HOME/.ccache + cat $HOME/.ccache/CcacheLogFile.log + rm $HOME/.ccache/CcacheLogFile.log + ls -la $HOME/.ccache - name: Test working-directory: ${{github.workspace}} From 1f3a8bf77c14d18d513959f500aabc2995c005a7 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sat, 25 Nov 2023 15:55:34 +0100 Subject: [PATCH 059/101] code_coverage workflow update --- .github/workflows/code_coverage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 8ae4bb9c0..3690cf865 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -155,9 +155,9 @@ jobs: uses: actions/cache@v3.3.2 with: path: ${{ env.CCACHE_HOME }} - key: ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}-${{ github.sha }} + key: ccache-${{ matrix.settings.os }}-${{ github.run_number }} restore-keys: | - ccache-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}- + ccache-${{ matrix.settings.os }}- - name: Build # Build your program with the given configuration From 37da3b24fcf5f8d50eb0f51cda69817ff57fd8ca Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sat, 25 Nov 2023 16:06:25 +0100 Subject: [PATCH 060/101] triggering recache for windows --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index de2a632fc..e2c6e7168 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -292,7 +292,7 @@ jobs: set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log - #set CCACHE_RECACHE=1 + set CCACHE_RECACHE=1 ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} From 6a5ff5654f5b3be5715d2bcd5222c75371979b32 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sat, 25 Nov 2023 16:20:36 +0100 Subject: [PATCH 061/101] restore CCACHE_RECACHE --- .github/workflows/cmake.yml | 2 +- .github/workflows/code_coverage.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e2c6e7168..de2a632fc 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -292,7 +292,7 @@ jobs: set CCACHE_SLOPPINESS=pch_defines,time_macros set CCACHE_NOHASHDIR=1 set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log - set CCACHE_RECACHE=1 + #set CCACHE_RECACHE=1 ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 3690cf865..36a348a20 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -155,9 +155,9 @@ jobs: uses: actions/cache@v3.3.2 with: path: ${{ env.CCACHE_HOME }} - key: ccache-${{ matrix.settings.os }}-${{ github.run_number }} + key: ccache-${{ matrix.os }}-${{ github.run_number }} restore-keys: | - ccache-${{ matrix.settings.os }}- + ccache-${{ matrix.os }}- - name: Build # Build your program with the given configuration From 69211cc25ba6c881f8f06a525dfc9c27eede23e5 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sat, 25 Nov 2023 23:49:42 +0100 Subject: [PATCH 062/101] adding more sloppines options --- .github/workflows/cmake.yml | 4 ++-- .github/workflows/code_coverage.yml | 2 +- cmake/ccache.cmake | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index de2a632fc..bd9cca848 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -289,7 +289,7 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat - set CCACHE_SLOPPINESS=pch_defines,time_macros + set CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime set CCACHE_NOHASHDIR=1 set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log #set CCACHE_RECACHE=1 @@ -302,7 +302,7 @@ jobs: run: | source build/generators/conanbuild.sh export CCACHE_DIR=$HOME/.ccache - export CCACHE_SLOPPINESS=pch_defines,time_macros + export CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime export CCACHE_NOHASHDIR=1 export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log #export CCACHE_RECACHE=1 diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 36a348a20..9d1fc4fda 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -165,7 +165,7 @@ jobs: run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh export CCACHE_DIR=$HOME/.ccache - export CCACHE_SLOPPINESS=pch_defines,time_macros + export CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime export CCACHE_NOHASHDIR=1 export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log #export CCACHE_RECACHE=1 diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 2fdcd1c9c..20193d832 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -104,7 +104,7 @@ function(enable_ccache) if (CCACHE_SLOPPINESS) message(STATUS "Morpheus: Enable CCache sloppiness") - list(APPEND ccacheEnv "CCACHE_SLOPPINESS=pch_defines,time_macros") + list(APPEND ccacheEnv "CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime") endif() foreach(lang IN ITEMS C CXX OBJC OBJCXX) From e851feba60b3b93e069898fb5e84e84fb49d9f86 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sun, 26 Nov 2023 17:56:36 +0100 Subject: [PATCH 063/101] enable CCACHE_DEBUG --- .github/workflows/cmake.yml | 10 ++++++++-- .github/workflows/code_coverage.yml | 11 +++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index bd9cca848..a2df221b1 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -292,6 +292,8 @@ jobs: set CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime set CCACHE_NOHASHDIR=1 set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log + set CCACHE_DEBUG=1 + set CCACHE_DEBUGDIR=D:\\a\\Morpheus\\Morpheus\\build\\ #set CCACHE_RECACHE=1 ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -305,6 +307,8 @@ jobs: export CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime export CCACHE_NOHASHDIR=1 export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log + export CCACHE_DEBUG=1 + export CCACHE_DEBUGDIR=$HOME/.ccache/ #export CCACHE_RECACHE=1 ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -316,7 +320,8 @@ jobs: call build\generators\conanbuild.bat ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz #dir D:\a\Morpheus\Morpheus\build - type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log + #type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log + type D:\a\Morpheus\Morpheus\build\*.ccache-log #rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log #dir D:\a\Morpheus\Morpheus\build @@ -327,7 +332,8 @@ jobs: source build/generators/conanbuild.sh ccache -d $HOME/.ccache -svvz #ls -la $HOME/.ccache - cat $HOME/.ccache/CcacheLogFile.log + #cat $HOME/.ccache/CcacheLogFile.log + cat $HOME/.ccache/*.ccache-log #rm $HOME/.ccache/CcacheLogFile.log #ls -la $HOME/.ccache diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 9d1fc4fda..a0fd2a87e 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -168,6 +168,8 @@ jobs: export CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime export CCACHE_NOHASHDIR=1 export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log + export CCACHE_DEBUG=1 + export CCACHE_DEBUGDIR=$HOME/.ccache/ #export CCACHE_RECACHE=1 ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -177,10 +179,11 @@ jobs: run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh ccache -d $HOME/.ccache -svvz - ls -la $HOME/.ccache - cat $HOME/.ccache/CcacheLogFile.log - rm $HOME/.ccache/CcacheLogFile.log - ls -la $HOME/.ccache + cat $HOME/.ccache/*.ccache-log + #cat $HOME/.ccache/CcacheLogFile.log + #ls -la $HOME/.ccache + #rm $HOME/.ccache/CcacheLogFile.log + #ls -la $HOME/.ccache - name: Test working-directory: ${{github.workspace}} From 13e1298c31fb2d120ec16469e54eef953e008098 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sun, 26 Nov 2023 21:41:44 +0100 Subject: [PATCH 064/101] search for debug files and show --- .github/workflows/cmake.yml | 8 ++++---- .github/workflows/code_coverage.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index bded94afd..d5ed92f0d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -293,7 +293,7 @@ jobs: set CCACHE_NOHASHDIR=1 set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log set CCACHE_DEBUG=1 - set CCACHE_DEBUGDIR=D:\\a\\Morpheus\\Morpheus\\build\\ + #set CCACHE_DEBUGDIR=D:\\a\\Morpheus\\Morpheus\\build\\ #set CCACHE_RECACHE=1 ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -308,7 +308,7 @@ jobs: export CCACHE_NOHASHDIR=1 export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log export CCACHE_DEBUG=1 - export CCACHE_DEBUGDIR=$HOME/.ccache/ + #export CCACHE_DEBUGDIR=$HOME/.ccache/ #export CCACHE_RECACHE=1 ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -319,9 +319,9 @@ jobs: run: | call build\generators\conanbuild.bat ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz + dir /s /b *.ccache-log | type #dir D:\a\Morpheus\Morpheus\build #type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log - type D:\a\Morpheus\Morpheus\build\*.ccache-log #rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log #dir D:\a\Morpheus\Morpheus\build @@ -331,9 +331,9 @@ jobs: run: | source build/generators/conanbuild.sh ccache -d $HOME/.ccache -svvz + find . -name "*.ccache-log" -exec cat {} + #ls -la $HOME/.ccache #cat $HOME/.ccache/CcacheLogFile.log - cat $HOME/.ccache/*.ccache-log #rm $HOME/.ccache/CcacheLogFile.log #ls -la $HOME/.ccache diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index a0fd2a87e..6806542c1 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -169,7 +169,7 @@ jobs: export CCACHE_NOHASHDIR=1 export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log export CCACHE_DEBUG=1 - export CCACHE_DEBUGDIR=$HOME/.ccache/ + #export CCACHE_DEBUGDIR=$HOME/.ccache/ #export CCACHE_RECACHE=1 ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -179,7 +179,7 @@ jobs: run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh ccache -d $HOME/.ccache -svvz - cat $HOME/.ccache/*.ccache-log + find . -name "*.ccache-log" -exec cat {} + #cat $HOME/.ccache/CcacheLogFile.log #ls -la $HOME/.ccache #rm $HOME/.ccache/CcacheLogFile.log From cb1677e1b7787765654a99482d7c09fb0639b67a Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Sun, 26 Nov 2023 21:59:49 +0100 Subject: [PATCH 065/101] windows batch commands fix --- .github/workflows/cmake.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index d5ed92f0d..a7c2ea35d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -319,11 +319,11 @@ jobs: run: | call build\generators\conanbuild.bat ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz - dir /s /b *.ccache-log | type - #dir D:\a\Morpheus\Morpheus\build - #type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log - #rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log - #dir D:\a\Morpheus\Morpheus\build + dir *.ccache-log /s /b | type + REM dir D:\a\Morpheus\Morpheus\build + REM type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log + REM rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log + REM dir D:\a\Morpheus\Morpheus\build - name: CCache Stats if: matrix.settings.os != 'windows-latest' From 7741607ab10376b962c0e987ea29500ea47099cd Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sun, 26 Nov 2023 21:45:10 +0100 Subject: [PATCH 066/101] update windows batch command --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a7c2ea35d..af8dd85e6 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -293,8 +293,8 @@ jobs: set CCACHE_NOHASHDIR=1 set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log set CCACHE_DEBUG=1 - #set CCACHE_DEBUGDIR=D:\\a\\Morpheus\\Morpheus\\build\\ - #set CCACHE_RECACHE=1 + REM set CCACHE_DEBUGDIR=D:\\a\\Morpheus\\Morpheus\\build\\ + REM set CCACHE_RECACHE=1 ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -319,7 +319,7 @@ jobs: run: | call build\generators\conanbuild.bat ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz - dir *.ccache-log /s /b | type + dir *.ccache-log /s /b | type * REM dir D:\a\Morpheus\Morpheus\build REM type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log REM rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log From c8c345b2a868e361c476bdfc6e7c7d471d2825f8 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Mon, 27 Nov 2023 18:17:28 +0100 Subject: [PATCH 067/101] Fix typo --- cmake/ccache.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake index 20193d832..db975ceda 100644 --- a/cmake/ccache.cmake +++ b/cmake/ccache.cmake @@ -92,7 +92,7 @@ function(enable_ccache) list(APPEND ccacheEnv "CCACHE_LOGFILE=${CMAKE_BINARY_DIR}/CCache_log.txt") endif() - if (CCACHE_NOHASDIR) + if (CCACHE_NOHASHDIR) message(STATUS "Morpheus: CCache do not hash current working directory") list(APPEND ccacheEnv "CCACHE_NOHASHDIR=1") endif() From 330f32351a49bb359ec885cc0560f3b1353ca479 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Mon, 27 Nov 2023 20:55:53 +0100 Subject: [PATCH 068/101] update workflow debug files --- .github/workflows/cmake.yml | 12 +++++++++++- .github/workflows/code_coverage.yml | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 271df6465..e3b37e6fc 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -276,6 +276,7 @@ jobs: set CCACHE_DEBUG=1 REM set CCACHE_DEBUGDIR=D:\\a\\Morpheus\\Morpheus\\build\\ REM set CCACHE_RECACHE=1 + echo Morpheus ccache show configuration ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -291,6 +292,7 @@ jobs: export CCACHE_DEBUG=1 #export CCACHE_DEBUGDIR=$HOME/.ccache/ #export CCACHE_RECACHE=1 + echo "Morpheus ccache show configuration" ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -299,8 +301,12 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat + echo Morpheus ccache show stats ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz - dir *.ccache-log /s /b | type * + echo Morpheus showing ccache debug input files + forfiles /M *.ccache-input-text /S /C "cmd /c type @file" + echo Morpheus showing ccache debug log files + forfiles /M *.ccache-log /S /C "cmd /c type @file" REM dir D:\a\Morpheus\Morpheus\build REM type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log REM rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log @@ -311,7 +317,11 @@ jobs: shell: bash run: | source build/generators/conanbuild.sh + echo "Morpheus ccache show stats" ccache -d $HOME/.ccache -svvz + echo "Morpheus showing ccache debug input files" + find . -name "*.ccache-input-text" -exec cat {} + + echo "Morpheus showing ccache debug log files" find . -name "*.ccache-log" -exec cat {} + #ls -la $HOME/.ccache #cat $HOME/.ccache/CcacheLogFile.log diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 14d32d5ec..e144cc142 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -169,6 +169,7 @@ jobs: export CCACHE_DEBUG=1 #export CCACHE_DEBUGDIR=$HOME/.ccache/ #export CCACHE_RECACHE=1 + echo "Morpheus ccache show configuration" ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -176,7 +177,11 @@ jobs: shell: bash run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh + echo "Morpheus ccache show stats" ccache -d $HOME/.ccache -svvz + echo "Morpheus showing ccache debug input files" + find . -name "*.ccache-input-text" -exec cat {} + + echo "Morpheus showing ccache debug log files" find . -name "*.ccache-log" -exec cat {} + #cat $HOME/.ccache/CcacheLogFile.log #ls -la $HOME/.ccache From e0d487de9e44b6affd14d1a4e51824b3a9ed2c29 Mon Sep 17 00:00:00 2001 From: jakeheke75 Date: Mon, 27 Nov 2023 23:48:39 +0100 Subject: [PATCH 069/101] test removing CCACHE_NOHASHDIR --- .github/workflows/code_coverage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index e144cc142..be2985f66 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -164,9 +164,9 @@ jobs: source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime - export CCACHE_NOHASHDIR=1 - export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log export CCACHE_DEBUG=1 + #export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log + #export CCACHE_NOHASHDIR=1 #export CCACHE_DEBUGDIR=$HOME/.ccache/ #export CCACHE_RECACHE=1 echo "Morpheus ccache show configuration" From 0574ecf88b28b14e55e941bb54107e7b0627fffe Mon Sep 17 00:00:00 2001 From: "g.t" Date: Tue, 28 Nov 2023 13:54:48 +0100 Subject: [PATCH 070/101] change ccache caching strategy for code coverage workflow --- .github/workflows/code_coverage.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index be2985f66..17f97af5f 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -153,9 +153,11 @@ jobs: uses: actions/cache@v3.3.2 with: path: ${{ env.CCACHE_HOME }} - key: ccache-${{ matrix.os }}-${{ github.run_number }} + #key: ccache-${{ matrix.os }}-${{ github.run_number }} + key: ccache-code-coverage-${{ github.run_number }} restore-keys: | - ccache-${{ matrix.os }}- + #ccache-${{ matrix.os }}- + ccache-code-coverage- - name: Build # Build your program with the given configuration From 877635b11bd4dd4ebe7695dc954fe0149c1e533c Mon Sep 17 00:00:00 2001 From: "g.t" Date: Tue, 28 Nov 2023 14:08:32 +0100 Subject: [PATCH 071/101] triggering code coverage workflow --- .github/workflows/code_coverage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 17f97af5f..291dc8f77 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -153,10 +153,10 @@ jobs: uses: actions/cache@v3.3.2 with: path: ${{ env.CCACHE_HOME }} - #key: ccache-${{ matrix.os }}-${{ github.run_number }} + # key: ccache-${{ matrix.os }}-${{ github.run_number }} key: ccache-code-coverage-${{ github.run_number }} + # ccache-${{ matrix.os }}- restore-keys: | - #ccache-${{ matrix.os }}- ccache-code-coverage- - name: Build From 24c448d27f8fb7a0b9036cf21361291e05357d94 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Tue, 28 Nov 2023 21:33:25 +0100 Subject: [PATCH 072/101] code coverage base dir setting and recache --- .github/workflows/code_coverage.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 291dc8f77..02453946e 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -167,10 +167,11 @@ jobs: export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime export CCACHE_DEBUG=1 + export CCACHE_NOHASHDIR=1 + export CCACHE_BASEDIR=${{ github.workspace }} + export CCACHE_RECACHE=1 #export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log - #export CCACHE_NOHASHDIR=1 #export CCACHE_DEBUGDIR=$HOME/.ccache/ - #export CCACHE_RECACHE=1 echo "Morpheus ccache show configuration" ccache -p cmake --build --preset ${{ env.CONAN_PRESET }} @@ -181,10 +182,10 @@ jobs: source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh echo "Morpheus ccache show stats" ccache -d $HOME/.ccache -svvz - echo "Morpheus showing ccache debug input files" - find . -name "*.ccache-input-text" -exec cat {} + echo "Morpheus showing ccache debug log files" find . -name "*.ccache-log" -exec cat {} + + #echo "Morpheus showing ccache debug input files" + #find . -name "*.ccache-input-text" -exec cat {} + #cat $HOME/.ccache/CcacheLogFile.log #ls -la $HOME/.ccache #rm $HOME/.ccache/CcacheLogFile.log From f52efe98d6e7749512f039f6c19ccd88ba3ef998 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Tue, 28 Nov 2023 21:44:30 +0100 Subject: [PATCH 073/101] code coverage workflow removing recache --- .github/workflows/code_coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 02453946e..301a4fd6f 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -169,7 +169,7 @@ jobs: export CCACHE_DEBUG=1 export CCACHE_NOHASHDIR=1 export CCACHE_BASEDIR=${{ github.workspace }} - export CCACHE_RECACHE=1 + #export CCACHE_RECACHE=1 #export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log #export CCACHE_DEBUGDIR=$HOME/.ccache/ echo "Morpheus ccache show configuration" From fc9581f1898f6e5de91032655bd41606d829e7be Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 29 Nov 2023 08:57:45 +0100 Subject: [PATCH 074/101] code coverage test umask and noinodecache options --- .github/workflows/code_coverage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 301a4fd6f..fce20c58b 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -169,6 +169,8 @@ jobs: export CCACHE_DEBUG=1 export CCACHE_NOHASHDIR=1 export CCACHE_BASEDIR=${{ github.workspace }} + export CCACHE_UMASK=002 + export CCACHE_NOINODECACHE=1 #export CCACHE_RECACHE=1 #export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log #export CCACHE_DEBUGDIR=$HOME/.ccache/ From 8941b51181385031c9333545165f0fa91bc1fcd9 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Wed, 29 Nov 2023 09:08:22 +0100 Subject: [PATCH 075/101] trigger code coverage workflow --- .github/workflows/code_coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index fce20c58b..bf9e62dd1 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -161,6 +161,7 @@ jobs: - name: Build # Build your program with the given configuration + # trigger code coverage workflow shell: bash run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh From b7a45d8ff1315081a4d7f327b1f2ee9102344657 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 30 Nov 2023 21:38:37 +0100 Subject: [PATCH 076/101] code coverage conan cache test --- .github/workflows/code_coverage.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index bf9e62dd1..605cce108 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -50,12 +50,14 @@ jobs: cache-name: cache-conan-data with: path: ${{github.workspace}}/.conan2/p - key: ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + #key: ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + key: ${{ hashFiles('**/conanfile.py') }}-code-coverage restore-keys: | - ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- - ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- - ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}- - ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}- + ${{ hashFiles('**/conanfile.py') }}-code-coverage + #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- + #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- + #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}- + #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}- # Previously GCC was installed via egor-tensin/setup-gcc@v1 but this does not install gcov with the compiler. # By default Ubuntu has Gcov 11 installed. This worked so long as the compiler was gcc 11, but if a later gcc was @@ -167,13 +169,13 @@ jobs: source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh export CCACHE_DIR=$HOME/.ccache export CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime - export CCACHE_DEBUG=1 export CCACHE_NOHASHDIR=1 export CCACHE_BASEDIR=${{ github.workspace }} - export CCACHE_UMASK=002 - export CCACHE_NOINODECACHE=1 + export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log + #export CCACHE_DEBUG=1 + #export CCACHE_UMASK=002 + #export CCACHE_NOINODECACHE=1 #export CCACHE_RECACHE=1 - #export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log #export CCACHE_DEBUGDIR=$HOME/.ccache/ echo "Morpheus ccache show configuration" ccache -p @@ -185,11 +187,12 @@ jobs: source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh echo "Morpheus ccache show stats" ccache -d $HOME/.ccache -svvz - echo "Morpheus showing ccache debug log files" - find . -name "*.ccache-log" -exec cat {} + + echo "Morpheus showing ccache log file" + cat $HOME/.ccache/CcacheLogFile.log + #echo "Morpheus showing ccache debug log files" + #find . -name "*.ccache-log" -exec cat {} + #echo "Morpheus showing ccache debug input files" #find . -name "*.ccache-input-text" -exec cat {} + - #cat $HOME/.ccache/CcacheLogFile.log #ls -la $HOME/.ccache #rm $HOME/.ccache/CcacheLogFile.log #ls -la $HOME/.ccache From 243ec3755aed82d77fbfc6ee6efa672125143ea5 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 30 Nov 2023 22:05:33 +0100 Subject: [PATCH 077/101] trigger code coverage workflow --- .github/workflows/code_coverage.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 605cce108..f1e8be775 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -163,7 +163,6 @@ jobs: - name: Build # Build your program with the given configuration - # trigger code coverage workflow shell: bash run: | source build/${{env.BUILD_TYPE}}/generators/conanbuild.sh From 94e6ba6c9161631979950a9c1e96bcad98a03f1d Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 30 Nov 2023 22:33:14 +0100 Subject: [PATCH 078/101] trigger code coverage --- .github/workflows/code_coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index f1e8be775..d3011cf1c 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -131,7 +131,8 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | - conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja --build catch2/3.4.0 + #conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja --build catch2/3.4.0 + conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja - name: Conan Preset shell: bash From c5b9dd6c65b21eb1097e1ea4c2df739c755e6758 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Thu, 30 Nov 2023 23:57:25 +0100 Subject: [PATCH 079/101] cmake workflow build flags for clang and msvc --- .github/workflows/cmake.yml | 60 ++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e3b37e6fc..4662163ba 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -185,7 +185,8 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | - conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 + #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 + conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" - name: Configure Conan Build if: matrix.settings.os == 'windows-latest' @@ -209,20 +210,35 @@ jobs: # detached: true - name: Configure CMake - if: matrix.settings.os == 'windows-latest' + if: matrix.settings.os == 'windows-latest' && matrix.configuration == 'Release' shell: cmd run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON - name: Configure CMake - if: matrix.settings.os != 'windows-latest' + if: matrix.settings.os == 'windows-latest' && matrix.configuration == 'Debug' + shell: cmd + run: | + cmake --version + call build\generators\conanbuild.bat + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_FLAGS_DEBUG="-Z7" + + - name: Configure CMake + if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler == 'GCC' shell: bash run: | source build/generators/conanbuild.sh cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + - name: Configure CMake + if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler != 'GCC' + shell: bash + run: | + source build/generators/conanbuild.sh + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="-Xclang -fno-pch-timestamp" -DCMAKE_CXX_FLAGS_RELEASE="-Xclang -fno-pch-timestamp" + - name: Conan Preset shell: bash run: echo "CONAN_PRESET=conan-$(echo ${{matrix.configuration}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV @@ -270,10 +286,11 @@ jobs: shell: cmd run: | call build\generators\conanbuild.bat - set CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime - set CCACHE_NOHASHDIR=1 + set CCACHE_BASEDIR=${{ github.workspace }} set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log - set CCACHE_DEBUG=1 + set CCACHE_NOHASHDIR=1 + set CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime + REM set CCACHE_DEBUG=1 REM set CCACHE_DEBUGDIR=D:\\a\\Morpheus\\Morpheus\\build\\ REM set CCACHE_RECACHE=1 echo Morpheus ccache show configuration @@ -285,11 +302,12 @@ jobs: shell: bash run: | source build/generators/conanbuild.sh + export CCACHE_BASEDIR=${{ github.workspace }} export CCACHE_DIR=$HOME/.ccache - export CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime - export CCACHE_NOHASHDIR=1 export CCACHE_LOGFILE=$HOME/.ccache/CcacheLogFile.log - export CCACHE_DEBUG=1 + export CCACHE_NOHASHDIR=1 + export CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime + #export CCACHE_DEBUG=1 #export CCACHE_DEBUGDIR=$HOME/.ccache/ #export CCACHE_RECACHE=1 echo "Morpheus ccache show configuration" @@ -303,12 +321,13 @@ jobs: call build\generators\conanbuild.bat echo Morpheus ccache show stats ccache -d C:\Users\runneradmin\AppData\Local\ccache\ -svvz - echo Morpheus showing ccache debug input files - forfiles /M *.ccache-input-text /S /C "cmd /c type @file" - echo Morpheus showing ccache debug log files - forfiles /M *.ccache-log /S /C "cmd /c type @file" + echo Morpheus showing ccache log files + type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log + REM echo Morpheus showing ccache debug input files + REM forfiles /M *.ccache-input-text /S /C "cmd /c type @file" + REM echo Morpheus showing ccache debug log files + REM forfiles /M *.ccache-log /S /C "cmd /c type @file" REM dir D:\a\Morpheus\Morpheus\build - REM type D:\a\Morpheus\Morpheus\build\CcacheLogFile.log REM rm D:\a\Morpheus\Morpheus\build\CcacheLogFile.log REM dir D:\a\Morpheus\Morpheus\build @@ -319,12 +338,13 @@ jobs: source build/generators/conanbuild.sh echo "Morpheus ccache show stats" ccache -d $HOME/.ccache -svvz - echo "Morpheus showing ccache debug input files" - find . -name "*.ccache-input-text" -exec cat {} + - echo "Morpheus showing ccache debug log files" - find . -name "*.ccache-log" -exec cat {} + + echo "Morpheus show ccache log files" + cat $HOME/.ccache/CcacheLogFile.log + #echo "Morpheus showing ccache debug input files" + #find . -name "*.ccache-input-text" -exec cat {} + + #echo "Morpheus showing ccache debug log files" + #find . -name "*.ccache-log" -exec cat {} + #ls -la $HOME/.ccache - #cat $HOME/.ccache/CcacheLogFile.log #rm $HOME/.ccache/CcacheLogFile.log #ls -la $HOME/.ccache From af569f3387a12375595dbf5c50a9cfd8087d2c4c Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 00:15:33 +0100 Subject: [PATCH 080/101] cmake workflow fix compiler type --- .github/workflows/cmake.yml | 38 ++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4662163ba..e5cc859ff 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -34,7 +34,15 @@ jobs: - { name: "Ubuntu GCC-12", os: ubuntu-latest, - compiler: { type: GCC, version: 12, conan: "gcc", cc: "gcc-12", cxx: "g++-12", std: 20 }, + compiler: + { + type: GCC, + version: 12, + conan: "gcc", + cc: "gcc-12", + cxx: "g++-12", + std: 20 + }, lib: "libstdc++11" } - { @@ -70,7 +78,15 @@ jobs: - { name: "Visual Studio 2019", os: windows-latest, - compiler: { type: VISUAL, version: 16, conan: "mscv", cc: "cl", cxx: "cl", std: 20 }, + compiler: + { + type: VISUAL, + version: 16, + conan: "mscv", + cc: "cl", + cxx: "cl", + std: 20 + }, } - { name: "MacOS Apple Clang 14", @@ -223,17 +239,17 @@ jobs: run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_FLAGS_DEBUG="-Z7" + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_FLAGS_DEBUG="/Z7" - name: Configure CMake - if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler == 'GCC' + if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler.type == 'GCC' shell: bash run: | source build/generators/conanbuild.sh cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Configure CMake - if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler != 'GCC' + if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler.type != 'GCC' shell: bash run: | source build/generators/conanbuild.sh @@ -243,18 +259,6 @@ jobs: shell: bash run: echo "CONAN_PRESET=conan-$(echo ${{matrix.configuration}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV -# - name: CCache Configure -# if: matrix.settings.os == 'windows-latest' -# id: ccache-config-windows -# shell: cmd -# run: | -# call build\generators\conanbuild.bat -# set CCACHE_SLOPPINESS=pch_defines,time_macros -# set CCACHE_NOHASHDIR=1 -# set CCACHE_LOGFILE=D:\\a\\Morpheus\\Morpheus\\build\\CcacheLogFile.log -# #set CCACHE_RECACHE=1 -# ccache -p - - name: CCache Configure if: matrix.settings.os != 'windows-latest' id: ccache-config-linux From 16daad6f1b5837c1e5a6028d1de8ce911a273fd3 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 00:29:31 +0100 Subject: [PATCH 081/101] triggering cmake workflow --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e5cc859ff..e643adc8f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -231,7 +231,7 @@ jobs: run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Configure CMake if: matrix.settings.os == 'windows-latest' && matrix.configuration == 'Debug' @@ -239,7 +239,7 @@ jobs: run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_FLAGS_DEBUG="/Z7" + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="/Z7" - name: Configure CMake if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler.type == 'GCC' From 4a96aff0267a64afc811e62f97c1f8b961740a86 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 00:54:28 +0100 Subject: [PATCH 082/101] trigger cmake workflow --- .github/workflows/code_coverage.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index d3011cf1c..0eaefd341 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -49,15 +49,10 @@ jobs: env: cache-name: cache-conan-data with: - path: ${{github.workspace}}/.conan2/p - #key: ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} + path: ${{github.workspace}}/.conan2/p key: ${{ hashFiles('**/conanfile.py') }}-code-coverage restore-keys: | ${{ hashFiles('**/conanfile.py') }}-code-coverage - #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- - #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- - #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}- - #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}- # Previously GCC was installed via egor-tensin/setup-gcc@v1 but this does not install gcov with the compiler. # By default Ubuntu has Gcov 11 installed. This worked so long as the compiler was gcc 11, but if a later gcc was @@ -131,7 +126,6 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | - #conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja --build catch2/3.4.0 conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja - name: Conan Preset @@ -156,9 +150,7 @@ jobs: uses: actions/cache@v3.3.2 with: path: ${{ env.CCACHE_HOME }} - # key: ccache-${{ matrix.os }}-${{ github.run_number }} key: ccache-code-coverage-${{ github.run_number }} - # ccache-${{ matrix.os }}- restore-keys: | ccache-code-coverage- From a631038c4e17bb2cd10dfcf77841ca61cfbb6b88 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 11:58:23 +0100 Subject: [PATCH 083/101] cmake workflow triggering --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e643adc8f..f0c96acfc 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -201,6 +201,7 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | + # triggering cmake workflow #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" From 51363a71918d1160bbba913ea0abffbf091d0184 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 12:10:52 +0100 Subject: [PATCH 084/101] triggering first build with --build catch2/3.4.0 for Conan cache --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f0c96acfc..13e868bf2 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -202,8 +202,8 @@ jobs: shell: bash run: | # triggering cmake workflow - #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 - conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" + conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 + #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" - name: Configure Conan Build if: matrix.settings.os == 'windows-latest' From c86262e24301c273fcdf1fd389a1cd7c41cb8262 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 12:36:10 +0100 Subject: [PATCH 085/101] rebuild all caches for Conan and ccache --- .github/workflows/code_coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 0eaefd341..490263f3c 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -126,7 +126,8 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | - conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja + conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja --build catch2/3.4.0 + #conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja - name: Conan Preset shell: bash From 44b969c5508da27774662240795d9fcfb9063973 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 13:18:13 +0100 Subject: [PATCH 086/101] retrigger all workflows without rebuild catch --- .github/workflows/cmake.yml | 10 ++++++++-- .github/workflows/code_coverage.yml | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 13e868bf2..4e34d7d28 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -201,9 +201,15 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | + # In order to have ccache working correctly we can't build the catch library every time, otherwise the hash of the built files will + # change at every workflow run and then we will get cache misses. Therefore the --build catch2/3.4.0 option must be enabled only the + # first time in order to correctly build the cache for Conan packages. After the first build of the Conan cache the option must + # be removed for all the subsequent executions. + # The same procedure must be followed every time that it changes something in the conanfile.py. + # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. # triggering cmake workflow - conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 - #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" + #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 + conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" - name: Configure Conan Build if: matrix.settings.os == 'windows-latest' diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 490263f3c..a9adda92a 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -126,8 +126,14 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | - conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja --build catch2/3.4.0 - #conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja + # In order to have ccache working correctly we can't build the catch library every time, otherwise the hash of the built files will + # change at every workflow run and then we will get cache misses. Therefore the --build catch2/3.4.0 option must be enabled only the + # first time in order to correctly build the cache for Conan packages. After the first build of the Conan cache the option must + # be removed for all the subsequent executions. + # The same procedure must be followed every time that it changes something in the conanfile.py. + # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. + #conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja --build catch2/3.4.0 + conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja - name: Conan Preset shell: bash From d0147538a4ca68d15a54bd4f45948e5dbd1377fe Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 14:22:31 +0100 Subject: [PATCH 087/101] retrigger windows workflow --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4e34d7d28..d73bee70c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -238,7 +238,7 @@ jobs: run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_VS_GLOBALS="UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true" - name: Configure CMake if: matrix.settings.os == 'windows-latest' && matrix.configuration == 'Debug' @@ -246,7 +246,7 @@ jobs: run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="/Z7" + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="/Z7" -DCMAKE_VS_GLOBALS="UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true" - name: Configure CMake if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler.type == 'GCC' From 1af0eeee16a769107c5d603426069afc872ce94b Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 16:29:10 +0100 Subject: [PATCH 088/101] retrigger windows debug --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index d73bee70c..8cbf2782c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -208,8 +208,8 @@ jobs: # The same procedure must be followed every time that it changes something in the conanfile.py. # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. # triggering cmake workflow - #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 - conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" + conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 + #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" - name: Configure Conan Build if: matrix.settings.os == 'windows-latest' @@ -246,7 +246,7 @@ jobs: run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="/Z7" -DCMAKE_VS_GLOBALS="UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true" + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="/Z7" -DCMAKE_VS_GLOBALS="UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true;TrackFileAccess=false;DebugInformationFormat=OldStyle" - name: Configure CMake if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler.type == 'GCC' From 43ba80669f3ffe4be291e0821e42ce8e0dbb7061 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 16:47:29 +0100 Subject: [PATCH 089/101] retrigger windows workflow --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8cbf2782c..f2712fe5d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -208,8 +208,8 @@ jobs: # The same procedure must be followed every time that it changes something in the conanfile.py. # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. # triggering cmake workflow - conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 - #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" + #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 + conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" - name: Configure Conan Build if: matrix.settings.os == 'windows-latest' From 7db080e4de81ae92d8903f940214681c440c736a Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 17:33:27 +0100 Subject: [PATCH 090/101] retrigger windows workflow --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f2712fe5d..9e530cdaf 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -208,8 +208,8 @@ jobs: # The same procedure must be followed every time that it changes something in the conanfile.py. # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. # triggering cmake workflow - #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 - conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" + conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 + #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" - name: Configure Conan Build if: matrix.settings.os == 'windows-latest' @@ -246,7 +246,7 @@ jobs: run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="/Z7" -DCMAKE_VS_GLOBALS="UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true;TrackFileAccess=false;DebugInformationFormat=OldStyle" + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="/Y-;/Z7" -DCMAKE_VS_GLOBALS="UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true;TrackFileAccess=false;DebugInformationFormat=OldStyle" - name: Configure CMake if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler.type == 'GCC' From e706ea4b555c7a73121c784d716c498a89426231 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 19:03:25 +0100 Subject: [PATCH 091/101] trigger windows workflow --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9e530cdaf..187ded381 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -246,7 +246,7 @@ jobs: run: | cmake --version call build\generators\conanbuild.bat - cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="/Y-;/Z7" -DCMAKE_VS_GLOBALS="UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true;TrackFileAccess=false;DebugInformationFormat=OldStyle" + cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS_DEBUG="/YI;/Z7" -DCMAKE_VS_GLOBALS="UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true;TrackFileAccess=false;DebugInformationFormat=OldStyle" - name: Configure CMake if: matrix.settings.os != 'windows-latest' && matrix.settings.compiler.type == 'GCC' From b6e149215107a6c4a7b707adda4ed80da9986836 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 19:38:32 +0100 Subject: [PATCH 092/101] trigger cache rebuild --- .github/workflows/cmake.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 187ded381..27a6450b1 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -206,8 +206,7 @@ jobs: # first time in order to correctly build the cache for Conan packages. After the first build of the Conan cache the option must # be removed for all the subsequent executions. # The same procedure must be followed every time that it changes something in the conanfile.py. - # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. - # triggering cmake workflow + # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" From a67eafe5b1a90bc86612c240c1ee428414be519a Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 20:11:41 +0100 Subject: [PATCH 093/101] retrigger workflow --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 27a6450b1..07a15036f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -207,8 +207,8 @@ jobs: # be removed for all the subsequent executions. # The same procedure must be followed every time that it changes something in the conanfile.py. # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. - conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 - #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" + #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 + conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" - name: Configure Conan Build if: matrix.settings.os == 'windows-latest' From a382ca05ad2ad3b47a52272dd04ef621b03d3241 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 22:40:46 +0100 Subject: [PATCH 094/101] trigger code coverage --- .github/workflows/code_coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index a9adda92a..01687438d 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -133,6 +133,7 @@ jobs: # The same procedure must be followed every time that it changes something in the conanfile.py. # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. #conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja --build catch2/3.4.0 + #trigger code coverage conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja - name: Conan Preset From 3b5a284d9c515eb761839045c90c81bb3562b47f Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 23:05:53 +0100 Subject: [PATCH 095/101] trigger code coverage --- .github/workflows/code_coverage.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 01687438d..a9adda92a 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -133,7 +133,6 @@ jobs: # The same procedure must be followed every time that it changes something in the conanfile.py. # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. #conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja --build catch2/3.4.0 - #trigger code coverage conan install "${{github.workspace}}" --build missing -c tools.cmake.cmaketoolchain:generator=Ninja - name: Conan Preset From 827606fdbb17c8b24e8d003254da6d5abfe33c21 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 23:21:56 +0100 Subject: [PATCH 096/101] trigger cmake workflow --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 07a15036f..11698ed9e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -114,9 +114,9 @@ jobs: key: ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }} restore-keys: | ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}- - ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- - ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}- - ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}- + #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}- + #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}- + #${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}- # - uses: lhotari/action-upterm@v1 # with: From 190182362f1f71172ab5cf8366eb2a11aae251ba Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 23:37:34 +0100 Subject: [PATCH 097/101] trigger cmake workflow --- .github/workflows/cmake.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 11698ed9e..7bfc8d84d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -198,6 +198,7 @@ jobs: conan profile show -pr default - name: Configure Install + if: matrix.settings.os != 'windows-latest' || matrix.configuration == 'Release' working-directory: ${{github.workspace}} shell: bash run: | @@ -210,6 +211,19 @@ jobs: #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" + - name: Configure Install + if: matrix.settings.os == 'windows-latest' && matrix.configuration == 'Debug' + working-directory: ${{github.workspace}} + shell: bash + run: | + # In order to have ccache working correctly we can't build the catch library every time, otherwise the hash of the built files will + # change at every workflow run and then we will get cache misses. Therefore the --build catch2/3.4.0 option must be enabled only the + # first time in order to correctly build the cache for Conan packages. After the first build of the Conan cache the option must + # be removed for all the subsequent executions. + # The same procedure must be followed every time that it changes something in the conanfile.py. + # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. + conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 + - name: Configure Conan Build if: matrix.settings.os == 'windows-latest' shell: cmd From f82d1605b501e1b2276b124748f46105af82cb7f Mon Sep 17 00:00:00 2001 From: "g.t" Date: Fri, 1 Dec 2023 23:45:18 +0100 Subject: [PATCH 098/101] trigger cmake workflow --- .github/workflows/cmake.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7bfc8d84d..ec7e05f34 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -198,30 +198,17 @@ jobs: conan profile show -pr default - name: Configure Install - if: matrix.settings.os != 'windows-latest' || matrix.configuration == 'Release' + if: matrix.settings.os != 'windows-latest' working-directory: ${{github.workspace}} shell: bash run: | - # In order to have ccache working correctly we can't build the catch library every time, otherwise the hash of the built files will - # change at every workflow run and then we will get cache misses. Therefore the --build catch2/3.4.0 option must be enabled only the - # first time in order to correctly build the cache for Conan packages. After the first build of the Conan cache the option must - # be removed for all the subsequent executions. - # The same procedure must be followed every time that it changes something in the conanfile.py. - # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. - #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" - name: Configure Install - if: matrix.settings.os == 'windows-latest' && matrix.configuration == 'Debug' + if: matrix.settings.os == 'windows-latest' working-directory: ${{github.workspace}} shell: bash run: | - # In order to have ccache working correctly we can't build the catch library every time, otherwise the hash of the built files will - # change at every workflow run and then we will get cache misses. Therefore the --build catch2/3.4.0 option must be enabled only the - # first time in order to correctly build the cache for Conan packages. After the first build of the Conan cache the option must - # be removed for all the subsequent executions. - # The same procedure must be followed every time that it changes something in the conanfile.py. - # it's a bit tricky but it is what it is, this is what must be done in order to get 100% ccache hit rate. conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 - name: Configure Conan Build From 107a485824bae93eb7beb87f770a41b9bc7781f2 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sat, 2 Dec 2023 00:18:45 +0100 Subject: [PATCH 099/101] trigger windows workflow --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ec7e05f34..7f710f006 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -209,6 +209,7 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | + #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 - name: Configure Conan Build From f99282276bf6bd0a927a6de1a180f77204fb98a9 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sat, 2 Dec 2023 00:47:06 +0100 Subject: [PATCH 100/101] retrigger workflow --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7f710f006..726a8b94a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -209,6 +209,7 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | + #trigger workflow #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0 From 28e4742df6aef3eb99815dcbbe02abe3cb426c66 Mon Sep 17 00:00:00 2001 From: "g.t" Date: Sat, 2 Dec 2023 01:18:15 +0100 Subject: [PATCH 101/101] trigger workflow --- .github/workflows/cmake.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 726a8b94a..7f710f006 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -209,7 +209,6 @@ jobs: working-directory: ${{github.workspace}} shell: bash run: | - #trigger workflow #conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0