Merge pull request #130 from Flamefire/appveyor-cxx

Enhance CI
This commit is contained in:
Alexander Grund 2025-05-02 12:37:41 +02:00 committed by GitHub
commit 8151fe20c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 60 additions and 15 deletions

View file

@ -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:

View file

@ -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
@ -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
@ -19,17 +23,38 @@ 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
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
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
BOOST: 1_65_1
CMAKE: true
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
BOOST: 1_77_0
BOOST: 1_83_0
CMAKE: true
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
BOOST: 1_86_0
CMAKE: true
install:
@ -55,8 +80,8 @@ build_script:
- cd %BOOST_ROOT%
- call bootstrap.bat
- cd %APPVEYOR_BUILD_FOLDER%
- if NOT "%CXX_STANDARD%"=="" set CXX_FLAGS=cxxflags=/std:c++%CXX_STANDARD%
- set BUILD_ARGS=address-model=32,64 variant=debug,release
- if NOT "%CXX_STANDARD%"=="" set CXX_FLAGS=cxxstd=%CXX_STANDARD%
- set BUILD_ARGS=address-model=%ADDRESS_MODEL% variant=%VARIANT%
- call scripts\build.bat --toolset=%TOOLSET% %CXX_FLAGS% -j3
for:

View file

@ -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

View file

@ -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 "$@"

View file

@ -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/<variant>release
: $(parent) -text -brief : : : inspect
]
;
run /boost/tools/inspect//inspect/<variant>release : $(parent) -text -brief : : <test-info>always_show_run_output : inspect ;
explicit inspect ;
rule run-test ( name )
{

View file

@ -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)
{