-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.jsonnet
107 lines (103 loc) · 2.02 KB
/
.drone.jsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
local image = "localhost:5000/jla/perm_group";
local boostArg(v) = "-DBOOST_ROOT=/opt/boost/%s" % v;
local CoverageStep(withCoverage, compiler, boost) = if !withCoverage then null else {
name: "coverage",
image: image,
environment: {
CTEST_OUTPUT_ON_FAILURE: 1,
CXX: compiler,
CXXFLAGS: "-Werror",
},
commands: [
"mkdir covBuild",
"cd covBuild",
"cmake ../ -DBUILD_TESTING=on -DBUILD_COVERAGE=on %s" % [boostArg(boost)],
"make",
"make install",
"make tests",
"make coverage_collect",
"make coverage_build",
"/copyCoverage.sh",
],
volumes: [
{
name: "www",
path: "/www",
},
],
};
local Volumes(withCoverage) = if !withCoverage then [] else [
{
name: "www",
host: {
path: "/www/results/perm_group",
},
},
];
local Pipeline(withCoverage, compiler, boost) = {
kind: "pipeline",
name: "%s, Boost %s" % [compiler, boost],
steps: [
{
name: "bootstrap",
image: image,
commands: [
"git fetch --tags",
"git submodule update --init --recursive",
"./bootstrap.sh",
],
},
{
name: "build",
image: image,
environment: {
CXX: compiler,
CXXFLAGS: "-Werror",
},
commands: [
"mkdir build",
"cd build",
"cmake ../ -DBUILD_TESTING=on -DBUILD_TESTING_SANITIZERS=off %s" % [boostArg(boost)],
"make",
],
},
{
name: "install",
image: image,
commands: [
"cd build",
"make install",
],
},
{
name: "build-test",
image: image,
commands: [
"cd build",
"make tests",
],
},
{
name: "test",
image: image,
commands: [
"cd build",
"make install",
"ctest --output-on-failure",
],
},
CoverageStep(withCoverage, compiler, boost),
],
volumes: Volumes(withCoverage),
};
[
Pipeline(boost == "1_74_0" && compiler == "g++-9", compiler, boost)
for compiler in [
"g++-7", "g++-8", "g++-9", "g++-10",
"clang++-6.0", "clang++-7", "clang++-8", "clang++-9", "clang++-10", "clang++-11"
]
for boost in [
"1_67_0", "1_68_0", "1_69_0", "1_70_0", "1_71_0",
"1_72_0", "1_73_0", "1_74_0", "1_75_0"
]
]