From d7c80fbf28a2667f4f200463ae6048de7993f18c Mon Sep 17 00:00:00 2001 From: Flamefire Date: Sun, 27 Apr 2025 17:45:14 +0200 Subject: [PATCH 1/7] GHA: Fix ownership of repo in container Avoid: > fatal: detected dubious ownership in repository at '/__w/turtle/turtle' by adding that path to the git `safe.path`. This is caused by the command(s) running inside the container but the folder being created outside the container so the owner inside the container is not what is expected by git. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc62ba3..9c8331f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,6 +75,7 @@ jobs: apt-get -o Acquire::Retries=$NET_RETRY_COUNT update apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y g++ git cmake git config --global pack.threads 0 + git config --global --add safe.directory "$GITHUB_WORKSPACE" # Avoid ownership issues of repo in container - uses: actions/checkout@v4 with: From 3555de3c89e8139de7cfc0c37760c3cf1de722b4 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 29 Apr 2025 13:27:02 +0200 Subject: [PATCH 2/7] Appveyor: Update Boost version for VS 2019 --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index faa42f7..e2d967d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,7 @@ environment: BOOST: 1_65_1 CMAKE: true - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - BOOST: 1_77_0 + BOOST: 1_83_0 CMAKE: true install: From 2e2a6525babca91aea04f790f5f4960d0e78af01 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 29 Apr 2025 18:05:41 +0200 Subject: [PATCH 3/7] Appveyor: Add VS 2022 builds --- appveyor.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e2d967d..3e0efb4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,8 +2,8 @@ # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # -# Copyright Mathieu Champlon 2015. -# Copyright Alexander Grund 2020. +# Copyright 2015 Mathieu Champlon +# Copyright 2020-2025 Alexander Grund skip_branch_with_pr: true @@ -19,18 +19,30 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 BOOST: 1_65_1 TOOLSET: msvc-14.1 - CXX_STANDARD: 14 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - BOOST: 1_67_0 + BOOST: 1_69_0 TOOLSET: msvc-14.1 - CXX_STANDARD: 14 - # CXX_STANDARD: 17 + CXX_STANDARD: 14,17 + + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + BOOST: 1_83_0 + TOOLSET: msvc-14.3 + CXX_STANDARD: 14,17,20 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + BOOST: 1_86_0 + TOOLSET: msvc-14.3 + CXX_STANDARD: 14,17,20 + + # CMake builds - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 BOOST: 1_65_1 CMAKE: true - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 BOOST: 1_83_0 CMAKE: true + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + BOOST: 1_86_0 + CMAKE: true install: - appveyor-retry powershell Invoke-WebRequest http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip -OutFile docbook-xml.zip @@ -55,7 +67,7 @@ build_script: - cd %BOOST_ROOT% - call bootstrap.bat - cd %APPVEYOR_BUILD_FOLDER% - - if NOT "%CXX_STANDARD%"=="" set CXX_FLAGS=cxxflags=/std:c++%CXX_STANDARD% + - if NOT "%CXX_STANDARD%"=="" set CXX_FLAGS=cxxstd=%CXX_STANDARD% - set BUILD_ARGS=address-model=32,64 variant=debug,release - call scripts\build.bat --toolset=%TOOLSET% %CXX_FLAGS% -j3 From f18da714f26bd9f8cc2490dd48395952ca35fd05 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 30 Apr 2025 09:27:07 +0200 Subject: [PATCH 4/7] Make inspect target explicit --- scripts/build.sh | 4 ++++ test/Jamfile.jam | 10 ++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 3261c23..2b69951 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,6 +1,7 @@ #!/bin/sh # Copyright (C) 2015 Mathieu Champlon +# Copyright (C) 2025 Alexander Grund # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) @@ -18,3 +19,6 @@ scripts/build_doc.sh "$@" cd "$BOOST_ROOT" ./b2 "$PROJECT_DIR/doc//mock_examples" -q "$@" + +cd "$BOOST_ROOT" +./b2 "$PROJECT_DIR/test//inspect" -q "$@" diff --git a/test/Jamfile.jam b/test/Jamfile.jam index 4575a0e..4cbca98 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -1,4 +1,5 @@ -# Copyright Mathieu Champlon 2012 +# Copyright 2012 Mathieu Champlon +# Copyright 2025 Alexander Grund # # Distributed under the Boost Software License version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at @@ -15,11 +16,8 @@ project path-constant parent : .. ; -alias mock_inspect : - [ run /boost/tools/inspect//inspect/release - : $(parent) -text -brief : : : inspect - ] -; +run /boost/tools/inspect//inspect/release : $(parent) -text -brief : : always_show_run_output : inspect ; +explicit inspect ; rule run-test ( name ) { From c34cbb56ab45c3f82e6062b4d7d483bb9e0c8116 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 30 Apr 2025 12:32:02 +0200 Subject: [PATCH 5/7] Add MOCK_CXX_VERSION macro --- include/turtle/config.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/turtle/config.hpp b/include/turtle/config.hpp index 111d09d..8e42051 100644 --- a/include/turtle/config.hpp +++ b/include/turtle/config.hpp @@ -1,6 +1,7 @@ // http://turtle.sourceforge.net // // Copyright Mathieu Champlon 2009 +// Copyright 2020-2025 Alexander Grund // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -30,4 +31,17 @@ # endif #endif +#if BOOST_VERSION >= 107700 +# define MOCK_CXX_VERSION BOOST_CXX_VERSION +#elif defined(_MSC_VER) +# ifdef _MSVC_LANG +# define MOCK_CXX_VERSION _MSVC_LANG +# elif defined(_HAS_CXX17) +# define MOCK_CXX_VERSION 201703L +# endif +#endif +#ifndef MOCK_CXX_VERSION +# define MOCK_CXX_VERSION __cplusplus +#endif + #endif // MOCK_CONFIG_HPP_INCLUDED From 78a4fbe129d571849a68c59b2843b86a5afd91d3 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 30 Apr 2025 12:36:56 +0200 Subject: [PATCH 6/7] Fix test in C++17 and up --- test/detail/test_is_functor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/detail/test_is_functor.cpp b/test/detail/test_is_functor.cpp index 1a50e29..0a2f5b2 100644 --- a/test/detail/test_is_functor.cpp +++ b/test/detail/test_is_functor.cpp @@ -67,6 +67,8 @@ BOOST_AUTO_TEST_CASE(function_pointer_is_functor) is_not_functor(&f2); } +// ptr_fun, bin1st is removed in C++17 +#if MOCK_CXX_VERSION < 201703L BOOST_AUTO_TEST_CASE(std_ptr_fun_is_functor) { is_functor(std::ptr_fun(&f1)); @@ -77,6 +79,7 @@ BOOST_AUTO_TEST_CASE(std_bind_first_is_functor) { is_functor(std::bind1st(std::ptr_fun(&f2), "")); } +#endif BOOST_AUTO_TEST_CASE(bind_is_functor) { From a334c4fb3b0221f871b44d664fafcd9dff64edfa Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 30 Apr 2025 15:40:17 +0200 Subject: [PATCH 7/7] Split appveyor jobs to fit time limit --- appveyor.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3e0efb4..e36753b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,6 +12,10 @@ branches: - main environment: + global: + ADDRESS_MODEL: 32,64 + VARIANT: debug,release + matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 BOOST: 1_65_1 @@ -23,15 +27,24 @@ environment: BOOST: 1_69_0 TOOLSET: msvc-14.1 CXX_STANDARD: 14,17 - + ADDRESS_MODEL: 64 + VARIANT: debug - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 BOOST: 1_83_0 TOOLSET: msvc-14.3 CXX_STANDARD: 14,17,20 + ADDRESS_MODEL: 64 + VARIANT: debug - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 BOOST: 1_86_0 TOOLSET: msvc-14.3 - CXX_STANDARD: 14,17,20 + CXX_STANDARD: 14,17 + ADDRESS_MODEL: 64 + VARIANT: debug + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + BOOST: 1_86_0 + TOOLSET: msvc-14.3 + CXX_STANDARD: 20 # CMake builds - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 @@ -68,7 +81,7 @@ build_script: - call bootstrap.bat - cd %APPVEYOR_BUILD_FOLDER% - if NOT "%CXX_STANDARD%"=="" set CXX_FLAGS=cxxstd=%CXX_STANDARD% - - set BUILD_ARGS=address-model=32,64 variant=debug,release + - set BUILD_ARGS=address-model=%ADDRESS_MODEL% variant=%VARIANT% - call scripts\build.bat --toolset=%TOOLSET% %CXX_FLAGS% -j3 for: