Skip to content

Commit 8151fe2

Browse files
authored
Merge pull request #130 from Flamefire/appveyor-cxx
Enhance CI
2 parents 20dafe0 + a334c4f commit 8151fe2

File tree

6 files changed

+60
-15
lines changed

6 files changed

+60
-15
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ jobs:
7575
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
7676
apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y g++ git cmake
7777
git config --global pack.threads 0
78+
git config --global --add safe.directory "$GITHUB_WORKSPACE" # Avoid ownership issues of repo in container
7879
7980
- uses: actions/checkout@v4
8081
with:

appveyor.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# subject to the Boost Software License, Version 1.0. (See accompanying
33
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
44
#
5-
# Copyright Mathieu Champlon 2015.
6-
# Copyright Alexander Grund 2020.
5+
# Copyright 2015 Mathieu Champlon
6+
# Copyright 2020-2025 Alexander Grund
77

88
skip_branch_with_pr: true
99

@@ -12,24 +12,49 @@ branches:
1212
- main
1313

1414
environment:
15+
global:
16+
ADDRESS_MODEL: 32,64
17+
VARIANT: debug,release
18+
1519
matrix:
1620
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
1721
BOOST: 1_65_1
1822
TOOLSET: msvc-14.0
1923
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
2024
BOOST: 1_65_1
2125
TOOLSET: msvc-14.1
22-
CXX_STANDARD: 14
2326
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
24-
BOOST: 1_67_0
27+
BOOST: 1_69_0
2528
TOOLSET: msvc-14.1
26-
CXX_STANDARD: 14
27-
# CXX_STANDARD: 17
29+
CXX_STANDARD: 14,17
30+
ADDRESS_MODEL: 64
31+
VARIANT: debug
32+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
33+
BOOST: 1_83_0
34+
TOOLSET: msvc-14.3
35+
CXX_STANDARD: 14,17,20
36+
ADDRESS_MODEL: 64
37+
VARIANT: debug
38+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
39+
BOOST: 1_86_0
40+
TOOLSET: msvc-14.3
41+
CXX_STANDARD: 14,17
42+
ADDRESS_MODEL: 64
43+
VARIANT: debug
44+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
45+
BOOST: 1_86_0
46+
TOOLSET: msvc-14.3
47+
CXX_STANDARD: 20
48+
49+
# CMake builds
2850
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
2951
BOOST: 1_65_1
3052
CMAKE: true
3153
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
32-
BOOST: 1_77_0
54+
BOOST: 1_83_0
55+
CMAKE: true
56+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
57+
BOOST: 1_86_0
3358
CMAKE: true
3459

3560
install:
@@ -55,8 +80,8 @@ build_script:
5580
- cd %BOOST_ROOT%
5681
- call bootstrap.bat
5782
- cd %APPVEYOR_BUILD_FOLDER%
58-
- if NOT "%CXX_STANDARD%"=="" set CXX_FLAGS=cxxflags=/std:c++%CXX_STANDARD%
59-
- set BUILD_ARGS=address-model=32,64 variant=debug,release
83+
- if NOT "%CXX_STANDARD%"=="" set CXX_FLAGS=cxxstd=%CXX_STANDARD%
84+
- set BUILD_ARGS=address-model=%ADDRESS_MODEL% variant=%VARIANT%
6085
- call scripts\build.bat --toolset=%TOOLSET% %CXX_FLAGS% -j3
6186

6287
for:

include/turtle/config.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// http://turtle.sourceforge.net
22
//
33
// Copyright Mathieu Champlon 2009
4+
// Copyright 2020-2025 Alexander Grund
45
//
56
// Distributed under the Boost Software License, Version 1.0.
67
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -30,4 +31,17 @@
3031
# endif
3132
#endif
3233

34+
#if BOOST_VERSION >= 107700
35+
# define MOCK_CXX_VERSION BOOST_CXX_VERSION
36+
#elif defined(_MSC_VER)
37+
# ifdef _MSVC_LANG
38+
# define MOCK_CXX_VERSION _MSVC_LANG
39+
# elif defined(_HAS_CXX17)
40+
# define MOCK_CXX_VERSION 201703L
41+
# endif
42+
#endif
43+
#ifndef MOCK_CXX_VERSION
44+
# define MOCK_CXX_VERSION __cplusplus
45+
#endif
46+
3347
#endif // MOCK_CONFIG_HPP_INCLUDED

scripts/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/sh
22

33
# Copyright (C) 2015 Mathieu Champlon
4+
# Copyright (C) 2025 Alexander Grund
45
#
56
# Distributed under the Boost Software License, Version 1.0.
67
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
@@ -18,3 +19,6 @@ scripts/build_doc.sh "$@"
1819

1920
cd "$BOOST_ROOT"
2021
./b2 "$PROJECT_DIR/doc//mock_examples" -q "$@"
22+
23+
cd "$BOOST_ROOT"
24+
./b2 "$PROJECT_DIR/test//inspect" -q "$@"

test/Jamfile.jam

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright Mathieu Champlon 2012
1+
# Copyright 2012 Mathieu Champlon
2+
# Copyright 2025 Alexander Grund
23
#
34
# Distributed under the Boost Software License version 1.0. (See
45
# accompanying file LICENSE_1_0.txt or copy at
@@ -15,11 +16,8 @@ project
1516

1617
path-constant parent : .. ;
1718

18-
alias mock_inspect :
19-
[ run /boost/tools/inspect//inspect/<variant>release
20-
: $(parent) -text -brief : : : inspect
21-
]
22-
;
19+
run /boost/tools/inspect//inspect/<variant>release : $(parent) -text -brief : : <test-info>always_show_run_output : inspect ;
20+
explicit inspect ;
2321

2422
rule run-test ( name )
2523
{

test/detail/test_is_functor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ BOOST_AUTO_TEST_CASE(function_pointer_is_functor)
6767
is_not_functor(&f2);
6868
}
6969

70+
// ptr_fun, bin1st is removed in C++17
71+
#if MOCK_CXX_VERSION < 201703L
7072
BOOST_AUTO_TEST_CASE(std_ptr_fun_is_functor)
7173
{
7274
is_functor(std::ptr_fun(&f1));
@@ -77,6 +79,7 @@ BOOST_AUTO_TEST_CASE(std_bind_first_is_functor)
7779
{
7880
is_functor(std::bind1st(std::ptr_fun(&f2), ""));
7981
}
82+
#endif
8083

8184
BOOST_AUTO_TEST_CASE(bind_is_functor)
8285
{

0 commit comments

Comments
 (0)