Add ARM64 and s390x testing. (#519)
This commit is contained in:
parent
20abc8f780
commit
792a091f4c
17
.drone.star
17
.drone.star
|
@ -184,6 +184,23 @@ def main(ctx):
|
|||
osx_cxx("XCode 8.3, c++14 misc", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': 'c++14', 'TEST_SUITE': 'misc', }, globalenv=globalenv),
|
||||
osx_cxx("XCode 8.3, c++14 compile_fail examples", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': 'c++14', }, globalenv=globalenv),
|
||||
osx_cxx("XCode 8.3, c++14 concepts", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': 'c++14', 'TEST_SUITE': 'concepts', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("Ubuntu ARM64 g++ std=gnu++17 arithmetic_tests", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'arithmetic_tests', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu ARM64 g++ std=gnu++17 cpp_int_tests", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'cpp_int_tests', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu ARM64 g++ std=gnu++17 functions_and_limits", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'functions_and_limits', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu ARM64 g++ std=gnu++17 conversions performance", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TEST_SUITE': 'conversions performance', 'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu ARM64 g++ std=gnu++17 misc", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'misc', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu ARM64 g++ std=gnu++17 compile_fail examples", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu ARM64 g++ std=gnu++17 concepts", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'concepts', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("Ubuntu s390x g++ std=gnu++17 arithmetic_tests", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'arithmetic_tests', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu s390x g++ std=gnu++17 cpp_int_tests", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'cpp_int_tests', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu s390x g++ std=gnu++17 functions_and_limits", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'functions_and_limits', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu s390x g++ std=gnu++17 conversions performance", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TEST_SUITE': 'conversions performance', 'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu s390x g++ std=gnu++17 misc", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'misc', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu s390x g++ std=gnu++17 compile_fail examples", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', }, globalenv=globalenv),
|
||||
linux_cxx("Ubuntu s390x g++ std=gnu++17 concepts", "g++", packages="libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'concepts', }, globalenv=globalenv),
|
||||
|
||||
]
|
||||
|
||||
# from https://github.com/boostorg/boost-ci
|
||||
|
|
|
@ -2298,6 +2298,25 @@ template <std::size_t MinBits, std::size_t MaxBits, cpp_integer_type SignType, c
|
|||
struct number_category<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > : public std::integral_constant<int, number_kind_integer>
|
||||
{};
|
||||
|
||||
#ifdef BOOST_HAS_INT128
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <std::size_t MinBits, std::size_t MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
|
||||
struct is_convertible_arithmetic<int128_type, backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
|
||||
{
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
template <std::size_t MinBits, std::size_t MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
|
||||
struct is_convertible_arithmetic<uint128_type, backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
|
||||
{
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
// see https://github.com/boostorg/multiprecision/issues/413
|
||||
// and https://github.com/boostorg/multiprecision/issues/431
|
||||
|
|
|
@ -50,7 +50,10 @@ BOOST_CXX14_CONSTEXPR T test_constexpr_add_subtract(T a)
|
|||
a += do_test_constexpr_add_subtract(a, a);
|
||||
a += do_test_constexpr_add_subtract(a, static_cast<unsigned char>(2));
|
||||
a += do_test_constexpr_add_subtract(a, static_cast<signed char>(2));
|
||||
a += do_test_constexpr_add_subtract(a, static_cast<char>(2));
|
||||
if constexpr(std::numeric_limits<char>::is_signed)
|
||||
a += do_test_constexpr_add_subtract(a, static_cast<char>(2));
|
||||
else
|
||||
a += do_test_constexpr_add_subtract(a, static_cast<signed char>(2)); // we need a consistent result.
|
||||
a += do_test_constexpr_add_subtract(a, static_cast<short>(2));
|
||||
a += do_test_constexpr_add_subtract(a, static_cast<unsigned short>(2));
|
||||
a += do_test_constexpr_add_subtract(a, static_cast<int>(2));
|
||||
|
|
|
@ -28,6 +28,10 @@ int main()
|
|||
|
||||
constexpr long long llv = (long long)b;
|
||||
|
||||
#if defined(BOOST_HAS_INT128) && !defined(BOOST_NO_CXX17_IF_CONSTEXPR)
|
||||
static_assert(std::is_constructible<int_backend, boost::int128_type>::value);
|
||||
#endif
|
||||
|
||||
static_assert(b == -108);
|
||||
static_assert(d == 554);
|
||||
static_assert(llv == -108);
|
||||
|
|
Loading…
Reference in New Issue