From e1c525914c1f91470256ab715079c31049e81dfd Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 10 Jul 2021 18:57:20 +0200 Subject: [PATCH 1/2] Add CI jobs to build tests in debug mode --- .gitlab-ci.yml | 18 ++++++++++++++++++ CI/before_script.linux.sh | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ceba2841fe..47c3426913 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,6 +76,15 @@ Debian_GCC_tests: CCACHE_SIZE: 1G BUILD_TESTS_ONLY: 1 +Debian_GCC_tests_Debug: + extends: Debian_GCC + cache: + key: Debian_GCC_tests_Debug.v1 + variables: + CCACHE_SIZE: 1G + BUILD_TESTS_ONLY: 1 + CMAKE_BUILD_TYPE: Debug + Debian_GCC_Static_Deps: extends: Debian_GCC cache: @@ -118,6 +127,15 @@ Debian_Clang_tests: CCACHE_SIZE: 1G BUILD_TESTS_ONLY: 1 +Debian_Clang_tests_Debug: + extends: Debian_Clang + cache: + key: Debian_Clang_tests_Debug.v1 + variables: + CCACHE_SIZE: 1G + BUILD_TESTS_ONLY: 1 + CMAKE_BUILD_TYPE: Debug + .MacOS: image: macos-11-xcode-12 tags: diff --git a/CI/before_script.linux.sh b/CI/before_script.linux.sh index 17292e4e98..4344b5212f 100755 --- a/CI/before_script.linux.sh +++ b/CI/before_script.linux.sh @@ -34,6 +34,12 @@ if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then ) fi +if [[ "${CMAKE_BUILD_TYPE}" ]]; then + CMAKE_CONF_OPTS+=( + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + ) +fi + mkdir -p build cd build From 73639a93b64041102c43c8f9e0068bac655b4164 Mon Sep 17 00:00:00 2001 From: elsid Date: Sun, 11 Jul 2021 13:22:26 +0200 Subject: [PATCH 2/2] Avoid CTAD to fix macOS build ../../../apps/openmw/engine.cpp:706:23: error: no viable constructor or deduction guide for deduction of template arguments of 'function' ? std::function(ScheduleNonDialogMessageBox {}) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1430:48: note: candidate template ignored: could not match 'function<_Fp>' against '(anonymous namespace)::ScheduleNonDialogMessageBox' template class _LIBCPP_TEMPLATE_VIS function; // undefined ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1430:48: note: candidate function template not viable: requires 0 arguments, but 1 was provided ../../../apps/openmw/engine.cpp:707:23: error: no viable constructor or deduction guide for deduction of template arguments of 'function' : std::function(IgnoreString {}) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1430:48: note: candidate template ignored: could not match 'function<_Fp>' against '(anonymous namespace)::IgnoreString' template class _LIBCPP_TEMPLATE_VIS function; // undefined ^ --- apps/openmw/engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 1bd79cdd02..f554821b3d 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -703,8 +703,8 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings) mCfgMgr.getScreenshotPath().string(), Settings::Manager::getString("screenshot format", "General"), Settings::Manager::getBool("notify on saved screenshot", "General") - ? std::function(ScheduleNonDialogMessageBox {}) - : std::function(IgnoreString {}) + ? std::function(ScheduleNonDialogMessageBox {}) + : std::function(IgnoreString {}) ) );