Skip to content

Commit 97d5ae8

Browse files
authored
Merge pull request #715 from cppalliance/develop
Merge for v2.2.0
2 parents 3976725 + 4bf4e48 commit 97d5ae8

29 files changed

+900
-352
lines changed

.drone.jsonnet

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,6 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
9898

9999
[
100100

101-
linux_pipeline(
102-
"Linux 24.04 GCC 14 GNU 32 ASAN",
103-
"cppalliance/droneubuntu2404:1",
104-
{ TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '03,11,14,17,20,23', ADDRMD: '32', CXXFLAGS: "-fexcess-precision=fast", CXXSTDDIALECT: "gnu" } + asan,
105-
"g++-14-multilib",
106-
),
107-
108-
linux_pipeline(
109-
"Linux 24.04 GCC 14 GNU 64 ASAN",
110-
"cppalliance/droneubuntu2404:1",
111-
{ TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '03,11,14,17,20,23', ADDRMD: '64', CXXFLAGS: "-fexcess-precision=fast", CXXSTDDIALECT: "gnu" } + asan,
112-
"g++-14-multilib",
113-
),
114-
115101
linux_pipeline(
116102
"Linux 18.04 GCC 8 32/64",
117103
"cppalliance/droneubuntu1804:1",

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
GIT_FETCH_JOBS: 8
2323
NET_RETRY_COUNT: 5
2424
DEFAULT_BUILD_VARIANT: debug,release
25+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
2526

2627
jobs:
2728
posix:

.github/workflows/fuzz.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ env:
1717
GIT_FETCH_JOBS: 8
1818
NET_RETRY_COUNT: 5
1919
DEFAULT_BUILD_VARIANT: debug,release
20+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
2021

2122
jobs:
2223
posix:

.github/workflows/qemu.yml

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# Copyright 2020-2021 Peter Dimov
2+
# Copyright 2021 Andrey Semashev
3+
# Copyright 2021 Alexander Grund
4+
# Copyright 2022 James E. King III
5+
# Copyright 2024 Matt Borland
6+
# Distributed under the Boost Software License, Version 1.0.
7+
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
8+
---
9+
name: qemu
10+
11+
on:
12+
pull_request:
13+
push:
14+
branches:
15+
- master
16+
- develop
17+
- bugfix/**
18+
- feature/**
19+
- fix/**
20+
- pr/**
21+
22+
env:
23+
GIT_FETCH_JOBS: 8
24+
NET_RETRY_COUNT: 5
25+
B2_CI_VERSION: 1
26+
B2_VARIANT: release
27+
B2_LINK: static
28+
LCOV_BRANCH_COVERAGE: 0
29+
CODECOV_NAME: Github Actions
30+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
31+
32+
jobs:
33+
posix:
34+
defaults:
35+
run:
36+
shell: bash
37+
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
include:
42+
# multiarch testing
43+
- { name: PPC64LE-GCC, multiarch: yes,
44+
compiler: gcc, cxxstd: '14', os: ubuntu-22.04, ccache: no, distro: alpine, edition: edge, arch: ppc64le }
45+
- { name: PPC64LE-Clang, multiarch: yes,
46+
compiler: clang, cxxstd: '14', os: ubuntu-22.04, ccache: no, distro: alpine, edition: edge, arch: ppc64le }
47+
48+
49+
timeout-minutes: 360
50+
runs-on: ${{matrix.os}}
51+
container: ${{matrix.container}}
52+
env: {B2_USE_CCACHE: 1}
53+
54+
steps:
55+
- name: Setup environment
56+
run: |
57+
if [ -f "/etc/debian_version" ]; then
58+
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
59+
export DEBIAN_FRONTEND=noninteractive
60+
fi
61+
if [ -n "${{matrix.container}}" ] && [ -f "/etc/debian_version" ]; then
62+
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
63+
apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y sudo software-properties-common curl
64+
# Need (newer) git, and the older Ubuntu container may require requesting the key manually using port 80
65+
curl -sSL --retry ${NET_RETRY_COUNT:-5} 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xE1DD270288B4E6030699E45FA1715D88E1DF1F24' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/git-core_ubuntu_ppa.gpg
66+
for i in {1..${NET_RETRY_COUNT:-3}}; do sudo -E add-apt-repository -y ppa:git-core/ppa && break || sleep 10; done
67+
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
68+
osver=$(lsb_release -sr | cut -f1 -d.)
69+
pkgs="g++ git"
70+
# Ubuntu 22+ has only Python 3 in the repos
71+
if [ -n "$osver" ] && [ "$osver" -ge "22" ]; then
72+
pkgs+=" python-is-python3 libpython3-dev"
73+
else
74+
pkgs+=" python libpython-dev"
75+
fi
76+
apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs locales
77+
sudo locale-gen de_DE.UTF-8
78+
sudo update-locale
79+
fi
80+
# For jobs not compatible with ccache, use "ccache: no" in the matrix
81+
if [[ "${{ matrix.ccache }}" == "no" ]]; then
82+
echo "B2_USE_CCACHE=0" >> $GITHUB_ENV
83+
fi
84+
git config --global pack.threads 0
85+
if [[ "${{matrix.container}}" == "ubuntu:16.04" ]] || [[ "${{matrix.container}}" == "ubuntu:18.04" ]]; then
86+
# Ubuntu 16/18 can't run Node 20, so stick to older actions: https://github.com/actions/checkout/issues/1590
87+
echo "GHA_USE_NODE_20=false" >> $GITHUB_ENV
88+
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
89+
else
90+
echo "GHA_USE_NODE_20=true" >> $GITHUB_ENV
91+
fi
92+
93+
- uses: actions/checkout@v3
94+
if: env.GHA_USE_NODE_20 == 'false'
95+
with:
96+
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
97+
fetch-depth: ${{ matrix.coverage && '0' || '1' }}
98+
- uses: actions/checkout@v4
99+
if: env.GHA_USE_NODE_20 == 'true'
100+
with:
101+
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
102+
fetch-depth: ${{ matrix.coverage && '0' || '1' }}
103+
104+
- name: Cache ccache
105+
uses: actions/cache@v3
106+
if: env.B2_USE_CCACHE && env.GHA_USE_NODE_20 == 'false'
107+
with:
108+
path: ~/.ccache
109+
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
110+
restore-keys: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-
111+
112+
- name: Cache ccache
113+
uses: actions/cache@v4
114+
if: env.B2_USE_CCACHE && env.GHA_USE_NODE_20 == 'true'
115+
with:
116+
path: ~/.ccache
117+
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
118+
restore-keys: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-
119+
120+
- name: Fetch Boost.CI
121+
uses: actions/checkout@v3
122+
if: env.GHA_USE_NODE_20 == 'false'
123+
with:
124+
repository: boostorg/boost-ci
125+
ref: master
126+
path: boost-ci-cloned
127+
128+
- name: Fetch Boost.CI
129+
uses: actions/checkout@v4
130+
if: env.GHA_USE_NODE_20 == 'true'
131+
with:
132+
repository: boostorg/boost-ci
133+
ref: master
134+
path: boost-ci-cloned
135+
136+
- name: Get CI scripts folder
137+
run: |
138+
# Copy ci folder if not testing Boost.CI
139+
[[ "$GITHUB_REPOSITORY" =~ "boost-ci" ]] || cp -r boost-ci-cloned/ci .
140+
rm -rf boost-ci-cloned
141+
142+
- name: Install packages
143+
if: startsWith(matrix.os, 'ubuntu')
144+
run: |
145+
SOURCE_KEYS=(${{join(matrix.source_keys, ' ')}})
146+
SOURCES=(${{join(matrix.sources, ' ')}})
147+
# Add this by default
148+
SOURCE_KEYS+=('http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F')
149+
SOURCES+=(ppa:ubuntu-toolchain-r/test)
150+
151+
ci/add-apt-keys.sh "${SOURCE_KEYS[@]}"
152+
# Initial update before adding sources required to get e.g. keys
153+
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
154+
ci/add-apt-repositories.sh "${SOURCES[@]}"
155+
156+
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
157+
if [[ -z "${{matrix.install}}" ]]; then
158+
pkgs="${{matrix.compiler}}"
159+
pkgs="${pkgs/gcc-/g++-}"
160+
else
161+
pkgs="${{matrix.install}}"
162+
fi
163+
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs
164+
165+
- name: Setup GCC Toolchain
166+
if: matrix.gcc_toolchain
167+
run: |
168+
GCC_TOOLCHAIN_ROOT="$HOME/gcc-toolchain"
169+
echo "GCC_TOOLCHAIN_ROOT=$GCC_TOOLCHAIN_ROOT" >> $GITHUB_ENV
170+
if ! command -v dpkg-architecture; then
171+
apt-get install -y dpkg-dev
172+
fi
173+
MULTIARCH_TRIPLET="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
174+
mkdir -p "$GCC_TOOLCHAIN_ROOT"
175+
ln -s /usr/include "$GCC_TOOLCHAIN_ROOT/include"
176+
ln -s /usr/bin "$GCC_TOOLCHAIN_ROOT/bin"
177+
mkdir -p "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET"
178+
ln -s "/usr/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}"
179+
180+
- name: Setup multiarch
181+
if: matrix.multiarch
182+
env:
183+
BDDE_DISTRO: ${{matrix.distro}}
184+
BDDE_EDITION: ${{matrix.edition}}
185+
BDDE_ARCH: ${{matrix.arch}}
186+
run: ci/github/setup_bdde.sh
187+
188+
- name: Setup Boost
189+
env:
190+
B2_ADDRESS_MODEL: ${{matrix.address-model}}
191+
B2_COMPILER: ${{matrix.compiler}}
192+
B2_CXXSTD: ${{matrix.cxxstd}}
193+
B2_SANITIZE: ${{matrix.sanitize}}
194+
B2_STDLIB: ${{matrix.stdlib}}
195+
# More entries can be added in the same way, see the B2_ARGS assignment in ci/enforce.sh for the possible keys.
196+
B2_DEFINES: 'BOOST_DECIMAL_QEMU_TEST'
197+
# Variables set here (to non-empty) will override the top-level environment variables, e.g.
198+
# B2_VARIANT: ${{matrix.variant}}
199+
# Set the (B2) target(s) to build, defaults to the test folder of the current library
200+
# Can alternatively be done like this in the build step or in the build command of the build step, e.g. `run: B2_TARGETS=libs/$SELF/doc ci/build.sh`
201+
# B2_TARGETS: libs/foo/test//bar
202+
run: source ci/github/install.sh
203+
204+
- name: Run tests
205+
if: '!matrix.coverity'
206+
run: ci/build.sh
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e1000a00000000000000000000p06
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
50000100000000000000078591790822

include/boost/decimal/charconv.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ BOOST_DECIMAL_CONSTEXPR auto to_chars_hex_impl(char* first, char* last, const Ta
615615

616616
int exp {};
617617
Unsigned_Integer significand = frexp10(value, &exp);
618-
618+
BOOST_DECIMAL_ASSERT(significand != 0);
619619
// Strip zeros of the significand since frexp10 normalizes it
620620
while (significand % 10U == 0)
621621
{

0 commit comments

Comments
 (0)