Skip to content

Commit da4fdb3

Browse files
authored
Merge pull request #512 from cppalliance/develop
Merge to master for beta
2 parents 503006f + d2be0f4 commit da4fdb3

File tree

284 files changed

+59353
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+59353
-123
lines changed

.drone.jsonnet

Lines changed: 330 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,330 @@
1+
# Copyright 2022, 2023 Peter Dimov
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# https://www.boost.org/LICENSE_1_0.txt
4+
5+
local library = "decimal";
6+
7+
local triggers =
8+
{
9+
branch: [ "master", "develop", "feature/*" ]
10+
};
11+
12+
local ubsan = { UBSAN: '1', UBSAN_OPTIONS: 'print_stacktrace=1' };
13+
local asan = { ASAN: '1' };
14+
15+
local linux_pipeline(name, image, environment, packages = "", sources = [], arch = "amd64") =
16+
{
17+
name: name,
18+
kind: "pipeline",
19+
type: "docker",
20+
trigger: triggers,
21+
platform:
22+
{
23+
os: "linux",
24+
arch: arch
25+
},
26+
steps:
27+
[
28+
{
29+
name: "everything",
30+
image: image,
31+
environment: environment,
32+
commands:
33+
[
34+
'set -e',
35+
'wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -',
36+
] +
37+
(if sources != [] then [ ('apt-add-repository "' + source + '"') for source in sources ] else []) +
38+
(if packages != "" then [ 'apt-get update', 'apt-get -y install ' + packages ] else []) +
39+
[
40+
'export LIBRARY=' + library,
41+
'./.drone/drone.sh',
42+
]
43+
}
44+
]
45+
};
46+
47+
local macos_pipeline(name, environment, xcode_version = "12.2", osx_version = "catalina", arch = "amd64") =
48+
{
49+
name: name,
50+
kind: "pipeline",
51+
type: "exec",
52+
trigger: triggers,
53+
platform: {
54+
"os": "darwin",
55+
"arch": arch
56+
},
57+
node: {
58+
"os": osx_version
59+
},
60+
steps: [
61+
{
62+
name: "everything",
63+
environment: environment + { "DEVELOPER_DIR": "/Applications/Xcode-" + xcode_version + ".app/Contents/Developer" },
64+
commands:
65+
[
66+
'export LIBRARY=' + library,
67+
'./.drone/drone.sh',
68+
]
69+
}
70+
]
71+
};
72+
73+
local windows_pipeline(name, image, environment, arch = "amd64") =
74+
{
75+
name: name,
76+
kind: "pipeline",
77+
type: "docker",
78+
trigger: triggers,
79+
platform:
80+
{
81+
os: "windows",
82+
arch: arch
83+
},
84+
"steps":
85+
[
86+
{
87+
name: "everything",
88+
image: image,
89+
environment: environment,
90+
commands:
91+
[
92+
'cmd /C .drone\\\\drone.bat ' + library,
93+
]
94+
}
95+
]
96+
};
97+
98+
[
99+
100+
linux_pipeline(
101+
"Linux 23.04 GCC 13 GNU 32 ASAN",
102+
"cppalliance/droneubuntu2304:1",
103+
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '03,11,14,17,20,23', ADDRMD: '32', CXXFLAGS: "-fexcess-precision=fast", CXXSTDDIALECT: "gnu" } + asan,
104+
"g++-13-multilib",
105+
),
106+
107+
linux_pipeline(
108+
"Linux 23.04 GCC 13 GNU 64 ASAN",
109+
"cppalliance/droneubuntu2304:1",
110+
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '03,11,14,17,20,23', ADDRMD: '64', CXXFLAGS: "-fexcess-precision=fast", CXXSTDDIALECT: "gnu" } + asan,
111+
"g++-13-multilib",
112+
),
113+
114+
linux_pipeline(
115+
"Linux 18.04 GCC 8 32/64",
116+
"cppalliance/droneubuntu1804:1",
117+
{ TOOLSET: 'gcc', COMPILER: 'g++-8', CXXSTD: '03,11,14,17', ADDRMD: '32,64' },
118+
"g++-8-multilib",
119+
),
120+
121+
linux_pipeline(
122+
"Linux 20.04 GCC 9* 32/64",
123+
"cppalliance/droneubuntu2004:1",
124+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17,2a', ADDRMD: '32,64' },
125+
),
126+
127+
linux_pipeline(
128+
"Linux 20.04 GCC 9* ARM64",
129+
"cppalliance/droneubuntu2004:multiarch",
130+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17,2a' },
131+
arch="arm64",
132+
),
133+
134+
linux_pipeline(
135+
"Linux 20.04 GCC 9* ARM64 - ASAN",
136+
"cppalliance/droneubuntu2004:multiarch",
137+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17,2a' } + asan,
138+
arch="arm64",
139+
),
140+
141+
linux_pipeline(
142+
"Linux 20.04 GCC 9* S390x",
143+
"cppalliance/droneubuntu2004:multiarch",
144+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17,2a' },
145+
arch="s390x",
146+
),
147+
148+
linux_pipeline(
149+
"Linux 20.04 GCC 10 32/64",
150+
"cppalliance/droneubuntu2004:1",
151+
{ TOOLSET: 'gcc', COMPILER: 'g++-10', CXXSTD: '03,11,14,17,20', ADDRMD: '32,64' },
152+
"g++-10-multilib",
153+
),
154+
155+
linux_pipeline(
156+
"Linux 22.04 GCC 11* 32/64",
157+
"cppalliance/droneubuntu2204:1",
158+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17,2a', ADDRMD: '32,64' },
159+
),
160+
161+
linux_pipeline(
162+
"Linux 22.04 GCC 12 32 ASAN",
163+
"cppalliance/droneubuntu2204:1",
164+
{ TOOLSET: 'gcc', COMPILER: 'g++-12', CXXSTD: '03,11,14,17,20,2b', ADDRMD: '32' } + asan,
165+
"g++-12-multilib",
166+
),
167+
168+
linux_pipeline(
169+
"Linux 22.04 GCC 12 64 ASAN",
170+
"cppalliance/droneubuntu2204:1",
171+
{ TOOLSET: 'gcc', COMPILER: 'g++-12', CXXSTD: '03,11,14,17,20,2b', ADDRMD: '64' } + asan,
172+
"g++-12-multilib",
173+
),
174+
175+
linux_pipeline(
176+
"Linux 23.04 GCC 13 32/64",
177+
"cppalliance/droneubuntu2304:1",
178+
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '03,11,14,17,20,23', ADDRMD: '32,64', CXXFLAGS: "-fexcess-precision=fast" },
179+
"g++-13-multilib",
180+
),
181+
182+
linux_pipeline(
183+
"Linux 23.04 GCC 13 GNU 32/64",
184+
"cppalliance/droneubuntu2304:1",
185+
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '03,11,14,17,20,23', ADDRMD: '32,64', CXXFLAGS: "-fexcess-precision=fast", CXXSTDDIALECT: "gnu" },
186+
"g++-13-multilib",
187+
),
188+
189+
linux_pipeline(
190+
"Linux 18.04 GCC 7* 32",
191+
"cppalliance/droneubuntu1804:1",
192+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17', ADDRMD: '32' },
193+
"nload",
194+
),
195+
196+
linux_pipeline(
197+
"Linux 18.04 GCC 7* 64",
198+
"cppalliance/droneubuntu1804:1",
199+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17', ADDRMD: '64' },
200+
"nload",
201+
),
202+
203+
linux_pipeline(
204+
"Linux 18.04 Clang 6.0",
205+
"cppalliance/droneubuntu1804:1",
206+
{ TOOLSET: 'clang', COMPILER: 'clang++-6.0', CXXSTD: '03,11,14,17' },
207+
"clang-6.0",
208+
),
209+
210+
linux_pipeline(
211+
"Linux 20.04 Clang 7",
212+
"cppalliance/droneubuntu2004:1",
213+
{ TOOLSET: 'clang', COMPILER: 'clang++-7', CXXSTD: '03,11,14,17' },
214+
"clang-7",
215+
),
216+
217+
linux_pipeline(
218+
"Linux 20.04 Clang 8",
219+
"cppalliance/droneubuntu2004:1",
220+
{ TOOLSET: 'clang', COMPILER: 'clang++-8', CXXSTD: '03,11,14,17' },
221+
"clang-8",
222+
),
223+
224+
linux_pipeline(
225+
"Linux 20.04 Clang 9",
226+
"cppalliance/droneubuntu2004:1",
227+
{ TOOLSET: 'clang', COMPILER: 'clang++-9', CXXSTD: '03,11,14,17,2a' },
228+
"clang-9",
229+
),
230+
231+
linux_pipeline(
232+
"Linux 20.04 Clang 10",
233+
"cppalliance/droneubuntu2004:1",
234+
{ TOOLSET: 'clang', COMPILER: 'clang++-10', CXXSTD: '03,11,14,17,2a' },
235+
"clang-10",
236+
),
237+
238+
linux_pipeline(
239+
"Linux 20.04 Clang 11",
240+
"cppalliance/droneubuntu2004:1",
241+
{ TOOLSET: 'clang', COMPILER: 'clang++-11', CXXSTD: '03,11,14,17,2a' },
242+
"clang-11",
243+
),
244+
245+
linux_pipeline(
246+
"Linux 20.04 Clang 12",
247+
"cppalliance/droneubuntu2004:1",
248+
{ TOOLSET: 'clang', COMPILER: 'clang++-12', CXXSTD: '03,11,14,17,2a' },
249+
"clang-12",
250+
),
251+
252+
linux_pipeline(
253+
"Linux 22.04 Clang 13",
254+
"cppalliance/droneubuntu2204:1",
255+
{ TOOLSET: 'clang', COMPILER: 'clang++-13', CXXSTD: '03,11,14,17,20' },
256+
"clang-13",
257+
),
258+
259+
linux_pipeline(
260+
"Linux 22.04 Clang 14 UBSAN",
261+
"cppalliance/droneubuntu2204:1",
262+
{ TOOLSET: 'clang', COMPILER: 'clang++-14', CXXSTD: '03,11,14,17,20,2b' } + ubsan,
263+
"clang-14",
264+
),
265+
266+
linux_pipeline(
267+
"Linux 22.04 Clang 14 ASAN",
268+
"cppalliance/droneubuntu2204:1",
269+
{ TOOLSET: 'clang', COMPILER: 'clang++-14', CXXSTD: '03,11,14,17,20,2b' } + asan,
270+
"clang-14",
271+
),
272+
273+
linux_pipeline(
274+
"Linux 22.04 Clang 15",
275+
"cppalliance/droneubuntu2204:1",
276+
{ TOOLSET: 'clang', COMPILER: 'clang++-15', CXXSTD: '03,11,14,17,20,2b' },
277+
"clang-15",
278+
["deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"],
279+
),
280+
281+
linux_pipeline(
282+
"Linux 22.04 Clang 16",
283+
"cppalliance/droneubuntu2204:1",
284+
{ TOOLSET: 'clang', COMPILER: 'clang++-16', CXXSTD: '03,11,14,17,20,2b' },
285+
"clang-16",
286+
["deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"],
287+
),
288+
289+
linux_pipeline(
290+
"Linux 23.10 Clang 17",
291+
"cppalliance/droneubuntu2310:1",
292+
{ TOOLSET: 'clang', COMPILER: 'clang++-17', CXXSTD: '03,11,14,17,20,2b' },
293+
"clang-17",
294+
["deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main"],
295+
),
296+
297+
macos_pipeline(
298+
"MacOS 10.15 Xcode 12.2 UBSAN",
299+
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,17,2a' } + ubsan,
300+
),
301+
302+
macos_pipeline(
303+
"MacOS 10.15 Xcode 12.2 ASAN",
304+
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,17,2a' } + asan,
305+
),
306+
307+
macos_pipeline(
308+
"MacOS 12.4 Xcode 13.4.1 UBSAN",
309+
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,17,20,2b' } + ubsan,
310+
xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64",
311+
),
312+
313+
macos_pipeline(
314+
"MacOS 12.4 Xcode 13.4.1 ASAN",
315+
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,17,20,2b' } + asan,
316+
xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64",
317+
),
318+
319+
windows_pipeline(
320+
"Windows VS2019 msvc-14.2",
321+
"cppalliance/dronevs2019",
322+
{ TOOLSET: 'msvc-14.2', CXXSTD: '14,17,20,latest' },
323+
),
324+
325+
windows_pipeline(
326+
"Windows VS2022 msvc-14.3",
327+
"cppalliance/dronevs2022:1",
328+
{ TOOLSET: 'msvc-14.3', CXXSTD: '14,17,20,latest' },
329+
),
330+
]

.drone/drone.bat

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@REM Copyright 2022 Peter Dimov
2+
@REM Distributed under the Boost Software License, Version 1.0.
3+
@REM https://www.boost.org/LICENSE_1_0.txt
4+
5+
@ECHO ON
6+
7+
set LIBRARY=%1
8+
set DRONE_BUILD_DIR=%CD%
9+
10+
echo $env:DRONE_STAGE_MACHINE
11+
12+
set BOOST_BRANCH=develop
13+
if "%DRONE_BRANCH%" == "master" set BOOST_BRANCH=master
14+
cd ..
15+
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
16+
cd boost-root
17+
git submodule update --init tools/boostdep
18+
xcopy /s /e /q %DRONE_BUILD_DIR% libs\%LIBRARY%\
19+
python tools/boostdep/depinst/depinst.py -I example %LIBRARY%
20+
cmd /c bootstrap
21+
b2 -d0 headers
22+
23+
if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
24+
if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
25+
b2 -j3 libs/%LIBRARY%/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker

.drone/drone.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
# Copyright 2022 Peter Dimov
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# https://www.boost.org/LICENSE_1_0.txt
6+
7+
set -ex
8+
export PATH=~/.local/bin:/usr/local/bin:$PATH
9+
uname -a
10+
echo $DRONE_STAGE_MACHINE
11+
12+
DRONE_BUILD_DIR=$(pwd)
13+
14+
BOOST_BRANCH=develop
15+
if [ "$DRONE_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi
16+
17+
cd ..
18+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
19+
cd boost-root
20+
git submodule update --init tools/boostdep
21+
mkdir -p libs/$LIBRARY
22+
cp -r $DRONE_BUILD_DIR/* libs/$LIBRARY
23+
python tools/boostdep/depinst/depinst.py -I example $LIBRARY
24+
./bootstrap.sh
25+
./b2 -d0 headers
26+
27+
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
28+
./b2 -j3 libs/$LIBRARY/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${ADDRMD:+address-model=$ADDRMD} ${UBSAN:+undefined-sanitizer=norecover debug-symbols=on} ${ASAN:+address-sanitizer=norecover debug-symbols=on} ${CXXFLAGS:+cxxflags=$CXXFLAGS} ${CXXSTDDIALECT:+cxxstd-dialect=$CXXSTDDIALECT} ${LINKFLAGS:+linkflags=$LINKFLAGS}

0 commit comments

Comments
 (0)