Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Jun 25, 2023
2 parents b96aba4 + f20b831 commit 51efec4
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 67 deletions.
73 changes: 28 additions & 45 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt

#
# Generic Azure Pipelines build script for boostorg repositories
# See: https://github.com/boostorg/boost-ci/
#
# Instructions for customizing this script for your library:
#
# 1. Customize the compilers and language levels you want.
# 2. If you have more than include/, src/, test/, example/, examples/,
# benchmark/ or tools/ directories, set the environment variable DEPINST.
# For example if your build uses code in "bench/" and "fog/" directories:
# - DEPINST: --include bench --include fog
# 3. Enable pull request builds in your boostorg/<library> account.
#
# That's it - the script will do everything else for you.

trigger:
branches:
include:
Expand All @@ -44,44 +29,42 @@ parameters:
- name: jobs
type: object
default:
- { compiler: gcc-4.8, cxxstd: '11', os: ubuntu-18.04 }
- { compiler: gcc-4.9, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' }
- { compiler: gcc-5, cxxstd: '11', os: ubuntu-18.04 }
- { compiler: gcc-6, cxxstd: '11,14', os: ubuntu-18.04 }
- { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-18.04 }
- { compiler: gcc-4.8, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: gcc-4.9, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: gcc-5, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:18.04' }
- { compiler: gcc-6, cxxstd: '11,14', os: ubuntu-20.04, container: 'ubuntu:18.04' }
- { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-20.04 }
- { compiler: gcc-8, cxxstd: '14,17,2a', os: ubuntu-20.04 }
- { compiler: gcc-9, cxxstd: '14,17,2a', os: ubuntu-20.04 }
- { compiler: gcc-10, cxxstd: '14,17,20', os: ubuntu-20.04 }
- { compiler: gcc-11, cxxstd: '14,17,20', os: ubuntu-20.04 }
- { compiler: clang-3.5, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.6, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.7, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.8, cxxstd: '11,14', os: ubuntu-18.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.9, cxxstd: '11,14', os: ubuntu-18.04 }
- { compiler: clang-4.0, cxxstd: '11,14', os: ubuntu-18.04 }
- { compiler: clang-5.0, cxxstd: '11,14,17', os: ubuntu-18.04 }
- { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-18.04, install: 'clang-6.0 libc6-dbg libc++-dev libc++abi-dev libstdc++-8-dev' }
- { compiler: clang-7, cxxstd: '14,17', os: ubuntu-18.04, install: 'clang-7 libc6-dbg libc++-dev libstdc++-8-dev' }
- { compiler: clang-8, cxxstd: '14,17', os: ubuntu-18.04, install: 'clang-8 libc6-dbg libc++-dev libstdc++-8-dev' }
- { compiler: clang-3.5, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.6, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.7, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.8, cxxstd: '11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.9, cxxstd: '11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-4.0, cxxstd: '11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-5.0, cxxstd: '11,14,17', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-20.04 }
- { compiler: clang-7, cxxstd: '14,17', os: ubuntu-20.04 }
- { compiler: clang-8, cxxstd: '14,17', os: ubuntu-20.04 }
- { compiler: clang-9, cxxstd: '14,17,2a', os: ubuntu-20.04 }
- { compiler: clang-10, cxxstd: '14,17,20', os: ubuntu-20.04 }
- { compiler: clang-11, cxxstd: '14,17,20', os: ubuntu-20.04 }
- { compiler: clang-12, cxxstd: '14,17,20', os: ubuntu-20.04 }
- { compiler: clang-11, cxxstd: '14,17,20', os: ubuntu-22.04 }
- { compiler: clang-12, cxxstd: '14,17,20', os: ubuntu-22.04 }
- { name: Linux_clang_6_libcxx,
compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-18.04, install: 'clang-6.0 libc6-dbg libc++-dev libc++abi-dev libstdc++-8-dev', env: {B2_STDLIB: libc++ } }
compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-20.04, container: 'ubuntu:18.04', install: 'clang-6.0 libc++-dev libc++abi-dev', env: {B2_STDLIB: libc++ } }
# OSX
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.2.1 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.3 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.3.1 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.4.1 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.5 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.6 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.7 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.0.1 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.1.1 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.2 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.3 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.4 }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-11, xcode: '11.7' }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-11, xcode: '12.4' }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-11, xcode: '12.5.1' }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-11, xcode: '13.0' }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.1' }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.2.1' }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.3.1' }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.4' }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.4.1' }
- { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '14.0.1' }

