Skip to content

Commit 2e72c5c

Browse files
committed
GHA & Drone updates
1 parent 50fe0ed commit 2e72c5c

File tree

8 files changed

+387
-586
lines changed

8 files changed

+387
-586
lines changed

.drone.jsonnet

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
# Copyright 2022 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 = "leaf";
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+
linux_pipeline(
100+
"Linux 14.04 GCC 4.9",
101+
"cppalliance/droneubuntu1404:1",
102+
{ TOOLSET: 'gcc', COMPILER: 'g++-4.9', CXXSTD: '11' },
103+
"g++-4.9",
104+
[ "ppa:ubuntu-toolchain-r/test" ],
105+
),
106+
107+
linux_pipeline(
108+
"Linux 16.04 GCC 5*",
109+
"cppalliance/droneubuntu1604:1",
110+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14' },
111+
),
112+
113+
linux_pipeline(
114+
"Linux 18.04 GCC 6",
115+
"cppalliance/droneubuntu1804:1",
116+
{ TOOLSET: 'gcc', COMPILER: 'g++-6', CXXSTD: '11,14' },
117+
"g++-6",
118+
),
119+
120+
linux_pipeline(
121+
"Linux 18.04 GCC 7* 32",
122+
"cppalliance/droneubuntu1804:1",
123+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14', ADDRMD: '32' },
124+
),
125+
126+
linux_pipeline(
127+
"Linux 18.04 GCC 7* 64",
128+
"cppalliance/droneubuntu1804:1",
129+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14', ADDRMD: '64' },
130+
),
131+
132+
linux_pipeline(
133+
"Linux 18.04 GCC 8",
134+
"cppalliance/droneubuntu1804:1",
135+
{ TOOLSET: 'gcc', COMPILER: 'g++-8', CXXSTD: '11,14,17' },
136+
"g++-8",
137+
),
138+
139+
linux_pipeline(
140+
"Linux 20.04 GCC 9* 32",
141+
"cppalliance/droneubuntu2004:1",
142+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14,17,2a', ADDRMD: '32' },
143+
),
144+
145+
linux_pipeline(
146+
"Linux 20.04 GCC 9* 64",
147+
"cppalliance/droneubuntu2004:1",
148+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14,17,2a', ADDRMD: '64' },
149+
),
150+
151+
linux_pipeline(
152+
"Linux 20.04 GCC 9 ARM64 32/64",
153+
"cppalliance/droneubuntu2004:multiarch",
154+
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14,17,2a', ADDRMD: '32,64' },
155+
arch="arm64",
156+
),
157+
158+
linux_pipeline(
159+
"Linux 20.04 GCC 10 32 ASAN",
160+
"cppalliance/droneubuntu2004:1",
161+
{ TOOLSET: 'gcc', COMPILER: 'g++-10', CXXSTD: '11,14,17,20', ADDRMD: '32' } + asan,
162+
"g++-10-multilib",
163+
),
164+
165+
linux_pipeline(
166+
"Linux 20.04 GCC 10 64 ASAN",
167+
"cppalliance/droneubuntu2004:1",
168+
{ TOOLSET: 'gcc', COMPILER: 'g++-10', CXXSTD: '11,14,17,20', ADDRMD: '64' } + asan,
169+
"g++-10-multilib",
170+
),
171+
172+
linux_pipeline(
173+
"Linux 16.04 Clang 3.6",
174+
"cppalliance/droneubuntu1604:1",
175+
{ TOOLSET: 'clang', COMPILER: 'clang++-3.6', CXXSTD: '11,14' },
176+
"clang-3.6",
177+
),
178+
179+
linux_pipeline(
180+
"Linux 16.04 Clang 3.7",
181+
"cppalliance/droneubuntu1604:1",
182+
{ TOOLSET: 'clang', COMPILER: 'clang++-3.7', CXXSTD: '11,14' },
183+
"clang-3.7",
184+
),
185+
186+
linux_pipeline(
187+
"Linux 16.04 Clang 3.8",
188+
"cppalliance/droneubuntu1604:1",
189+
{ TOOLSET: 'clang', COMPILER: 'clang++-3.8', CXXSTD: '11,14' },
190+
"clang-3.8",
191+
),
192+
193+
linux_pipeline(
194+
"Linux 20.04 Clang 13",
195+
"cppalliance/droneubuntu2004:1",
196+
{ TOOLSET: 'clang', COMPILER: 'clang++-13', CXXSTD: '11,14,17,20' },
197+
"clang-13",
198+
["deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"],
199+
),
200+
201+
linux_pipeline(
202+
"Linux 22.04 Clang 14 UBSAN",
203+
"cppalliance/droneubuntu2204:1",
204+
{ TOOLSET: 'clang', COMPILER: 'clang++-14', CXXSTD: '11,14,17,20' } + ubsan,
205+
"clang-14",
206+
),
207+
208+
linux_pipeline(
209+
"Linux 22.04 Clang 14 ASAN",
210+
"cppalliance/droneubuntu2204:1",
211+
{ TOOLSET: 'clang', COMPILER: 'clang++-14', CXXSTD: '11,14,17,20' } + asan,
212+
"clang-14",
213+
),
214+
215+
macos_pipeline(
216+
"MacOS 10.15 Xcode 12.2 UBSAN",
217+
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '11,14,1z' } + ubsan,
218+
),
219+
220+
macos_pipeline(
221+
"MacOS 10.15 Xcode 12.2 ASAN",
222+
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '11,14,1z' } + asan,
223+
),
224+
225+
windows_pipeline(
226+
"Windows VS2017 msvc-14.1",
227+
"cppalliance/dronevs2017",
228+
{ TOOLSET: 'msvc-14.1', CXXSTD: '14,17,latest' },
229+
),
230+
231+
windows_pipeline(
232+
"Windows VS2019 msvc-14.2",
233+
"cppalliance/dronevs2019",
234+
{ TOOLSET: 'msvc-14.2', CXXSTD: '14,17,20,latest' },
235+
),
236+
237+
windows_pipeline(
238+
"Windows VS2022 msvc-14.3",
239+
"cppalliance/dronevs2022:1",
240+
{ TOOLSET: 'msvc-14.3', CXXSTD: '14,17,20,latest' },
241+
),
242+
]

.drone.star

Lines changed: 0 additions & 55 deletions
This file was deleted.

.drone/drone.bat

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
set BOOST_BRANCH=develop
11+
if "%DRONE_BRANCH%" == "master" set BOOST_BRANCH=master
12+
cd ..
13+
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
14+
cd boost-root
15+
git submodule update --init tools/boostdep
16+
xcopy /s /e /q %DRONE_BUILD_DIR% libs\%LIBRARY%\
17+
python tools/boostdep/depinst/depinst.py %LIBRARY%
18+
cmd /c bootstrap
19+
b2 -d0 headers
20+
21+
echo "Generating single header"
22+
cd libs/%LIBRARY%
23+
python gen/generate_single_header.py -i include/boost/leaf/detail/all.hpp -p include -o test/leaf.hpp boost/leaf
24+
25+
echo "Testing"
26+
if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
27+
if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
28+
..\..\b2 -j3 test toolset=%TOOLSET% %CXXSTD% %ADDRMD% embed-manifest-via=linker link=shared,static variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_leaf_hpp,leaf_release_leaf_hpp

0 commit comments

Comments
 (0)