From 6050fa4fd4fdd1abc2c0b2841387d37adab767e6 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 6 Oct 2021 08:41:00 +0100 Subject: [PATCH] Add some more windows checks, remove outdated CI tests (Xenial is no longer supported). --- .github/workflows/ci.yml | 51 ------------------------------------ test/Jamfile.v2 | 5 ++++ test/test_windows_defs_1.cpp | 29 ++++++++++++++++++++ test/test_windows_defs_2.cpp | 29 ++++++++++++++++++++ test/test_windows_defs_3.cpp | 27 +++++++++++++++++++ test/test_windows_defs_4.cpp | 28 ++++++++++++++++++++ 6 files changed, 118 insertions(+), 51 deletions(-) create mode 100644 test/test_windows_defs_1.cpp create mode 100644 test/test_windows_defs_2.cpp create mode 100644 test/test_windows_defs_3.cpp create mode 100644 test/test_windows_defs_4.cpp diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c104347..ce5e3275 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,57 +108,6 @@ jobs: - name: Test run: ../../../b2 toolset=$TOOLSET define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER working-directory: ../boost-root/libs/regex/test - ubuntu-xenial: - runs-on: ubuntu-16.04 - strategy: - fail-fast: false - matrix: - compiler: [ g++-5, g++-6, clang++-5.0, clang++-6.0 ] - standard: [ c++03 c++11, c++14, c++1z ] - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: '0' - - uses: mstachniuk/ci-skip@v1 - with: - commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]' - commit-filter-separator: ';' - fail-fast: true - - name: Set TOOLSET - run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV - - name: Add repository - run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" - - name: Install packages - run: sudo apt install g++-5 g++-6 clang-5.0 clang-6.0 - - name: Checkout main boost - run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root - - name: Update tools/boostdep - run: git submodule update --init tools/boostdep - working-directory: ../boost-root - - name: Copy files - run: cp -r $GITHUB_WORKSPACE/* libs/regex - working-directory: ../boost-root - - name: Install deps - run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex - working-directory: ../boost-root - - name: Bootstrap - run: ./bootstrap.sh - working-directory: ../boost-root - - name: Generate headers - run: ./b2 headers - working-directory: ../boost-root - - name: Generate user config - run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : -std=${{ matrix.standard }} ;" > ~/user-config.jam' - working-directory: ../boost-root - - name: Config info install - run: ../../../b2 config_info_travis_install toolset=$TOOLSET - working-directory: ../boost-root/libs/config/test - - name: Config info - run: ./config_info_travis - working-directory: ../boost-root/libs/config/test - - name: Test - run: ../../../b2 toolset=$TOOLSET - working-directory: ../boost-root/libs/regex/test macos: runs-on: macos-latest strategy: diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9a50918c..04514302 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -224,3 +224,8 @@ compile test_warnings.cpp BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : no ] : test_warnings_standalone ; + +compile test_windows_defs_1.cpp ; +compile test_windows_defs_2.cpp ; +compile test_windows_defs_3.cpp ; +compile test_windows_defs_4.cpp ; diff --git a/test/test_windows_defs_1.cpp b/test/test_windows_defs_1.cpp new file mode 100644 index 00000000..5415a607 --- /dev/null +++ b/test/test_windows_defs_1.cpp @@ -0,0 +1,29 @@ +/* +* +* Copyright (c) 2021 +* John Maddock +* +* Use, modification and distribution are 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) +* +*/ + +#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) +// +// Make sure our forward declarations match those in windows.h: +// + +#define STRICT + +#include +#include + +void test_proc() +{ + std::string text, re; + boost::regex exp(re); + regex_match(text, exp); +} + +#endif diff --git a/test/test_windows_defs_2.cpp b/test/test_windows_defs_2.cpp new file mode 100644 index 00000000..8707b36b --- /dev/null +++ b/test/test_windows_defs_2.cpp @@ -0,0 +1,29 @@ +/* +* +* Copyright (c) 2021 +* John Maddock +* +* Use, modification and distribution are 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) +* +*/ + +#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) +// +// Make sure our forward declarations match those in windows.h: +// + +#define NO_STRICT + +#include +#include + +void test_proc() +{ + std::string text, re; + boost::regex exp(re); + regex_match(text, exp); +} + +#endif diff --git a/test/test_windows_defs_3.cpp b/test/test_windows_defs_3.cpp new file mode 100644 index 00000000..bc369d34 --- /dev/null +++ b/test/test_windows_defs_3.cpp @@ -0,0 +1,27 @@ +/* +* +* Copyright (c) 2021 +* John Maddock +* +* Use, modification and distribution are 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) +* +*/ + +#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) +// +// Make sure our forward declarations match those in windows.h: +// + +#include +#include + +void test_proc() +{ + std::string text, re; + boost::regex exp(re); + regex_match(text, exp); +} + +#endif diff --git a/test/test_windows_defs_4.cpp b/test/test_windows_defs_4.cpp new file mode 100644 index 00000000..09a0015c --- /dev/null +++ b/test/test_windows_defs_4.cpp @@ -0,0 +1,28 @@ +/* +* +* Copyright (c) 2021 +* John Maddock +* +* Use, modification and distribution are 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) +* +*/ + +#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) +// +// Make sure our forward declarations match those in windows.h: +// +#define STRICT +#define BOOST_NO_ANSI_APIS +#include +#include + +void test_proc() +{ + std::string text, re; + boost::regex exp(re); + regex_match(text, exp); +} + +#endif