stages:
- stage: Test
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: Flamefire
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ jobs:
matrix:
include:
# Linux, gcc
- { compiler: gcc-4.4, cxxstd: '98,0x', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: gcc-4.6, cxxstd: '03,0x', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: gcc-4.7, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: gcc-4.8, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:18.04' }
- { compiler: gcc-4.9, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: gcc-4.4, cxxstd: '98,0x', os: ubuntu-22.04, container: 'ubuntu:16.04' }
- { compiler: gcc-4.6, cxxstd: '03,0x', os: ubuntu-22.04, container: 'ubuntu:16.04' }
- { compiler: gcc-4.7, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:16.04' }
- { compiler: gcc-4.8, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:16.04' }
- { compiler: gcc-4.9, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:16.04' }
- { compiler: gcc-5, cxxstd: '03,11,14,1z', os: ubuntu-22.04, container: 'ubuntu:18.04' }
- { compiler: gcc-6, cxxstd: '03,11,14,17', os: ubuntu-22.04, container: 'ubuntu:18.04' }
- { compiler: gcc-7, cxxstd: '03,11,14,17', os: ubuntu-22.04, container: 'ubuntu:18.04' }
- { compiler: gcc-8, cxxstd: '03,11,14,17,2a', os: ubuntu-22.04, container: 'ubuntu:18.04' }
- { compiler: gcc-9, cxxstd: '03,11,14,17,2a', os: ubuntu-22.04, container: 'ubuntu:18.04' }
- { compiler: gcc-7, cxxstd: '03,11,14,17', os: ubuntu-20.04 }
- { compiler: gcc-8, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04 }
- { compiler: gcc-9, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04 }
- { compiler: gcc-10, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 }
- { compiler: gcc-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 }
- { compiler: gcc-12, cxxstd: '03,11,14,17,20', os: ubuntu-22.04 }
Expand All @@ -63,10 +63,10 @@ jobs:
compiler: gcc-8, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04, install: 'g++-8-multilib', address-model: '32,64' }

# Linux, clang
- { compiler: clang-3.5, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.6, cxxstd: '03,11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.7, cxxstd: '03,11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.8, cxxstd: '03,11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.5, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.6, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.7, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.8, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:16.04' }
- { compiler: clang-3.9, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:18.04' }
- { compiler: clang-4.0, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:18.04' }
- { compiler: clang-5.0, cxxstd: '03,11,14,1z', os: ubuntu-22.04, container: 'ubuntu:18.04' }
Expand All @@ -88,7 +88,7 @@ jobs:
compiler: clang-14, cxxstd: '03,11,14,17,20', os: ubuntu-22.04, stdlib: libc++, install: 'clang-14 libc++-14-dev libc++abi-14-dev' }

# OSX, clang
- { compiler: clang, cxxstd: '03,11,14,17,2a', os: macos-10.15, sanitize: yes }
- { compiler: clang, cxxstd: '03,11,14,17,2a', os: macos-11, sanitize: yes }

timeout-minutes: 120
runs-on: ${{matrix.os}}
Expand Down
10 changes: 9 additions & 1 deletion build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,20 @@ project boost/nowide
: source-location ../src
: requirements $(requirements)
[ requires
cxx11_auto_declarations
cxx11_char16_t
cxx11_char32_t
cxx11_constexpr
cxx11_decltype
cxx11_defaulted_functions
cxx11_noexcept
cxx11_nullptr
cxx11_override
cxx11_rvalue_references
cxx11_static_assert
cxx11_template_aliases
cxx11_variadic_templates
]
[ check-target-builds ../config//cxx11_moveable_fstreams "std::fstream is moveable and swappable" : : <build>no ]
[ check-target-builds ../config//lfs_support "Has Large File Support" : : <define>BOOST_NOWIDE_NO_LFS ] <boost.nowide.lfs>no:<define>BOOST_NOWIDE_NO_LFS
[ check-target-builds ../config//attribute_init_priority "Has attribute init_priority" : <define>BOOST_NOWIDE_HAS_INIT_PRIORITY ]
: usage-requirements $(requirements)
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wsuggest-override _BOOST_NOWIDE_SUGGEST_OVERRIDE_SUPPORTED)

add_library(boost_nowide_file_test_helpers STATIC file_test_helpers.cpp)
target_link_libraries(boost_nowide_file_test_helpers PRIVATE PRIVATE Boost::nowide)
target_link_libraries(boost_nowide_file_test_helpers PRIVATE Boost::nowide)
target_compile_definitions(boost_nowide_file_test_helpers PRIVATE BOOST_ALL_NO_LIB)

if(NOT TARGET tests)
Expand Down
7 changes: 1 addition & 6 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@ project : requirements
<include>.
<warnings>pedantic
<warnings-as-errors>on
[ requires
cxx11_defaulted_functions
cxx11_noexcept
cxx11_rvalue_references
cxx11_static_assert
]
[ check-target-builds ../config//cxx11_moveable_fstreams "std::fstream is moveable and swappable" : : <build>no ]
;

lib shell32 ;
lib file_test_helpers : file_test_helpers.cpp : <link>static -<library>/boost/nowide//boost_nowide ;
explicit file_test_helpers ;

run test_codecvt.cpp ;
run test_convert.cpp ;
Expand Down
8 changes: 8 additions & 0 deletions test/test_codecvt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,15 @@ void test_codecvt_err()
TEST_EQ(cvt.in(mb, from, from_end, from_next, to, to_end, to_next), cvt_type::partial);
TEST(from_next == from + 1);
TEST(to_next == to + 1);
// False positive in GCC 13 in MinGW
#if defined(__GNUC__) && __GNUC__ >= 13
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
#endif
TEST(std::wstring(to, to_next) == std::wstring(L"1"));
#if defined(__GNUC__) && __GNUC__ >= 13
#pragma GCC diagnostic pop
#endif
}
{
char buf[4] = {};
Expand Down
2 changes: 1 addition & 1 deletion test/test_filebuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ void test_xsgetn(const std::string& filepath, bool binary)
buffer[0] = origStr[0];

TEST_EQ(buf.sgetn(&str[0], 0), 0);
#if defined(__GNUC__) && __GNUC__ >= 7
#if defined(__GNUC__) && __GNUC__ >= 12
// GCC may not detect that the negative value is checked by xsgetn
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wrestrict"
Expand Down

0 comments on commit 51efec4

Please sign in to comment.