mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-07 05:15:49 +00:00
Compare commits
508 Commits
2.2.0-b2
...
mathbunnyr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b11c1c9987 | ||
|
|
43a4d15d2d | ||
|
|
04c80c62f5 | ||
|
|
92fdebf590 | ||
|
|
b054a8424d | ||
|
|
162b1305e0 | ||
|
|
bdaa04d1ec | ||
|
|
6c69453bda | ||
|
|
7661ee6a3b | ||
|
|
6cabe89601 | ||
|
|
70f7635dda | ||
|
|
c8574ea42a | ||
|
|
e4fbf5131f | ||
|
|
87ee358297 | ||
|
|
27e29d0421 | ||
|
|
63ec563135 | ||
|
|
2c6f52a0ed | ||
|
|
97956b1718 | ||
|
|
ebfe4e6468 | ||
|
|
534518f13e | ||
|
|
4ed51c22d0 | ||
|
|
4364c07f1e | ||
|
|
f20efae75a | ||
|
|
67b27ee344 | ||
|
|
082f2fe21e | ||
|
|
7584a683dd | ||
|
|
f58c85d203 | ||
|
|
95698ee2de | ||
|
|
3d3db68508 | ||
|
|
7fcabd1ce7 | ||
|
|
59bb9a11ab | ||
|
|
ac5fcc7f4b | ||
|
|
3d0e722176 | ||
|
|
93add775b2 | ||
|
|
0273ba0da3 | ||
|
|
276477c494 | ||
|
|
d0b2a24a30 | ||
|
|
e44a058b13 | ||
|
|
743c9b92de | ||
|
|
35c90e64ec | ||
|
|
6e0d7a0fac | ||
|
|
d3c98ab2a8 | ||
|
|
2d172f470d | ||
|
|
a68229e9d7 | ||
|
|
cec8b29998 | ||
|
|
13524be6cc | ||
|
|
2bf582839e | ||
|
|
ed47db7d39 | ||
|
|
4994f9db92 | ||
|
|
50851aed16 | ||
|
|
4118fb2584 | ||
|
|
837a547849 | ||
|
|
b57618a211 | ||
|
|
588ed91d1b | ||
|
|
4904c4b4d4 | ||
|
|
03070d7582 | ||
|
|
b3f3259b14 | ||
|
|
357b96ab0d | ||
|
|
550f0fae85 | ||
|
|
19257f8aa9 | ||
|
|
49b4af1a56 | ||
|
|
c7600057bc | ||
|
|
0b7fd64a4c | ||
|
|
ecdea015b9 | ||
|
|
7588e9d5bf | ||
|
|
bfa17134d2 | ||
|
|
57b8ff1c49 | ||
|
|
9b69da7f91 | ||
|
|
09409fc05d | ||
|
|
561eae1b7f | ||
|
|
28062496eb | ||
|
|
3e83b54332 | ||
|
|
3e520c8742 | ||
|
|
2a147b9487 | ||
|
|
8aab33c18c | ||
|
|
aef3119efb | ||
|
|
28bd58f1d1 | ||
|
|
b3da9adb03 | ||
|
|
670eaaa51d | ||
|
|
7dee6413ae | ||
|
|
27b37ade7b | ||
|
|
76ec9ccb0b | ||
|
|
5cb3908e4f | ||
|
|
cdb5882688 | ||
|
|
8cbbf6689d | ||
|
|
34ed4a1eb0 | ||
|
|
683e2ba54b | ||
|
|
e2f078e0af | ||
|
|
27ff532473 | ||
|
|
d5195e3e52 | ||
|
|
0595076c6e | ||
|
|
e835ad8b57 | ||
|
|
0a7ce8c5be | ||
|
|
ca2a3ccee9 | ||
|
|
a4f677be2c | ||
|
|
243e174f1e | ||
|
|
a369381594 | ||
|
|
2d52966806 | ||
|
|
02ccbf850f | ||
|
|
b87b32db86 | ||
|
|
d02da5d28a | ||
|
|
00aff5cfe0 | ||
|
|
59282f764d | ||
|
|
0cdfad3731 | ||
|
|
0b0794d9bf | ||
|
|
aa910ba889 | ||
|
|
dbfabd4102 | ||
|
|
ce41f5ba07 | ||
|
|
24c77752cb | ||
|
|
81f4386770 | ||
|
|
a60d01d272 | ||
|
|
59d27db5ab | ||
|
|
e75aa1add1 | ||
|
|
68f832a832 | ||
|
|
5e43c3b099 | ||
|
|
9af36e5235 | ||
|
|
90103431ea | ||
|
|
ed27c41641 | ||
|
|
3daa735b31 | ||
|
|
5d2c2a8bfc | ||
|
|
f2384a47f1 | ||
|
|
c774a40a59 | ||
|
|
477d8e1f5f | ||
|
|
7fd51d8a60 | ||
|
|
b2a1b34ae6 | ||
|
|
5860a90b94 | ||
|
|
f2f342f7c2 | ||
|
|
cc1da5afa9 | ||
|
|
de055934e1 | ||
|
|
0c201ed952 | ||
|
|
9b83eb4033 | ||
|
|
fadd60e68a | ||
|
|
eef85b520a | ||
|
|
8b99013ff8 | ||
|
|
af0a8af287 | ||
|
|
de43be887e | ||
|
|
b03cd63efd | ||
|
|
76cf2fc57e | ||
|
|
f7f619fd1b | ||
|
|
4a0267fbac | ||
|
|
b51ed8dd98 | ||
|
|
cb01c9f596 | ||
|
|
7c55529c90 | ||
|
|
424af5dfe0 | ||
|
|
bebc683ba2 | ||
|
|
1e0a2f5162 | ||
|
|
593d7298b1 | ||
|
|
79e6f07863 | ||
|
|
1cb09a01f6 | ||
|
|
9c92a2b51b | ||
|
|
99580a2602 | ||
|
|
ade6289de2 | ||
|
|
3916635037 | ||
|
|
f195a30a76 | ||
|
|
cc610a0964 | ||
|
|
c5012eb854 | ||
|
|
01ae4c4312 | ||
|
|
88d27a7265 | ||
|
|
e01d7d12cf | ||
|
|
1e38ad5ec0 | ||
|
|
bd9e39ee85 | ||
|
|
46514c8fe9 | ||
|
|
39d1ceace4 | ||
|
|
89eb962d85 | ||
|
|
4a5fee7548 | ||
|
|
fcd891148b | ||
|
|
99adb31184 | ||
|
|
2c1a90a20d | ||
|
|
2385bf547b | ||
|
|
1d011cf8d9 | ||
|
|
6896a2545a | ||
|
|
91484c64e4 | ||
|
|
bdf7382d44 | ||
|
|
8a3e71e91f | ||
|
|
e61ee30180 | ||
|
|
d3df6d10e4 | ||
|
|
60df3a1914 | ||
|
|
f454076fb6 | ||
|
|
66b3f40268 | ||
|
|
b31b7633c9 | ||
|
|
a36aa3618f | ||
|
|
7943f47939 | ||
|
|
67e451ec23 | ||
|
|
92789d5a91 | ||
|
|
73477fb9d4 | ||
|
|
8ac1ff7699 | ||
|
|
26842374de | ||
|
|
a46d700390 | ||
|
|
a34d565ea4 | ||
|
|
c57fe1e6e4 | ||
|
|
8a08c5e6ce | ||
|
|
5d2694d36c | ||
|
|
98ff72be66 | ||
|
|
915a8beb40 | ||
|
|
f7db030ad7 | ||
|
|
86e2cd1cc4 | ||
|
|
f0613c945f | ||
|
|
d11e7bc60e | ||
|
|
b909b8879d | ||
|
|
918a92eeee | ||
|
|
c9e8330e0a | ||
|
|
f577139f70 | ||
|
|
491cd58f93 | ||
|
|
25296f8ffa | ||
|
|
4b178805de | ||
|
|
fcebd715ba | ||
|
|
531e1dad6d | ||
|
|
3c008b6bb4 | ||
|
|
624f7ff6d5 | ||
|
|
e503dffc9a | ||
|
|
cd1aa8fb70 | ||
|
|
b5fe22da18 | ||
|
|
cd6289b79a | ||
|
|
f5e6c9576e | ||
|
|
427ba47716 | ||
|
|
67c989081d | ||
|
|
2fd16cd582 | ||
|
|
89af8fe500 | ||
|
|
1753c95910 | ||
|
|
e7702e9c11 | ||
|
|
e549657766 | ||
|
|
7c2742036b | ||
|
|
73f375f20d | ||
|
|
3e200d8b9d | ||
|
|
81fe617816 | ||
|
|
75354fbecd | ||
|
|
540e938223 | ||
|
|
6ef6ca9e65 | ||
|
|
35b9a066e3 | ||
|
|
957028699b | ||
|
|
12e6fcc97e | ||
|
|
f9d9879513 | ||
|
|
278f7b1b58 | ||
|
|
fbedeff697 | ||
|
|
f64d8ecb77 | ||
|
|
3e38ea9b48 | ||
|
|
7834b63b55 | ||
|
|
2cf849dd12 | ||
|
|
c47b96bc68 | ||
|
|
9659d98140 | ||
|
|
f1698c55ff | ||
|
|
91c00e781a | ||
|
|
c0d52723c9 | ||
|
|
590c07ad84 | ||
|
|
48c8d85d0c | ||
|
|
36a9f40a60 | ||
|
|
698718a02a | ||
|
|
0a9dbe1cc1 | ||
|
|
cce7aa2893 | ||
|
|
820b32c6d7 | ||
|
|
efe5d08205 | ||
|
|
285d4e6e9b | ||
|
|
f2a89b095d | ||
|
|
7d4e3619b0 | ||
|
|
c4b87d2a0a | ||
|
|
2d0253bc4a | ||
|
|
017cf2adc9 | ||
|
|
64b50b419f | ||
|
|
fc3e60f17f | ||
|
|
8dc7f16ef1 | ||
|
|
15a441b084 | ||
|
|
3c4903a339 | ||
|
|
b53cfd0ec1 | ||
|
|
c41399ef8e | ||
|
|
7bef13f913 | ||
|
|
4ff2953257 | ||
|
|
475e309f25 | ||
|
|
a7074dbf0f | ||
|
|
66691c45a0 | ||
|
|
fe4f95dabd | ||
|
|
f62fadc9f9 | ||
|
|
afb0c7fee2 | ||
|
|
fd73b90416 | ||
|
|
541bf4395f | ||
|
|
63c80f2b7d | ||
|
|
385d99c56e | ||
|
|
b5da61931f | ||
|
|
6af86367fd | ||
|
|
9dc322fc7b | ||
|
|
c77154a5e6 | ||
|
|
fc3ba07f2e | ||
|
|
229ba69b5d | ||
|
|
524d096777 | ||
|
|
815dfd672e | ||
|
|
a4b3877cb2 | ||
|
|
6bb5804bb8 | ||
|
|
67d99457f2 | ||
|
|
0e25c0cabc | ||
|
|
6b61984e0e | ||
|
|
891fd1e7bf | ||
|
|
de6c17797f | ||
|
|
0add6c6d90 | ||
|
|
e6cdb141c5 | ||
|
|
c435466fb0 | ||
|
|
f8df654d8e | ||
|
|
f3e754398e | ||
|
|
d04331d244 | ||
|
|
1c82d379d9 | ||
|
|
f083c82557 | ||
|
|
b6d5ec5cf7 | ||
|
|
c62e9d56b8 | ||
|
|
2a5d73730f | ||
|
|
cffda52ba6 | ||
|
|
cf081e7e25 | ||
|
|
f351a4cc79 | ||
|
|
d60654c3dc | ||
|
|
9b0b4f5ad7 | ||
|
|
a21011799b | ||
|
|
2f40cde7f5 | ||
|
|
02a75356fb | ||
|
|
b761fffa2d | ||
|
|
c3be155f8d | ||
|
|
11192c362e | ||
|
|
2c18fd5465 | ||
|
|
da76907279 | ||
|
|
1b42466a0d | ||
|
|
87f1c06b5b | ||
|
|
d0c6b65870 | ||
|
|
3343c1fa6b | ||
|
|
c8e3da6470 | ||
|
|
c409f8b2d6 | ||
|
|
13a9aef579 | ||
|
|
af4fde9a3a | ||
|
|
0282504f18 | ||
|
|
bea905adcd | ||
|
|
7a9a1656f9 | ||
|
|
0ede0ed351 | ||
|
|
ee6018186e | ||
|
|
293af3f3b0 | ||
|
|
9600637edd | ||
|
|
7d0753f1da | ||
|
|
b04e090cbb | ||
|
|
7088ebad97 | ||
|
|
1d33b8e88a | ||
|
|
44c07e7332 | ||
|
|
dbb8d9eedd | ||
|
|
bc9ca41bc1 | ||
|
|
e4736bf9d8 | ||
|
|
7360c4fd0e | ||
|
|
9a9de501e4 | ||
|
|
fb473f6d28 | ||
|
|
4cbd3f5e18 | ||
|
|
5332d3e9f0 | ||
|
|
5499b892e6 | ||
|
|
0ff1edaac8 | ||
|
|
b7c8ed7e3a | ||
|
|
49e9d5eda0 | ||
|
|
d7605d1069 | ||
|
|
58045fb0b6 | ||
|
|
1b4eed3b2b | ||
|
|
27c9e2a530 | ||
|
|
00026ebf5a | ||
|
|
fa1e9da0de | ||
|
|
2bd7ac346c | ||
|
|
5abf912b5a | ||
|
|
a7f34490b1 | ||
|
|
2a74a65b22 | ||
|
|
319cd3d67b | ||
|
|
2fef03d766 | ||
|
|
fb90fb27ae | ||
|
|
9607cff8a0 | ||
|
|
00c4287b3b | ||
|
|
3095f58dbe | ||
|
|
8d0e904ecb | ||
|
|
3a3d8d46dd | ||
|
|
b2f7983609 | ||
|
|
501e131061 | ||
|
|
27cf62ca63 | ||
|
|
638e2e28ab | ||
|
|
f9bb62f670 | ||
|
|
895f3c0059 | ||
|
|
77494245a9 | ||
|
|
648cedcba5 | ||
|
|
8a613c5de8 | ||
|
|
d6ae890f83 | ||
|
|
e16a9510f1 | ||
|
|
d6598f30f1 | ||
|
|
b12d916276 | ||
|
|
4f6f717bfb | ||
|
|
46a616cdad | ||
|
|
f771478da0 | ||
|
|
6e606cb7d8 | ||
|
|
5bcc11b347 | ||
|
|
d227c53ef3 | ||
|
|
e85f6cd9e4 | ||
|
|
46bd67a9ec | ||
|
|
094ed8f299 | ||
|
|
d536433d64 | ||
|
|
29847caf0e | ||
|
|
aa86075159 | ||
|
|
4dd3254354 | ||
|
|
f55872d496 | ||
|
|
6cb63ed9b2 | ||
|
|
f77186002a | ||
|
|
66849432be | ||
|
|
d26c93a711 | ||
|
|
54c9a6e7c0 | ||
|
|
b24aadc898 | ||
|
|
7bd21345a1 | ||
|
|
2ff51ff416 | ||
|
|
72f9a8fe78 | ||
|
|
b2eacf9868 | ||
|
|
77cec26cc9 | ||
|
|
6a848649b3 | ||
|
|
c761b50fa4 | ||
|
|
062ef9f0a5 | ||
|
|
c7fee023e7 | ||
|
|
e65351e9e6 | ||
|
|
8cea9ee7e2 | ||
|
|
9d299a1948 | ||
|
|
132ec743e1 | ||
|
|
bdb72f91a2 | ||
|
|
0cdc24023f | ||
|
|
c795cf371a | ||
|
|
e135aa49d5 | ||
|
|
5ba08b1d26 | ||
|
|
37cd79ceb0 | ||
|
|
1334bd05d9 | ||
|
|
437ea7bf98 | ||
|
|
f9f3bc928e | ||
|
|
aa1f3efda2 | ||
|
|
a6d21c1a02 | ||
|
|
49b80c7ad8 | ||
|
|
56ab943be5 | ||
|
|
9d3b4f0313 | ||
|
|
42c970a2a3 | ||
|
|
1125b09611 | ||
|
|
ce94f0f513 | ||
|
|
d39fb20022 | ||
|
|
967b85ca33 | ||
|
|
55b8134e6d | ||
|
|
66e8a65732 | ||
|
|
067dd72aed | ||
|
|
da5bf5c441 | ||
|
|
ff4bc5b0aa | ||
|
|
c56998477c | ||
|
|
df17b429c5 | ||
|
|
36c6caa7c0 | ||
|
|
642aaf8902 | ||
|
|
99400d74ba | ||
|
|
da10535bc0 | ||
|
|
f74b89cc8d | ||
|
|
d229ff1811 | ||
|
|
3a6390caf5 | ||
|
|
a8c90a31d9 | ||
|
|
531b647b1e | ||
|
|
cbc856b190 | ||
|
|
98ef83d470 | ||
|
|
d5ed0cff77 | ||
|
|
b18d73eef0 | ||
|
|
8f47128424 | ||
|
|
b8cb60b7db | ||
|
|
0dcbbf9afa | ||
|
|
c00342c792 | ||
|
|
82b8316978 | ||
|
|
890e5bb4c2 | ||
|
|
adadd70a05 | ||
|
|
e66cc7759e | ||
|
|
e931f27d3b | ||
|
|
1fe42c88c3 | ||
|
|
6b9c8a12d0 | ||
|
|
3fa1df9117 | ||
|
|
25876aef9b | ||
|
|
e744a5a8a9 | ||
|
|
230212213b | ||
|
|
7fcd3e48bd | ||
|
|
470585461d | ||
|
|
ec05b06370 | ||
|
|
1b7d35b16c | ||
|
|
6ff6956a53 | ||
|
|
dade122c6e | ||
|
|
8095e6893d | ||
|
|
48b0a7690c | ||
|
|
7372442f3a | ||
|
|
36a790d666 | ||
|
|
285dd008de | ||
|
|
332b66dc4f | ||
|
|
231556d850 | ||
|
|
d2439cc8a9 | ||
|
|
03d6b1a3b6 | ||
|
|
ebdcca51a6 | ||
|
|
7e5f94c3fd | ||
|
|
1be4d5186d | ||
|
|
8240508d19 | ||
|
|
03a01e55f9 | ||
|
|
828fea6e30 | ||
|
|
27a422369d | ||
|
|
b7d0fc0200 | ||
|
|
6e8de0b64e | ||
|
|
8e75818b4f | ||
|
|
27db183aff | ||
|
|
d9362311ca | ||
|
|
9d91fddce5 | ||
|
|
6d9446bf87 | ||
|
|
94706bfff9 | ||
|
|
a1243da956 | ||
|
|
8004a0e0ff | ||
|
|
6978431c6a | ||
|
|
8211440711 | ||
|
|
041608b243 | ||
|
|
e83dfcbcc3 | ||
|
|
010538d6fe | ||
|
|
c17cc37c1c | ||
|
|
9fa1740146 | ||
|
|
7312b4af80 | ||
|
|
c3125b4b1c | ||
|
|
43ced3bf9d | ||
|
|
ecb7cdae88 |
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
Language: Cpp
|
Language: Cpp
|
||||||
AccessModifierOffset: -4
|
AccessModifierOffset: -4
|
||||||
AlignAfterOpenBracket: BlockIndent
|
AlignAfterOpenBracket: BlockIndent
|
||||||
AlignConsecutiveAssignments: false
|
AlignConsecutiveAssignments: false
|
||||||
@@ -22,31 +22,31 @@ BreakBeforeBinaryOperators: false
|
|||||||
BreakBeforeBraces: WebKit
|
BreakBeforeBraces: WebKit
|
||||||
BreakBeforeTernaryOperators: true
|
BreakBeforeTernaryOperators: true
|
||||||
BreakConstructorInitializersBeforeComma: true
|
BreakConstructorInitializersBeforeComma: true
|
||||||
ColumnLimit: 120
|
ColumnLimit: 120
|
||||||
CommentPragmas: '^ IWYU pragma:'
|
CommentPragmas: "^ IWYU pragma:"
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
ConstructorInitializerIndentWidth: 4
|
ConstructorInitializerIndentWidth: 4
|
||||||
ContinuationIndentWidth: 4
|
ContinuationIndentWidth: 4
|
||||||
Cpp11BracedListStyle: true
|
Cpp11BracedListStyle: true
|
||||||
DerivePointerAlignment: false
|
DerivePointerAlignment: false
|
||||||
DisableFormat: false
|
DisableFormat: false
|
||||||
ExperimentalAutoDetectBinPacking: false
|
ExperimentalAutoDetectBinPacking: false
|
||||||
FixNamespaceComments: true
|
FixNamespaceComments: true
|
||||||
ForEachMacros: [ Q_FOREACH, BOOST_FOREACH ]
|
ForEachMacros: [Q_FOREACH, BOOST_FOREACH]
|
||||||
IncludeBlocks: Regroup
|
IncludeBlocks: Regroup
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
- Regex: '^".*"$'
|
- Regex: '^".*"$'
|
||||||
Priority: 1
|
Priority: 1
|
||||||
- Regex: '^<.*\.(h|hpp)>$'
|
- Regex: '^<.*\.(h|hpp)>$'
|
||||||
Priority: 2
|
Priority: 2
|
||||||
- Regex: '^<.*>$'
|
- Regex: "^<.*>$"
|
||||||
Priority: 3
|
Priority: 3
|
||||||
- Regex: '.*'
|
- Regex: ".*"
|
||||||
Priority: 4
|
Priority: 4
|
||||||
IncludeIsMainRegex: '$'
|
IncludeIsMainRegex: "$"
|
||||||
IndentCaseLabels: true
|
IndentCaseLabels: true
|
||||||
IndentFunctionDeclarationAfterType: false
|
IndentFunctionDeclarationAfterType: false
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
IndentWrappedFunctionNames: false
|
IndentWrappedFunctionNames: false
|
||||||
IndentRequiresClause: true
|
IndentRequiresClause: true
|
||||||
RequiresClausePosition: OwnLine
|
RequiresClausePosition: OwnLine
|
||||||
@@ -63,18 +63,18 @@ PenaltyExcessCharacter: 1000000
|
|||||||
PenaltyReturnTypeOnItsOwnLine: 200
|
PenaltyReturnTypeOnItsOwnLine: 200
|
||||||
PointerAlignment: Left
|
PointerAlignment: Left
|
||||||
QualifierAlignment: Right
|
QualifierAlignment: Right
|
||||||
ReflowComments: true
|
ReflowComments: true
|
||||||
SortIncludes: true
|
SortIncludes: true
|
||||||
SpaceAfterCStyleCast: false
|
SpaceAfterCStyleCast: false
|
||||||
SpaceBeforeAssignmentOperators: true
|
SpaceBeforeAssignmentOperators: true
|
||||||
SpaceBeforeParens: ControlStatements
|
SpaceBeforeParens: ControlStatements
|
||||||
SpaceInEmptyParentheses: false
|
SpaceInEmptyParentheses: false
|
||||||
SpacesBeforeTrailingComments: 2
|
SpacesBeforeTrailingComments: 2
|
||||||
SpacesInAngles: false
|
SpacesInAngles: false
|
||||||
SpacesInContainerLiterals: true
|
SpacesInContainerLiterals: true
|
||||||
SpacesInCStyleCastParentheses: false
|
SpacesInCStyleCastParentheses: false
|
||||||
SpacesInParentheses: false
|
SpacesInParentheses: false
|
||||||
SpacesInSquareBrackets: false
|
SpacesInSquareBrackets: false
|
||||||
Standard: Cpp11
|
Standard: Cpp11
|
||||||
TabWidth: 8
|
TabWidth: 8
|
||||||
UseTab: Never
|
UseTab: Never
|
||||||
|
|||||||
77
.clang-tidy
77
.clang-tidy
@@ -1,16 +1,22 @@
|
|||||||
---
|
---
|
||||||
Checks: '-*,
|
Checks: "-*,
|
||||||
bugprone-argument-comment,
|
bugprone-argument-comment,
|
||||||
bugprone-assert-side-effect,
|
bugprone-assert-side-effect,
|
||||||
bugprone-bad-signal-to-kill-thread,
|
bugprone-bad-signal-to-kill-thread,
|
||||||
bugprone-bool-pointer-implicit-conversion,
|
bugprone-bool-pointer-implicit-conversion,
|
||||||
|
bugprone-casting-through-void,
|
||||||
|
bugprone-chained-comparison,
|
||||||
|
bugprone-compare-pointer-to-member-virtual-function,
|
||||||
bugprone-copy-constructor-init,
|
bugprone-copy-constructor-init,
|
||||||
|
bugprone-crtp-constructor-accessibility,
|
||||||
bugprone-dangling-handle,
|
bugprone-dangling-handle,
|
||||||
bugprone-dynamic-static-initializers,
|
bugprone-dynamic-static-initializers,
|
||||||
bugprone-empty-catch,
|
bugprone-empty-catch,
|
||||||
bugprone-fold-init-type,
|
bugprone-fold-init-type,
|
||||||
bugprone-forward-declaration-namespace,
|
bugprone-forward-declaration-namespace,
|
||||||
bugprone-inaccurate-erase,
|
bugprone-inaccurate-erase,
|
||||||
|
bugprone-inc-dec-in-conditions,
|
||||||
|
bugprone-incorrect-enable-if,
|
||||||
bugprone-incorrect-roundings,
|
bugprone-incorrect-roundings,
|
||||||
bugprone-infinite-loop,
|
bugprone-infinite-loop,
|
||||||
bugprone-integer-division,
|
bugprone-integer-division,
|
||||||
@@ -21,15 +27,18 @@ Checks: '-*,
|
|||||||
bugprone-misplaced-pointer-arithmetic-in-alloc,
|
bugprone-misplaced-pointer-arithmetic-in-alloc,
|
||||||
bugprone-misplaced-widening-cast,
|
bugprone-misplaced-widening-cast,
|
||||||
bugprone-move-forwarding-reference,
|
bugprone-move-forwarding-reference,
|
||||||
|
bugprone-multi-level-implicit-pointer-conversion,
|
||||||
bugprone-multiple-new-in-one-expression,
|
bugprone-multiple-new-in-one-expression,
|
||||||
bugprone-multiple-statement-macro,
|
bugprone-multiple-statement-macro,
|
||||||
bugprone-no-escape,
|
bugprone-no-escape,
|
||||||
bugprone-non-zero-enum-to-bool-conversion,
|
bugprone-non-zero-enum-to-bool-conversion,
|
||||||
|
bugprone-optional-value-conversion,
|
||||||
bugprone-parent-virtual-call,
|
bugprone-parent-virtual-call,
|
||||||
|
bugprone-pointer-arithmetic-on-polymorphic-object,
|
||||||
bugprone-posix-return,
|
bugprone-posix-return,
|
||||||
bugprone-redundant-branch-condition,
|
bugprone-redundant-branch-condition,
|
||||||
bugprone-reserved-identifier,
|
bugprone-reserved-identifier,
|
||||||
bugprone-unused-return-value,
|
bugprone-return-const-ref-from-parameter,
|
||||||
bugprone-shared-ptr-array-mismatch,
|
bugprone-shared-ptr-array-mismatch,
|
||||||
bugprone-signal-handler,
|
bugprone-signal-handler,
|
||||||
bugprone-signed-char-misuse,
|
bugprone-signed-char-misuse,
|
||||||
@@ -49,6 +58,7 @@ Checks: '-*,
|
|||||||
bugprone-suspicious-realloc-usage,
|
bugprone-suspicious-realloc-usage,
|
||||||
bugprone-suspicious-semicolon,
|
bugprone-suspicious-semicolon,
|
||||||
bugprone-suspicious-string-compare,
|
bugprone-suspicious-string-compare,
|
||||||
|
bugprone-suspicious-stringview-data-usage,
|
||||||
bugprone-swapped-arguments,
|
bugprone-swapped-arguments,
|
||||||
bugprone-switch-missing-default-case,
|
bugprone-switch-missing-default-case,
|
||||||
bugprone-terminating-continue,
|
bugprone-terminating-continue,
|
||||||
@@ -60,16 +70,20 @@ Checks: '-*,
|
|||||||
bugprone-unhandled-self-assignment,
|
bugprone-unhandled-self-assignment,
|
||||||
bugprone-unique-ptr-array-mismatch,
|
bugprone-unique-ptr-array-mismatch,
|
||||||
bugprone-unsafe-functions,
|
bugprone-unsafe-functions,
|
||||||
|
bugprone-unused-local-non-trivial-variable,
|
||||||
bugprone-unused-raii,
|
bugprone-unused-raii,
|
||||||
|
bugprone-unused-return-value,
|
||||||
bugprone-use-after-move,
|
bugprone-use-after-move,
|
||||||
bugprone-virtual-near-miss,
|
bugprone-virtual-near-miss,
|
||||||
cppcoreguidelines-init-variables,
|
cppcoreguidelines-init-variables,
|
||||||
cppcoreguidelines-misleading-capture-default-by-value,
|
cppcoreguidelines-misleading-capture-default-by-value,
|
||||||
|
cppcoreguidelines-no-suspend-with-lock,
|
||||||
cppcoreguidelines-pro-type-member-init,
|
cppcoreguidelines-pro-type-member-init,
|
||||||
cppcoreguidelines-pro-type-static-cast-downcast,
|
cppcoreguidelines-pro-type-static-cast-downcast,
|
||||||
cppcoreguidelines-rvalue-reference-param-not-moved,
|
cppcoreguidelines-rvalue-reference-param-not-moved,
|
||||||
cppcoreguidelines-use-default-member-init,
|
cppcoreguidelines-use-default-member-init,
|
||||||
cppcoreguidelines-virtual-class-destructor,
|
cppcoreguidelines-virtual-class-destructor,
|
||||||
|
hicpp-ignored-remove-result,
|
||||||
llvm-namespace-comment,
|
llvm-namespace-comment,
|
||||||
misc-const-correctness,
|
misc-const-correctness,
|
||||||
misc-definitions-in-headers,
|
misc-definitions-in-headers,
|
||||||
@@ -87,10 +101,14 @@ Checks: '-*,
|
|||||||
modernize-make-unique,
|
modernize-make-unique,
|
||||||
modernize-pass-by-value,
|
modernize-pass-by-value,
|
||||||
modernize-type-traits,
|
modernize-type-traits,
|
||||||
|
modernize-use-designated-initializers,
|
||||||
modernize-use-emplace,
|
modernize-use-emplace,
|
||||||
modernize-use-equals-default,
|
modernize-use-equals-default,
|
||||||
modernize-use-equals-delete,
|
modernize-use-equals-delete,
|
||||||
modernize-use-override,
|
modernize-use-override,
|
||||||
|
modernize-use-ranges,
|
||||||
|
modernize-use-starts-ends-with,
|
||||||
|
modernize-use-std-numbers,
|
||||||
modernize-use-using,
|
modernize-use-using,
|
||||||
performance-faster-string-find,
|
performance-faster-string-find,
|
||||||
performance-for-range-copy,
|
performance-for-range-copy,
|
||||||
@@ -100,6 +118,8 @@ Checks: '-*,
|
|||||||
performance-move-constructor-init,
|
performance-move-constructor-init,
|
||||||
performance-no-automatic-move,
|
performance-no-automatic-move,
|
||||||
performance-trivially-destructible,
|
performance-trivially-destructible,
|
||||||
|
readability-avoid-nested-conditional-operator,
|
||||||
|
readability-avoid-return-with-void-value,
|
||||||
readability-braces-around-statements,
|
readability-braces-around-statements,
|
||||||
readability-const-return-type,
|
readability-const-return-type,
|
||||||
readability-container-contains,
|
readability-container-contains,
|
||||||
@@ -107,26 +127,65 @@ Checks: '-*,
|
|||||||
readability-convert-member-functions-to-static,
|
readability-convert-member-functions-to-static,
|
||||||
readability-duplicate-include,
|
readability-duplicate-include,
|
||||||
readability-else-after-return,
|
readability-else-after-return,
|
||||||
|
readability-enum-initial-value,
|
||||||
readability-implicit-bool-conversion,
|
readability-implicit-bool-conversion,
|
||||||
readability-inconsistent-declaration-parameter-name,
|
readability-inconsistent-declaration-parameter-name,
|
||||||
|
readability-identifier-naming,
|
||||||
readability-make-member-function-const,
|
readability-make-member-function-const,
|
||||||
|
readability-math-missing-parentheses,
|
||||||
readability-misleading-indentation,
|
readability-misleading-indentation,
|
||||||
readability-non-const-parameter,
|
readability-non-const-parameter,
|
||||||
|
readability-redundant-casting,
|
||||||
readability-redundant-declaration,
|
readability-redundant-declaration,
|
||||||
|
readability-redundant-inline-specifier,
|
||||||
readability-redundant-member-init,
|
readability-redundant-member-init,
|
||||||
readability-redundant-string-init,
|
readability-redundant-string-init,
|
||||||
|
readability-reference-to-constructed-temporary,
|
||||||
readability-simplify-boolean-expr,
|
readability-simplify-boolean-expr,
|
||||||
readability-static-accessed-through-instance,
|
readability-static-accessed-through-instance,
|
||||||
readability-static-definition-in-anonymous-namespace,
|
readability-static-definition-in-anonymous-namespace,
|
||||||
readability-suspicious-call-argument
|
readability-suspicious-call-argument,
|
||||||
'
|
readability-use-std-min-max
|
||||||
|
"
|
||||||
|
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
readability-braces-around-statements.ShortStatementLines: 2
|
readability-braces-around-statements.ShortStatementLines: 2
|
||||||
|
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
|
||||||
|
readability-identifier-naming.ClassCase: CamelCase
|
||||||
|
readability-identifier-naming.StructCase: CamelCase
|
||||||
|
readability-identifier-naming.UnionCase: CamelCase
|
||||||
|
readability-identifier-naming.EnumCase: CamelCase
|
||||||
|
readability-identifier-naming.EnumConstantCase: CamelCase
|
||||||
|
readability-identifier-naming.ScopedEnumConstantCase: CamelCase
|
||||||
|
readability-identifier-naming.GlobalConstantCase: UPPER_CASE
|
||||||
|
readability-identifier-naming.GlobalConstantPrefix: "k"
|
||||||
|
readability-identifier-naming.GlobalVariableCase: CamelCase
|
||||||
|
readability-identifier-naming.GlobalVariablePrefix: "g"
|
||||||
|
readability-identifier-naming.ConstexprFunctionCase: camelBack
|
||||||
|
readability-identifier-naming.ConstexprMethodCase: camelBack
|
||||||
|
readability-identifier-naming.ClassMethodCase: camelBack
|
||||||
|
readability-identifier-naming.ClassMemberCase: camelBack
|
||||||
|
readability-identifier-naming.ClassConstantCase: UPPER_CASE
|
||||||
|
readability-identifier-naming.ClassConstantPrefix: "k"
|
||||||
|
readability-identifier-naming.StaticConstantCase: UPPER_CASE
|
||||||
|
readability-identifier-naming.StaticConstantPrefix: "k"
|
||||||
|
readability-identifier-naming.StaticVariableCase: UPPER_CASE
|
||||||
|
readability-identifier-naming.StaticVariablePrefix: "k"
|
||||||
|
readability-identifier-naming.ConstexprVariableCase: UPPER_CASE
|
||||||
|
readability-identifier-naming.ConstexprVariablePrefix: "k"
|
||||||
|
readability-identifier-naming.LocalConstantCase: camelBack
|
||||||
|
readability-identifier-naming.LocalVariableCase: camelBack
|
||||||
|
readability-identifier-naming.TemplateParameterCase: CamelCase
|
||||||
|
readability-identifier-naming.ParameterCase: camelBack
|
||||||
|
readability-identifier-naming.FunctionCase: camelBack
|
||||||
|
readability-identifier-naming.MemberCase: camelBack
|
||||||
|
readability-identifier-naming.PrivateMemberSuffix: _
|
||||||
|
readability-identifier-naming.ProtectedMemberSuffix: _
|
||||||
|
readability-identifier-naming.PublicMemberSuffix: ""
|
||||||
|
readability-identifier-naming.FunctionIgnoredRegexp: ".*tag_invoke.*"
|
||||||
bugprone-unsafe-functions.ReportMoreUnsafeFunctions: true
|
bugprone-unsafe-functions.ReportMoreUnsafeFunctions: true
|
||||||
bugprone-unused-return-value.CheckedReturnTypes: ::std::error_code;::std::error_condition;::std::errc;::std::expected
|
bugprone-unused-return-value.CheckedReturnTypes: ::std::error_code;::std::error_condition;::std::errc
|
||||||
misc-include-cleaner.IgnoreHeaders: '.*/(detail|impl)/.*'
|
misc-include-cleaner.IgnoreHeaders: '.*/(detail|impl)/.*;.*(expected|unexpected).*;.*ranges_lower_bound\.h;time.h;stdlib.h;__chrono/.*;fmt/chrono.h;boost/uuid/uuid_hash.hpp'
|
||||||
|
|
||||||
HeaderFilterRegex: '^.*/(src|unittests)/.*\.(h|hpp)$'
|
|
||||||
WarningsAsErrors: '*'
|
|
||||||
|
|
||||||
|
HeaderFilterRegex: '^.*/(src|tests)/.*\.(h|hpp)$'
|
||||||
|
WarningsAsErrors: "*"
|
||||||
|
|||||||
10
.clangd
10
.clangd
@@ -1,5 +1,13 @@
|
|||||||
|
CompileFlags:
|
||||||
|
Add: [-D__cpp_concepts=202002]
|
||||||
|
|
||||||
Diagnostics:
|
Diagnostics:
|
||||||
UnusedIncludes: Strict
|
UnusedIncludes: Strict
|
||||||
MissingIncludes: Strict
|
MissingIncludes: Strict
|
||||||
Includes:
|
Includes:
|
||||||
IgnoreHeader: ".*/(detail|impl)/.*"
|
IgnoreHeader:
|
||||||
|
- ".*/(detail|impl)/.*"
|
||||||
|
- ".*expected.*"
|
||||||
|
- ".*ranges_lower_bound.h"
|
||||||
|
- "time.h"
|
||||||
|
- "stdlib.h"
|
||||||
|
|||||||
@@ -1,222 +1,222 @@
|
|||||||
_help_parse: Options affecting listfile parsing
|
_help_parse: Options affecting listfile parsing
|
||||||
parse:
|
parse:
|
||||||
_help_additional_commands:
|
_help_additional_commands:
|
||||||
- Specify structure for custom cmake functions
|
- Specify structure for custom cmake functions
|
||||||
additional_commands:
|
additional_commands:
|
||||||
foo:
|
foo:
|
||||||
flags:
|
flags:
|
||||||
- BAR
|
- BAR
|
||||||
- BAZ
|
- BAZ
|
||||||
kwargs:
|
kwargs:
|
||||||
HEADERS: '*'
|
HEADERS: "*"
|
||||||
SOURCES: '*'
|
SOURCES: "*"
|
||||||
DEPENDS: '*'
|
DEPENDS: "*"
|
||||||
_help_override_spec:
|
_help_override_spec:
|
||||||
- Override configurations per-command where available
|
- Override configurations per-command where available
|
||||||
override_spec: {}
|
override_spec: {}
|
||||||
_help_vartags:
|
_help_vartags:
|
||||||
- Specify variable tags.
|
- Specify variable tags.
|
||||||
vartags: []
|
vartags: []
|
||||||
_help_proptags:
|
_help_proptags:
|
||||||
- Specify property tags.
|
- Specify property tags.
|
||||||
proptags: []
|
proptags: []
|
||||||
_help_format: Options affecting formatting.
|
_help_format: Options affecting formatting.
|
||||||
format:
|
format:
|
||||||
_help_disable:
|
_help_disable:
|
||||||
- Disable formatting entirely, making cmake-format a no-op
|
- Disable formatting entirely, making cmake-format a no-op
|
||||||
disable: false
|
disable: false
|
||||||
_help_line_width:
|
_help_line_width:
|
||||||
- How wide to allow formatted cmake files
|
- How wide to allow formatted cmake files
|
||||||
line_width: 120
|
line_width: 120
|
||||||
_help_tab_size:
|
_help_tab_size:
|
||||||
- How many spaces to tab for indent
|
- How many spaces to tab for indent
|
||||||
tab_size: 2
|
tab_size: 2
|
||||||
_help_use_tabchars:
|
_help_use_tabchars:
|
||||||
- If true, lines are indented using tab characters (utf-8
|
- If true, lines are indented using tab characters (utf-8
|
||||||
- 0x09) instead of <tab_size> space characters (utf-8 0x20).
|
- 0x09) instead of <tab_size> space characters (utf-8 0x20).
|
||||||
- In cases where the layout would require a fractional tab
|
- In cases where the layout would require a fractional tab
|
||||||
- character, the behavior of the fractional indentation is
|
- character, the behavior of the fractional indentation is
|
||||||
- governed by <fractional_tab_policy>
|
- governed by <fractional_tab_policy>
|
||||||
use_tabchars: false
|
use_tabchars: false
|
||||||
_help_fractional_tab_policy:
|
_help_fractional_tab_policy:
|
||||||
- If <use_tabchars> is True, then the value of this variable
|
- If <use_tabchars> is True, then the value of this variable
|
||||||
- indicates how fractional indentions are handled during
|
- indicates how fractional indentions are handled during
|
||||||
- whitespace replacement. If set to 'use-space', fractional
|
- whitespace replacement. If set to 'use-space', fractional
|
||||||
- indentation is left as spaces (utf-8 0x20). If set to
|
- indentation is left as spaces (utf-8 0x20). If set to
|
||||||
- '`round-up` fractional indentation is replaced with a single'
|
- "`round-up` fractional indentation is replaced with a single"
|
||||||
- tab character (utf-8 0x09) effectively shifting the column
|
- tab character (utf-8 0x09) effectively shifting the column
|
||||||
- to the next tabstop
|
- to the next tabstop
|
||||||
fractional_tab_policy: use-space
|
fractional_tab_policy: use-space
|
||||||
_help_max_subgroups_hwrap:
|
_help_max_subgroups_hwrap:
|
||||||
- If an argument group contains more than this many sub-groups
|
- If an argument group contains more than this many sub-groups
|
||||||
- (parg or kwarg groups) then force it to a vertical layout.
|
- (parg or kwarg groups) then force it to a vertical layout.
|
||||||
max_subgroups_hwrap: 4
|
max_subgroups_hwrap: 4
|
||||||
_help_max_pargs_hwrap:
|
_help_max_pargs_hwrap:
|
||||||
- If a positional argument group contains more than this many
|
- If a positional argument group contains more than this many
|
||||||
- arguments, then force it to a vertical layout.
|
- arguments, then force it to a vertical layout.
|
||||||
max_pargs_hwrap: 6
|
max_pargs_hwrap: 6
|
||||||
_help_max_rows_cmdline:
|
_help_max_rows_cmdline:
|
||||||
- If a cmdline positional group consumes more than this many
|
- If a cmdline positional group consumes more than this many
|
||||||
- lines without nesting, then invalidate the layout (and nest)
|
- lines without nesting, then invalidate the layout (and nest)
|
||||||
max_rows_cmdline: 2
|
max_rows_cmdline: 2
|
||||||
_help_separate_ctrl_name_with_space:
|
_help_separate_ctrl_name_with_space:
|
||||||
- If true, separate flow control names from their parentheses
|
- If true, separate flow control names from their parentheses
|
||||||
- with a space
|
- with a space
|
||||||
separate_ctrl_name_with_space: true
|
separate_ctrl_name_with_space: true
|
||||||
_help_separate_fn_name_with_space:
|
_help_separate_fn_name_with_space:
|
||||||
- If true, separate function names from parentheses with a
|
- If true, separate function names from parentheses with a
|
||||||
- space
|
- space
|
||||||
separate_fn_name_with_space: false
|
separate_fn_name_with_space: false
|
||||||
_help_dangle_parens:
|
_help_dangle_parens:
|
||||||
- If a statement is wrapped to more than one line, than dangle
|
- If a statement is wrapped to more than one line, than dangle
|
||||||
- the closing parenthesis on its own line.
|
- the closing parenthesis on its own line.
|
||||||
dangle_parens: true
|
dangle_parens: true
|
||||||
_help_dangle_align:
|
_help_dangle_align:
|
||||||
- If the trailing parenthesis must be 'dangled' on its on
|
- If the trailing parenthesis must be 'dangled' on its on
|
||||||
- 'line, then align it to this reference: `prefix`: the start'
|
- "line, then align it to this reference: `prefix`: the start"
|
||||||
- 'of the statement, `prefix-indent`: the start of the'
|
- "of the statement, `prefix-indent`: the start of the"
|
||||||
- 'statement, plus one indentation level, `child`: align to'
|
- "statement, plus one indentation level, `child`: align to"
|
||||||
- the column of the arguments
|
- the column of the arguments
|
||||||
dangle_align: prefix
|
dangle_align: prefix
|
||||||
_help_min_prefix_chars:
|
_help_min_prefix_chars:
|
||||||
- If the statement spelling length (including space and
|
- If the statement spelling length (including space and
|
||||||
- parenthesis) is smaller than this amount, then force reject
|
- parenthesis) is smaller than this amount, then force reject
|
||||||
- nested layouts.
|
- nested layouts.
|
||||||
min_prefix_chars: 4
|
min_prefix_chars: 4
|
||||||
_help_max_prefix_chars:
|
_help_max_prefix_chars:
|
||||||
- If the statement spelling length (including space and
|
- If the statement spelling length (including space and
|
||||||
- parenthesis) is larger than the tab width by more than this
|
- parenthesis) is larger than the tab width by more than this
|
||||||
- amount, then force reject un-nested layouts.
|
- amount, then force reject un-nested layouts.
|
||||||
max_prefix_chars: 10
|
max_prefix_chars: 10
|
||||||
_help_max_lines_hwrap:
|
_help_max_lines_hwrap:
|
||||||
- If a candidate layout is wrapped horizontally but it exceeds
|
- If a candidate layout is wrapped horizontally but it exceeds
|
||||||
- this many lines, then reject the layout.
|
- this many lines, then reject the layout.
|
||||||
max_lines_hwrap: 2
|
max_lines_hwrap: 2
|
||||||
_help_line_ending:
|
_help_line_ending:
|
||||||
- What style line endings to use in the output.
|
- What style line endings to use in the output.
|
||||||
line_ending: unix
|
line_ending: unix
|
||||||
_help_command_case:
|
_help_command_case:
|
||||||
- Format command names consistently as 'lower' or 'upper' case
|
- Format command names consistently as 'lower' or 'upper' case
|
||||||
command_case: canonical
|
command_case: canonical
|
||||||
_help_keyword_case:
|
_help_keyword_case:
|
||||||
- Format keywords consistently as 'lower' or 'upper' case
|
- Format keywords consistently as 'lower' or 'upper' case
|
||||||
keyword_case: unchanged
|
keyword_case: unchanged
|
||||||
_help_always_wrap:
|
_help_always_wrap:
|
||||||
- A list of command names which should always be wrapped
|
- A list of command names which should always be wrapped
|
||||||
always_wrap: []
|
always_wrap: []
|
||||||
_help_enable_sort:
|
_help_enable_sort:
|
||||||
- If true, the argument lists which are known to be sortable
|
- If true, the argument lists which are known to be sortable
|
||||||
- will be sorted lexicographicall
|
- will be sorted lexicographicall
|
||||||
enable_sort: true
|
enable_sort: true
|
||||||
_help_autosort:
|
_help_autosort:
|
||||||
- If true, the parsers may infer whether or not an argument
|
- If true, the parsers may infer whether or not an argument
|
||||||
- list is sortable (without annotation).
|
- list is sortable (without annotation).
|
||||||
autosort: true
|
autosort: true
|
||||||
_help_require_valid_layout:
|
_help_require_valid_layout:
|
||||||
- By default, if cmake-format cannot successfully fit
|
- By default, if cmake-format cannot successfully fit
|
||||||
- everything into the desired linewidth it will apply the
|
- everything into the desired linewidth it will apply the
|
||||||
- last, most agressive attempt that it made. If this flag is
|
- last, most aggressive attempt that it made. If this flag is
|
||||||
- True, however, cmake-format will print error, exit with non-
|
- True, however, cmake-format will print error, exit with non-
|
||||||
- zero status code, and write-out nothing
|
- zero status code, and write-out nothing
|
||||||
require_valid_layout: false
|
require_valid_layout: false
|
||||||
_help_layout_passes:
|
_help_layout_passes:
|
||||||
- A dictionary mapping layout nodes to a list of wrap
|
- A dictionary mapping layout nodes to a list of wrap
|
||||||
- decisions. See the documentation for more information.
|
- decisions. See the documentation for more information.
|
||||||
layout_passes: {}
|
layout_passes: {}
|
||||||
_help_markup: Options affecting comment reflow and formatting.
|
_help_markup: Options affecting comment reflow and formatting.
|
||||||
markup:
|
markup:
|
||||||
_help_bullet_char:
|
_help_bullet_char:
|
||||||
- What character to use for bulleted lists
|
- What character to use for bulleted lists
|
||||||
bullet_char: '*'
|
bullet_char: "*"
|
||||||
_help_enum_char:
|
_help_enum_char:
|
||||||
- What character to use as punctuation after numerals in an
|
- What character to use as punctuation after numerals in an
|
||||||
- enumerated list
|
- enumerated list
|
||||||
enum_char: .
|
enum_char: .
|
||||||
_help_first_comment_is_literal:
|
_help_first_comment_is_literal:
|
||||||
- If comment markup is enabled, don't reflow the first comment
|
- If comment markup is enabled, don't reflow the first comment
|
||||||
- block in each listfile. Use this to preserve formatting of
|
- block in each listfile. Use this to preserve formatting of
|
||||||
- your copyright/license statements.
|
- your copyright/license statements.
|
||||||
first_comment_is_literal: false
|
first_comment_is_literal: false
|
||||||
_help_literal_comment_pattern:
|
_help_literal_comment_pattern:
|
||||||
- If comment markup is enabled, don't reflow any comment block
|
- If comment markup is enabled, don't reflow any comment block
|
||||||
- which matches this (regex) pattern. Default is `None`
|
- which matches this (regex) pattern. Default is `None`
|
||||||
- (disabled).
|
- (disabled).
|
||||||
literal_comment_pattern: null
|
literal_comment_pattern: null
|
||||||
_help_fence_pattern:
|
_help_fence_pattern:
|
||||||
- Regular expression to match preformat fences in comments
|
- Regular expression to match preformat fences in comments
|
||||||
- default= ``r'^\s*([`~]{3}[`~]*)(.*)$'``
|
- default= ``r'^\s*([`~]{3}[`~]*)(.*)$'``
|
||||||
fence_pattern: ^\s*([`~]{3}[`~]*)(.*)$
|
fence_pattern: ^\s*([`~]{3}[`~]*)(.*)$
|
||||||
_help_ruler_pattern:
|
_help_ruler_pattern:
|
||||||
- Regular expression to match rulers in comments default=
|
- Regular expression to match rulers in comments default=
|
||||||
- '``r''^\s*[^\w\s]{3}.*[^\w\s]{3}$''``'
|
- '``r''^\s*[^\w\s]{3}.*[^\w\s]{3}$''``'
|
||||||
ruler_pattern: ^\s*[^\w\s]{3}.*[^\w\s]{3}$
|
ruler_pattern: ^\s*[^\w\s]{3}.*[^\w\s]{3}$
|
||||||
_help_explicit_trailing_pattern:
|
_help_explicit_trailing_pattern:
|
||||||
- If a comment line matches starts with this pattern then it
|
- If a comment line matches starts with this pattern then it
|
||||||
- is explicitly a trailing comment for the preceeding
|
- is explicitly a trailing comment for the preceding
|
||||||
- argument. Default is '#<'
|
- argument. Default is '#<'
|
||||||
explicit_trailing_pattern: '#<'
|
explicit_trailing_pattern: "#<"
|
||||||
_help_hashruler_min_length:
|
_help_hashruler_min_length:
|
||||||
- If a comment line starts with at least this many consecutive
|
- If a comment line starts with at least this many consecutive
|
||||||
- hash characters, then don't lstrip() them off. This allows
|
- hash characters, then don't lstrip() them off. This allows
|
||||||
- for lazy hash rulers where the first hash char is not
|
- for lazy hash rulers where the first hash char is not
|
||||||
- separated by space
|
- separated by space
|
||||||
hashruler_min_length: 10
|
hashruler_min_length: 10
|
||||||
_help_canonicalize_hashrulers:
|
_help_canonicalize_hashrulers:
|
||||||
- If true, then insert a space between the first hash char and
|
- If true, then insert a space between the first hash char and
|
||||||
- remaining hash chars in a hash ruler, and normalize its
|
- remaining hash chars in a hash ruler, and normalize its
|
||||||
- length to fill the column
|
- length to fill the column
|
||||||
canonicalize_hashrulers: true
|
canonicalize_hashrulers: true
|
||||||
_help_enable_markup:
|
_help_enable_markup:
|
||||||
- enable comment markup parsing and reflow
|
- enable comment markup parsing and reflow
|
||||||
enable_markup: true
|
enable_markup: true
|
||||||
_help_lint: Options affecting the linter
|
_help_lint: Options affecting the linter
|
||||||
lint:
|
lint:
|
||||||
_help_disabled_codes:
|
_help_disabled_codes:
|
||||||
- a list of lint codes to disable
|
- a list of lint codes to disable
|
||||||
disabled_codes: []
|
disabled_codes: []
|
||||||
_help_function_pattern:
|
_help_function_pattern:
|
||||||
- regular expression pattern describing valid function names
|
- regular expression pattern describing valid function names
|
||||||
function_pattern: '[0-9a-z_]+'
|
function_pattern: "[0-9a-z_]+"
|
||||||
_help_macro_pattern:
|
_help_macro_pattern:
|
||||||
- regular expression pattern describing valid macro names
|
- regular expression pattern describing valid macro names
|
||||||
macro_pattern: '[0-9A-Z_]+'
|
macro_pattern: "[0-9A-Z_]+"
|
||||||
_help_global_var_pattern:
|
_help_global_var_pattern:
|
||||||
- regular expression pattern describing valid names for
|
- regular expression pattern describing valid names for
|
||||||
- variables with global (cache) scope
|
- variables with global (cache) scope
|
||||||
global_var_pattern: '[A-Z][0-9A-Z_]+'
|
global_var_pattern: "[A-Z][0-9A-Z_]+"
|
||||||
_help_internal_var_pattern:
|
_help_internal_var_pattern:
|
||||||
- regular expression pattern describing valid names for
|
- regular expression pattern describing valid names for
|
||||||
- variables with global scope (but internal semantic)
|
- variables with global scope (but internal semantic)
|
||||||
internal_var_pattern: _[A-Z][0-9A-Z_]+
|
internal_var_pattern: _[A-Z][0-9A-Z_]+
|
||||||
_help_local_var_pattern:
|
_help_local_var_pattern:
|
||||||
- regular expression pattern describing valid names for
|
- regular expression pattern describing valid names for
|
||||||
- variables with local scope
|
- variables with local scope
|
||||||
local_var_pattern: '[a-z][a-z0-9_]+'
|
local_var_pattern: "[a-z][a-z0-9_]+"
|
||||||
_help_private_var_pattern:
|
_help_private_var_pattern:
|
||||||
- regular expression pattern describing valid names for
|
- regular expression pattern describing valid names for
|
||||||
- privatedirectory variables
|
- privatedirectory variables
|
||||||
private_var_pattern: _[0-9a-z_]+
|
private_var_pattern: _[0-9a-z_]+
|
||||||
_help_public_var_pattern:
|
_help_public_var_pattern:
|
||||||
- regular expression pattern describing valid names for public
|
- regular expression pattern describing valid names for public
|
||||||
- directory variables
|
- directory variables
|
||||||
public_var_pattern: '[A-Z][0-9A-Z_]+'
|
public_var_pattern: "[A-Z][0-9A-Z_]+"
|
||||||
_help_argument_var_pattern:
|
_help_argument_var_pattern:
|
||||||
- regular expression pattern describing valid names for
|
- regular expression pattern describing valid names for
|
||||||
- function/macro arguments and loop variables.
|
- function/macro arguments and loop variables.
|
||||||
argument_var_pattern: '[a-z][a-z0-9_]+'
|
argument_var_pattern: "[a-z][a-z0-9_]+"
|
||||||
_help_keyword_pattern:
|
_help_keyword_pattern:
|
||||||
- regular expression pattern describing valid names for
|
- regular expression pattern describing valid names for
|
||||||
- keywords used in functions or macros
|
- keywords used in functions or macros
|
||||||
keyword_pattern: '[A-Z][0-9A-Z_]+'
|
keyword_pattern: "[A-Z][0-9A-Z_]+"
|
||||||
_help_max_conditionals_custom_parser:
|
_help_max_conditionals_custom_parser:
|
||||||
- In the heuristic for C0201, how many conditionals to match
|
- In the heuristic for C0201, how many conditionals to match
|
||||||
- within a loop in before considering the loop a parser.
|
- within a loop in before considering the loop a parser.
|
||||||
max_conditionals_custom_parser: 2
|
max_conditionals_custom_parser: 2
|
||||||
_help_min_statement_spacing:
|
_help_min_statement_spacing:
|
||||||
- Require at least this many newlines between statements
|
- Require at least this many newlines between statements
|
||||||
min_statement_spacing: 1
|
min_statement_spacing: 1
|
||||||
_help_max_statement_spacing:
|
_help_max_statement_spacing:
|
||||||
- Require no more than this many newlines between statements
|
- Require no more than this many newlines between statements
|
||||||
max_statement_spacing: 2
|
max_statement_spacing: 2
|
||||||
max_returns: 6
|
max_returns: 6
|
||||||
max_branches: 12
|
max_branches: 12
|
||||||
@@ -226,20 +226,20 @@ lint:
|
|||||||
_help_encode: Options affecting file encoding
|
_help_encode: Options affecting file encoding
|
||||||
encode:
|
encode:
|
||||||
_help_emit_byteorder_mark:
|
_help_emit_byteorder_mark:
|
||||||
- If true, emit the unicode byte-order mark (BOM) at the start
|
- If true, emit the unicode byte-order mark (BOM) at the start
|
||||||
- of the file
|
- of the file
|
||||||
emit_byteorder_mark: false
|
emit_byteorder_mark: false
|
||||||
_help_input_encoding:
|
_help_input_encoding:
|
||||||
- Specify the encoding of the input file. Defaults to utf-8
|
- Specify the encoding of the input file. Defaults to utf-8
|
||||||
input_encoding: utf-8
|
input_encoding: utf-8
|
||||||
_help_output_encoding:
|
_help_output_encoding:
|
||||||
- Specify the encoding of the output file. Defaults to utf-8.
|
- Specify the encoding of the output file. Defaults to utf-8.
|
||||||
- Note that cmake only claims to support utf-8 so be careful
|
- Note that cmake only claims to support utf-8 so be careful
|
||||||
- when using anything else
|
- when using anything else
|
||||||
output_encoding: utf-8
|
output_encoding: utf-8
|
||||||
_help_misc: Miscellaneous configurations options.
|
_help_misc: Miscellaneous configurations options.
|
||||||
misc:
|
misc:
|
||||||
_help_per_command:
|
_help_per_command:
|
||||||
- A dictionary containing any per-command configuration
|
- A dictionary containing any per-command configuration
|
||||||
- overrides. Currently only `command_case` is supported.
|
- overrides. Currently only `command_case` is supported.
|
||||||
per_command: {}
|
per_command: {}
|
||||||
|
|||||||
11
.codecov.yml
11
.codecov.yml
@@ -9,3 +9,14 @@ coverage:
|
|||||||
default:
|
default:
|
||||||
target: 20% # Need to bump this number https://docs.codecov.com/docs/commit-status#patch-status
|
target: 20% # Need to bump this number https://docs.codecov.com/docs/commit-status#patch-status
|
||||||
threshold: 2%
|
threshold: 2%
|
||||||
|
|
||||||
|
# `codecov/codecov-action` reruns `gcovr` if build files present
|
||||||
|
# That's why we run it in a separate workflow
|
||||||
|
# This ignore list is not currently used
|
||||||
|
#
|
||||||
|
# More info: https://github.com/XRPLF/clio/pull/2066
|
||||||
|
ignore:
|
||||||
|
- "tests"
|
||||||
|
- "src/data/cassandra/"
|
||||||
|
- "src/data/CassandraBackend.hpp"
|
||||||
|
- "src/data/BackendFactory.*"
|
||||||
|
|||||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.svg filter=lfs diff=lfs merge=lfs -text
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Note: This script is intended to be run from the root of the repository.
|
|
||||||
#
|
|
||||||
# This script checks the format of the code and cmake files.
|
|
||||||
# In many cases it will automatically fix the issues and abort the commit.
|
|
||||||
|
|
||||||
echo "+ Checking code format..."
|
|
||||||
|
|
||||||
# paths to check and re-format
|
|
||||||
sources="src unittests"
|
|
||||||
formatter="clang-format -i"
|
|
||||||
version=$($formatter --version | grep -o '[0-9\.]*')
|
|
||||||
|
|
||||||
if [[ "17.0.0" > "$version" ]]; then
|
|
||||||
cat <<EOF
|
|
||||||
|
|
||||||
ERROR
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
A minimum of version 17 of `which clang-format` is required.
|
|
||||||
Your version is $version.
|
|
||||||
Please fix paths and run again.
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
EOF
|
|
||||||
exit 3
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check there is no .h headers, only .hpp
|
|
||||||
wrong_headers=$(find $sources -name "*.h" | sed 's/^/ - /')
|
|
||||||
if [[ ! -z "$wrong_headers" ]]; then
|
|
||||||
cat <<EOF
|
|
||||||
|
|
||||||
ERROR
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
Found .h headers in the source code. Please rename them to .hpp:
|
|
||||||
|
|
||||||
$wrong_headers
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
EOF
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v cmake-format &> /dev/null; then
|
|
||||||
cat <<EOF
|
|
||||||
|
|
||||||
ERROR
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
'cmake-format' is required to run this script.
|
|
||||||
Please install it and run again.
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
EOF
|
|
||||||
exit 3
|
|
||||||
fi
|
|
||||||
|
|
||||||
function grep_code {
|
|
||||||
grep -l "${1}" ${sources} -r --include \*.hpp --include \*.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
||||||
# make all includes to be <...> style
|
|
||||||
grep_code '#include ".*"' | xargs sed -i '' -E 's|#include "(.*)"|#include <\1>|g'
|
|
||||||
|
|
||||||
# make local includes to be "..." style
|
|
||||||
main_src_dirs=$(find ./src -maxdepth 1 -type d -exec basename {} \; | tr '\n' '|' | sed 's/|$//' | sed 's/|/\\|/g')
|
|
||||||
grep_code "#include <\($main_src_dirs\)/.*>" | xargs sed -i '' -E "s|#include <(($main_src_dirs)/.*)>|#include \"\1\"|g"
|
|
||||||
else
|
|
||||||
# make all includes to be <...> style
|
|
||||||
grep_code '#include ".*"' | xargs sed -i -E 's|#include "(.*)"|#include <\1>|g'
|
|
||||||
|
|
||||||
# make local includes to be "..." style
|
|
||||||
main_src_dirs=$(find ./src -type d -maxdepth 1 -exec basename {} \; | paste -sd '|' | sed 's/|/\\|/g')
|
|
||||||
grep_code "#include <\($main_src_dirs\)/.*>" | xargs sed -i -E "s|#include <(($main_src_dirs)/.*)>|#include \"\1\"|g"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake_dirs=$(echo cmake $sources)
|
|
||||||
cmake_files=$(find $cmake_dirs -type f \( -name "CMakeLists.txt" -o -name "*.cmake" \))
|
|
||||||
cmake_files=$(echo $cmake_files ./CMakeLists.txt)
|
|
||||||
|
|
||||||
first=$(git diff $sources $cmake_files)
|
|
||||||
find $sources -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.ipp' \) -print0 | xargs -0 $formatter
|
|
||||||
cmake-format -i $cmake_files
|
|
||||||
second=$(git diff $sources $cmake_files)
|
|
||||||
changes=$(diff <(echo "$first") <(echo "$second") | wc -l | sed -e 's/^[[:space:]]*//')
|
|
||||||
|
|
||||||
if [ "$changes" != "0" ]; then
|
|
||||||
cat <<\EOF
|
|
||||||
|
|
||||||
WARNING
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
Automatically re-formatted code with 'clang-format' - commit was aborted.
|
|
||||||
Please manually add any updated files and commit again.
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
EOF
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# This script is intended to be run from the root of the repository.
|
|
||||||
|
|
||||||
source .githooks/check-format
|
|
||||||
source .githooks/check-docs
|
|
||||||
10
.github/ISSUE_TEMPLATE/bug_report.md
vendored
10
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -3,28 +3,34 @@ name: Bug report
|
|||||||
about: Create a report to help us improve
|
about: Create a report to help us improve
|
||||||
title: "[Title with short description] (Version: [Clio version])"
|
title: "[Title with short description] (Version: [Clio version])"
|
||||||
labels: bug
|
labels: bug
|
||||||
assignees: ''
|
assignees: ""
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Please search existing issues to avoid creating duplicates. -->
|
<!-- Please search existing issues to avoid creating duplicates. -->
|
||||||
|
<!-- Kindly refrain from posting any credentials or sensitive information in this issue -->
|
||||||
|
|
||||||
## Issue Description
|
## Issue Description
|
||||||
|
|
||||||
<!-- Provide a summary for your issue/bug. -->
|
<!-- Provide a summary for your issue/bug. -->
|
||||||
|
|
||||||
## Steps to Reproduce
|
## Steps to Reproduce
|
||||||
|
|
||||||
<!-- List in detail the exact steps to reproduce the unexpected behavior of the software. -->
|
<!-- List in detail the exact steps to reproduce the unexpected behavior of the software. -->
|
||||||
|
|
||||||
## Expected Result
|
## Expected Result
|
||||||
|
|
||||||
<!-- Explain in detail what behavior you expected to happen. -->
|
<!-- Explain in detail what behavior you expected to happen. -->
|
||||||
|
|
||||||
## Actual Result
|
## Actual Result
|
||||||
|
|
||||||
<!-- Explain in detail what behavior actually happened. -->
|
<!-- Explain in detail what behavior actually happened. -->
|
||||||
|
|
||||||
## Environment
|
## Environment
|
||||||
|
|
||||||
<!-- Please describe your environment setup (such as Ubuntu 20.04.2 with Boost 1.82). -->
|
<!-- Please describe your environment setup (such as Ubuntu 20.04.2 with Boost 1.82). -->
|
||||||
<!-- Please use the version returned by './clio_server --version' as the version number -->
|
<!-- Please use the version returned by './clio_server --version' as the version number -->
|
||||||
|
|
||||||
## Supporting Files
|
## Supporting Files
|
||||||
|
|
||||||
<!-- If you have supporting files such as a log, feel free to post a link here using Github Gist. -->
|
<!-- If you have supporting files such as a log, feel free to post a link here using Github Gist. -->
|
||||||
<!-- Consider adding configuration files with private information removed via Github Gist. -->
|
<!-- Consider adding configuration files with private information removed via Github Gist. -->
|
||||||
|
|||||||
8
.github/ISSUE_TEMPLATE/feature_request.md
vendored
8
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -3,20 +3,24 @@ name: Feature request
|
|||||||
about: Suggest an idea for this project
|
about: Suggest an idea for this project
|
||||||
title: "[Title with short description] (Version: [Clio version])"
|
title: "[Title with short description] (Version: [Clio version])"
|
||||||
labels: enhancement
|
labels: enhancement
|
||||||
assignees: ''
|
assignees: ""
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Please search existing issues to avoid creating duplicates. -->
|
<!-- Please search existing issues to avoid creating duplicates. -->
|
||||||
|
<!-- Kindly refrain from posting any credentials or sensitive information in this issue -->
|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
<!-- Provide a summary to the feature request -->
|
<!-- Provide a summary to the feature request -->
|
||||||
|
|
||||||
## Motivation
|
## Motivation
|
||||||
|
|
||||||
<!-- Why do we need this feature? -->
|
<!-- Why do we need this feature? -->
|
||||||
|
|
||||||
## Solution
|
## Solution
|
||||||
|
|
||||||
<!-- What is the solution? -->
|
<!-- What is the solution? -->
|
||||||
|
|
||||||
## Paths Not Taken
|
## Paths Not Taken
|
||||||
|
|
||||||
<!-- What other alternatives have been considered? -->
|
<!-- What other alternatives have been considered? -->
|
||||||
|
|||||||
6
.github/ISSUE_TEMPLATE/question.md
vendored
6
.github/ISSUE_TEMPLATE/question.md
vendored
@@ -3,15 +3,17 @@ name: Question
|
|||||||
about: A question in form of an issue
|
about: A question in form of an issue
|
||||||
title: "[Title with short description] (Version: Clio version)"
|
title: "[Title with short description] (Version: Clio version)"
|
||||||
labels: question
|
labels: question
|
||||||
assignees: ''
|
assignees: ""
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Please search existing issues to avoid creating duplicates. -->
|
<!-- Please search existing issues to avoid creating duplicates. -->
|
||||||
<!-- Consider starting a [discussion](https://github.com/XRPLF/clio/discussions) instead. -->
|
<!-- Consider starting a [discussion](https://github.com/XRPLF/clio/discussions) instead. -->
|
||||||
|
<!-- Kindly refrain from posting any credentials or sensitive information in this issue -->
|
||||||
|
|
||||||
## Question
|
## Question
|
||||||
|
|
||||||
<!-- Your question -->
|
<!-- Your question -->
|
||||||
|
|
||||||
## Paths Not Taken
|
## Paths Not Taken
|
||||||
|
|
||||||
<!-- If applicable, what other alternatives have been considered? -->
|
<!-- If applicable, what other alternatives have been considered? -->
|
||||||
|
|||||||
19
.github/actions/build_clio/action.yml
vendored
19
.github/actions/build_clio/action.yml
vendored
@@ -1,18 +1,29 @@
|
|||||||
name: Build clio
|
name: Build clio
|
||||||
description: Build clio in build directory
|
description: Build clio in build directory
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
target:
|
targets:
|
||||||
description: Build target name
|
description: Space-separated build target names
|
||||||
default: all
|
default: all
|
||||||
|
subtract_threads:
|
||||||
|
description: An option for the action get_number_of_threads. See get_number_of_threads
|
||||||
|
required: true
|
||||||
|
default: "0"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Get number of threads
|
- name: Get number of threads
|
||||||
uses: ./.github/actions/get_number_of_threads
|
uses: ./.github/actions/get_number_of_threads
|
||||||
id: number_of_threads
|
id: number_of_threads
|
||||||
|
with:
|
||||||
|
subtract_threads: ${{ inputs.subtract_threads }}
|
||||||
|
|
||||||
- name: Build Clio
|
- name: Build targets
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cmake --build . --parallel ${{ steps.number_of_threads.outputs.threads_number }} --target ${{ inputs.target }}
|
cmake \
|
||||||
|
--build . \
|
||||||
|
--parallel "${{ steps.number_of_threads.outputs.threads_number }}" \
|
||||||
|
--target ${{ inputs.targets }}
|
||||||
|
|||||||
73
.github/actions/build_docker_image/action.yml
vendored
Normal file
73
.github/actions/build_docker_image/action.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
name: Build and push Docker image
|
||||||
|
description: Build and push Docker image to DockerHub and GitHub Container Registry
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
images:
|
||||||
|
description: Name of the images to use as a base name
|
||||||
|
required: true
|
||||||
|
push_image:
|
||||||
|
description: Whether to push the image to the registry (true/false)
|
||||||
|
required: true
|
||||||
|
directory:
|
||||||
|
description: The directory containing the Dockerfile
|
||||||
|
required: true
|
||||||
|
tags:
|
||||||
|
description: Comma separated tags to apply to the image
|
||||||
|
required: true
|
||||||
|
platforms:
|
||||||
|
description: Platforms to build the image for (e.g. linux/amd64,linux/arm64)
|
||||||
|
required: true
|
||||||
|
|
||||||
|
dockerhub_repo:
|
||||||
|
description: DockerHub repository name
|
||||||
|
required: false
|
||||||
|
dockerhub_description:
|
||||||
|
description: Short description of the image
|
||||||
|
required: false
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Login to DockerHub
|
||||||
|
if: ${{ inputs.push_image == 'true' && inputs.dockerhub_repo != '' }}
|
||||||
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
||||||
|
with:
|
||||||
|
username: ${{ env.DOCKERHUB_USER }}
|
||||||
|
password: ${{ env.DOCKERHUB_PW }}
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
if: ${{ inputs.push_image == 'true' }}
|
||||||
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ env.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
|
||||||
|
with:
|
||||||
|
cache-image: false
|
||||||
|
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
||||||
|
|
||||||
|
- uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
||||||
|
id: meta
|
||||||
|
with:
|
||||||
|
images: ${{ inputs.images }}
|
||||||
|
tags: ${{ inputs.tags }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
||||||
|
with:
|
||||||
|
context: ${{ inputs.directory }}
|
||||||
|
platforms: ${{ inputs.platforms }}
|
||||||
|
push: ${{ inputs.push_image == 'true' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|
||||||
|
- name: Update DockerHub description
|
||||||
|
if: ${{ inputs.push_image == 'true' && inputs.dockerhub_repo != '' }}
|
||||||
|
uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 # v4.0.2
|
||||||
|
with:
|
||||||
|
username: ${{ env.DOCKERHUB_USER }}
|
||||||
|
password: ${{ env.DOCKERHUB_PW }}
|
||||||
|
repository: ${{ inputs.dockerhub_repo }}
|
||||||
|
short-description: ${{ inputs.dockerhub_description }}
|
||||||
|
readme-filepath: ${{ inputs.directory }}/README.md
|
||||||
15
.github/actions/code_coverage/action.yml
vendored
15
.github/actions/code_coverage/action.yml
vendored
@@ -1,20 +1,29 @@
|
|||||||
name: Generate code coverage report
|
name: Generate code coverage report
|
||||||
description: Run tests, generate code coverage report and upload it to codecov.io
|
description: Run tests, generate code coverage report and upload it to codecov.io
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
build/clio_tests --backend_host=scylladb
|
build/clio_tests
|
||||||
|
|
||||||
|
# Please keep exclude list in sync with .codecov.yml
|
||||||
- name: Run gcovr
|
- name: Run gcovr
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
gcovr -e unittests --xml build/coverage_report.xml -j8 --exclude-throw-branches
|
gcovr \
|
||||||
|
-e tests \
|
||||||
|
-e src/data/cassandra \
|
||||||
|
-e src/data/CassandraBackend.hpp \
|
||||||
|
-e 'src/data/BackendFactory.*' \
|
||||||
|
--xml build/coverage_report.xml \
|
||||||
|
-j8 --exclude-throw-branches
|
||||||
|
|
||||||
- name: Archive coverage report
|
- name: Archive coverage report
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: coverage-report.xml
|
name: coverage-report.xml
|
||||||
path: build/coverage_report.xml
|
path: build/coverage_report.xml
|
||||||
|
|||||||
41
.github/actions/create_issue/action.yml
vendored
Normal file
41
.github/actions/create_issue/action.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
name: Create an issue
|
||||||
|
description: Create an issue
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
title:
|
||||||
|
description: Issue title
|
||||||
|
required: true
|
||||||
|
body:
|
||||||
|
description: Issue body
|
||||||
|
required: true
|
||||||
|
labels:
|
||||||
|
description: Comma-separated list of labels
|
||||||
|
required: true
|
||||||
|
default: "bug"
|
||||||
|
assignees:
|
||||||
|
description: Comma-separated list of assignees
|
||||||
|
required: true
|
||||||
|
default: "godexsoft,kuznetsss,PeterChen13579,mathbunnyru"
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
created_issue_id:
|
||||||
|
description: Created issue id
|
||||||
|
value: ${{ steps.create_issue.outputs.created_issue }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Create an issue
|
||||||
|
id: create_issue
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo -e '${{ inputs.body }}' > issue.md
|
||||||
|
gh issue create \
|
||||||
|
--assignee '${{ inputs.assignees }}' \
|
||||||
|
--label '${{ inputs.labels }}' \
|
||||||
|
--title '${{ inputs.title }}' \
|
||||||
|
--body-file ./issue.md \
|
||||||
|
> create_issue.log
|
||||||
|
created_issue="$(sed 's|.*/||' create_issue.log)"
|
||||||
|
echo "created_issue=$created_issue" >> $GITHUB_OUTPUT
|
||||||
|
rm create_issue.log issue.md
|
||||||
54
.github/actions/generate/action.yml
vendored
54
.github/actions/generate/action.yml
vendored
@@ -1,21 +1,35 @@
|
|||||||
name: Run conan and cmake
|
name: Run conan and cmake
|
||||||
description: Run conan and cmake
|
description: Run conan and cmake
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
conan_profile:
|
conan_profile:
|
||||||
description: Conan profile name
|
description: Conan profile name
|
||||||
required: true
|
required: true
|
||||||
conan_cache_hit:
|
force_conan_source_build:
|
||||||
description: Whether conan cache has been downloaded
|
description: Whether conan should build all dependencies from source
|
||||||
required: true
|
required: true
|
||||||
default: 'false'
|
default: "false"
|
||||||
build_type:
|
build_type:
|
||||||
description: Build type for third-party libraries and clio. Could be 'Release', 'Debug'
|
description: Build type for third-party libraries and clio. Could be 'Release', 'Debug'
|
||||||
required: true
|
required: true
|
||||||
default: 'Release'
|
default: "Release"
|
||||||
|
build_integration_tests:
|
||||||
|
description: Whether to build integration tests
|
||||||
|
required: true
|
||||||
|
default: "true"
|
||||||
code_coverage:
|
code_coverage:
|
||||||
description: Whether conan's coverage option should be on or not
|
description: Whether conan's coverage option should be on or not
|
||||||
required: true
|
required: true
|
||||||
default: 'false'
|
default: "false"
|
||||||
|
static:
|
||||||
|
description: Whether Clio is to be statically linked
|
||||||
|
required: true
|
||||||
|
default: "false"
|
||||||
|
time_trace:
|
||||||
|
description: Whether to enable compiler trace reports
|
||||||
|
required: true
|
||||||
|
default: "false"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -26,16 +40,40 @@ runs:
|
|||||||
- name: Run conan
|
- name: Run conan
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BUILD_OPTION: "${{ inputs.conan_cache_hit == 'true' && 'missing' || '' }}"
|
CONAN_BUILD_OPTION: "${{ inputs.force_conan_source_build == 'true' && '*' || 'missing' }}"
|
||||||
CODE_COVERAGE: "${{ inputs.code_coverage == 'true' && 'True' || 'False' }}"
|
CODE_COVERAGE: "${{ inputs.code_coverage == 'true' && 'True' || 'False' }}"
|
||||||
|
STATIC_OPTION: "${{ inputs.static == 'true' && 'True' || 'False' }}"
|
||||||
|
INTEGRATION_TESTS_OPTION: "${{ inputs.build_integration_tests == 'true' && 'True' || 'False' }}"
|
||||||
|
TIME_TRACE: "${{ inputs.time_trace == 'true' && 'True' || 'False' }}"
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
conan install .. -of . -b $BUILD_OPTION -s build_type=${{ inputs.build_type }} -o clio:tests=True -o clio:lint=False -o clio:coverage="${CODE_COVERAGE}" --profile ${{ inputs.conan_profile }}
|
conan \
|
||||||
|
install .. \
|
||||||
|
-of . \
|
||||||
|
-b "$CONAN_BUILD_OPTION" \
|
||||||
|
-s "build_type=${{ inputs.build_type }}" \
|
||||||
|
-o "&:static=${STATIC_OPTION}" \
|
||||||
|
-o "&:tests=True" \
|
||||||
|
-o "&:integration_tests=${INTEGRATION_TESTS_OPTION}" \
|
||||||
|
-o "&:lint=False" \
|
||||||
|
-o "&:coverage=${CODE_COVERAGE}" \
|
||||||
|
-o "&:time_trace=${TIME_TRACE}" \
|
||||||
|
--profile:all "${{ inputs.conan_profile }}"
|
||||||
|
|
||||||
- name: Run cmake
|
- name: Run cmake
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: "${{ inputs.build_type }}"
|
BUILD_TYPE: "${{ inputs.build_type }}"
|
||||||
|
SANITIZER_OPTION: |-
|
||||||
|
${{ endsWith(inputs.conan_profile, '.asan') && '-Dsan=address' ||
|
||||||
|
endsWith(inputs.conan_profile, '.tsan') && '-Dsan=thread' ||
|
||||||
|
endsWith(inputs.conan_profile, '.ubsan') && '-Dsan=undefined' ||
|
||||||
|
'' }}
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} ${{ inputs.extra_cmake_args }} .. -G Ninja
|
cmake \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
||||||
|
"${SANITIZER_OPTION}" \
|
||||||
|
.. \
|
||||||
|
-G Ninja
|
||||||
|
|||||||
16
.github/actions/get_number_of_threads/action.yml
vendored
16
.github/actions/get_number_of_threads/action.yml
vendored
@@ -1,9 +1,16 @@
|
|||||||
name: Get number of threads
|
name: Get number of threads
|
||||||
description: Determines number of threads to use on macOS and Linux
|
description: Determines number of threads to use on macOS and Linux
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
subtract_threads:
|
||||||
|
description: How many threads to subtract from the calculated number
|
||||||
|
required: true
|
||||||
|
default: "0"
|
||||||
outputs:
|
outputs:
|
||||||
threads_number:
|
threads_number:
|
||||||
description: Number of threads to use
|
description: Number of threads to use
|
||||||
value: ${{ steps.number_of_threads_export.outputs.num }}
|
value: ${{ steps.number_of_threads_export.outputs.num }}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -19,8 +26,11 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: echo "num=$(($(nproc) - 2))" >> $GITHUB_OUTPUT
|
run: echo "num=$(($(nproc) - 2))" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Export output variable
|
- name: Shift and export number of threads
|
||||||
shell: bash
|
|
||||||
id: number_of_threads_export
|
id: number_of_threads_export
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "num=${{ steps.mac_threads.outputs.num || steps.linux_threads.outputs.num }}" >> $GITHUB_OUTPUT
|
num_of_threads="${{ steps.mac_threads.outputs.num || steps.linux_threads.outputs.num }}"
|
||||||
|
shift_by="${{ inputs.subtract_threads }}"
|
||||||
|
shifted="$((num_of_threads - shift_by))"
|
||||||
|
echo "num=$(( shifted > 1 ? shifted : 1 ))" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
name: Git common ancestor
|
name: Git common ancestor
|
||||||
description: Find the closest common commit
|
description: Find the closest common commit
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
commit:
|
commit:
|
||||||
description: Hash of commit
|
description: Hash of commit
|
||||||
value: ${{ steps.find_common_ancestor.outputs.commit }}
|
value: ${{ steps.find_common_ancestor.outputs.commit }}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -11,4 +13,4 @@ runs:
|
|||||||
id: find_common_ancestor
|
id: find_common_ancestor
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "commit=$(git merge-base --fork-point origin/develop)" >> $GITHUB_OUTPUT
|
echo "commit=\"$(git merge-base --fork-point origin/develop)\"" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
49
.github/actions/prepare_runner/action.yml
vendored
49
.github/actions/prepare_runner/action.yml
vendored
@@ -1,9 +1,11 @@
|
|||||||
name: Prepare runner
|
name: Prepare runner
|
||||||
description: Install packages, set environment variables, create directories
|
description: Install packages, set environment variables, create directories
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
disable_ccache:
|
disable_ccache:
|
||||||
description: Whether ccache should be disabled
|
description: Whether ccache should be disabled
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -11,29 +13,56 @@ runs:
|
|||||||
if: ${{ runner.os == 'macOS' }}
|
if: ${{ runner.os == 'macOS' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
brew install llvm@14 pkg-config ninja bison cmake ccache jq gh conan@1
|
brew install --quiet \
|
||||||
if ! command -v conan &> /dev/null; then
|
bison \
|
||||||
echo "/opt/homebrew/opt/conan@1/bin" >> $GITHUB_PATH
|
ca-certificates \
|
||||||
fi
|
ccache \
|
||||||
|
clang-build-analyzer \
|
||||||
|
conan \
|
||||||
|
gh \
|
||||||
|
jq \
|
||||||
|
llvm@14 \
|
||||||
|
ninja \
|
||||||
|
pkg-config
|
||||||
|
echo "/opt/homebrew/opt/conan@2/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: Install CMake 3.31.6 on mac
|
||||||
|
if: ${{ runner.os == 'macOS' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Uninstall any existing cmake
|
||||||
|
brew uninstall --formula cmake --ignore-dependencies || true
|
||||||
|
|
||||||
|
# Download specific cmake formula
|
||||||
|
FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/b4e46db74e74a8c1650b38b1da222284ce1ec5ce/Formula/c/cmake.rb"
|
||||||
|
FORMULA_EXPECTED_SHA256="c7ec95d86f0657638835441871e77541165e0a2581b53b3dd657cf13ad4228d4"
|
||||||
|
|
||||||
|
mkdir -p /tmp/homebrew-formula
|
||||||
|
curl -s -L "$FORMULA_URL" -o /tmp/homebrew-formula/cmake.rb
|
||||||
|
|
||||||
|
echo "$FORMULA_EXPECTED_SHA256 /tmp/homebrew-formula/cmake.rb" | shasum -a 256 -c
|
||||||
|
|
||||||
|
# Install cmake from the specific formula with force flag
|
||||||
|
brew install --formula --quiet --force /tmp/homebrew-formula/cmake.rb
|
||||||
|
|
||||||
- name: Fix git permissions on Linux
|
- name: Fix git permissions on Linux
|
||||||
if: ${{ runner.os == 'Linux' }}
|
if: ${{ runner.os == 'Linux' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: git config --global --add safe.directory $PWD
|
run: git config --global --add safe.directory "$PWD"
|
||||||
|
|
||||||
- name: Set env variables for macOS
|
- name: Set env variables for macOS
|
||||||
if: ${{ runner.os == 'macOS' }}
|
if: ${{ runner.os == 'macOS' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV
|
echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV
|
||||||
echo "CONAN_USER_HOME=${{ github.workspace }}" >> $GITHUB_ENV
|
echo "CONAN_HOME=${{ github.workspace }}/.conan2" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set env variables for Linux
|
- name: Set env variables for Linux
|
||||||
if: ${{ runner.os == 'Linux' }}
|
if: ${{ runner.os == 'Linux' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "CCACHE_DIR=/root/.ccache" >> $GITHUB_ENV
|
echo "CCACHE_DIR=/root/.ccache" >> $GITHUB_ENV
|
||||||
echo "CONAN_USER_HOME=/root/" >> $GITHUB_ENV
|
echo "CONAN_HOME=/root/.conan2" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set CCACHE_DISABLE=1
|
- name: Set CCACHE_DISABLE=1
|
||||||
if: ${{ inputs.disable_ccache == 'true' }}
|
if: ${{ inputs.disable_ccache == 'true' }}
|
||||||
@@ -44,7 +73,5 @@ runs:
|
|||||||
- name: Create directories
|
- name: Create directories
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $CCACHE_DIR
|
mkdir -p "$CCACHE_DIR"
|
||||||
mkdir -p $CONAN_USER_HOME/.conan
|
mkdir -p "$CONAN_HOME"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
39
.github/actions/restore_cache/action.yml
vendored
39
.github/actions/restore_cache/action.yml
vendored
@@ -1,8 +1,9 @@
|
|||||||
name: Restore cache
|
name: Restore cache
|
||||||
description: Find and restores conan and ccache cache
|
description: Find and restores ccache cache
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
conan_dir:
|
conan_profile:
|
||||||
description: Path to .conan directory
|
description: Conan profile name
|
||||||
required: true
|
required: true
|
||||||
ccache_dir:
|
ccache_dir:
|
||||||
description: Path to .ccache directory
|
description: Path to .ccache directory
|
||||||
@@ -14,17 +15,13 @@ inputs:
|
|||||||
code_coverage:
|
code_coverage:
|
||||||
description: Whether code coverage is on
|
description: Whether code coverage is on
|
||||||
required: true
|
required: true
|
||||||
default: 'false'
|
default: "false"
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
conan_hash:
|
|
||||||
description: Hash to use as a part of conan cache key
|
|
||||||
value: ${{ steps.conan_hash.outputs.hash }}
|
|
||||||
conan_cache_hit:
|
|
||||||
description: True if conan cache has been downloaded
|
|
||||||
value: ${{ steps.conan_cache.outputs.cache-hit }}
|
|
||||||
ccache_cache_hit:
|
ccache_cache_hit:
|
||||||
description: True if ccache cache has been downloaded
|
description: True if ccache cache has been downloaded
|
||||||
value: ${{ steps.ccache_cache.outputs.cache-hit }}
|
value: ${{ steps.ccache_cache.outputs.cache-hit }}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -32,28 +29,10 @@ runs:
|
|||||||
id: git_common_ancestor
|
id: git_common_ancestor
|
||||||
uses: ./.github/actions/git_common_ancestor
|
uses: ./.github/actions/git_common_ancestor
|
||||||
|
|
||||||
- name: Calculate conan hash
|
|
||||||
id: conan_hash
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
conan info . -j info.json -o clio:tests=True
|
|
||||||
packages_info=$(cat info.json | jq '.[] | "\(.display_name): \(.id)"' | grep -v 'clio')
|
|
||||||
echo "$packages_info"
|
|
||||||
hash=$(echo "$packages_info" | shasum -a 256 | cut -d ' ' -f 1)
|
|
||||||
rm info.json
|
|
||||||
echo "hash=$hash" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Restore conan cache
|
|
||||||
uses: actions/cache/restore@v3
|
|
||||||
id: conan_cache
|
|
||||||
with:
|
|
||||||
path: ${{ inputs.conan_dir }}/data
|
|
||||||
key: clio-conan_data-${{ runner.os }}-${{ inputs.build_type }}-develop-${{ steps.conan_hash.outputs.hash }}
|
|
||||||
|
|
||||||
- name: Restore ccache cache
|
- name: Restore ccache cache
|
||||||
uses: actions/cache/restore@v3
|
uses: actions/cache/restore@v4
|
||||||
id: ccache_cache
|
id: ccache_cache
|
||||||
if: ${{ env.CCACHE_DISABLE != '1' }}
|
if: ${{ env.CCACHE_DISABLE != '1' }}
|
||||||
with:
|
with:
|
||||||
path: ${{ inputs.ccache_dir }}
|
path: ${{ inputs.ccache_dir }}
|
||||||
key: clio-ccache-${{ runner.os }}-${{ inputs.build_type }}${{ inputs.code_coverage == 'true' && '-code_coverage' || '' }}-develop-${{ steps.git_common_ancestor.outputs.commit }}
|
key: clio-ccache-${{ runner.os }}-${{ inputs.build_type }}${{ inputs.code_coverage == 'true' && '-code_coverage' || '' }}-${{ inputs.conan_profile }}-develop-${{ steps.git_common_ancestor.outputs.commit }}
|
||||||
|
|||||||
46
.github/actions/save_cache/action.yml
vendored
46
.github/actions/save_cache/action.yml
vendored
@@ -1,23 +1,13 @@
|
|||||||
name: Save cache
|
name: Save cache
|
||||||
description: Save conan and ccache cache for develop branch
|
description: Save ccache cache for develop branch
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
conan_dir:
|
conan_profile:
|
||||||
description: Path to .conan directory
|
description: Conan profile name
|
||||||
required: true
|
|
||||||
conan_hash:
|
|
||||||
description: Hash to use as a part of conan cache key
|
|
||||||
required: true
|
|
||||||
conan_cache_hit:
|
|
||||||
description: Whether conan cache has been downloaded
|
|
||||||
required: true
|
required: true
|
||||||
ccache_dir:
|
ccache_dir:
|
||||||
description: Path to .ccache directory
|
description: Path to .ccache directory
|
||||||
required: true
|
required: true
|
||||||
ccache_cache_hit:
|
|
||||||
description: Whether conan cache has been downloaded
|
|
||||||
required: true
|
|
||||||
ccache_cache_miss_rate:
|
|
||||||
description: How many cache misses happened
|
|
||||||
build_type:
|
build_type:
|
||||||
description: Current build type (e.g. Release, Debug)
|
description: Current build type (e.g. Release, Debug)
|
||||||
required: true
|
required: true
|
||||||
@@ -25,7 +15,14 @@ inputs:
|
|||||||
code_coverage:
|
code_coverage:
|
||||||
description: Whether code coverage is on
|
description: Whether code coverage is on
|
||||||
required: true
|
required: true
|
||||||
default: 'false'
|
default: "false"
|
||||||
|
|
||||||
|
ccache_cache_hit:
|
||||||
|
description: Whether ccache cache has been downloaded
|
||||||
|
required: true
|
||||||
|
ccache_cache_miss_rate:
|
||||||
|
description: How many ccache cache misses happened
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -33,24 +30,9 @@ runs:
|
|||||||
id: git_common_ancestor
|
id: git_common_ancestor
|
||||||
uses: ./.github/actions/git_common_ancestor
|
uses: ./.github/actions/git_common_ancestor
|
||||||
|
|
||||||
- name: Cleanup conan directory from extra data
|
|
||||||
if: ${{ inputs.conan_cache_hit != 'true' }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
conan remove "*" -s -b -f
|
|
||||||
|
|
||||||
- name: Save conan cache
|
|
||||||
if: ${{ inputs.conan_cache_hit != 'true' }}
|
|
||||||
uses: actions/cache/save@v3
|
|
||||||
with:
|
|
||||||
path: ${{ inputs.conan_dir }}/data
|
|
||||||
key: clio-conan_data-${{ runner.os }}-${{ inputs.build_type }}-develop-${{ inputs.conan_hash }}
|
|
||||||
|
|
||||||
- name: Save ccache cache
|
- name: Save ccache cache
|
||||||
if: ${{ inputs.ccache_cache_hit != 'true' || inputs.ccache_cache_miss_rate == '100.0' }}
|
if: ${{ inputs.ccache_cache_hit != 'true' || inputs.ccache_cache_miss_rate == '100.0' }}
|
||||||
uses: actions/cache/save@v3
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ inputs.ccache_dir }}
|
path: ${{ inputs.ccache_dir }}
|
||||||
key: clio-ccache-${{ runner.os }}-${{ inputs.build_type }}${{ inputs.code_coverage == 'true' && '-code_coverage' || '' }}-develop-${{ steps.git_common_ancestor.outputs.commit }}
|
key: clio-ccache-${{ runner.os }}-${{ inputs.build_type }}${{ inputs.code_coverage == 'true' && '-code_coverage' || '' }}-${{ inputs.conan_profile }}-develop-${{ steps.git_common_ancestor.outputs.commit }}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
48
.github/actions/setup_conan/action.yml
vendored
48
.github/actions/setup_conan/action.yml
vendored
@@ -1,48 +0,0 @@
|
|||||||
name: Setup conan
|
|
||||||
description: Setup conan profile and artifactory
|
|
||||||
outputs:
|
|
||||||
conan_profile:
|
|
||||||
description: Created conan profile name
|
|
||||||
value: ${{ steps.conan_export_output.outputs.conan_profile }}
|
|
||||||
runs:
|
|
||||||
using: composite
|
|
||||||
steps:
|
|
||||||
- name: On mac
|
|
||||||
if: ${{ runner.os == 'macOS' }}
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
CONAN_PROFILE: clio_apple_clang_15
|
|
||||||
id: conan_setup_mac
|
|
||||||
run: |
|
|
||||||
echo "Creating $CONAN_PROFILE conan profile";
|
|
||||||
conan profile new $CONAN_PROFILE --detect --force
|
|
||||||
conan profile update settings.compiler.libcxx=libc++ $CONAN_PROFILE
|
|
||||||
conan profile update settings.compiler.cppstd=20 $CONAN_PROFILE
|
|
||||||
conan profile update env.CXXFLAGS=-DBOOST_ASIO_DISABLE_CONCEPTS $CONAN_PROFILE
|
|
||||||
conan profile update "conf.tools.build:cxxflags+=[\"-DBOOST_ASIO_DISABLE_CONCEPTS\"]" $CONAN_PROFILE
|
|
||||||
echo "created_conan_profile=$CONAN_PROFILE" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: On linux
|
|
||||||
if: ${{ runner.os == 'Linux' }}
|
|
||||||
shell: bash
|
|
||||||
id: conan_setup_linux
|
|
||||||
run: |
|
|
||||||
echo "created_conan_profile=default" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Export output variable
|
|
||||||
shell: bash
|
|
||||||
id: conan_export_output
|
|
||||||
run: |
|
|
||||||
echo "conan_profile=${{ steps.conan_setup_mac.outputs.created_conan_profile || steps.conan_setup_linux.outputs.created_conan_profile }}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Add conan-non-prod artifactory
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [[ -z $(conan remote list | grep conan-non-prod) ]]; then
|
|
||||||
echo "Adding conan-non-prod"
|
|
||||||
conan remote add --insert 0 conan-non-prod http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
else
|
|
||||||
echo "Conan-non-prod is available"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
39
.github/actions/setup_conan_macos/action.yml
vendored
Normal file
39
.github/actions/setup_conan_macos/action.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: Setup conan
|
||||||
|
description: Setup conan profiles and artifactory on macOS runner
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
conan_files_dir:
|
||||||
|
description: Directory with conan files
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Fail on non-macOS
|
||||||
|
if: runner.os != 'macOS'
|
||||||
|
shell: bash
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
|
- name: Copy global.conf
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp "${{ inputs.conan_files_dir }}/global.conf" "${{ env.CONAN_HOME }}/global.conf"
|
||||||
|
|
||||||
|
- name: Create apple-clang conan profile
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p "${{ env.CONAN_HOME }}/profiles"
|
||||||
|
cp .github/actions/setup_conan_macos/apple-clang.profile "${{ env.CONAN_HOME }}/profiles/apple-clang"
|
||||||
|
|
||||||
|
- name: Create conan profiles for sanitizers
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ inputs.conan_files_dir }}
|
||||||
|
run: |
|
||||||
|
cp ./sanitizer_template.profile "${{ env.CONAN_HOME }}/profiles/apple-clang.asan"
|
||||||
|
cp ./sanitizer_template.profile "${{ env.CONAN_HOME }}/profiles/apple-clang.tsan"
|
||||||
|
cp ./sanitizer_template.profile "${{ env.CONAN_HOME }}/profiles/apple-clang.ubsan"
|
||||||
|
|
||||||
|
- name: Add artifactory remote
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
conan remote add --index 0 ripple http://18.143.149.228:8081/artifactory/api/conan/dev
|
||||||
8
.github/actions/setup_conan_macos/apple-clang.profile
vendored
Normal file
8
.github/actions/setup_conan_macos/apple-clang.profile
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[settings]
|
||||||
|
arch={{detect_api.detect_arch()}}
|
||||||
|
build_type=Release
|
||||||
|
compiler=apple-clang
|
||||||
|
compiler.cppstd=20
|
||||||
|
compiler.libcxx=libc++
|
||||||
|
compiler.version=16
|
||||||
|
os=Macos
|
||||||
6
.github/actions/test/Dockerfile
vendored
6
.github/actions/test/Dockerfile
vendored
@@ -1,6 +0,0 @@
|
|||||||
FROM cassandra:4.0.4
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y postgresql
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
8
.github/actions/test/entrypoint.sh
vendored
8
.github/actions/test/entrypoint.sh
vendored
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
pg_ctlcluster 12 main start
|
|
||||||
su postgres -c"psql -c\"alter user postgres with password 'postgres'\""
|
|
||||||
su cassandra -c "/opt/cassandra/bin/cassandra -R"
|
|
||||||
sleep 90
|
|
||||||
chmod +x ./clio_tests
|
|
||||||
./clio_tests
|
|
||||||
157
.github/dependabot.yml
vendored
Normal file
157
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/build_clio/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/build_docker_image/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/code_coverage/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/create_issue/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/generate/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/get_number_of_threads/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/git_common_ancestor/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/prepare_runner/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/restore_cache/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/save_cache/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: .github/actions/setup_conan_macos/
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Etc/GMT
|
||||||
|
reviewers:
|
||||||
|
- XRPLF/clio-dev-team
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci: [DEPENDABOT] "
|
||||||
|
target-branch: develop
|
||||||
45
.github/scripts/execute-tests-under-sanitizer
vendored
Executable file
45
.github/scripts/execute-tests-under-sanitizer
vendored
Executable file
@@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
# Note: This script is intended to be run from the root of the repository.
|
||||||
|
#
|
||||||
|
# This script runs each unit-test separately and generates reports from the currently active sanitizer.
|
||||||
|
# Output is saved in ./.sanitizer-report in the root of the repository
|
||||||
|
|
||||||
|
if [[ -z "$1" ]]; then
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
ERROR
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Path to clio_tests should be passed as first argument to the script.
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TEST_BINARY=$1
|
||||||
|
|
||||||
|
if [[ ! -f "$TEST_BINARY" ]]; then
|
||||||
|
echo "Test binary not found: $TEST_BINARY"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TESTS=$($TEST_BINARY --gtest_list_tests | awk '/^ / {print suite $1} !/^ / {suite=$1}')
|
||||||
|
|
||||||
|
OUTPUT_DIR="./.sanitizer-report"
|
||||||
|
mkdir -p "$OUTPUT_DIR"
|
||||||
|
|
||||||
|
for TEST in $TESTS; do
|
||||||
|
OUTPUT_FILE="$OUTPUT_DIR/${TEST//\//_}"
|
||||||
|
export TSAN_OPTIONS="log_path=\"$OUTPUT_FILE\" die_after_fork=0"
|
||||||
|
export ASAN_OPTIONS="log_path=\"$OUTPUT_FILE\""
|
||||||
|
export UBSAN_OPTIONS="log_path=\"$OUTPUT_FILE\""
|
||||||
|
export MallocNanoZone='0' # for MacOSX
|
||||||
|
$TEST_BINARY --gtest_filter="$TEST" > /dev/null 2>&1
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "'$TEST' failed a sanitizer check."
|
||||||
|
fi
|
||||||
|
done
|
||||||
42
.github/scripts/generate_conan_matrix.py
vendored
Executable file
42
.github/scripts/generate_conan_matrix.py
vendored
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import itertools
|
||||||
|
import json
|
||||||
|
|
||||||
|
LINUX_OS = ["heavy", "heavy-arm64"]
|
||||||
|
LINUX_CONTAINERS = ['{ "image": "ghcr.io/xrplf/clio-ci:latest" }']
|
||||||
|
LINUX_COMPILERS = ["gcc", "clang"]
|
||||||
|
|
||||||
|
MACOS_OS = ["macos15"]
|
||||||
|
MACOS_CONTAINERS = [""]
|
||||||
|
MACOS_COMPILERS = ["apple-clang"]
|
||||||
|
|
||||||
|
BUILD_TYPES = ["Release", "Debug"]
|
||||||
|
SANITIZER_EXT = [".asan", ".tsan", ".ubsan", ""]
|
||||||
|
|
||||||
|
|
||||||
|
def generate_matrix():
|
||||||
|
configurations = []
|
||||||
|
|
||||||
|
for os, container, compiler in itertools.chain(
|
||||||
|
itertools.product(LINUX_OS, LINUX_CONTAINERS, LINUX_COMPILERS),
|
||||||
|
itertools.product(MACOS_OS, MACOS_CONTAINERS, MACOS_COMPILERS),
|
||||||
|
):
|
||||||
|
for sanitizer_ext, build_type in itertools.product(SANITIZER_EXT, BUILD_TYPES):
|
||||||
|
# libbacktrace doesn't build on arm64 with gcc.tsan
|
||||||
|
if os == "heavy-arm64" and compiler == "gcc" and sanitizer_ext == ".tsan":
|
||||||
|
continue
|
||||||
|
configurations.append(
|
||||||
|
{
|
||||||
|
"os": os,
|
||||||
|
"container": container,
|
||||||
|
"compiler": compiler,
|
||||||
|
"sanitizer_ext": sanitizer_ext,
|
||||||
|
"build_type": build_type,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
return {"include": configurations}
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print(f"matrix={json.dumps(generate_matrix())}")
|
||||||
24
.github/scripts/prepare-release-artifacts.sh
vendored
Executable file
24
.github/scripts/prepare-release-artifacts.sh
vendored
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex -o pipefail
|
||||||
|
|
||||||
|
BINARY_NAME="clio_server"
|
||||||
|
|
||||||
|
ARTIFACTS_DIR="$1"
|
||||||
|
if [ -z "${ARTIFACTS_DIR}" ]; then
|
||||||
|
echo "Usage: $0 <artifacts_directory>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${ARTIFACTS_DIR}" || exit 1
|
||||||
|
|
||||||
|
for artifact_name in $(ls); do
|
||||||
|
pushd "${artifact_name}" || exit 1
|
||||||
|
zip -r "../${artifact_name}.zip" ./${BINARY_NAME}
|
||||||
|
popd || exit 1
|
||||||
|
|
||||||
|
rm "${artifact_name}/${BINARY_NAME}"
|
||||||
|
rm -r "${artifact_name}"
|
||||||
|
|
||||||
|
sha256sum "./${artifact_name}.zip" > "./${artifact_name}.zip.sha256sum"
|
||||||
|
done
|
||||||
241
.github/workflows/build.yml
vendored
241
.github/workflows/build.yml
vendored
@@ -1,184 +1,107 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master, release/*, develop]
|
branches: [master, release/*, develop]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master, release/*, develop]
|
branches: [master, release/*, develop]
|
||||||
|
paths:
|
||||||
|
- .github/workflows/build.yml
|
||||||
|
|
||||||
|
- .github/workflows/build_and_test.yml
|
||||||
|
- .github/workflows/build_impl.yml
|
||||||
|
- .github/workflows/test_impl.yml
|
||||||
|
- .github/workflows/upload_coverage_report.yml
|
||||||
|
|
||||||
|
- ".github/actions/**"
|
||||||
|
- "!.github/actions/build_docker_image/**"
|
||||||
|
- "!.github/actions/create_issue/**"
|
||||||
|
|
||||||
|
- CMakeLists.txt
|
||||||
|
- conanfile.py
|
||||||
|
- conan.lock
|
||||||
|
- "cmake/**"
|
||||||
|
- "src/**"
|
||||||
|
- "tests/**"
|
||||||
|
|
||||||
|
- docs/config-description.md
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
concurrency:
|
||||||
check_format:
|
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
|
||||||
name: Check format
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
runs-on: ubuntu-20.04
|
cancel-in-progress: true
|
||||||
container:
|
|
||||||
image: rippleci/clio_ci:latest
|
jobs:
|
||||||
steps:
|
build-and-test:
|
||||||
- uses: actions/checkout@v4
|
name: Build and Test
|
||||||
- name: Run formatters
|
|
||||||
id: run_formatters
|
|
||||||
run: |
|
|
||||||
./.githooks/check-format
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
check_docs:
|
|
||||||
name: Check documentation
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container:
|
|
||||||
image: rippleci/clio_ci:latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Run linter
|
|
||||||
id: run_linter
|
|
||||||
run: |
|
|
||||||
./.githooks/check-docs
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
needs:
|
|
||||||
- check_format
|
|
||||||
- check_docs
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
os: [heavy]
|
||||||
|
conan_profile: [gcc, clang]
|
||||||
|
build_type: [Release, Debug]
|
||||||
|
container: ['{ "image": "ghcr.io/xrplf/clio-ci:latest" }']
|
||||||
|
static: [true]
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- os: heavy
|
- os: macos15
|
||||||
container:
|
conan_profile: apple-clang
|
||||||
image: rippleci/clio_ci:latest
|
|
||||||
build_type: Release
|
build_type: Release
|
||||||
code_coverage: false
|
container: ""
|
||||||
- os: heavy
|
static: false
|
||||||
container:
|
|
||||||
image: rippleci/clio_ci:latest
|
|
||||||
build_type: Debug
|
|
||||||
code_coverage: true
|
|
||||||
- os: macos14
|
|
||||||
build_type: Release
|
|
||||||
code_coverage: false
|
|
||||||
runs-on: [self-hosted, "${{ matrix.os }}"]
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
|
|
||||||
services:
|
uses: ./.github/workflows/build_and_test.yml
|
||||||
scylladb:
|
with:
|
||||||
image: ${{ (matrix.code_coverage) && 'scylladb/scylla' || '' }}
|
runs_on: ${{ matrix.os }}
|
||||||
options: >-
|
container: ${{ matrix.container }}
|
||||||
--health-cmd "cqlsh -e 'describe cluster'"
|
conan_profile: ${{ matrix.conan_profile }}
|
||||||
--health-interval 10s
|
build_type: ${{ matrix.build_type }}
|
||||||
--health-timeout 5s
|
static: ${{ matrix.static }}
|
||||||
--health-retries 5
|
run_unit_tests: true
|
||||||
|
run_integration_tests: false
|
||||||
|
upload_clio_server: true
|
||||||
|
|
||||||
steps:
|
code_coverage:
|
||||||
- name: Clean workdir
|
name: Run Code Coverage
|
||||||
if: ${{ runner.os == 'macOS' }}
|
|
||||||
uses: kuznetsss/workspace-cleanup@1.0
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
uses: ./.github/workflows/build_impl.yml
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
runs_on: heavy
|
||||||
|
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
|
||||||
- name: Prepare runner
|
conan_profile: gcc
|
||||||
uses: ./.github/actions/prepare_runner
|
build_type: Debug
|
||||||
with:
|
disable_cache: false
|
||||||
disable_ccache: false
|
code_coverage: true
|
||||||
|
static: true
|
||||||
- name: Setup conan
|
upload_clio_server: false
|
||||||
uses: ./.github/actions/setup_conan
|
targets: all
|
||||||
id: conan
|
analyze_build_time: false
|
||||||
|
|
||||||
- name: Restore cache
|
|
||||||
uses: ./.github/actions/restore_cache
|
|
||||||
id: restore_cache
|
|
||||||
with:
|
|
||||||
conan_dir: ${{ env.CONAN_USER_HOME }}/.conan
|
|
||||||
ccache_dir: ${{ env.CCACHE_DIR }}
|
|
||||||
build_type: ${{ matrix.build_type }}
|
|
||||||
code_coverage: ${{ matrix.code_coverage }}
|
|
||||||
|
|
||||||
- name: Run conan and cmake
|
|
||||||
uses: ./.github/actions/generate
|
|
||||||
with:
|
|
||||||
conan_profile: ${{ steps.conan.outputs.conan_profile }}
|
|
||||||
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
|
|
||||||
build_type: ${{ matrix.build_type }}
|
|
||||||
code_coverage: ${{ matrix.code_coverage }}
|
|
||||||
|
|
||||||
- name: Build Clio
|
|
||||||
uses: ./.github/actions/build_clio
|
|
||||||
|
|
||||||
- name: Show ccache's statistics
|
|
||||||
shell: bash
|
|
||||||
id: ccache_stats
|
|
||||||
run: |
|
|
||||||
ccache -s > /tmp/ccache.stats
|
|
||||||
miss_rate=$(cat /tmp/ccache.stats | grep 'Misses' | head -n1 | sed 's/.*(\(.*\)%).*/\1/')
|
|
||||||
echo "miss_rate=${miss_rate}" >> $GITHUB_OUTPUT
|
|
||||||
cat /tmp/ccache.stats
|
|
||||||
|
|
||||||
- name: Strip tests
|
|
||||||
if: ${{ !matrix.code_coverage }}
|
|
||||||
run: strip build/clio_tests
|
|
||||||
|
|
||||||
- name: Upload clio_server
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: clio_server_${{ runner.os }}_${{ matrix.build_type }}
|
|
||||||
path: build/clio_server
|
|
||||||
|
|
||||||
- name: Upload clio_tests
|
|
||||||
if: ${{ !matrix.code_coverage }}
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: clio_tests_${{ runner.os }}
|
|
||||||
path: build/clio_tests
|
|
||||||
|
|
||||||
- name: Save cache
|
|
||||||
uses: ./.github/actions/save_cache
|
|
||||||
with:
|
|
||||||
conan_dir: ${{ env.CONAN_USER_HOME }}/.conan
|
|
||||||
conan_hash: ${{ steps.restore_cache.outputs.conan_hash }}
|
|
||||||
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
|
|
||||||
ccache_dir: ${{ env.CCACHE_DIR }}
|
|
||||||
ccache_cache_hit: ${{ steps.restore_cache.outputs.ccache_cache_hit }}
|
|
||||||
ccache_cache_miss_rate: ${{ steps.ccache_stats.outputs.miss_rate }}
|
|
||||||
build_type: ${{ matrix.build_type }}
|
|
||||||
code_coverage: ${{ matrix.code_coverage }}
|
|
||||||
|
|
||||||
# TODO: This is not a part of build process but it is the easiest way to do it here.
|
|
||||||
# It will be refactored in https://github.com/XRPLF/clio/issues/1075
|
|
||||||
- name: Run code coverage
|
|
||||||
if: ${{ matrix.code_coverage }}
|
|
||||||
uses: ./.github/actions/code_coverage
|
|
||||||
|
|
||||||
upload_coverage_report:
|
|
||||||
name: Codecov
|
|
||||||
needs: build
|
|
||||||
uses: ./.github/workflows/upload_coverage_report.yml
|
|
||||||
secrets:
|
secrets:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
test:
|
check_config:
|
||||||
name: Run Tests
|
name: Check Config Description
|
||||||
needs: build
|
needs: build-and-test
|
||||||
strategy:
|
runs-on: heavy
|
||||||
fail-fast: false
|
container:
|
||||||
matrix:
|
image: ghcr.io/xrplf/clio-ci:latest
|
||||||
include:
|
|
||||||
- os: heavy
|
|
||||||
container:
|
|
||||||
image: rippleci/clio_ci:latest
|
|
||||||
- os: macos14
|
|
||||||
runs-on: [self-hosted, "${{ matrix.os }}"]
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clean workdir
|
- uses: actions/checkout@v4
|
||||||
if: ${{ runner.os == 'macOS' }}
|
|
||||||
uses: kuznetsss/workspace-cleanup@1.0
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: clio_tests_${{ runner.os }}
|
name: clio_server_Linux_Release_gcc
|
||||||
- name: Run clio_tests
|
|
||||||
|
- name: Compare Config Description
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./clio_tests
|
repoConfigFile=docs/config-description.md
|
||||||
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*"
|
configDescriptionFile=config_description_new.md
|
||||||
|
|
||||||
|
chmod +x ./clio_server
|
||||||
|
./clio_server -d "${configDescriptionFile}"
|
||||||
|
|
||||||
|
diff -u "${repoConfigFile}" "${configDescriptionFile}"
|
||||||
|
|||||||
84
.github/workflows/build_and_test.yml
vendored
Normal file
84
.github/workflows/build_and_test.yml
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
name: Reusable build and test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
runs_on:
|
||||||
|
description: Runner to run the job on
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
container:
|
||||||
|
description: "The container object as a JSON string (leave empty to run natively)"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
conan_profile:
|
||||||
|
description: Conan profile to use
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
build_type:
|
||||||
|
description: Build type
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
disable_cache:
|
||||||
|
description: Whether ccache should be disabled
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
|
static:
|
||||||
|
description: Whether to build static binaries
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
run_unit_tests:
|
||||||
|
description: Whether to run unit tests
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
run_integration_tests:
|
||||||
|
description: Whether to run integration tests
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
|
upload_clio_server:
|
||||||
|
description: Whether to upload clio_server
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
targets:
|
||||||
|
description: Space-separated build target names
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
uses: ./.github/workflows/build_impl.yml
|
||||||
|
with:
|
||||||
|
runs_on: ${{ inputs.runs_on }}
|
||||||
|
container: ${{ inputs.container }}
|
||||||
|
conan_profile: ${{ inputs.conan_profile }}
|
||||||
|
build_type: ${{ inputs.build_type }}
|
||||||
|
disable_cache: ${{ inputs.disable_cache }}
|
||||||
|
code_coverage: false
|
||||||
|
static: ${{ inputs.static }}
|
||||||
|
upload_clio_server: ${{ inputs.upload_clio_server }}
|
||||||
|
targets: ${{ inputs.targets }}
|
||||||
|
analyze_build_time: false
|
||||||
|
|
||||||
|
test:
|
||||||
|
needs: build
|
||||||
|
uses: ./.github/workflows/test_impl.yml
|
||||||
|
with:
|
||||||
|
runs_on: ${{ inputs.runs_on }}
|
||||||
|
container: ${{ inputs.container }}
|
||||||
|
conan_profile: ${{ inputs.conan_profile }}
|
||||||
|
build_type: ${{ inputs.build_type }}
|
||||||
|
run_unit_tests: ${{ inputs.run_unit_tests }}
|
||||||
|
run_integration_tests: ${{ inputs.run_integration_tests }}
|
||||||
100
.github/workflows/build_clio_docker_image.yml
vendored
Normal file
100
.github/workflows/build_clio_docker_image.yml
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
name: Build and publish Clio docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
tags:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
description: Comma separated tags for docker image
|
||||||
|
artifact_name:
|
||||||
|
type: string
|
||||||
|
description: Name of Github artifact to put into docker image
|
||||||
|
strip_binary:
|
||||||
|
type: boolean
|
||||||
|
description: Whether to strip clio binary
|
||||||
|
default: true
|
||||||
|
publish_image:
|
||||||
|
type: boolean
|
||||||
|
description: Whether to publish docker image
|
||||||
|
required: true
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tags:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
description: Comma separated tags for docker image
|
||||||
|
clio_server_binary_url:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
description: Url to download clio_server binary from
|
||||||
|
binary_sha256:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
description: sha256 hash of the binary
|
||||||
|
strip_binary:
|
||||||
|
type: boolean
|
||||||
|
description: Whether to strip clio binary
|
||||||
|
default: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_publish_image:
|
||||||
|
name: Build and publish image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Download Clio binary from artifact
|
||||||
|
if: ${{ inputs.artifact_name != null }}
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_name }}
|
||||||
|
path: ./docker/clio/artifact/
|
||||||
|
|
||||||
|
- name: Download Clio binary from url
|
||||||
|
if: ${{ inputs.clio_server_binary_url != null }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
wget "${{inputs.clio_server_binary_url}}" -P ./docker/clio/artifact/
|
||||||
|
if [ "$(sha256sum ./docker/clio/clio_server | awk '{print $1}')" != "${{inputs.binary_sha256}}" ]; then
|
||||||
|
echo "Binary sha256 sum doesn't match"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Unpack binary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt update && sudo apt install -y tar unzip
|
||||||
|
cd docker/clio/artifact
|
||||||
|
artifact=$(find . -type f)
|
||||||
|
if [[ $artifact == *.zip ]]; then
|
||||||
|
unzip $artifact
|
||||||
|
elif [[ $artifact == *.tar.gz ]]; then
|
||||||
|
tar -xvf $artifact
|
||||||
|
fi
|
||||||
|
mv clio_server ../
|
||||||
|
cd ../
|
||||||
|
rm -rf ./artifact
|
||||||
|
|
||||||
|
- name: Strip binary
|
||||||
|
if: ${{ inputs.strip_binary }}
|
||||||
|
shell: bash
|
||||||
|
run: strip ./docker/clio/clio_server
|
||||||
|
|
||||||
|
- name: Build Docker image
|
||||||
|
uses: ./.github/actions/build_docker_image
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
ghcr.io/xrplf/clio
|
||||||
|
rippleci/clio
|
||||||
|
push_image: ${{ inputs.publish_image }}
|
||||||
|
directory: docker/clio
|
||||||
|
tags: ${{ inputs.tags }}
|
||||||
|
platforms: linux/amd64
|
||||||
|
dockerhub_repo: rippleci/clio
|
||||||
|
dockerhub_description: Clio is an XRP Ledger API server.
|
||||||
197
.github/workflows/build_impl.yml
vendored
Normal file
197
.github/workflows/build_impl.yml
vendored
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
name: Reusable build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
runs_on:
|
||||||
|
description: Runner to run the job on
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
container:
|
||||||
|
description: "The container object as a JSON string (leave empty to run natively)"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
conan_profile:
|
||||||
|
description: Conan profile to use
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
build_type:
|
||||||
|
description: Build type
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
disable_cache:
|
||||||
|
description: Whether ccache should be disabled
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
code_coverage:
|
||||||
|
description: Whether to enable code coverage
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
static:
|
||||||
|
description: Whether to build static binaries
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
upload_clio_server:
|
||||||
|
description: Whether to upload clio_server
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
targets:
|
||||||
|
description: Space-separated build target names
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
analyze_build_time:
|
||||||
|
description: Whether to enable build time analysis
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ${{ inputs.runs_on }}
|
||||||
|
container: ${{ inputs.container != '' && fromJson(inputs.container) || null }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clean workdir
|
||||||
|
if: ${{ runner.os == 'macOS' }}
|
||||||
|
uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce # v1.0
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Prepare runner
|
||||||
|
uses: ./.github/actions/prepare_runner
|
||||||
|
with:
|
||||||
|
disable_ccache: ${{ inputs.disable_cache }}
|
||||||
|
|
||||||
|
- name: Setup conan
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
uses: ./.github/actions/setup_conan_macos
|
||||||
|
with:
|
||||||
|
conan_files_dir: docker/ci/conan/
|
||||||
|
|
||||||
|
- name: Restore cache
|
||||||
|
if: ${{ !inputs.disable_cache }}
|
||||||
|
uses: ./.github/actions/restore_cache
|
||||||
|
id: restore_cache
|
||||||
|
with:
|
||||||
|
conan_profile: ${{ inputs.conan_profile }}
|
||||||
|
ccache_dir: ${{ env.CCACHE_DIR }}
|
||||||
|
build_type: ${{ inputs.build_type }}
|
||||||
|
code_coverage: ${{ inputs.code_coverage }}
|
||||||
|
|
||||||
|
- name: Run conan and cmake
|
||||||
|
uses: ./.github/actions/generate
|
||||||
|
with:
|
||||||
|
conan_profile: ${{ inputs.conan_profile }}
|
||||||
|
build_type: ${{ inputs.build_type }}
|
||||||
|
code_coverage: ${{ inputs.code_coverage }}
|
||||||
|
static: ${{ inputs.static }}
|
||||||
|
time_trace: ${{ inputs.analyze_build_time }}
|
||||||
|
|
||||||
|
- name: Build Clio
|
||||||
|
uses: ./.github/actions/build_clio
|
||||||
|
with:
|
||||||
|
targets: ${{ inputs.targets }}
|
||||||
|
|
||||||
|
- name: Show build time analyze report
|
||||||
|
if: ${{ inputs.analyze_build_time }}
|
||||||
|
run: |
|
||||||
|
ClangBuildAnalyzer --all build/ build_time_report.bin
|
||||||
|
ClangBuildAnalyzer --analyze build_time_report.bin > build_time_report.txt
|
||||||
|
cat build_time_report.txt
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Upload build time analyze report
|
||||||
|
if: ${{ inputs.analyze_build_time }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build_time_report_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
|
path: build_time_report.txt
|
||||||
|
|
||||||
|
- name: Show ccache's statistics
|
||||||
|
if: ${{ !inputs.disable_cache }}
|
||||||
|
shell: bash
|
||||||
|
id: ccache_stats
|
||||||
|
run: |
|
||||||
|
ccache -s > /tmp/ccache.stats
|
||||||
|
miss_rate=$(cat /tmp/ccache.stats | grep 'Misses' | head -n1 | sed 's/.*(\(.*\)%).*/\1/')
|
||||||
|
echo "miss_rate=${miss_rate}" >> $GITHUB_OUTPUT
|
||||||
|
cat /tmp/ccache.stats
|
||||||
|
|
||||||
|
- name: Strip unit_tests
|
||||||
|
if: ${{ !endsWith(inputs.conan_profile, 'san') && !inputs.code_coverage && !inputs.analyze_build_time }}
|
||||||
|
run: strip build/clio_tests
|
||||||
|
|
||||||
|
- name: Strip integration_tests
|
||||||
|
if: ${{ !endsWith(inputs.conan_profile, 'san') && !inputs.code_coverage && !inputs.analyze_build_time }}
|
||||||
|
run: strip build/clio_integration_tests
|
||||||
|
|
||||||
|
- name: Upload clio_server
|
||||||
|
if: inputs.upload_clio_server && !inputs.code_coverage && !inputs.analyze_build_time
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clio_server_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
|
path: build/clio_server
|
||||||
|
|
||||||
|
- name: Upload clio_tests
|
||||||
|
if: ${{ !inputs.code_coverage && !inputs.analyze_build_time }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
|
path: build/clio_tests
|
||||||
|
|
||||||
|
- name: Upload clio_integration_tests
|
||||||
|
if: ${{ !inputs.code_coverage && !inputs.analyze_build_time }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
|
path: build/clio_integration_tests
|
||||||
|
|
||||||
|
- name: Save cache
|
||||||
|
if: ${{ !inputs.disable_cache && github.ref == 'refs/heads/develop' }}
|
||||||
|
uses: ./.github/actions/save_cache
|
||||||
|
with:
|
||||||
|
conan_profile: ${{ inputs.conan_profile }}
|
||||||
|
ccache_dir: ${{ env.CCACHE_DIR }}
|
||||||
|
build_type: ${{ inputs.build_type }}
|
||||||
|
code_coverage: ${{ inputs.code_coverage }}
|
||||||
|
|
||||||
|
ccache_cache_hit: ${{ steps.restore_cache.outputs.ccache_cache_hit }}
|
||||||
|
ccache_cache_miss_rate: ${{ steps.ccache_stats.outputs.miss_rate }}
|
||||||
|
|
||||||
|
# This is run as part of the build job, because it requires the following:
|
||||||
|
# - source code
|
||||||
|
# - generated source code (Build.cpp)
|
||||||
|
# - conan packages
|
||||||
|
# - .gcno files in build directory
|
||||||
|
#
|
||||||
|
# It's all available in the build job, but not in the test job
|
||||||
|
- name: Run code coverage
|
||||||
|
if: ${{ inputs.code_coverage }}
|
||||||
|
uses: ./.github/actions/code_coverage
|
||||||
|
|
||||||
|
# `codecov/codecov-action` will rerun `gcov` if it's available and build directory is present
|
||||||
|
# To prevent this from happening, we run this action in a separate workflow
|
||||||
|
#
|
||||||
|
# More info: https://github.com/XRPLF/clio/pull/2066
|
||||||
|
upload_coverage_report:
|
||||||
|
if: ${{ inputs.code_coverage }}
|
||||||
|
name: Codecov
|
||||||
|
needs: build
|
||||||
|
uses: ./.github/workflows/upload_coverage_report.yml
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
100
.github/workflows/check_libxrpl.yml
vendored
Normal file
100
.github/workflows/check_libxrpl.yml
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
name: Check new libXRPL
|
||||||
|
|
||||||
|
on:
|
||||||
|
repository_dispatch:
|
||||||
|
types: [check_libxrpl]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
CONAN_PROFILE: gcc
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Clio / `libXRPL ${{ github.event.client_payload.version }}`
|
||||||
|
runs-on: heavy
|
||||||
|
container:
|
||||||
|
image: ghcr.io/xrplf/clio-ci:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Update libXRPL version requirement
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i.bak -E "s|'xrpl/[a-zA-Z0-9\\.\\-]+'|'xrpl/${{ github.event.client_payload.version }}'|g" conanfile.py
|
||||||
|
rm -f conanfile.py.bak
|
||||||
|
|
||||||
|
- name: Update conan lockfile
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
conan lock create . -o '&:tests=True' -o '&:benchmark=True'
|
||||||
|
|
||||||
|
- name: Prepare runner
|
||||||
|
uses: ./.github/actions/prepare_runner
|
||||||
|
with:
|
||||||
|
disable_ccache: true
|
||||||
|
|
||||||
|
- name: Run conan and cmake
|
||||||
|
uses: ./.github/actions/generate
|
||||||
|
with:
|
||||||
|
conan_profile: ${{ env.CONAN_PROFILE }}
|
||||||
|
|
||||||
|
- name: Build Clio
|
||||||
|
uses: ./.github/actions/build_clio
|
||||||
|
|
||||||
|
- name: Strip tests
|
||||||
|
run: strip build/clio_tests
|
||||||
|
|
||||||
|
- name: Upload clio_tests
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clio_tests_check_libxrpl
|
||||||
|
path: build/clio_tests
|
||||||
|
|
||||||
|
run_tests:
|
||||||
|
name: Run tests
|
||||||
|
needs: build
|
||||||
|
runs-on: heavy
|
||||||
|
container:
|
||||||
|
image: ghcr.io/xrplf/clio-ci:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clio_tests_check_libxrpl
|
||||||
|
|
||||||
|
- name: Run clio_tests
|
||||||
|
run: |
|
||||||
|
chmod +x ./clio_tests
|
||||||
|
./clio_tests
|
||||||
|
|
||||||
|
create_issue_on_failure:
|
||||||
|
name: Create an issue on failure
|
||||||
|
needs: [build, run_tests]
|
||||||
|
if: ${{ always() && contains(needs.*.result, 'failure') }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
issues: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create an issue
|
||||||
|
uses: ./.github/actions/create_issue
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
labels: "compatibility,bug"
|
||||||
|
title: "Proposed libXRPL check failed"
|
||||||
|
body: >
|
||||||
|
Clio build or tests failed against `libXRPL ${{ github.event.client_payload.version }}`.
|
||||||
|
|
||||||
|
Workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/
|
||||||
17
.github/workflows/check_pr_title.yml
vendored
Normal file
17
.github/workflows/check_pr_title.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
name: Check PR title
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, edited, reopened, synchronize]
|
||||||
|
branches: [develop]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check_title:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: ytanikin/pr-conventional-commits@8267db1bacc237419f9ed0228bb9d94e94271a1d # v1.4.1
|
||||||
|
with:
|
||||||
|
task_types: '["build","feat","fix","docs","test","ci","style","refactor","perf","chore"]'
|
||||||
|
add_label: false
|
||||||
|
custom_labels: '{"build":"build", "feat":"enhancement", "fix":"bug", "docs":"documentation", "test":"testability", "ci":"ci", "style":"refactoring", "refactor":"refactoring", "perf":"performance", "chore":"tooling"}'
|
||||||
70
.github/workflows/clang-tidy.yml
vendored
70
.github/workflows/clang-tidy.yml
vendored
@@ -1,20 +1,30 @@
|
|||||||
name: Clang-tidy check
|
name: Clang-tidy check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 6 * * 1-5"
|
- cron: "0 9 * * 1-5"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [develop]
|
branches: [develop]
|
||||||
paths:
|
paths:
|
||||||
- .clang_tidy
|
|
||||||
- .github/workflows/clang-tidy.yml
|
- .github/workflows/clang-tidy.yml
|
||||||
workflow_call:
|
|
||||||
|
- .clang_tidy
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
CONAN_PROFILE: clang
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clang_tidy:
|
clang_tidy:
|
||||||
runs-on: [self-hosted, Linux]
|
runs-on: heavy
|
||||||
container:
|
container:
|
||||||
image: rippleci/clio_ci:latest
|
image: ghcr.io/xrplf/clio-ci:latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
issues: write
|
issues: write
|
||||||
@@ -30,23 +40,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
disable_ccache: true
|
disable_ccache: true
|
||||||
|
|
||||||
- name: Setup conan
|
|
||||||
uses: ./.github/actions/setup_conan
|
|
||||||
id: conan
|
|
||||||
|
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: ./.github/actions/restore_cache
|
uses: ./.github/actions/restore_cache
|
||||||
id: restore_cache
|
id: restore_cache
|
||||||
with:
|
with:
|
||||||
conan_dir: ${{ env.CONAN_USER_HOME }}/.conan
|
conan_profile: ${{ env.CONAN_PROFILE }}
|
||||||
ccache_dir: ${{ env.CCACHE_DIR }}
|
ccache_dir: ${{ env.CCACHE_DIR }}
|
||||||
|
|
||||||
- name: Run conan and cmake
|
- name: Run conan and cmake
|
||||||
uses: ./.github/actions/generate
|
uses: ./.github/actions/generate
|
||||||
with:
|
with:
|
||||||
conan_profile: ${{ steps.conan.outputs.conan_profile }}
|
conan_profile: ${{ env.CONAN_PROFILE }}
|
||||||
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
|
|
||||||
build_type: Release
|
|
||||||
|
|
||||||
- name: Get number of threads
|
- name: Get number of threads
|
||||||
uses: ./.github/actions/get_number_of_threads
|
uses: ./.github/actions/get_number_of_threads
|
||||||
@@ -57,13 +61,14 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
id: run_clang_tidy
|
id: run_clang_tidy
|
||||||
run: |
|
run: |
|
||||||
run-clang-tidy-17 -p build -j ${{ steps.number_of_threads.outputs.threads_number }} -fix -quiet 1>output.txt
|
run-clang-tidy-19 -p build -j "${{ steps.number_of_threads.outputs.threads_number }}" -fix -quiet 1>output.txt
|
||||||
|
|
||||||
- name: Check format
|
- name: Fix local includes and clang-format style
|
||||||
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
||||||
continue-on-error: true
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./.githooks/check-format
|
run: |
|
||||||
|
pre-commit run --all-files fix-local-includes || true
|
||||||
|
pre-commit run --all-files clang-format || true
|
||||||
|
|
||||||
- name: Print issues found
|
- name: Print issues found
|
||||||
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
||||||
@@ -74,21 +79,20 @@ jobs:
|
|||||||
rm output.txt
|
rm output.txt
|
||||||
|
|
||||||
- name: Create an issue
|
- name: Create an issue
|
||||||
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
if: ${{ steps.run_clang_tidy.outcome != 'success' && github.event_name != 'pull_request' }}
|
||||||
id: create_issue
|
id: create_issue
|
||||||
shell: bash
|
uses: ./.github/actions/create_issue
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
with:
|
||||||
echo -e 'Clang-tidy found issues in the code:\n' > issue.md
|
title: "Clang-tidy found bugs in code 🐛"
|
||||||
echo -e "List of the issues found: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/" >> issue.md
|
body: >
|
||||||
gh issue create --assignee 'cindyyan317,godexsoft,kuznetsss' --label bug --title 'Clang-tidy found bugs in code🐛' --body-file ./issue.md > create_issue.log
|
Clang-tidy found issues in the code:
|
||||||
created_issue=$(cat create_issue.log | sed 's|.*/||')
|
|
||||||
echo "created_issue=$created_issue" >> $GITHUB_OUTPUT
|
|
||||||
rm create_issue.log issue.md
|
|
||||||
|
|
||||||
- uses: crazy-max/ghaction-import-gpg@v5
|
List of the issues found: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/
|
||||||
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
|
||||||
|
- uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
|
||||||
|
if: ${{ steps.run_clang_tidy.outcome != 'success' && github.event_name != 'pull_request' }}
|
||||||
with:
|
with:
|
||||||
gpg_private_key: ${{ secrets.ACTIONS_GPG_PRIVATE_KEY }}
|
gpg_private_key: ${{ secrets.ACTIONS_GPG_PRIVATE_KEY }}
|
||||||
passphrase: ${{ secrets.ACTIONS_GPG_PASSPHRASE }}
|
passphrase: ${{ secrets.ACTIONS_GPG_PASSPHRASE }}
|
||||||
@@ -96,8 +100,8 @@ jobs:
|
|||||||
git_commit_gpgsign: true
|
git_commit_gpgsign: true
|
||||||
|
|
||||||
- name: Create PR with fixes
|
- name: Create PR with fixes
|
||||||
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
if: ${{ steps.run_clang_tidy.outcome != 'success' && github.event_name != 'pull_request' }}
|
||||||
uses: peter-evans/create-pull-request@v5
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||||
env:
|
env:
|
||||||
GH_REPO: ${{ github.repository }}
|
GH_REPO: ${{ github.repository }}
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
@@ -107,9 +111,9 @@ jobs:
|
|||||||
branch: "clang_tidy/autofix"
|
branch: "clang_tidy/autofix"
|
||||||
branch-suffix: timestamp
|
branch-suffix: timestamp
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
title: "[CI] clang-tidy auto fixes"
|
title: "style: clang-tidy auto fixes"
|
||||||
body: "Fixes #${{ steps.create_issue.outputs.created_issue }}. Please review and commit clang-tidy fixes."
|
body: "Fixes #${{ steps.create_issue.outputs.created_issue_id }}. Please review and commit clang-tidy fixes."
|
||||||
reviewers: "cindyyan317,godexsoft,kuznetsss"
|
reviewers: "godexsoft,kuznetsss,PeterChen13579,mathbunnyru"
|
||||||
|
|
||||||
- name: Fail the job
|
- name: Fail the job
|
||||||
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
name: Restart clang-tidy workflow
|
name: Restart clang-tidy workflow
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [develop]
|
branches: [develop]
|
||||||
@@ -6,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restart_clang_tidy:
|
restart_clang_tidy:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
actions: write
|
actions: write
|
||||||
@@ -17,8 +18,8 @@ jobs:
|
|||||||
id: check
|
id: check
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
passed=$(if [[ $(git log -1 --pretty=format:%s | grep '\[CI\] clang-tidy auto fixes') ]]; then echo 'true' ; else echo 'false' ; fi)
|
passed=$(if [[ "$(git log -1 --pretty=format:%s | grep 'style: clang-tidy auto fixes')" ]]; then echo 'true' ; else echo 'false' ; fi)
|
||||||
echo "passed=$passed" >> $GITHUB_OUTPUT
|
echo "passed=\"$passed\"" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Run clang-tidy workflow
|
- name: Run clang-tidy workflow
|
||||||
if: ${{ contains(steps.check.outputs.passed, 'true') }}
|
if: ${{ contains(steps.check.outputs.passed, 'true') }}
|
||||||
|
|||||||
61
.github/workflows/docs.yml
vendored
61
.github/workflows/docs.yml
vendored
@@ -1,45 +1,60 @@
|
|||||||
name: Documentation
|
name: Documentation
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [release/*, develop]
|
branches: [develop]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "pages"
|
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build:
|
||||||
environment:
|
runs-on: ubuntu-latest
|
||||||
name: github-pages
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
continue-on-error: true
|
|
||||||
container:
|
container:
|
||||||
image: rippleci/clio_ci:latest
|
image: ghcr.io/xrplf/clio-ci:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
|
||||||
|
- name: Create build directory
|
||||||
|
run: mkdir build_docs
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
working-directory: build_docs
|
||||||
|
run: cmake ../docs
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: build_docs
|
||||||
|
run: cmake --build . --target docs
|
||||||
|
|
||||||
- name: Build docs
|
|
||||||
run: |
|
|
||||||
mkdir -p build_docs && cd build_docs
|
|
||||||
cmake ../docs && cmake --build . --target docs
|
|
||||||
|
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v3
|
uses: actions/configure-pages@v5
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: build_docs/html
|
path: build_docs/html
|
||||||
name: docs-develop # TODO: use x.y.z for `release/x.y.z` branches and `develop` for latest dev docs
|
name: docs-develop
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: build
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v4
|
uses: actions/deploy-pages@v4
|
||||||
|
|||||||
225
.github/workflows/nightly.yml
vendored
225
.github/workflows/nightly.yml
vendored
@@ -1,146 +1,143 @@
|
|||||||
name: Nightly release
|
name: Nightly release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * 1-5'
|
- cron: "0 8 * * 1-5"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- .github/workflows/nightly.yml
|
||||||
|
|
||||||
|
- .github/workflows/release_impl.yml
|
||||||
|
- .github/workflows/build_and_test.yml
|
||||||
|
- .github/workflows/build_impl.yml
|
||||||
|
- .github/workflows/test_impl.yml
|
||||||
|
- .github/workflows/build_clio_docker_image.yml
|
||||||
|
|
||||||
|
- ".github/actions/**"
|
||||||
|
- "!.github/actions/code_coverage/**"
|
||||||
|
- .github/scripts/prepare-release-artifacts.sh
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-and-test:
|
||||||
name: Build clio
|
name: Build and Test
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos14
|
- os: macos15
|
||||||
|
conan_profile: apple-clang
|
||||||
build_type: Release
|
build_type: Release
|
||||||
|
static: false
|
||||||
- os: heavy
|
- os: heavy
|
||||||
|
conan_profile: gcc
|
||||||
build_type: Release
|
build_type: Release
|
||||||
container:
|
static: true
|
||||||
image: rippleci/clio_ci:latest
|
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
|
||||||
- os: heavy
|
- os: heavy
|
||||||
|
conan_profile: gcc
|
||||||
build_type: Debug
|
build_type: Debug
|
||||||
container:
|
static: true
|
||||||
image: rippleci/clio_ci:latest
|
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
|
||||||
runs-on: [self-hosted, "${{ matrix.os }}"]
|
- os: heavy
|
||||||
container: ${{ matrix.container }}
|
conan_profile: gcc.ubsan
|
||||||
|
build_type: Release
|
||||||
|
static: false
|
||||||
|
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
|
||||||
|
|
||||||
steps:
|
uses: ./.github/workflows/build_and_test.yml
|
||||||
- name: Clean workdir
|
with:
|
||||||
if: ${{ runner.os == 'macOS' }}
|
runs_on: ${{ matrix.os }}
|
||||||
uses: kuznetsss/workspace-cleanup@1.0
|
container: ${{ matrix.container }}
|
||||||
|
conan_profile: ${{ matrix.conan_profile }}
|
||||||
|
build_type: ${{ matrix.build_type }}
|
||||||
|
static: ${{ matrix.static }}
|
||||||
|
run_unit_tests: true
|
||||||
|
run_integration_tests: true
|
||||||
|
upload_clio_server: true
|
||||||
|
disable_cache: true
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
analyze_build_time:
|
||||||
with:
|
name: Analyze Build Time
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Prepare runner
|
|
||||||
uses: ./.github/actions/prepare_runner
|
|
||||||
with:
|
|
||||||
disable_ccache: true
|
|
||||||
|
|
||||||
- name: Setup conan
|
|
||||||
uses: ./.github/actions/setup_conan
|
|
||||||
id: conan
|
|
||||||
|
|
||||||
- name: Run conan and cmake
|
|
||||||
uses: ./.github/actions/generate
|
|
||||||
with:
|
|
||||||
conan_profile: ${{ steps.conan.outputs.conan_profile }}
|
|
||||||
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
|
|
||||||
build_type: ${{ matrix.build_type }}
|
|
||||||
|
|
||||||
- name: Build Clio
|
|
||||||
uses: ./.github/actions/build_clio
|
|
||||||
|
|
||||||
- name: Strip tests
|
|
||||||
run: strip build/clio_tests
|
|
||||||
|
|
||||||
- name: Upload clio_tests
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}
|
|
||||||
path: build/clio_tests
|
|
||||||
|
|
||||||
- name: Compress clio_server
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
tar czf ./clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz ./clio_server
|
|
||||||
|
|
||||||
- name: Upload clio_server
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: clio_server_${{ runner.os }}_${{ matrix.build_type }}
|
|
||||||
path: build/clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
run_tests:
|
|
||||||
needs: build
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos14
|
|
||||||
build_type: Release
|
|
||||||
- os: heavy
|
- os: heavy
|
||||||
build_type: Release
|
conan_profile: clang
|
||||||
- os: heavy
|
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
|
||||||
build_type: Debug
|
static: true
|
||||||
runs-on: [self-hosted, "${{ matrix.os }}"]
|
- os: macos15
|
||||||
|
conan_profile: apple-clang
|
||||||
steps:
|
container: ""
|
||||||
- name: Clean workdir
|
static: false
|
||||||
if: ${{ runner.os == 'macOS' }}
|
uses: ./.github/workflows/build_impl.yml
|
||||||
uses: kuznetsss/workspace-cleanup@1.0
|
with:
|
||||||
|
runs_on: ${{ matrix.os }}
|
||||||
- uses: actions/download-artifact@v3
|
container: ${{ matrix.container }}
|
||||||
with:
|
conan_profile: ${{ matrix.conan_profile }}
|
||||||
name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}
|
build_type: Release
|
||||||
|
disable_cache: true
|
||||||
- name: Run clio_tests
|
code_coverage: false
|
||||||
run: |
|
static: ${{ matrix.static }}
|
||||||
chmod +x ./clio_tests
|
upload_clio_server: false
|
||||||
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*"
|
targets: all
|
||||||
|
analyze_build_time: true
|
||||||
|
|
||||||
nightly_release:
|
nightly_release:
|
||||||
needs: run_tests
|
needs: build-and-test
|
||||||
runs-on: ubuntu-20.04
|
uses: ./.github/workflows/release_impl.yml
|
||||||
env:
|
with:
|
||||||
GH_REPO: ${{ github.repository }}
|
overwrite_release: true
|
||||||
GH_TOKEN: ${{ github.token }}
|
title: "Clio development (nightly) build"
|
||||||
|
version: nightly
|
||||||
|
header: >
|
||||||
|
# Release notes
|
||||||
|
|
||||||
|
> **Note:** Please remember that this is a development release and it is not recommended for production use.
|
||||||
|
|
||||||
|
Changelog (including previous releases): <https://github.com/XRPLF/clio/commits/nightly>
|
||||||
|
generate_changelog: false
|
||||||
|
draft: false
|
||||||
|
|
||||||
|
build_and_publish_docker_image:
|
||||||
|
uses: ./.github/workflows/build_clio_docker_image.yml
|
||||||
|
needs: build-and-test
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
tags: |
|
||||||
|
type=raw,value=nightly
|
||||||
|
type=raw,value=${{ github.sha }}
|
||||||
|
artifact_name: clio_server_Linux_Release_gcc
|
||||||
|
strip_binary: true
|
||||||
|
publish_image: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|
||||||
|
create_issue_on_failure:
|
||||||
|
needs: [build-and-test, nightly_release, build_and_publish_docker_image]
|
||||||
|
if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name != 'pull_request' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- name: Create an issue
|
||||||
|
uses: ./.github/actions/create_issue
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
with:
|
with:
|
||||||
path: nightly_release
|
title: "Nightly release failed 🌙"
|
||||||
|
body: >
|
||||||
|
Nightly release failed:
|
||||||
|
|
||||||
- name: Prepare files
|
Workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cp ${{ github.workspace }}/.github/workflows/nightly_notes.md "${RUNNER_TEMP}/nightly_notes.md"
|
|
||||||
cd nightly_release
|
|
||||||
rm -r clio_tests*
|
|
||||||
for d in $(ls); do
|
|
||||||
archive_name=$(ls $d)
|
|
||||||
mv ${d}/${archive_name} ./
|
|
||||||
rm -r $d
|
|
||||||
sha256sum ./$archive_name > ./${archive_name}.sha256sum
|
|
||||||
cat ./$archive_name.sha256sum >> "${RUNNER_TEMP}/nightly_notes.md"
|
|
||||||
done
|
|
||||||
echo '```' >> "${RUNNER_TEMP}/nightly_notes.md"
|
|
||||||
|
|
||||||
- name: Remove current nightly release and nightly tag
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
gh release delete nightly --yes || true
|
|
||||||
git push origin :nightly || true
|
|
||||||
|
|
||||||
- name: Publish nightly release
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
gh release create nightly --prerelease --title "Clio development (nightly) build" \
|
|
||||||
--target $GITHUB_SHA --notes-file "${RUNNER_TEMP}/nightly_notes.md" \
|
|
||||||
./nightly_release/clio_server*
|
|
||||||
|
|||||||
6
.github/workflows/nightly_notes.md
vendored
6
.github/workflows/nightly_notes.md
vendored
@@ -1,6 +0,0 @@
|
|||||||
> **Note:** Please remember that this is a development release and it is not recommended for production use.
|
|
||||||
|
|
||||||
Changelog (including previous releases): https://github.com/XRPLF/clio/commits/nightly
|
|
||||||
|
|
||||||
## SHA256 checksums
|
|
||||||
```
|
|
||||||
39
.github/workflows/pre-commit-autoupdate.yml
vendored
Normal file
39
.github/workflows/pre-commit-autoupdate.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: Pre-commit auto-update
|
||||||
|
|
||||||
|
on:
|
||||||
|
# every first day of the month
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 1 * *"
|
||||||
|
# on demand
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto-update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- run: pip install pre-commit
|
||||||
|
- run: pre-commit autoupdate --freeze
|
||||||
|
- run: pre-commit run --all-files || true
|
||||||
|
|
||||||
|
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||||
|
if: always()
|
||||||
|
env:
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
branch: update/pre-commit-hooks
|
||||||
|
title: "style: Update pre-commit hooks"
|
||||||
|
commit-message: "style: Update pre-commit hooks"
|
||||||
|
body: Update versions of pre-commit hooks to latest version.
|
||||||
|
reviewers: "godexsoft,kuznetsss,PeterChen13579,mathbunnyru"
|
||||||
28
.github/workflows/pre-commit.yml
vendored
Normal file
28
.github/workflows/pre-commit.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: Run pre-commit hooks
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-hooks:
|
||||||
|
runs-on: heavy
|
||||||
|
container:
|
||||||
|
image: ghcr.io/xrplf/clio-ci:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo ⚡️
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Prepare runner
|
||||||
|
uses: ./.github/actions/prepare_runner
|
||||||
|
with:
|
||||||
|
disable_ccache: true
|
||||||
|
|
||||||
|
- name: Run pre-commit ✅
|
||||||
|
run: pre-commit run --all-files
|
||||||
56
.github/workflows/release.yml
vendored
Normal file
56
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
name: Create release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*.*.*"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- .github/workflows/release.yml
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
name: Build and Test
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: macos15
|
||||||
|
conan_profile: apple-clang
|
||||||
|
build_type: Release
|
||||||
|
static: false
|
||||||
|
- os: heavy
|
||||||
|
conan_profile: gcc
|
||||||
|
build_type: Release
|
||||||
|
static: true
|
||||||
|
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
|
||||||
|
|
||||||
|
uses: ./.github/workflows/build_and_test.yml
|
||||||
|
with:
|
||||||
|
runs_on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
conan_profile: ${{ matrix.conan_profile }}
|
||||||
|
build_type: ${{ matrix.build_type }}
|
||||||
|
static: ${{ matrix.static }}
|
||||||
|
run_unit_tests: true
|
||||||
|
run_integration_tests: true
|
||||||
|
upload_clio_server: true
|
||||||
|
disable_cache: true
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: build-and-test
|
||||||
|
uses: ./.github/workflows/release_impl.yml
|
||||||
|
with:
|
||||||
|
overwrite_release: false
|
||||||
|
title: "${{ github.ref_name}}"
|
||||||
|
version: "${{ github.ref_name }}"
|
||||||
|
header: >
|
||||||
|
# Introducing Clio version ${{ github.ref_name }}
|
||||||
|
generate_changelog: true
|
||||||
|
draft: true
|
||||||
117
.github/workflows/release_impl.yml
vendored
Normal file
117
.github/workflows/release_impl.yml
vendored
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
name: Make release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
overwrite_release:
|
||||||
|
description: "Overwrite the current release and tag"
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
title:
|
||||||
|
description: "Release title"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
version:
|
||||||
|
description: "Release version"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
header:
|
||||||
|
description: "Release notes header"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
generate_changelog:
|
||||||
|
description: "Generate changelog"
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
draft:
|
||||||
|
description: "Create a draft release"
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: heavy
|
||||||
|
container:
|
||||||
|
image: ghcr.io/xrplf/clio-ci:latest
|
||||||
|
env:
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Prepare runner
|
||||||
|
uses: ./.github/actions/prepare_runner
|
||||||
|
with:
|
||||||
|
disable_ccache: true
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: release_artifacts
|
||||||
|
pattern: clio_server_*
|
||||||
|
|
||||||
|
- name: Create release notes
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
printf '%s\n' "${{ inputs.header }}" > "${RUNNER_TEMP}/release_notes.md"
|
||||||
|
|
||||||
|
- name: Generate changelog
|
||||||
|
shell: bash
|
||||||
|
if: ${{ inputs.generate_changelog }}
|
||||||
|
run: |
|
||||||
|
LAST_TAG=$(gh release view --json tagName -q .tagName)
|
||||||
|
LAST_TAG_COMMIT=$(git rev-parse $LAST_TAG)
|
||||||
|
BASE_COMMIT=$(git merge-base HEAD $LAST_TAG_COMMIT)
|
||||||
|
git-cliff "${BASE_COMMIT}..HEAD" --ignore-tags "nightly|-b"
|
||||||
|
cat CHANGELOG.md >> "${RUNNER_TEMP}/release_notes.md"
|
||||||
|
|
||||||
|
- name: Prepare release artifacts
|
||||||
|
shell: bash
|
||||||
|
run: .github/scripts/prepare-release-artifacts.sh release_artifacts
|
||||||
|
|
||||||
|
- name: Append sha256 checksums
|
||||||
|
shell: bash
|
||||||
|
working-directory: release_artifacts
|
||||||
|
run: |
|
||||||
|
{
|
||||||
|
echo '## SHA256 checksums'
|
||||||
|
echo
|
||||||
|
echo '```'
|
||||||
|
cat *.sha256sum
|
||||||
|
echo '```'
|
||||||
|
} >> "${RUNNER_TEMP}/release_notes.md"
|
||||||
|
|
||||||
|
- name: Upload release notes
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release_notes_${{ inputs.version }}
|
||||||
|
path: "${RUNNER_TEMP}/release_notes.md"
|
||||||
|
|
||||||
|
- name: Remove current release and tag
|
||||||
|
if: ${{ github.event_name != 'pull_request' && inputs.overwrite_release }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
gh release delete ${{ inputs.version }} --yes || true
|
||||||
|
git push origin :${{ inputs.version }} || true
|
||||||
|
|
||||||
|
- name: Publish release
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
gh release create ${{ inputs.version }} \
|
||||||
|
${{ inputs.overwrite_release && '--prerelease' || '' }} \
|
||||||
|
--title "${{ inputs.title }}" \
|
||||||
|
--target $GITHUB_SHA \
|
||||||
|
${{ inputs.draft && '--draft' || '' }} \
|
||||||
|
--notes-file "${RUNNER_TEMP}/release_notes.md" \
|
||||||
|
./release_artifacts/clio_server*
|
||||||
58
.github/workflows/sanitizers.yml
vendored
Normal file
58
.github/workflows/sanitizers.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
name: Run tests with sanitizers
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 4 * * 1-5"
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- .github/workflows/sanitizers.yml
|
||||||
|
|
||||||
|
- .github/workflows/build_and_test.yml
|
||||||
|
- .github/workflows/build_impl.yml
|
||||||
|
- .github/workflows/test_impl.yml
|
||||||
|
|
||||||
|
- ".github/actions/**"
|
||||||
|
- "!.github/actions/build_docker_image/**"
|
||||||
|
- "!.github/actions/create_issue/**"
|
||||||
|
- .github/scripts/execute-tests-under-sanitizer
|
||||||
|
|
||||||
|
- CMakeLists.txt
|
||||||
|
- conanfile.py
|
||||||
|
- conan.lock
|
||||||
|
- "cmake/**"
|
||||||
|
# We don't run sanitizer on code change, because it takes too long
|
||||||
|
# - "src/**"
|
||||||
|
# - "tests/**"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
name: Build and Test
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
compiler: ["gcc", "clang"]
|
||||||
|
sanitizer_ext: [".asan", ".tsan", ".ubsan"]
|
||||||
|
exclude:
|
||||||
|
# Currently, clang.tsan unit tests hang
|
||||||
|
- compiler: clang
|
||||||
|
sanitizer_ext: .tsan
|
||||||
|
|
||||||
|
uses: ./.github/workflows/build_and_test.yml
|
||||||
|
with:
|
||||||
|
runs_on: heavy
|
||||||
|
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
|
||||||
|
disable_cache: true
|
||||||
|
conan_profile: ${{ matrix.compiler }}${{ matrix.sanitizer_ext }}
|
||||||
|
build_type: Release
|
||||||
|
static: false
|
||||||
|
run_unit_tests: true
|
||||||
|
run_integration_tests: false
|
||||||
|
upload_clio_server: false
|
||||||
|
targets: clio_tests clio_integration_tests
|
||||||
160
.github/workflows/test_impl.yml
vendored
Normal file
160
.github/workflows/test_impl.yml
vendored
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
name: Reusable test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
runs_on:
|
||||||
|
description: Runner to run the job on
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
container:
|
||||||
|
description: "The container object as a JSON string (leave empty to run natively)"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
conan_profile:
|
||||||
|
description: Conan profile to use
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
build_type:
|
||||||
|
description: Build type
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
run_unit_tests:
|
||||||
|
description: Whether to run unit tests
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
run_integration_tests:
|
||||||
|
description: Whether to run integration tests
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
unit_tests:
|
||||||
|
name: Unit testing
|
||||||
|
runs-on: ${{ inputs.runs_on }}
|
||||||
|
container: ${{ inputs.container != '' && fromJson(inputs.container) || null }}
|
||||||
|
|
||||||
|
if: inputs.run_unit_tests
|
||||||
|
|
||||||
|
env:
|
||||||
|
# TODO: remove completely when we have fixed all currently existing issues with sanitizers
|
||||||
|
SANITIZER_IGNORE_ERRORS: ${{ endsWith(inputs.conan_profile, '.asan') || endsWith(inputs.conan_profile, '.tsan') }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clean workdir
|
||||||
|
if: ${{ runner.os == 'macOS' }}
|
||||||
|
uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce # v1.0
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
|
|
||||||
|
- name: Make clio_tests executable
|
||||||
|
shell: bash
|
||||||
|
run: chmod +x ./clio_tests
|
||||||
|
|
||||||
|
- name: Run clio_tests (regular)
|
||||||
|
if: env.SANITIZER_IGNORE_ERRORS == 'false'
|
||||||
|
run: ./clio_tests
|
||||||
|
|
||||||
|
- name: Run clio_tests (sanitizer errors ignored)
|
||||||
|
if: env.SANITIZER_IGNORE_ERRORS == 'true'
|
||||||
|
run: ./.github/scripts/execute-tests-under-sanitizer ./clio_tests
|
||||||
|
|
||||||
|
- name: Check for sanitizer report
|
||||||
|
if: env.SANITIZER_IGNORE_ERRORS == 'true'
|
||||||
|
shell: bash
|
||||||
|
id: check_report
|
||||||
|
run: |
|
||||||
|
if ls .sanitizer-report/* 1> /dev/null 2>&1; then
|
||||||
|
echo "found_report=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "found_report=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload sanitizer report
|
||||||
|
if: env.SANITIZER_IGNORE_ERRORS == 'true' && steps.check_report.outputs.found_report == 'true'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.conan_profile }}_report
|
||||||
|
path: .sanitizer-report/*
|
||||||
|
include-hidden-files: true
|
||||||
|
|
||||||
|
- name: Create an issue
|
||||||
|
if: false && env.SANITIZER_IGNORE_ERRORS == 'true' && steps.check_report.outputs.found_report == 'true'
|
||||||
|
uses: ./.github/actions/create_issue
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
labels: "bug"
|
||||||
|
title: "[${{ inputs.conan_profile }}] reported issues"
|
||||||
|
body: >
|
||||||
|
Clio tests failed one or more sanitizer checks when built with ${{ inputs.conan_profile }}`.
|
||||||
|
|
||||||
|
Workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/
|
||||||
|
Reports are available as artifacts.
|
||||||
|
|
||||||
|
integration_tests:
|
||||||
|
name: Integration testing
|
||||||
|
runs-on: ${{ inputs.runs_on }}
|
||||||
|
container: ${{ inputs.container != '' && fromJson(inputs.container) || null }}
|
||||||
|
|
||||||
|
if: inputs.run_integration_tests
|
||||||
|
|
||||||
|
services:
|
||||||
|
scylladb:
|
||||||
|
image: ${{ inputs.container != '' && 'scylladb/scylla' || '' }}
|
||||||
|
options: >-
|
||||||
|
--health-cmd "cqlsh -e 'describe cluster'"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clean workdir
|
||||||
|
if: ${{ runner.os == 'macOS' }}
|
||||||
|
uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce # v1.0
|
||||||
|
|
||||||
|
- name: Spin up scylladb
|
||||||
|
if: ${{ runner.os == 'macOS' }}
|
||||||
|
timeout-minutes: 3
|
||||||
|
run: |
|
||||||
|
docker rm --force scylladb || true
|
||||||
|
docker run \
|
||||||
|
--detach \
|
||||||
|
--name scylladb \
|
||||||
|
--health-cmd "cqlsh -e 'describe cluster'" \
|
||||||
|
--health-interval 10s \
|
||||||
|
--health-timeout 5s \
|
||||||
|
--health-retries 5 \
|
||||||
|
--publish 9042:9042 \
|
||||||
|
--memory 16G \
|
||||||
|
scylladb/scylla
|
||||||
|
|
||||||
|
until [ "$(docker inspect -f '{{.State.Health.Status}}' scylladb)" == "healthy" ]; do
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
|
|
||||||
|
- name: Run clio_integration_tests
|
||||||
|
run: |
|
||||||
|
chmod +x ./clio_integration_tests
|
||||||
|
./clio_integration_tests ${{ runner.os != 'macOS' && '--backend_host=scylladb' || '' }}
|
||||||
|
|
||||||
|
- name: Show docker logs and stop scylladb
|
||||||
|
if: ${{ always() && runner.os == 'macOS' }}
|
||||||
|
run: |
|
||||||
|
docker logs scylladb
|
||||||
|
docker rm --force scylladb || true
|
||||||
232
.github/workflows/update_docker_ci.yml
vendored
232
.github/workflows/update_docker_ci.yml
vendored
@@ -1,40 +1,236 @@
|
|||||||
name: Update CI docker image
|
name: Update CI docker image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- .github/workflows/update_docker_ci.yml
|
||||||
|
|
||||||
|
- ".github/actions/build_docker_image/**"
|
||||||
|
|
||||||
|
- "docker/ci/**"
|
||||||
|
- "docker/compilers/**"
|
||||||
|
- "docker/tools/**"
|
||||||
push:
|
push:
|
||||||
branches: [develop]
|
branches: [develop]
|
||||||
paths:
|
paths:
|
||||||
- 'docker/ci/**'
|
|
||||||
- .github/workflows/update_docker_ci.yml
|
- .github/workflows/update_docker_ci.yml
|
||||||
|
|
||||||
|
- ".github/actions/build_docker_image/**"
|
||||||
|
|
||||||
|
- "docker/ci/**"
|
||||||
|
- "docker/compilers/**"
|
||||||
|
- "docker/tools/**"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
# We want to execute all builds sequentially in develop
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
GHCR_REPO: ghcr.io/${{ github.repository_owner }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_push:
|
gcc-amd64:
|
||||||
name: Build and push docker image
|
name: Build and push GCC docker image (amd64)
|
||||||
runs-on: ubuntu-20.04
|
runs-on: heavy
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
||||||
|
with:
|
||||||
|
files: "docker/compilers/gcc/**"
|
||||||
|
|
||||||
|
- uses: ./.github/actions/build_docker_image
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.GHCR_REPO }}/clio-gcc
|
||||||
|
rippleci/clio_gcc
|
||||||
|
push_image: ${{ github.event_name != 'pull_request' }}
|
||||||
|
directory: docker/compilers/gcc
|
||||||
|
tags: |
|
||||||
|
type=raw,value=amd64-latest
|
||||||
|
type=raw,value=amd64-12
|
||||||
|
type=raw,value=amd64-12.3.0
|
||||||
|
type=raw,value=amd64-${{ github.sha }}
|
||||||
|
platforms: linux/amd64
|
||||||
|
dockerhub_repo: rippleci/clio_gcc
|
||||||
|
dockerhub_description: GCC compiler for XRPLF/clio.
|
||||||
|
|
||||||
|
gcc-arm64:
|
||||||
|
name: Build and push GCC docker image (arm64)
|
||||||
|
runs-on: heavy-arm64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
||||||
|
with:
|
||||||
|
files: "docker/compilers/gcc/**"
|
||||||
|
|
||||||
|
- uses: ./.github/actions/build_docker_image
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.GHCR_REPO }}/clio-gcc
|
||||||
|
rippleci/clio_gcc
|
||||||
|
push_image: ${{ github.event_name != 'pull_request' }}
|
||||||
|
directory: docker/compilers/gcc
|
||||||
|
tags: |
|
||||||
|
type=raw,value=arm64-latest
|
||||||
|
type=raw,value=arm64-12
|
||||||
|
type=raw,value=arm64-12.3.0
|
||||||
|
type=raw,value=arm64-${{ github.sha }}
|
||||||
|
platforms: linux/arm64
|
||||||
|
dockerhub_repo: rippleci/clio_gcc
|
||||||
|
dockerhub_description: GCC compiler for XRPLF/clio.
|
||||||
|
|
||||||
|
gcc-merge:
|
||||||
|
name: Merge and push multi-arch GCC docker image
|
||||||
|
runs-on: heavy
|
||||||
|
needs: [gcc-amd64, gcc-arm64]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
||||||
|
with:
|
||||||
|
files: "docker/compilers/gcc/**"
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USER }}
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
password: ${{ secrets.DOCKERHUB_PW }}
|
password: ${{ secrets.DOCKERHUB_PW }}
|
||||||
|
|
||||||
|
- name: Make GHCR_REPO lowercase
|
||||||
|
run: |
|
||||||
|
echo "GHCR_REPO_LC=$(echo ${{env.GHCR_REPO}} | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
|
- name: Create and push multi-arch manifest
|
||||||
|
if: github.event_name != 'pull_request' && steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
run: |
|
||||||
|
for image in ${{ env.GHCR_REPO_LC }}/clio-gcc rippleci/clio_gcc; do
|
||||||
|
docker buildx imagetools create \
|
||||||
|
-t $image:latest \
|
||||||
|
-t $image:12 \
|
||||||
|
-t $image:12.3.0 \
|
||||||
|
-t $image:${{ github.sha }} \
|
||||||
|
$image:arm64-latest \
|
||||||
|
$image:amd64-latest
|
||||||
|
done
|
||||||
|
|
||||||
|
clang:
|
||||||
|
name: Build and push Clang docker image
|
||||||
|
runs-on: heavy
|
||||||
|
|
||||||
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: docker/setup-qemu-action@v3
|
|
||||||
- uses: docker/setup-buildx-action@v3
|
- name: Get changed files
|
||||||
- uses: docker/metadata-action@v5
|
id: changed-files
|
||||||
id: meta
|
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
||||||
with:
|
with:
|
||||||
images: rippleci/clio_ci
|
files: "docker/compilers/clang/**"
|
||||||
|
|
||||||
|
- uses: ./.github/actions/build_docker_image
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.GHCR_REPO }}/clio-clang
|
||||||
|
rippleci/clio_clang
|
||||||
|
push_image: ${{ github.event_name != 'pull_request' }}
|
||||||
|
directory: docker/compilers/clang
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest
|
type=raw,value=latest
|
||||||
type=raw,value=gcc_11
|
type=raw,value=16
|
||||||
type=raw,value=${{ env.GITHUB_SHA }}
|
type=raw,value=${{ github.sha }}
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ${{ github.workspace }}/docker/ci
|
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
dockerhub_repo: rippleci/clio_clang
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
dockerhub_description: Clang compiler for XRPLF/clio.
|
||||||
|
|
||||||
|
tools:
|
||||||
|
name: Build and push tools docker image
|
||||||
|
runs-on: heavy
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
||||||
|
with:
|
||||||
|
files: "docker/tools/**"
|
||||||
|
|
||||||
|
- uses: ./.github/actions/build_docker_image
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.GHCR_REPO }}/clio-tools
|
||||||
|
push_image: ${{ github.event_name != 'pull_request' }}
|
||||||
|
directory: docker/tools
|
||||||
|
tags: |
|
||||||
|
type=raw,value=latest
|
||||||
|
type=raw,value=${{ github.sha }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
|
ci:
|
||||||
|
name: Build and push CI docker image
|
||||||
|
runs-on: heavy
|
||||||
|
needs: [gcc-merge, clang, tools]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/build_docker_image
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.GHCR_REPO }}/clio-ci
|
||||||
|
rippleci/clio_ci
|
||||||
|
push_image: ${{ github.event_name != 'pull_request' }}
|
||||||
|
directory: docker/ci
|
||||||
|
tags: |
|
||||||
|
type=raw,value=latest
|
||||||
|
type=raw,value=gcc_12_clang_16
|
||||||
|
type=raw,value=${{ github.sha }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
dockerhub_repo: rippleci/clio_ci
|
||||||
|
dockerhub_description: CI image for XRPLF/clio.
|
||||||
|
|||||||
93
.github/workflows/upload_conan_deps.yml
vendored
Normal file
93
.github/workflows/upload_conan_deps.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
name: Upload Conan Dependencies
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 9 * * 1-5"
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
force_source_build:
|
||||||
|
description: "Force source build of all dependencies"
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
- .github/workflows/upload_conan_deps.yml
|
||||||
|
- .github/scripts/generate_conan_matrix.py
|
||||||
|
- conanfile.py
|
||||||
|
- conan.lock
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
- .github/workflows/upload_conan_deps.yml
|
||||||
|
- .github/scripts/generate_conan_matrix.py
|
||||||
|
- conanfile.py
|
||||||
|
- conan.lock
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate-matrix:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Calculate conan matrix
|
||||||
|
id: set-matrix
|
||||||
|
run: .github/scripts/generate_conan_matrix.py >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
|
upload-conan-deps:
|
||||||
|
name: Build ${{ matrix.compiler }}${{ matrix.sanitizer_ext }} ${{ matrix.build_type }}
|
||||||
|
|
||||||
|
needs: generate-matrix
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container != '' && fromJson(matrix.container) || null }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
CONAN_PROFILE: ${{ matrix.compiler }}${{ matrix.sanitizer_ext }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Prepare runner
|
||||||
|
uses: ./.github/actions/prepare_runner
|
||||||
|
with:
|
||||||
|
disable_ccache: true
|
||||||
|
|
||||||
|
- name: Setup conan
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
uses: ./.github/actions/setup_conan_macos
|
||||||
|
with:
|
||||||
|
conan_files_dir: docker/ci/conan/
|
||||||
|
|
||||||
|
- name: Show conan profile
|
||||||
|
run: conan profile show --profile:all ${{ env.CONAN_PROFILE }}
|
||||||
|
|
||||||
|
- name: Run conan and cmake
|
||||||
|
uses: ./.github/actions/generate
|
||||||
|
with:
|
||||||
|
conan_profile: ${{ env.CONAN_PROFILE }}
|
||||||
|
# We check that everything builds fine from source on scheduled runs
|
||||||
|
# But we do build and upload packages with build=missing by default
|
||||||
|
force_conan_source_build: ${{ github.event_name == 'schedule' || github.event.inputs.force_source_build == 'true' }}
|
||||||
|
build_type: ${{ matrix.build_type }}
|
||||||
|
|
||||||
|
- name: Login to Conan
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
run: conan remote login -p ${{ secrets.CONAN_PASSWORD }} ripple ${{ secrets.CONAN_USERNAME }}
|
||||||
|
|
||||||
|
- name: Upload Conan packages
|
||||||
|
if: github.event_name != 'pull_request' && github.event_name != 'schedule'
|
||||||
|
run: conan upload "*" -r=ripple --confirm
|
||||||
20
.github/workflows/upload_coverage_report.yml
vendored
20
.github/workflows/upload_coverage_report.yml
vendored
@@ -1,4 +1,5 @@
|
|||||||
name: Upload report
|
name: Upload report
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
@@ -9,27 +10,24 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
upload_report:
|
upload_report:
|
||||||
name: Upload report
|
name: Upload report
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download report artifact
|
- name: Download report artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: coverage-report.xml
|
name: coverage-report.xml
|
||||||
path: build
|
path: build
|
||||||
|
|
||||||
- name: Upload coverage report
|
- name: Upload coverage report
|
||||||
if: ${{ hashFiles('build/coverage_report.xml') != '' }}
|
if: ${{ hashFiles('build/coverage_report.xml') != '' }}
|
||||||
uses: wandalen/wretry.action@v1.3.0
|
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
|
||||||
with:
|
with:
|
||||||
action: codecov/codecov-action@v3
|
files: build/coverage_report.xml
|
||||||
with: |
|
fail_ci_if_error: true
|
||||||
files: build/coverage_report.xml
|
verbose: true
|
||||||
fail_ci_if_error: false
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
verbose: true
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
attempt_limit: 5
|
|
||||||
attempt_delay: 10000
|
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -6,6 +6,7 @@
|
|||||||
.vscode
|
.vscode
|
||||||
.python-version
|
.python-version
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.sanitizer-report
|
||||||
CMakeUserPresets.json
|
CMakeUserPresets.json
|
||||||
config.json
|
config.json
|
||||||
src/main/impl/Build.cpp
|
src/util/build/Build.cpp
|
||||||
|
|||||||
6
.hadolint.yml
Normal file
6
.hadolint.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
ignored:
|
||||||
|
- DL3003
|
||||||
|
- DL3007
|
||||||
|
- DL3008
|
||||||
|
- DL3013
|
||||||
6
.markdownlint.yaml
Normal file
6
.markdownlint.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Default state for all rules
|
||||||
|
default: true
|
||||||
|
|
||||||
|
# MD013/line-length - Line length
|
||||||
|
MD013:
|
||||||
|
line_length: 1000
|
||||||
108
.pre-commit-config.yaml
Normal file
108
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
---
|
||||||
|
# pre-commit is a tool to perform a predefined set of tasks manually and/or
|
||||||
|
# automatically before git commits are made.
|
||||||
|
#
|
||||||
|
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
|
||||||
|
#
|
||||||
|
# Common tasks
|
||||||
|
#
|
||||||
|
# - Run on all files: pre-commit run --all-files
|
||||||
|
# - Register git hooks: pre-commit install --hook-type pre-commit --hook-type pre-push
|
||||||
|
#
|
||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
exclude: ^(docs/doxygen-awesome-theme/|conan\.lock$)
|
||||||
|
|
||||||
|
repos:
|
||||||
|
# `pre-commit sample-config` default hooks
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
|
||||||
|
hooks:
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: check-shebang-scripts-are-executable
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
|
||||||
|
# Autoformat: YAML, JSON, Markdown, etc.
|
||||||
|
- repo: https://github.com/rbubley/mirrors-prettier
|
||||||
|
rev: 787fb9f542b140ba0b2aced38e6a3e68021647a3 # frozen: v3.5.3
|
||||||
|
hooks:
|
||||||
|
- id: prettier
|
||||||
|
|
||||||
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||||
|
rev: 586c3ea3f51230da42bab657c6a32e9e66c364f0 # frozen: v0.44.0
|
||||||
|
hooks:
|
||||||
|
- id: markdownlint-fix
|
||||||
|
exclude: LICENSE.md
|
||||||
|
|
||||||
|
- repo: https://github.com/hadolint/hadolint
|
||||||
|
rev: c3dc18df7a501f02a560a2cc7ba3c69a85ca01d3 # frozen: v2.13.1-beta
|
||||||
|
hooks:
|
||||||
|
- id: hadolint-docker
|
||||||
|
# hadolint-docker is a special hook that runs hadolint in a Docker container
|
||||||
|
# Docker is not installed in the environment where pre-commit is run
|
||||||
|
stages: [manual]
|
||||||
|
entry: hadolint/hadolint:v2.12.1-beta hadolint
|
||||||
|
|
||||||
|
- repo: https://github.com/codespell-project/codespell
|
||||||
|
rev: 63c8f8312b7559622c0d82815639671ae42132ac # frozen: v2.4.1
|
||||||
|
hooks:
|
||||||
|
- id: codespell
|
||||||
|
args:
|
||||||
|
[
|
||||||
|
--write-changes,
|
||||||
|
--ignore-words=pre-commit-hooks/codespell_ignore.txt,
|
||||||
|
]
|
||||||
|
|
||||||
|
# Running fix-local-includes before clang-format
|
||||||
|
# to ensure that the include order is correct.
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: fix-local-includes
|
||||||
|
name: Fix Local Includes
|
||||||
|
entry: pre-commit-hooks/fix-local-includes.sh
|
||||||
|
types: [c++]
|
||||||
|
language: script
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
|
rev: f9a52e87b6cdcb01b0a62b8611d9ba9f2dad0067 # frozen: v19.1.7
|
||||||
|
hooks:
|
||||||
|
- id: clang-format
|
||||||
|
args: [--style=file]
|
||||||
|
types: [c++]
|
||||||
|
|
||||||
|
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
||||||
|
rev: e2c2116d86a80e72e7146a06e68b7c228afc6319 # frozen: v0.6.13
|
||||||
|
hooks:
|
||||||
|
- id: cmake-format
|
||||||
|
additional_dependencies: [PyYAML]
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: check-no-h-files
|
||||||
|
name: No .h files
|
||||||
|
entry: There should be no .h files in this repository
|
||||||
|
language: fail
|
||||||
|
files: \.h$
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: gofmt
|
||||||
|
name: Go Format
|
||||||
|
entry: pre-commit-hooks/run-go-fmt.sh
|
||||||
|
types: [go]
|
||||||
|
language: golang
|
||||||
|
description: "Runs `gofmt`, requires golang"
|
||||||
|
- id: check-docs
|
||||||
|
name: Check Doxygen Documentation
|
||||||
|
entry: pre-commit-hooks/check-doxygen-docs.sh
|
||||||
|
types: [text]
|
||||||
|
language: script
|
||||||
|
pass_filenames: false
|
||||||
|
- id: verify-commits
|
||||||
|
name: Verify Commits
|
||||||
|
entry: pre-commit-hooks/verify-commits.sh
|
||||||
|
always_run: true
|
||||||
|
stages: [pre-push]
|
||||||
|
language: script
|
||||||
|
pass_filenames: false
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.16.3)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
set(CMAKE_PROJECT_INCLUDE_BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ClioVersion.cmake)
|
set(CMAKE_PROJECT_INCLUDE_BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ClioVersion.cmake)
|
||||||
|
|
||||||
@@ -8,12 +8,17 @@ project(clio VERSION ${CLIO_VERSION} HOMEPAGE_URL "https://github.com/XRPLF/clio
|
|||||||
|
|
||||||
# =========================== Options ====================================== #
|
# =========================== Options ====================================== #
|
||||||
option(verbose "Verbose build" FALSE)
|
option(verbose "Verbose build" FALSE)
|
||||||
option(tests "Build tests" FALSE)
|
option(tests "Build unit tests" FALSE)
|
||||||
|
option(integration_tests "Build integration tests" FALSE)
|
||||||
option(benchmark "Build benchmarks" FALSE)
|
option(benchmark "Build benchmarks" FALSE)
|
||||||
option(docs "Generate doxygen docs" FALSE)
|
option(docs "Generate doxygen docs" FALSE)
|
||||||
option(coverage "Build test coverage report" FALSE)
|
option(coverage "Build test coverage report" FALSE)
|
||||||
option(packaging "Create distribution packages" FALSE)
|
option(packaging "Create distribution packages" FALSE)
|
||||||
option(lint "Run clang-tidy checks during compilation" FALSE)
|
option(lint "Run clang-tidy checks during compilation" FALSE)
|
||||||
|
option(static "Statically linked Clio" FALSE)
|
||||||
|
option(snapshot "Build snapshot tool" FALSE)
|
||||||
|
option(time_trace "Build using -ftime-trace to create compiler trace reports" FALSE)
|
||||||
|
|
||||||
# ========================================================================== #
|
# ========================================================================== #
|
||||||
set(san "" CACHE STRING "Add sanitizer instrumentation")
|
set(san "" CACHE STRING "Add sanitizer instrumentation")
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
|
||||||
@@ -28,17 +33,9 @@ include(CheckCXXCompilerFlag)
|
|||||||
include(ClangTidy)
|
include(ClangTidy)
|
||||||
|
|
||||||
add_library(clio_options INTERFACE)
|
add_library(clio_options INTERFACE)
|
||||||
|
target_compile_features(clio_options INTERFACE cxx_std_23) # Clio needs c++23 but deps can remain c++20 for now
|
||||||
target_include_directories(clio_options INTERFACE ${CMAKE_SOURCE_DIR}/src)
|
target_include_directories(clio_options INTERFACE ${CMAKE_SOURCE_DIR}/src)
|
||||||
|
|
||||||
# Set coverage build options
|
|
||||||
if (coverage)
|
|
||||||
if (NOT tests)
|
|
||||||
message(FATAL_ERROR "Coverage requires tests to be enabled")
|
|
||||||
endif ()
|
|
||||||
include(CodeCoverage)
|
|
||||||
append_coverage_compiler_flags_to_target(clio_options INTERFACE)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
set(CMAKE_VERBOSE_MAKEFILE TRUE)
|
set(CMAKE_VERBOSE_MAKEFILE TRUE)
|
||||||
endif ()
|
endif ()
|
||||||
@@ -63,10 +60,7 @@ include(deps/cassandra)
|
|||||||
include(deps/libbacktrace)
|
include(deps/libbacktrace)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
add_subdirectory(tests)
|
||||||
if (tests)
|
|
||||||
add_subdirectory(unittests)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (benchmark)
|
if (benchmark)
|
||||||
add_subdirectory(benchmarks)
|
add_subdirectory(benchmarks)
|
||||||
@@ -74,15 +68,21 @@ endif ()
|
|||||||
|
|
||||||
# Enable selected sanitizer if enabled via `san`
|
# Enable selected sanitizer if enabled via `san`
|
||||||
if (san)
|
if (san)
|
||||||
|
set(SUPPORTED_SANITIZERS "address" "thread" "memory" "undefined")
|
||||||
|
list(FIND SUPPORTED_SANITIZERS "${san}" INDEX)
|
||||||
|
if (INDEX EQUAL -1)
|
||||||
|
message(FATAL_ERROR "Error: Unsupported sanitizer '${san}'. Supported values are: ${SUPPORTED_SANITIZERS}.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_compile_options(
|
target_compile_options(
|
||||||
clio PUBLIC # Sanitizers recommend minimum of -O1 for reasonable performance
|
clio_options INTERFACE # Sanitizers recommend minimum of -O1 for reasonable performance
|
||||||
$<$<CONFIG:Debug>:-O1> ${SAN_FLAG} -fno-omit-frame-pointer
|
$<$<CONFIG:Debug>:-O1> ${SAN_FLAG} -fno-omit-frame-pointer
|
||||||
)
|
)
|
||||||
target_compile_definitions(
|
target_compile_definitions(
|
||||||
clio PUBLIC $<$<STREQUAL:${san},address>:SANITIZER=ASAN> $<$<STREQUAL:${san},thread>:SANITIZER=TSAN>
|
clio_options INTERFACE $<$<STREQUAL:${san},address>:SANITIZER=ASAN> $<$<STREQUAL:${san},thread>:SANITIZER=TSAN>
|
||||||
$<$<STREQUAL:${san},memory>:SANITIZER=MSAN> $<$<STREQUAL:${san},undefined>:SANITIZER=UBSAN>
|
$<$<STREQUAL:${san},memory>:SANITIZER=MSAN> $<$<STREQUAL:${san},undefined>:SANITIZER=UBSAN>
|
||||||
)
|
)
|
||||||
target_link_libraries(clio INTERFACE ${SAN_FLAG} ${SAN_LIB})
|
target_link_libraries(clio_options INTERFACE ${SAN_FLAG} ${SAN_LIB})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Generate `docs` target for doxygen documentation if enabled Note: use `make docs` to generate the documentation
|
# Generate `docs` target for doxygen documentation if enabled Note: use `make docs` to generate the documentation
|
||||||
@@ -94,3 +94,7 @@ include(install/install)
|
|||||||
if (packaging)
|
if (packaging)
|
||||||
include(cmake/packaging.cmake) # This file exists only in build runner
|
include(cmake/packaging.cmake) # This file exists only in build runner
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (snapshot)
|
||||||
|
add_subdirectory(tools/snapshot)
|
||||||
|
endif ()
|
||||||
|
|||||||
142
CONTRIBUTING.md
142
CONTRIBUTING.md
@@ -1,39 +1,57 @@
|
|||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
Thank you for your interest in contributing to the `clio` project 🙏
|
Thank you for your interest in contributing to the `clio` project 🙏
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
To contribute, please:
|
To contribute, please:
|
||||||
|
|
||||||
1. Fork the repository under your own user.
|
1. Fork the repository under your own user.
|
||||||
2. Create a new branch on which to commit/push your changes.
|
2. Create a new branch on which to commit/push your changes.
|
||||||
3. Write and test your code.
|
3. Write and test your code.
|
||||||
4. Ensure that your code compiles with the provided build engine and update the provided build engine as part of your PR where needed and where appropriate.
|
4. Ensure that your code compiles with the provided build engine and update the provided build engine as part of your PR where needed and where appropriate.
|
||||||
5. Where applicable, write test cases for your code and include those in `unittests`.
|
5. Where applicable, write test cases for your code and include those in the relevant subfolder under `tests`.
|
||||||
6. Ensure your code passes automated checks (e.g. clang-format)
|
6. Ensure your code passes [automated checks](#pre-commit-hooks)
|
||||||
7. Squash your commits (i.e. rebase) into as few commits as is reasonable to describe your changes at a high level (typically a single commit for a small change). See below for more details.
|
7. Squash your commits (i.e. rebase) into as few commits as is reasonable to describe your changes at a high level (typically a single commit for a small change). See below for more details.
|
||||||
8. Open a PR to the main repository onto the _develop_ branch, and follow the provided template.
|
8. Open a PR to the main repository onto the _develop_ branch, and follow the provided template.
|
||||||
|
|
||||||
> **Note:** Please read the [Style guide](#style-guide).
|
> **Note:** Please read the [Style guide](#style-guide).
|
||||||
|
|
||||||
## Install git hooks
|
### `git lfs` hooks
|
||||||
Please run the following command in order to use git hooks that are helpful for `clio` development.
|
|
||||||
|
|
||||||
``` bash
|
Install `git lfs` hooks using the following command:
|
||||||
git config --local core.hooksPath .githooks
|
|
||||||
|
```bash
|
||||||
|
git lfs install
|
||||||
```
|
```
|
||||||
|
|
||||||
## Git hooks dependencies
|
> **Note:** You need to install Git LFS hooks before installing `pre-commit` hooks.
|
||||||
The pre-commit hook requires `clang-format >= 17.0.0` and `cmake-format` to be installed on your machine.
|
|
||||||
`clang-format` can be installed using `brew` on macOS and default package manager on Linux.
|
|
||||||
`cmake-format` can be installed using `pip`.
|
|
||||||
The hook will also attempt to automatically use `doxygen` to verify that everything public in the codebase is covered by doc comments. If `doxygen` is not installed, the hook will raise a warning suggesting to install `doxygen` for future commits.
|
|
||||||
|
|
||||||
## Git commands
|
### `pre-commit` hooks
|
||||||
This sections offers a detailed look at the git commands you will need to use to get your PR submitted.
|
|
||||||
|
To ensure code quality and style, we use [`pre-commit`](https://pre-commit.com/).
|
||||||
|
|
||||||
|
Run the following command to enable `pre-commit` hooks that help with Clio development:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip3 install pre-commit
|
||||||
|
pre-commit install --hook-type pre-commit --hook-type pre-push
|
||||||
|
```
|
||||||
|
|
||||||
|
`pre-commit` takes care of running each tool in [`.pre-commit-config.yaml`](https://github.com/XRPLF/clio/blob/develop/.pre-commit-config.yaml) in a separate environment.
|
||||||
|
|
||||||
|
`pre-commit` also attempts to automatically use Doxygen to verify that everything public in the codebase has doc comments.
|
||||||
|
If Doxygen is not installed, the hook issues a warning and recommends installing Doxygen for future commits.
|
||||||
|
|
||||||
|
### Git commands
|
||||||
|
|
||||||
|
This sections offers a detailed look at the git commands you will need to use to get your PR submitted.
|
||||||
Please note that there are more than one way to do this and these commands are provided for your convenience.
|
Please note that there are more than one way to do this and these commands are provided for your convenience.
|
||||||
At this point it's assumed that you have already finished working on your feature/bug.
|
At this point it's assumed that you have already finished working on your feature/bug.
|
||||||
|
|
||||||
> **Important:** Before you issue any of the commands below, please hit the `Sync fork` button and make sure your fork's `develop` branch is up-to-date with the main `clio` repository.
|
> **Important:** Before you issue any of the commands below, please hit the `Sync fork` button and make sure your fork's `develop` branch is up-to-date with the main `clio` repository.
|
||||||
|
|
||||||
``` bash
|
```bash
|
||||||
# Create a backup of your branch
|
# Create a backup of your branch
|
||||||
git branch <your feature branch>_bk
|
git branch <your feature branch>_bk
|
||||||
|
|
||||||
@@ -43,18 +61,20 @@ git pull origin develop
|
|||||||
git checkout <your feature branch>
|
git checkout <your feature branch>
|
||||||
git rebase -i develop
|
git rebase -i develop
|
||||||
```
|
```
|
||||||
|
|
||||||
For each commit in the list other than the first one, enter `s` to squash.
|
For each commit in the list other than the first one, enter `s` to squash.
|
||||||
After this is done, you will have the opportunity to write a message for the squashed commit.
|
After this is done, you will have the opportunity to write a message for the squashed commit.
|
||||||
|
|
||||||
> **Hint:** Please use **imperative mood** in the commit message, and capitalize the first word.
|
> **Hint:** Please use **imperative mood** in the commit message, and capitalize the first word.
|
||||||
|
|
||||||
``` bash
|
```bash
|
||||||
# You should now have a single commit on top of a commit in `develop`
|
# You should now have a single commit on top of a commit in `develop`
|
||||||
git log
|
git log
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note:** If there are merge conflicts, please resolve them now.
|
> **Note:** If there are merge conflicts, please resolve them now.
|
||||||
|
|
||||||
``` bash
|
```bash
|
||||||
# Use the same commit message as you did above
|
# Use the same commit message as you did above
|
||||||
git commit -m 'Your message'
|
git commit -m 'Your message'
|
||||||
git rebase --continue
|
git rebase --continue
|
||||||
@@ -62,24 +82,30 @@ git rebase --continue
|
|||||||
|
|
||||||
> **Important:** If you have no GPG keys set up, please follow [this tutorial](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account)
|
> **Important:** If you have no GPG keys set up, please follow [this tutorial](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account)
|
||||||
|
|
||||||
``` bash
|
```bash
|
||||||
# Sign the commit with your GPG key, and push your changes
|
# Sign the commit with your GPG key, and push your changes
|
||||||
git commit --amend -S
|
git commit --amend -S
|
||||||
git push --force
|
git push --force
|
||||||
```
|
```
|
||||||
|
|
||||||
## Use ccache (optional)
|
### Use ccache (optional)
|
||||||
|
|
||||||
Clio uses `ccache` to speed up compilation. If you want to use it, please make sure it is installed on your machine.
|
Clio uses `ccache` to speed up compilation. If you want to use it, please make sure it is installed on your machine.
|
||||||
CMake will automatically detect it and use it if it is available.
|
CMake will automatically detect it and use it if it is available.
|
||||||
|
|
||||||
|
### Opening a pull request
|
||||||
|
|
||||||
|
When a pull request is open CI will perform checks on the new code.
|
||||||
|
Title of the pull request and squashed commit should follow [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
|
||||||
|
|
||||||
|
### Fixing issues found during code review
|
||||||
|
|
||||||
## Fixing issues found during code review
|
|
||||||
While your code is in review, it's possible that some changes will be requested by reviewer(s).
|
While your code is in review, it's possible that some changes will be requested by reviewer(s).
|
||||||
This section describes the process of adding your fixes.
|
This section describes the process of adding your fixes.
|
||||||
|
|
||||||
We assume that you already made the required changes on your feature branch.
|
We assume that you already made the required changes on your feature branch.
|
||||||
|
|
||||||
``` bash
|
```bash
|
||||||
# Add the changed code
|
# Add the changed code
|
||||||
git add <paths to add>
|
git add <paths to add>
|
||||||
|
|
||||||
@@ -91,62 +117,72 @@ git commit -S -m "[FOLD] Your commit message"
|
|||||||
git push
|
git push
|
||||||
```
|
```
|
||||||
|
|
||||||
## After code review
|
### After code review
|
||||||
|
|
||||||
When your PR is approved and ready to merge, use `Squash and merge`.
|
When your PR is approved and ready to merge, use `Squash and merge`.
|
||||||
The button for that is near the bottom of the PR's page on GitHub.
|
The button for that is near the bottom of the PR's page on GitHub.
|
||||||
|
|
||||||
> **Important:** Please leave the automatically-generated mention/link to the PR in the subject line **and** in the description field add `"Fix #ISSUE_ID"` (replacing `ISSUE_ID` with yours) if the PR fixes an issue.
|
> **Important:** Please leave the automatically-generated mention/link to the PR in the subject line **and** in the description field add `"Fix #ISSUE_ID"` (replacing `ISSUE_ID` with yours) if the PR fixes an issue.
|
||||||
> **Note:** See [issues](https://github.com/XRPLF/clio/issues) to find the `ISSUE_ID` for the feature/bug you were working on.
|
> **Note:** See [issues](https://github.com/XRPLF/clio/issues) to find the `ISSUE_ID` for the feature/bug you were working on.
|
||||||
|
|
||||||
# Style guide
|
## Style guide
|
||||||
|
|
||||||
This is a non-exhaustive list of recommended style guidelines. These are not always strictly enforced and serve as a way to keep the codebase coherent.
|
This is a non-exhaustive list of recommended style guidelines. These are not always strictly enforced and serve as a way to keep the codebase coherent.
|
||||||
|
|
||||||
## Formatting
|
### Formatting
|
||||||
Code must conform to `clang-format` version 17, unless the result would be unreasonably difficult to read or maintain.
|
|
||||||
In most cases the pre-commit hook will take care of formatting and will fix any issues automatically.
|
Code must conform to `clang-format`, unless the result is unreasonably difficult to read or maintain.
|
||||||
To manually format your code, use `clang-format -i <your changed files>` for C++ files and `cmake-format -i <your changed files>` for CMake files.
|
In most cases the `pre-commit` hook takes care of formatting and fixes any issues automatically.
|
||||||
|
To manually format your code, run `pre-commit run clang-format --files <your changed files>` for C++ files, and `pre-commit run cmake-format --files <your changed files>` for CMake files.
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
## Documentation
|
|
||||||
All public namespaces, classes and functions must be covered by doc (`doxygen`) comments. Everything that is not within a nested `impl` namespace is considered public.
|
All public namespaces, classes and functions must be covered by doc (`doxygen`) comments. Everything that is not within a nested `impl` namespace is considered public.
|
||||||
|
|
||||||
> **Note:** Keep in mind that this is enforced by Clio's CI and your build will fail if newly added public code lacks documentation.
|
> **Note:** Keep in mind that this is enforced by Clio's CI and your build will fail if newly added public code lacks documentation.
|
||||||
|
|
||||||
## Avoid
|
### Avoid
|
||||||
* Proliferation of nearly identical code.
|
|
||||||
* Proliferation of new files and classes unless it improves readability or/and compilation time.
|
|
||||||
* Unmanaged memory allocation and raw pointers.
|
|
||||||
* Macros (unless they add significant value.)
|
|
||||||
* Lambda patterns (unless these add significant value.)
|
|
||||||
* CPU or architecture-specific code unless there is a good reason to include it, and where it is used guard it with macros and provide explanatory comments.
|
|
||||||
* Importing new libraries unless there is a very good reason to do so.
|
|
||||||
|
|
||||||
## Seek to
|
- Proliferation of nearly identical code.
|
||||||
* Extend functionality of existing code rather than creating new code.
|
- Proliferation of new files and classes unless it improves readability or/and compilation time.
|
||||||
* Prefer readability over terseness where important logic is concerned.
|
- Unmanaged memory allocation and raw pointers.
|
||||||
* Inline functions that are not used or are not likely to be used elsewhere in the codebase.
|
- Macros (unless they add significant value.)
|
||||||
* Use clear and self-explanatory names for functions, variables, structs and classes.
|
- Lambda patterns (unless these add significant value.)
|
||||||
* Use TitleCase for classes, structs and filenames, camelCase for function and variable names, lower case for namespaces and folders.
|
- CPU or architecture-specific code unless there is a good reason to include it, and where it is used guard it with macros and provide explanatory comments.
|
||||||
* Provide as many comments as you feel that a competent programmer would need to understand what your code does.
|
- Importing new libraries unless there is a very good reason to do so.
|
||||||
|
|
||||||
|
### Seek to
|
||||||
|
|
||||||
|
- Extend functionality of existing code rather than creating new code.
|
||||||
|
- Prefer readability over terseness where important logic is concerned.
|
||||||
|
- Inline functions that are not used or are not likely to be used elsewhere in the codebase.
|
||||||
|
- Use clear and self-explanatory names for functions, variables, structs and classes.
|
||||||
|
- Use TitleCase for classes, structs and filenames, camelCase for function and variable names, lower case for namespaces and folders.
|
||||||
|
- Provide as many comments as you feel that a competent programmer would need to understand what your code does.
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
# Maintainers
|
|
||||||
Maintainers are ecosystem participants with elevated access to the repository. They are able to push new code, make decisions on when a release should be made, etc.
|
Maintainers are ecosystem participants with elevated access to the repository. They are able to push new code, make decisions on when a release should be made, etc.
|
||||||
|
|
||||||
## Code Review
|
### Code Review
|
||||||
|
|
||||||
A PR must be reviewed and approved by at least one of the maintainers before it can be merged.
|
A PR must be reviewed and approved by at least one of the maintainers before it can be merged.
|
||||||
|
|
||||||
## Adding and Removing
|
### Adding and Removing
|
||||||
|
|
||||||
New maintainers can be proposed by two existing maintainers, subject to a vote by a quorum of the existing maintainers. A minimum of 50% support and a 50% participation is required. In the event of a tie vote, the addition of the new maintainer will be rejected.
|
New maintainers can be proposed by two existing maintainers, subject to a vote by a quorum of the existing maintainers. A minimum of 50% support and a 50% participation is required. In the event of a tie vote, the addition of the new maintainer will be rejected.
|
||||||
|
|
||||||
Existing maintainers can resign, or be subject to a vote for removal at the behest of two existing maintainers. A minimum of 60% agreement and 50% participation are required. The XRP Ledger Foundation will have the ability, for cause, to remove an existing maintainer without a vote.
|
Existing maintainers can resign, or be subject to a vote for removal at the behest of two existing maintainers. A minimum of 60% agreement and 50% participation are required. The XRP Ledger Foundation will have the ability, for cause, to remove an existing maintainer without a vote.
|
||||||
|
|
||||||
## Existing Maintainers
|
### Existing Maintainers
|
||||||
|
|
||||||
* [cindyyan317](https://github.com/cindyyan317) (Ripple)
|
- [godexsoft](https://github.com/godexsoft) (Ripple)
|
||||||
* [godexsoft](https://github.com/godexsoft) (Ripple)
|
- [kuznetsss](https://github.com/kuznetsss) (Ripple)
|
||||||
* [kuznetsss](https://github.com/kuznetsss) (Ripple)
|
- [legleux](https://github.com/legleux) (Ripple)
|
||||||
* [legleux](https://github.com/legleux) (Ripple)
|
- [PeterChen13579](https://github.com/PeterChen13579) (Ripple)
|
||||||
|
|
||||||
## Honorable ex-Maintainers
|
### Honorable ex-Maintainers
|
||||||
|
|
||||||
* [cjcobb23](https://github.com/cjcobb23) (ex-Ripple)
|
- [cindyyan317](https://github.com/cindyyan317) (ex-Ripple)
|
||||||
* [natenichols](https://github.com/natenichols) (ex-Ripple)
|
- [cjcobb23](https://github.com/cjcobb23) (ex-Ripple)
|
||||||
|
- [natenichols](https://github.com/natenichols) (ex-Ripple)
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
ISC License
|
ISC License
|
||||||
|
|
||||||
Copyright (c) 2022, the clio developers
|
Copyright (c) 2022, the clio developers
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# <img src='./docs/img/xrpl-logo.svg' width='40' valign="top" /> Clio
|
# <img src='./docs/img/xrpl-logo.svg' width='40' valign="top" /> Clio <!-- markdownlint-disable-line MD033 MD045 -->
|
||||||
|
|
||||||
[](https://github.com/XRPLF/clio/actions/workflows/build.yml?query=branch%3Adevelop)
|
[](https://github.com/XRPLF/clio/actions/workflows/build.yml?query=branch%3Adevelop)
|
||||||
[](https://github.com/XRPLF/clio/actions/workflows/nightly.yml?query=branch%3Adevelop)
|
[](https://github.com/XRPLF/clio/actions/workflows/nightly.yml?query=branch%3Adevelop)
|
||||||
@@ -16,9 +16,9 @@ Multiple Clio nodes can share access to the same dataset, which allows for a hig
|
|||||||
Clio offers the full `rippled` API, with the caveat that Clio by default only returns validated data. This means that `ledger_index` defaults to `validated` instead of `current` for all requests. Other non-validated data, such as information about queued transactions, is also not returned.
|
Clio offers the full `rippled` API, with the caveat that Clio by default only returns validated data. This means that `ledger_index` defaults to `validated` instead of `current` for all requests. Other non-validated data, such as information about queued transactions, is also not returned.
|
||||||
|
|
||||||
Clio retrieves data from a designated group of `rippled` nodes instead of connecting to the peer-to-peer network.
|
Clio retrieves data from a designated group of `rippled` nodes instead of connecting to the peer-to-peer network.
|
||||||
For requests that require access to the peer-to-peer network, such as `fee` or `submit`, Clio automatically forwards the request to a `rippled` node and propagates the response back to the client. To access non-validated data for *any* request, simply add `ledger_index: "current"` to the request, and Clio will forward the request to `rippled`.
|
For requests that require access to the peer-to-peer network, such as `fee` or `submit`, Clio automatically forwards the request to a `rippled` node and propagates the response back to the client. To access non-validated data for _any_ request, simply add `ledger_index: "current"` to the request, and Clio will forward the request to `rippled`.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Clio requires access to at least one `rippled` node, which can run on the same machine as Clio or separately.
|
> Clio requires access to at least one `rippled` node, which can run on the same machine as Clio or separately.
|
||||||
|
|
||||||
## 📚 Learn more about Clio
|
## 📚 Learn more about Clio
|
||||||
@@ -28,7 +28,6 @@ Below are some useful docs to learn more about Clio.
|
|||||||
**For Developers**:
|
**For Developers**:
|
||||||
|
|
||||||
- [How to build Clio](./docs/build-clio.md)
|
- [How to build Clio](./docs/build-clio.md)
|
||||||
- [Metrics and static analysis](./docs/metrics-and-static-analysis.md)
|
|
||||||
- [Coverage report](./docs/coverage-report.md)
|
- [Coverage report](./docs/coverage-report.md)
|
||||||
|
|
||||||
**For Operators**:
|
**For Operators**:
|
||||||
@@ -36,10 +35,12 @@ Below are some useful docs to learn more about Clio.
|
|||||||
- [How to configure Clio and rippled](./docs/configure-clio.md)
|
- [How to configure Clio and rippled](./docs/configure-clio.md)
|
||||||
- [How to run Clio](./docs/run-clio.md)
|
- [How to run Clio](./docs/run-clio.md)
|
||||||
- [Logging](./docs/logging.md)
|
- [Logging](./docs/logging.md)
|
||||||
|
- [Troubleshooting guide](./docs/trouble_shooting.md)
|
||||||
|
|
||||||
**General reference material:**
|
**General reference material:**
|
||||||
|
|
||||||
- [API reference](https://xrpl.org/http-websocket-apis.html)
|
- [API reference](https://xrpl.org/http-websocket-apis.html)
|
||||||
|
- [Developer docs](https://xrplf.github.io/clio)
|
||||||
- [Clio documentation](https://xrpl.org/the-clio-server.html#the-clio-server)
|
- [Clio documentation](https://xrpl.org/the-clio-server.html#the-clio-server)
|
||||||
|
|
||||||
## 🆘 Help
|
## 🆘 Help
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ target_sources(
|
|||||||
include(deps/gbench)
|
include(deps/gbench)
|
||||||
|
|
||||||
target_include_directories(clio_benchmark PRIVATE .)
|
target_include_directories(clio_benchmark PRIVATE .)
|
||||||
target_link_libraries(clio_benchmark PUBLIC clio benchmark::benchmark_main)
|
target_link_libraries(clio_benchmark PUBLIC clio_etl benchmark::benchmark_main)
|
||||||
set_target_properties(clio_benchmark PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
set_target_properties(clio_benchmark PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <latch>
|
#include <latch>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <stdexcept>
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@@ -189,11 +188,12 @@ public:
|
|||||||
static auto
|
static auto
|
||||||
generateData()
|
generateData()
|
||||||
{
|
{
|
||||||
constexpr auto TOTAL = 10'000;
|
constexpr auto kTOTAL = 10'000;
|
||||||
std::vector<uint64_t> data;
|
std::vector<uint64_t> data;
|
||||||
data.reserve(TOTAL);
|
data.reserve(kTOTAL);
|
||||||
for (auto i = 0; i < TOTAL; ++i)
|
util::MTRandomGenerator randomGenerator;
|
||||||
data.push_back(util::Random::uniform(1, 100'000'000));
|
for (auto i = 0; i < kTOTAL; ++i)
|
||||||
|
data.push_back(randomGenerator.uniform(1, 100'000'000));
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,7 @@ benchmarkThreads(benchmark::State& state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename CtxType>
|
template <typename CtxType>
|
||||||
void
|
static void
|
||||||
benchmarkExecutionContextBatched(benchmark::State& state)
|
benchmarkExecutionContextBatched(benchmark::State& state)
|
||||||
{
|
{
|
||||||
auto data = generateData();
|
auto data = generateData();
|
||||||
@@ -220,7 +220,7 @@ benchmarkExecutionContextBatched(benchmark::State& state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename CtxType>
|
template <typename CtxType>
|
||||||
void
|
static void
|
||||||
benchmarkAnyExecutionContextBatched(benchmark::State& state)
|
benchmarkAnyExecutionContextBatched(benchmark::State& state)
|
||||||
{
|
{
|
||||||
auto data = generateData();
|
auto data = generateData();
|
||||||
|
|||||||
101
cliff.toml
Normal file
101
cliff.toml
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
# git-cliff ~ default configuration file
|
||||||
|
# https://git-cliff.org/docs/configuration
|
||||||
|
#
|
||||||
|
# Lines starting with "#" are comments.
|
||||||
|
# Configuration options are organized into tables and keys.
|
||||||
|
# See documentation for more information on available options.
|
||||||
|
|
||||||
|
[changelog]
|
||||||
|
# template for the changelog header
|
||||||
|
header = """
|
||||||
|
"""
|
||||||
|
# template for the changelog body
|
||||||
|
# https://keats.github.io/tera/docs/#introduction
|
||||||
|
|
||||||
|
body = """
|
||||||
|
{% if version %}\
|
||||||
|
Version {{ version | trim_start_matches(pat="v") }} of Clio, an XRP Ledger API server optimized for HTTP and WebSocket API calls, is now available.
|
||||||
|
{% else %}\
|
||||||
|
Clio, an XRP Ledger API server optimized for HTTP and WebSocket API calls, is under active development.
|
||||||
|
{% endif %}\
|
||||||
|
|
||||||
|
<!-- Please, remove one of the 2 following lines -->
|
||||||
|
This release adds new features and bug fixes.
|
||||||
|
This release adds bug fixes.
|
||||||
|
\
|
||||||
|
{% if version %}
|
||||||
|
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||||
|
{% else %}
|
||||||
|
## [unreleased]
|
||||||
|
{% endif %}\
|
||||||
|
{% for group, commits in commits | filter(attribute="merge_commit", value=false) | group_by(attribute="group") %}
|
||||||
|
### {{ group | striptags | trim | upper_first }}
|
||||||
|
{% for commit in commits %}
|
||||||
|
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
||||||
|
{% if commit.breaking %}[**breaking**] {% endif %}\
|
||||||
|
{{ commit.message | upper_first }}{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}\
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}\n
|
||||||
|
"""
|
||||||
|
# template for the changelog footer
|
||||||
|
footer = """
|
||||||
|
<!-- generated by git-cliff -->
|
||||||
|
"""
|
||||||
|
# remove the leading and trailing s
|
||||||
|
trim = true
|
||||||
|
# postprocessors
|
||||||
|
postprocessors = [
|
||||||
|
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
|
||||||
|
]
|
||||||
|
# render body even when there are no releases to process
|
||||||
|
# render_always = true
|
||||||
|
# output file path
|
||||||
|
output = "CHANGELOG.md"
|
||||||
|
|
||||||
|
[git]
|
||||||
|
# parse the commits based on https://www.conventionalcommits.org
|
||||||
|
conventional_commits = true
|
||||||
|
# filter out the commits that are not conventional
|
||||||
|
filter_unconventional = true
|
||||||
|
# process each line of a commit as an individual commit
|
||||||
|
split_commits = false
|
||||||
|
# regex for preprocessing the commit messages
|
||||||
|
commit_preprocessors = [
|
||||||
|
# Replace issue numbers
|
||||||
|
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
|
||||||
|
# Check spelling of the commit with https://github.com/crate-ci/typos
|
||||||
|
# If the spelling is incorrect, it will be automatically fixed.
|
||||||
|
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
|
||||||
|
]
|
||||||
|
# regex for parsing and grouping commits
|
||||||
|
commit_parsers = [
|
||||||
|
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
|
||||||
|
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
|
||||||
|
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
|
||||||
|
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
|
||||||
|
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
||||||
|
{ message = "^style.*[Cc]lang-tidy auto fixes", skip = true },
|
||||||
|
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
||||||
|
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
||||||
|
{ message = "^chore\\(release\\): prepare for", skip = true },
|
||||||
|
{ message = "^chore: Commits", skip = true },
|
||||||
|
{ message = "^chore\\(deps.*\\)", skip = true },
|
||||||
|
{ message = "^chore\\(pr\\)", skip = true },
|
||||||
|
{ message = "^chore\\(pull\\)", skip = true },
|
||||||
|
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
|
||||||
|
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
||||||
|
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
|
||||||
|
{ message = ".*", group = "<!-- 10 -->💼 Other" },
|
||||||
|
]
|
||||||
|
# filter out the commits that are not matched by commit parsers
|
||||||
|
filter_commits = false
|
||||||
|
# sort the tags topologically
|
||||||
|
topo_order = false
|
||||||
|
# sort the commits inside sections by oldest/newest order
|
||||||
|
sort_commits = "oldest"
|
||||||
|
|
||||||
|
ignore_tags = "^.*-[b|rc].*"
|
||||||
|
|
||||||
|
[remote.github]
|
||||||
|
owner = "XRPLF"
|
||||||
|
repo = "clio"
|
||||||
@@ -17,25 +17,26 @@
|
|||||||
*/
|
*/
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
#include "main/Build.hpp"
|
#include "util/build/Build.hpp"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Build {
|
namespace util::build {
|
||||||
static constexpr char versionString[] = "@CLIO_VERSION@";
|
|
||||||
|
static constexpr char versionString[] = "@CLIO_VERSION@"; // NOLINT(readability-identifier-naming)
|
||||||
|
|
||||||
std::string const&
|
std::string const&
|
||||||
getClioVersionString()
|
getClioVersionString()
|
||||||
{
|
{
|
||||||
static std::string const value = versionString;
|
static std::string const value = versionString; // NOLINT(readability-identifier-naming)
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string const&
|
std::string const&
|
||||||
getClioFullVersionString()
|
getClioFullVersionString()
|
||||||
{
|
{
|
||||||
static std::string const value = "clio-" + getClioVersionString();
|
static std::string const value = "clio-" + getClioVersionString(); // NOLINT(readability-identifier-naming)
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Build
|
} // namespace util::build
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||||
message(FATAL_ERROR "Clang 14+ required for building clio")
|
message(FATAL_ERROR "Clang 16+ required for building clio")
|
||||||
endif ()
|
endif ()
|
||||||
set(is_clang TRUE)
|
set(is_clang TRUE)
|
||||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
|
||||||
message(FATAL_ERROR "AppleClang 14+ required for building clio")
|
message(FATAL_ERROR "AppleClang 15+ required for building clio")
|
||||||
endif ()
|
endif ()
|
||||||
set(is_appleclang TRUE)
|
set(is_appleclang TRUE)
|
||||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11)
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12)
|
||||||
message(FATAL_ERROR "GCC 11+ required for building clio")
|
message(FATAL_ERROR "GCC 12+ required for building clio")
|
||||||
endif ()
|
endif ()
|
||||||
set(is_gcc TRUE)
|
set(is_gcc TRUE)
|
||||||
else ()
|
else ()
|
||||||
message(FATAL_ERROR "Supported compilers: AppleClang 14+, Clang 14+, GCC 11+")
|
message(FATAL_ERROR "Supported compilers: AppleClang 15+, Clang 16+, GCC 12+")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (san)
|
if (san)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ if (lint)
|
|||||||
endif ()
|
endif ()
|
||||||
message(STATUS "Using clang-tidy from CLIO_CLANG_TIDY_BIN")
|
message(STATUS "Using clang-tidy from CLIO_CLANG_TIDY_BIN")
|
||||||
else ()
|
else ()
|
||||||
find_program(_CLANG_TIDY_BIN NAMES "clang-tidy-17" "clang-tidy" REQUIRED)
|
find_program(_CLANG_TIDY_BIN NAMES "clang-tidy-19" "clang-tidy" REQUIRED)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT _CLANG_TIDY_BIN)
|
if (NOT _CLANG_TIDY_BIN)
|
||||||
|
|||||||
@@ -22,7 +22,11 @@ endif ()
|
|||||||
|
|
||||||
if (NOT (BRANCH MATCHES master OR BRANCH MATCHES release/*)) # for develop and any other branch name
|
if (NOT (BRANCH MATCHES master OR BRANCH MATCHES release/*)) # for develop and any other branch name
|
||||||
# YYYYMMDDHMS-<branch>-<git-rev>
|
# YYYYMMDDHMS-<branch>-<git-rev>
|
||||||
execute_process(COMMAND date +%Y%m%d%H%M%S OUTPUT_VARIABLE DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
set(GIT_COMMAND show -s --date=format:%Y%m%d%H%M%S --format=%cd)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE DATE
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
set(CLIO_VERSION "${DATE}-${BRANCH}-${REV}")
|
set(CLIO_VERSION "${DATE}-${BRANCH}-${REV}")
|
||||||
set(DOC_CLIO_VERSION "develop")
|
set(DOC_CLIO_VERSION "develop")
|
||||||
else ()
|
else ()
|
||||||
@@ -31,7 +35,7 @@ else ()
|
|||||||
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE CLIO_TAG_VERSION
|
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE CLIO_TAG_VERSION
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
set(CLIO_VERSION "${CLIO_TAG_VERSION}-${REV}")
|
set(CLIO_VERSION "${CLIO_TAG_VERSION}")
|
||||||
set(DOC_CLIO_VERSION "${CLIO_TAG_VERSION}")
|
set(DOC_CLIO_VERSION "${CLIO_TAG_VERSION}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@@ -41,4 +45,4 @@ endif ()
|
|||||||
|
|
||||||
message(STATUS "Build version: ${CLIO_VERSION}")
|
message(STATUS "Build version: ${CLIO_VERSION}")
|
||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/Build.cpp.in ${CMAKE_CURRENT_LIST_DIR}/../src/main/impl/Build.cpp)
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/Build.cpp.in ${CMAKE_CURRENT_LIST_DIR}/../src/util/build/Build.cpp)
|
||||||
|
|||||||
@@ -1,25 +1,33 @@
|
|||||||
set(COMPILER_FLAGS
|
set(COMPILER_FLAGS
|
||||||
|
-pedantic
|
||||||
-Wall
|
-Wall
|
||||||
-Wcast-align
|
-Wcast-align
|
||||||
-Wdouble-promotion
|
-Wdouble-promotion
|
||||||
-Wextra
|
|
||||||
-Werror
|
-Werror
|
||||||
|
-Wextra
|
||||||
-Wformat=2
|
-Wformat=2
|
||||||
-Wimplicit-fallthrough
|
-Wimplicit-fallthrough
|
||||||
-Wmisleading-indentation
|
-Wmisleading-indentation
|
||||||
-Wno-narrowing
|
|
||||||
-Wno-deprecated-declarations
|
|
||||||
-Wno-dangling-else
|
-Wno-dangling-else
|
||||||
|
-Wno-deprecated-declarations
|
||||||
|
-Wno-narrowing
|
||||||
-Wno-unused-but-set-variable
|
-Wno-unused-but-set-variable
|
||||||
-Wnon-virtual-dtor
|
-Wnon-virtual-dtor
|
||||||
-Wnull-dereference
|
-Wnull-dereference
|
||||||
-Wold-style-cast
|
-Wold-style-cast
|
||||||
-pedantic
|
|
||||||
-Wpedantic
|
-Wpedantic
|
||||||
|
-Wunreachable-code
|
||||||
-Wunused
|
-Wunused
|
||||||
|
# FIXME: The following bunch are needed for gcc12 atm.
|
||||||
|
-Wno-missing-requires
|
||||||
|
-Wno-restrict
|
||||||
|
-Wno-null-dereference
|
||||||
|
-Wno-maybe-uninitialized
|
||||||
|
-Wno-unknown-warning-option # and this to work with clang
|
||||||
|
# TODO: Address these and others in https://github.com/XRPLF/clio/issues/1273
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: reenable when we change CI #884 if (is_gcc AND NOT lint) list(APPEND COMPILER_FLAGS -Wduplicated-branches
|
# TODO: re-enable when we change CI #884 if (is_gcc AND NOT lint) list(APPEND COMPILER_FLAGS -Wduplicated-branches
|
||||||
# -Wduplicated-cond -Wlogical-op -Wuseless-cast ) endif ()
|
# -Wduplicated-cond -Wlogical-op -Wuseless-cast ) endif ()
|
||||||
|
|
||||||
if (is_clang)
|
if (is_clang)
|
||||||
@@ -32,7 +40,43 @@ if (is_appleclang)
|
|||||||
list(APPEND COMPILER_FLAGS -Wreorder-init-list)
|
list(APPEND COMPILER_FLAGS -Wreorder-init-list)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (san)
|
||||||
|
# When building with sanitizers some compilers will actually produce extra warnings/errors. We don't want this yet, at
|
||||||
|
# least not until we have fixed all runtime issues reported by the sanitizers. Once that is done we can start removing
|
||||||
|
# some of these and trying to fix it in our codebase. We can never remove all of below because most of them are
|
||||||
|
# reported from deep inside libraries like boost or libxrpl.
|
||||||
|
#
|
||||||
|
# TODO: Address in https://github.com/XRPLF/clio/issues/1885
|
||||||
|
list(
|
||||||
|
APPEND
|
||||||
|
COMPILER_FLAGS
|
||||||
|
-Wno-error=tsan # Disables treating TSAN warnings as errors
|
||||||
|
-Wno-tsan # Disables TSAN warnings (thread-safety analysis)
|
||||||
|
-Wno-uninitialized # Disables warnings about uninitialized variables (AddressSanitizer, UndefinedBehaviorSanitizer,
|
||||||
|
# etc.)
|
||||||
|
-Wno-stringop-overflow # Disables warnings about potential string operation overflows (AddressSanitizer)
|
||||||
|
-Wno-unsafe-buffer-usage # Disables warnings about unsafe memory operations (AddressSanitizer)
|
||||||
|
-Wno-frame-larger-than # Disables warnings about stack frame size being too large (AddressSanitizer)
|
||||||
|
-Wno-unused-function # Disables warnings about unused functions (LeakSanitizer, memory-related issues)
|
||||||
|
-Wno-unused-but-set-variable # Disables warnings about unused variables (MemorySanitizer)
|
||||||
|
-Wno-thread-safety-analysis # Disables warnings related to thread safety usage (ThreadSanitizer)
|
||||||
|
-Wno-thread-safety # Disables warnings related to thread safety usage (ThreadSanitizer)
|
||||||
|
-Wno-sign-compare # Disables warnings about signed/unsigned comparison (UndefinedBehaviorSanitizer)
|
||||||
|
-Wno-nonnull # Disables warnings related to null pointer dereferencing (UndefinedBehaviorSanitizer)
|
||||||
|
-Wno-address # Disables warnings about address-related issues (UndefinedBehaviorSanitizer)
|
||||||
|
-Wno-array-bounds # Disables array bounds checks (UndefinedBehaviorSanitizer)
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# See https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#gcc--clang for
|
# See https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#gcc--clang for
|
||||||
# the flags description
|
# the flags description
|
||||||
|
|
||||||
|
if (time_trace)
|
||||||
|
if (is_clang OR is_appleclang)
|
||||||
|
list(APPEND COMPILER_FLAGS -ftime-trace)
|
||||||
|
else ()
|
||||||
|
message(FATAL_ERROR "Clang or AppleClang is required to use `-ftime-trace`")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_compile_options(clio_options INTERFACE ${COMPILER_FLAGS})
|
target_compile_options(clio_options INTERFACE ${COMPILER_FLAGS})
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_LINK)
|
if ("${san}" STREQUAL "")
|
||||||
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_USE_BACKTRACE)
|
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_LINK)
|
||||||
find_package(libbacktrace REQUIRED CONFIG)
|
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_USE_BACKTRACE)
|
||||||
|
find_package(libbacktrace REQUIRED CONFIG)
|
||||||
|
else ()
|
||||||
|
# Some sanitizers (TSAN and ASAN for sure) can't be used with libbacktrace because they have their own backtracing
|
||||||
|
# capabilities and there are conflicts. In any case, this makes sure Clio code knows that backtrace is not available.
|
||||||
|
# See relevant conan profiles for sanitizers where we disable stacktrace in Boost explicitly.
|
||||||
|
target_compile_definitions(clio_options INTERFACE CLIO_WITHOUT_STACKTRACE)
|
||||||
|
message(STATUS "Sanitizer enabled, disabling stacktrace")
|
||||||
|
endif ()
|
||||||
|
|||||||
57
conan.lock
Normal file
57
conan.lock
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"version": "0.5",
|
||||||
|
"requires": [
|
||||||
|
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1750263732.782",
|
||||||
|
"xxhash/0.8.2#7856c968c985b2981b707ee8f2413b2b%1750263730.908",
|
||||||
|
"xrpl/2.5.0-rc1#e5897e048ea5712d2c71561c507d949d%1750263725.455",
|
||||||
|
"sqlite3/3.47.0#7a0904fd061f5f8a2366c294f9387830%1750263721.79",
|
||||||
|
"soci/4.0.3#a9f8d773cd33e356b5879a4b0564f287%1750263717.455",
|
||||||
|
"re2/20230301#dfd6e2bf050eb90ddd8729cfb4c844a4%1750263715.145",
|
||||||
|
"rapidjson/cci.20220822#1b9d8c2256876a154172dc5cfbe447c6%1750263713.526",
|
||||||
|
"protobuf/3.21.12#d927114e28de9f4691a6bbcdd9a529d1%1750263698.841",
|
||||||
|
"openssl/1.1.1v#216374e4fb5b2e0f5ab1fb6f27b5b434%1750263685.885",
|
||||||
|
"nudb/2.0.8#63990d3e517038e04bf529eb8167f69f%1750263683.814",
|
||||||
|
"minizip/1.2.13#9e87d57804bd372d6d1e32b1871517a3%1750263681.745",
|
||||||
|
"lz4/1.10.0#59fc63cac7f10fbe8e05c7e62c2f3504%1750263679.891",
|
||||||
|
"libuv/1.46.0#78565d142ac7102776256328a26cdf60%1750263677.819",
|
||||||
|
"libiconv/1.17#1ae2f60ab5d08de1643a22a81b360c59%1750257497.552",
|
||||||
|
"libbacktrace/cci.20210118#a7691bfccd8caaf66309df196790a5a1%1750263675.748",
|
||||||
|
"libarchive/3.7.6#e0453864b2a4d225f06b3304903cb2b7%1750263671.05",
|
||||||
|
"http_parser/2.9.4#98d91690d6fd021e9e624218a85d9d97%1750263668.751",
|
||||||
|
"gtest/1.14.0#f8f0757a574a8dd747d16af62d6eb1b7%1750263666.833",
|
||||||
|
"grpc/1.50.1#02291451d1e17200293a409410d1c4e1%1750263646.614",
|
||||||
|
"fmt/10.1.1#021e170cf81db57da82b5f737b6906c1%1750263644.741",
|
||||||
|
"date/3.0.3#cf28fe9c0aab99fe12da08aa42df65e1%1750263643.099",
|
||||||
|
"cassandra-cpp-driver/2.17.0#e50919efac8418c26be6671fd702540a%1750263632.157",
|
||||||
|
"c-ares/1.34.5#b78b91e7cfb1f11ce777a285bbf169c6%1750263630.06",
|
||||||
|
"bzip2/1.0.8#00b4a4658791c1f06914e087f0e792f5%1750263627.95",
|
||||||
|
"boost/1.83.0#8eb22f36ddfb61f54bbc412c4555bd66%1750263616.444",
|
||||||
|
"benchmark/1.8.3#1a2ce62c99e2b3feaa57b1f0c15a8c46%1724323740.181",
|
||||||
|
"abseil/20230802.1#f0f91485b111dc9837a68972cb19ca7b%1750263609.776"
|
||||||
|
],
|
||||||
|
"build_requires": [
|
||||||
|
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1750263732.782",
|
||||||
|
"protobuf/3.21.12#d927114e28de9f4691a6bbcdd9a529d1%1750263698.841",
|
||||||
|
"protobuf/3.21.9#64ce20e1d9ea24f3d6c504015d5f6fa8%1750263690.822",
|
||||||
|
"cmake/3.31.6#ed0e6c1d49bd564ce6fed1a19653b86d%1750263636.055",
|
||||||
|
"b2/5.3.2#7b5fabfe7088ae933fb3e78302343ea0%1750263614.565"
|
||||||
|
],
|
||||||
|
"python_requires": [],
|
||||||
|
"overrides": {
|
||||||
|
"boost/1.83.0": [
|
||||||
|
null,
|
||||||
|
"boost/1.83.0#8eb22f36ddfb61f54bbc412c4555bd66"
|
||||||
|
],
|
||||||
|
"protobuf/3.21.9": [
|
||||||
|
null,
|
||||||
|
"protobuf/3.21.12"
|
||||||
|
],
|
||||||
|
"lz4/1.9.4": [
|
||||||
|
"lz4/1.10.0"
|
||||||
|
],
|
||||||
|
"sqlite3/3.44.2": [
|
||||||
|
"sqlite3/3.47.0"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"config_requires": []
|
||||||
|
}
|
||||||
50
conanfile.py
50
conanfile.py
@@ -2,46 +2,54 @@ from conan import ConanFile
|
|||||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
||||||
|
|
||||||
|
|
||||||
class Clio(ConanFile):
|
class ClioConan(ConanFile):
|
||||||
name = 'clio'
|
name = 'clio'
|
||||||
license = 'ISC'
|
license = 'ISC'
|
||||||
author = 'Alex Kremer <akremer@ripple.com>, John Freeman <jfreeman@ripple.com>'
|
author = 'Alex Kremer <akremer@ripple.com>, John Freeman <jfreeman@ripple.com>, Ayaz Salikhov <asalikhov@ripple.com>'
|
||||||
url = 'https://github.com/xrplf/clio'
|
url = 'https://github.com/xrplf/clio'
|
||||||
description = 'Clio RPC server'
|
description = 'Clio RPC server'
|
||||||
settings = 'os', 'compiler', 'build_type', 'arch'
|
settings = 'os', 'compiler', 'build_type', 'arch'
|
||||||
options = {
|
options = {
|
||||||
'fPIC': [True, False],
|
'static': [True, False], # static linkage
|
||||||
'verbose': [True, False],
|
'verbose': [True, False],
|
||||||
'tests': [True, False], # build unit tests; create `clio_tests` binary
|
'tests': [True, False], # build unit tests; create `clio_tests` binary
|
||||||
'benchmark': [True, False], # build benchmarks; create `clio_benchmarks` binary
|
'integration_tests': [True, False], # build integration tests; create `clio_integration_tests` binary
|
||||||
'docs': [True, False], # doxygen API docs; create custom target 'docs'
|
'benchmark': [True, False], # build benchmarks; create `clio_benchmarks` binary
|
||||||
'packaging': [True, False], # create distribution packages
|
'docs': [True, False], # doxygen API docs; create custom target 'docs'
|
||||||
'coverage': [True, False], # build for test coverage report; create custom target `clio_tests-ccov`
|
'packaging': [True, False], # create distribution packages
|
||||||
'lint': [True, False], # run clang-tidy checks during compilation
|
'coverage': [True, False], # build for test coverage report; create custom target `clio_tests-ccov`
|
||||||
|
'lint': [True, False], # run clang-tidy checks during compilation
|
||||||
|
'snapshot': [True, False], # build export/import snapshot tool
|
||||||
|
'time_trace': [True, False] # build using -ftime-trace to create compiler trace reports
|
||||||
}
|
}
|
||||||
|
|
||||||
requires = [
|
requires = [
|
||||||
'boost/1.82.0',
|
'boost/1.83.0',
|
||||||
'cassandra-cpp-driver/2.17.0',
|
'cassandra-cpp-driver/2.17.0',
|
||||||
'fmt/10.1.1',
|
'fmt/10.1.1',
|
||||||
'protobuf/3.21.12',
|
'protobuf/3.21.12',
|
||||||
'grpc/1.50.1',
|
'grpc/1.50.1',
|
||||||
'openssl/1.1.1u',
|
'openssl/1.1.1v',
|
||||||
'xrpl/2.2.0-b1',
|
'xrpl/2.5.0-rc1',
|
||||||
|
'zlib/1.3.1',
|
||||||
'libbacktrace/cci.20210118'
|
'libbacktrace/cci.20210118'
|
||||||
]
|
]
|
||||||
|
|
||||||
default_options = {
|
default_options = {
|
||||||
'fPIC': True,
|
'static': False,
|
||||||
'verbose': False,
|
'verbose': False,
|
||||||
'tests': False,
|
'tests': False,
|
||||||
|
'integration_tests': False,
|
||||||
'benchmark': False,
|
'benchmark': False,
|
||||||
'packaging': False,
|
'packaging': False,
|
||||||
'coverage': False,
|
'coverage': False,
|
||||||
'lint': False,
|
'lint': False,
|
||||||
'docs': False,
|
'docs': False,
|
||||||
|
'snapshot': False,
|
||||||
|
'time_trace': False,
|
||||||
|
|
||||||
'xrpl/*:tests': False,
|
'xrpl/*:tests': False,
|
||||||
|
'xrpl/*:rocksdb': False,
|
||||||
'cassandra-cpp-driver/*:shared': False,
|
'cassandra-cpp-driver/*:shared': False,
|
||||||
'date/*:header_only': True,
|
'date/*:header_only': True,
|
||||||
'grpc/*:shared': False,
|
'grpc/*:shared': False,
|
||||||
@@ -60,7 +68,7 @@ class Clio(ConanFile):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
if self.options.tests:
|
if self.options.tests or self.options.integration_tests:
|
||||||
self.requires('gtest/1.14.0')
|
self.requires('gtest/1.14.0')
|
||||||
if self.options.benchmark:
|
if self.options.benchmark:
|
||||||
self.requires('benchmark/1.8.3')
|
self.requires('benchmark/1.8.3')
|
||||||
@@ -71,20 +79,16 @@ class Clio(ConanFile):
|
|||||||
|
|
||||||
def layout(self):
|
def layout(self):
|
||||||
cmake_layout(self)
|
cmake_layout(self)
|
||||||
# Fix this setting to follow the default introduced in Conan 1.48
|
# Fix this setting to follow the default introduced in Conan 1.48
|
||||||
# to align with our build instructions.
|
# to align with our build instructions.
|
||||||
self.folders.generators = 'build/generators'
|
self.folders.generators = 'build/generators'
|
||||||
|
|
||||||
generators = 'CMakeDeps'
|
generators = 'CMakeDeps'
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
tc = CMakeToolchain(self)
|
tc = CMakeToolchain(self)
|
||||||
tc.variables['verbose'] = self.options.verbose
|
for option_name, option_value in self.options.items():
|
||||||
tc.variables['tests'] = self.options.tests
|
tc.variables[option_name] = option_value
|
||||||
tc.variables['coverage'] = self.options.coverage
|
|
||||||
tc.variables['lint'] = self.options.lint
|
|
||||||
tc.variables['docs'] = self.options.docs
|
|
||||||
tc.variables['packaging'] = self.options.packaging
|
|
||||||
tc.variables['benchmark'] = self.options.benchmark
|
|
||||||
tc.generate()
|
tc.generate()
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
# FROM centos:7 as deps
|
|
||||||
FROM centos:7 as build
|
|
||||||
|
|
||||||
ENV CLIO_DIR=/opt/clio/
|
|
||||||
# ENV OPENSSL_DIR=/opt/openssl
|
|
||||||
|
|
||||||
RUN yum -y install git epel-release centos-release-scl perl-IPC-Cmd openssl
|
|
||||||
RUN yum install -y devtoolset-11
|
|
||||||
ENV version=3.16
|
|
||||||
ENV build=3
|
|
||||||
# RUN curl -OJL https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
|
|
||||||
COPY docker/shared/install_cmake.sh /install_cmake.sh
|
|
||||||
RUN /install_cmake.sh 3.16.3 /usr/local
|
|
||||||
RUN source /opt/rh/devtoolset-11/enable
|
|
||||||
WORKDIR /tmp
|
|
||||||
# RUN mkdir $OPENSSL_DIR && cd $OPENSSL_DIR
|
|
||||||
COPY docker/centos/build_git_centos7.sh build_git_centos7.sh
|
|
||||||
|
|
||||||
RUN ./build_git_centos7.sh
|
|
||||||
RUN git clone https://github.com/openssl/openssl
|
|
||||||
WORKDIR /tmp/openssl
|
|
||||||
RUN git checkout OpenSSL_1_1_1q
|
|
||||||
#--prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic
|
|
||||||
RUN SSLDIR=$(openssl version -d | cut -d: -f2 | tr -d [:space:]\") && ./config -fPIC --prefix=/usr --openssldir=${SSLDIR} zlib shared && \
|
|
||||||
make -j $(nproc) && \
|
|
||||||
make install_sw
|
|
||||||
WORKDIR /tmp
|
|
||||||
# FROM centos:7 as build
|
|
||||||
|
|
||||||
RUN git clone https://github.com/xrplf/clio.git
|
|
||||||
COPY docker/shared/build_boost.sh build_boost.sh
|
|
||||||
ENV OPENSSL_ROOT=/opt/local/openssl
|
|
||||||
ENV BOOST_ROOT=/boost
|
|
||||||
RUN source scl_source enable devtoolset-11 && /tmp/build_boost.sh 1.75.0
|
|
||||||
RUN yum install -y bison flex
|
|
||||||
RUN yum install -y rpmdevtools rpmlint
|
|
||||||
RUN source /opt/rh/devtoolset-11/enable && cd /tmp/clio && \
|
|
||||||
cmake -B build -DBUILD_TESTS=1 && \
|
|
||||||
cmake --build build --parallel $(nproc)
|
|
||||||
RUN mkdir output
|
|
||||||
RUN strip clio/build/clio_server && strip clio/build/clio_tests
|
|
||||||
RUN cp clio/build/clio_tests output/ && cp clio/build/clio_server output/
|
|
||||||
RUN cp clio/docs/examples/config/example-config.json output/example-config.json
|
|
||||||
|
|
||||||
FROM centos:7
|
|
||||||
COPY --from=build /tmp/output /clio
|
|
||||||
RUN mkdir -p /opt/clio/etc && mv /clio/docs/examples/config/example-config.json /opt/clio/etc/config.json
|
|
||||||
|
|
||||||
CMD ["/clio/clio_server", "/opt/clio/etc/config.json"]
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
GIT_VERSION="2.37.1"
|
|
||||||
curl -OJL https://github.com/git/git/archive/refs/tags/v${GIT_VERSION}.tar.gz
|
|
||||||
tar zxvf git-${GIT_VERSION}.tar.gz
|
|
||||||
cd git-${GIT_VERSION}
|
|
||||||
|
|
||||||
yum install -y centos-release-scl epel-release
|
|
||||||
yum update -y
|
|
||||||
yum install -y devtoolset-11 autoconf gnu-getopt gettext zlib-devel libcurl-devel
|
|
||||||
|
|
||||||
source /opt/rh/devtoolset-11/enable
|
|
||||||
make configure
|
|
||||||
./configure
|
|
||||||
make git -j$(nproc)
|
|
||||||
make install git
|
|
||||||
git --version | cut -d ' ' -f3
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
CMAKE_VERSION=${1:-"3.16.3"}
|
|
||||||
cd /tmp
|
|
||||||
URL="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz"
|
|
||||||
curl -OJLs $URL
|
|
||||||
tar xzvf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
|
|
||||||
mv cmake-${CMAKE_VERSION}-Linux-x86_64 /opt/
|
|
||||||
ln -s /opt/cmake-${CMAKE_VERSION}-Linux-x86_64/bin/cmake /usr/local/bin/cmake
|
|
||||||
105
docker/ci/Dockerfile
Normal file
105
docker/ci/Dockerfile
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
FROM ghcr.io/xrplf/clio-gcc:12.3.0 AS clio-gcc
|
||||||
|
FROM ghcr.io/xrplf/clio-tools:latest AS clio-tools
|
||||||
|
|
||||||
|
FROM ghcr.io/xrplf/clio-clang:16
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
|
# Using root by default is not very secure but github checkout action doesn't work with any other user
|
||||||
|
# https://github.com/actions/checkout/issues/956
|
||||||
|
# And Github Actions doc recommends using root
|
||||||
|
# https://docs.github.com/en/actions/sharing-automations/creating-actions/dockerfile-support-for-github-actions#user
|
||||||
|
|
||||||
|
# hadolint ignore=DL3002
|
||||||
|
USER root
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
ARG LLVM_TOOLS_VERSION=19
|
||||||
|
|
||||||
|
# Add repositories
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
|
gnupg \
|
||||||
|
wget \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${LLVM_TOOLS_VERSION} main" >> /etc/apt/sources.list \
|
||||||
|
&& wget --progress=dot:giga -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
|
clang-tidy-${LLVM_TOOLS_VERSION} \
|
||||||
|
clang-tools-${LLVM_TOOLS_VERSION} \
|
||||||
|
git \
|
||||||
|
git-lfs \
|
||||||
|
graphviz \
|
||||||
|
jq \
|
||||||
|
make \
|
||||||
|
ninja-build \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
zip \
|
||||||
|
&& pip3 install -q --upgrade --no-cache-dir pip \
|
||||||
|
&& pip3 install -q --no-cache-dir \
|
||||||
|
cmake==3.31.6 \
|
||||||
|
conan==2.17.0 \
|
||||||
|
gcovr \
|
||||||
|
pre-commit \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install gcc-12 and make ldconfig aware of the new libstdc++ location (for gcc)
|
||||||
|
# Note: Clang is using libc++ instead
|
||||||
|
COPY --from=clio-gcc /gcc12.deb /
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
|
binutils \
|
||||||
|
libc6-dev \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& dpkg -i /gcc12.deb \
|
||||||
|
&& rm -rf /gcc12.deb \
|
||||||
|
&& ldconfig
|
||||||
|
|
||||||
|
# Rewire to use gcc-12 as default compiler
|
||||||
|
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-12 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-12 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-12 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-12 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-12 100
|
||||||
|
|
||||||
|
COPY --from=clio-tools \
|
||||||
|
/usr/local/bin/ccache \
|
||||||
|
/usr/local/bin/doxygen \
|
||||||
|
/usr/local/bin/ClangBuildAnalyzer \
|
||||||
|
/usr/local/bin/git-cliff \
|
||||||
|
/usr/local/bin/gh \
|
||||||
|
/usr/local/bin/
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
# Setup conan
|
||||||
|
RUN conan remote add --index 0 ripple http://18.143.149.228:8081/artifactory/api/conan/dev
|
||||||
|
|
||||||
|
WORKDIR /root/.conan2
|
||||||
|
COPY conan/global.conf ./global.conf
|
||||||
|
|
||||||
|
WORKDIR /root/.conan2/profiles
|
||||||
|
|
||||||
|
COPY conan/clang.profile ./clang
|
||||||
|
COPY conan/sanitizer_template.profile ./clang.asan
|
||||||
|
COPY conan/sanitizer_template.profile ./clang.tsan
|
||||||
|
COPY conan/sanitizer_template.profile ./clang.ubsan
|
||||||
|
|
||||||
|
COPY conan/gcc.profile ./gcc
|
||||||
|
COPY conan/sanitizer_template.profile ./gcc.asan
|
||||||
|
COPY conan/sanitizer_template.profile ./gcc.tsan
|
||||||
|
COPY conan/sanitizer_template.profile ./gcc.ubsan
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
21
docker/ci/README.md
Normal file
21
docker/ci/README.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# CI image for XRPLF/clio
|
||||||
|
|
||||||
|
This image contains an environment to build [Clio](https://github.com/XRPLF/clio), check code and documentation.
|
||||||
|
It is used in [Clio Github Actions](https://github.com/XRPLF/clio/actions) but can also be used to compile Clio locally.
|
||||||
|
|
||||||
|
The image is based on Ubuntu 20.04 and contains:
|
||||||
|
|
||||||
|
- ccache 4.11.3
|
||||||
|
- clang 16.0.6
|
||||||
|
- ClangBuildAnalyzer 1.6.0
|
||||||
|
- conan 2.17.0
|
||||||
|
- doxygen 1.12
|
||||||
|
- gcc 12.3.0
|
||||||
|
- gh 2.74
|
||||||
|
- git-cliff 2.9.1
|
||||||
|
- and some other useful tools
|
||||||
|
|
||||||
|
Conan is set up to build Clio without any additional steps.
|
||||||
|
There are two preset conan profiles: `clang` and `gcc` to use corresponding compiler.
|
||||||
|
`ASan`, `TSan` and `UBSan` sanitizer builds are enabled via conan profiles for each of the supported compilers.
|
||||||
|
These can be selected using the following pattern (all lowercase): `[compiler].[sanitizer]` (e.g. `--profile:all gcc.tsan`).
|
||||||
11
docker/ci/conan/clang.profile
Normal file
11
docker/ci/conan/clang.profile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[settings]
|
||||||
|
arch={{detect_api.detect_arch()}}
|
||||||
|
build_type=Release
|
||||||
|
compiler=clang
|
||||||
|
compiler.cppstd=20
|
||||||
|
compiler.libcxx=libc++
|
||||||
|
compiler.version=16
|
||||||
|
os=Linux
|
||||||
|
|
||||||
|
[conf]
|
||||||
|
tools.build:compiler_executables={'c': '/usr/bin/clang-16', 'cpp': '/usr/bin/clang++-16'}
|
||||||
11
docker/ci/conan/gcc.profile
Normal file
11
docker/ci/conan/gcc.profile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[settings]
|
||||||
|
arch={{detect_api.detect_arch()}}
|
||||||
|
build_type=Release
|
||||||
|
compiler=gcc
|
||||||
|
compiler.cppstd=20
|
||||||
|
compiler.libcxx=libstdc++11
|
||||||
|
compiler.version=12
|
||||||
|
os=Linux
|
||||||
|
|
||||||
|
[conf]
|
||||||
|
tools.build:compiler_executables={'c': '/usr/bin/gcc-12', 'cpp': '/usr/bin/g++-12'}
|
||||||
3
docker/ci/conan/global.conf
Normal file
3
docker/ci/conan/global.conf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
core.download:parallel={{os.cpu_count()}}
|
||||||
|
core.upload:parallel={{os.cpu_count()}}
|
||||||
|
tools.info.package_id:confs = ["tools.build:cflags", "tools.build:cxxflags", "tools.build:exelinkflags", "tools.build:sharedlinkflags"]
|
||||||
20
docker/ci/conan/sanitizer_template.profile
Normal file
20
docker/ci/conan/sanitizer_template.profile
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{% set compiler, sani = profile_name.split('.') %}
|
||||||
|
|
||||||
|
{% set sanitizer_opt_map = {'asan': 'address', 'tsan': 'thread', 'ubsan': 'undefined'} %}
|
||||||
|
{% set sanitizer = sanitizer_opt_map[sani] %}
|
||||||
|
{% set sanitizer_build_flags_str = "-fsanitize=" ~ sanitizer ~ " -g -O1 -fno-omit-frame-pointer" %}
|
||||||
|
{% set sanitizer_build_flags = sanitizer_build_flags_str.split(' ') %}
|
||||||
|
{% set sanitizer_link_flags_str = "-fsanitize=" ~ sanitizer %}
|
||||||
|
{% set sanitizer_link_flags = sanitizer_link_flags_str.split(' ') %}
|
||||||
|
|
||||||
|
include({{ compiler }})
|
||||||
|
|
||||||
|
[options]
|
||||||
|
boost/*:extra_b2_flags = "cxxflags=\"{{ sanitizer_build_flags_str }}\" linkflags=\"{{ sanitizer_link_flags_str }}\""
|
||||||
|
boost/*:without_stacktrace = True
|
||||||
|
|
||||||
|
[conf]
|
||||||
|
tools.build:cflags += {{ sanitizer_build_flags }}
|
||||||
|
tools.build:cxxflags += {{ sanitizer_build_flags }}
|
||||||
|
tools.build:exelinkflags += {{ sanitizer_link_flags }}
|
||||||
|
tools.build:sharedlinkflags += {{ sanitizer_link_flags }}
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
FROM ubuntu:focal
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
ARG TARGETARCH
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
|
||||||
USER root
|
|
||||||
WORKDIR /root/
|
|
||||||
|
|
||||||
ENV GCC_VERSION=11 \
|
|
||||||
CCACHE_VERSION=4.8.3 \
|
|
||||||
LLVM_TOOLS_VERSION=17 \
|
|
||||||
GH_VERSION=2.40.0 \
|
|
||||||
DOXYGEN_VERSION=1.10.0
|
|
||||||
|
|
||||||
# Add repositories
|
|
||||||
RUN apt-get -qq update \
|
|
||||||
&& apt-get -qq install -y --no-install-recommends --no-install-suggests gnupg wget curl software-properties-common \
|
|
||||||
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
|
|
||||||
&& wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - \
|
|
||||||
&& apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' \
|
|
||||||
&& echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${LLVM_TOOLS_VERSION} main" >> /etc/apt/sources.list \
|
|
||||||
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
|
||||||
|
|
||||||
# Install packages
|
|
||||||
RUN apt update -qq \
|
|
||||||
&& apt install -y --no-install-recommends --no-install-suggests cmake python3 python3-pip sudo git \
|
|
||||||
ninja-build make pkg-config libzstd-dev libzstd1 g++-${GCC_VERSION} flex bison jq graphviz \
|
|
||||||
clang-format-${LLVM_TOOLS_VERSION} clang-tidy-${LLVM_TOOLS_VERSION} clang-tools-${LLVM_TOOLS_VERSION} \
|
|
||||||
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} 100 \
|
|
||||||
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-${GCC_VERSION} 100 \
|
|
||||||
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 100 \
|
|
||||||
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${GCC_VERSION} 100 \
|
|
||||||
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-${GCC_VERSION} 100 \
|
|
||||||
&& update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-${GCC_VERSION} 100 \
|
|
||||||
&& update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-${GCC_VERSION} 100 \
|
|
||||||
&& update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${LLVM_TOOLS_VERSION} 100 \
|
|
||||||
&& apt-get clean && apt remove -y software-properties-common \
|
|
||||||
&& pip3 install -q --upgrade --no-cache-dir pip \
|
|
||||||
&& pip3 install -q --no-cache-dir conan==1.62 gcovr cmake-format
|
|
||||||
|
|
||||||
WORKDIR /tmp
|
|
||||||
|
|
||||||
# Install ccache from source
|
|
||||||
RUN wget "https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz" \
|
|
||||||
&& tar xf "ccache-${CCACHE_VERSION}.tar.gz" \
|
|
||||||
&& cd "ccache-${CCACHE_VERSION}" \
|
|
||||||
&& mkdir build && cd build \
|
|
||||||
&& cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. \
|
|
||||||
&& cmake --build . --target install
|
|
||||||
|
|
||||||
# Install doxygen from sounce
|
|
||||||
RUN wget "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.src.tar.gz" \
|
|
||||||
&& tar xf "doxygen-${DOXYGEN_VERSION}.src.tar.gz" \
|
|
||||||
&& cd "doxygen-${DOXYGEN_VERSION}" \
|
|
||||||
&& mkdir build && cd build \
|
|
||||||
&& cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. \
|
|
||||||
&& cmake --build . --target install
|
|
||||||
|
|
||||||
# Install gh
|
|
||||||
RUN wget https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${TARGETARCH}.tar.gz \
|
|
||||||
&& tar xf gh_${GH_VERSION}_linux_${TARGETARCH}.tar.gz \
|
|
||||||
&& mv gh_${GH_VERSION}_linux_${TARGETARCH}/bin/gh /usr/bin/gh
|
|
||||||
|
|
||||||
# Clean up
|
|
||||||
RUN rm -rf /tmp/* /var/tmp/*
|
|
||||||
|
|
||||||
WORKDIR /root/
|
|
||||||
# Using root by default is not very secure but github checkout action doesn't work with any other user
|
|
||||||
# https://github.com/actions/checkout/issues/956
|
|
||||||
# And Github Actions doc recommends using root
|
|
||||||
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
|
|
||||||
|
|
||||||
# Setup conan
|
|
||||||
RUN conan profile new default --detect \
|
|
||||||
&& conan profile update settings.compiler.cppstd=20 default \
|
|
||||||
&& conan profile update settings.compiler.libcxx=libstdc++11 default \
|
|
||||||
&& conan remote add --insert 0 conan-non-prod http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
|
|
||||||
|
|
||||||
19
docker/clio/Dockerfile
Normal file
19
docker/clio/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
COPY ./clio_server /opt/clio/bin/clio_server
|
||||||
|
|
||||||
|
RUN ln -s /opt/clio/bin/clio_server /usr/local/bin/clio_server \
|
||||||
|
&& mkdir -p /opt/clio/etc/ \
|
||||||
|
&& mkdir -p /opt/clio/log/ \
|
||||||
|
&& groupadd -g 10001 clio \
|
||||||
|
&& useradd -u 10000 -g 10001 -s /bin/bash clio \
|
||||||
|
&& chown clio:clio /opt/clio/log \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
|
libatomic1 \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
USER clio
|
||||||
|
ENTRYPOINT ["/opt/clio/bin/clio_server"]
|
||||||
|
CMD ["--conf", "/opt/clio/etc/config.json"]
|
||||||
25
docker/clio/README.md
Normal file
25
docker/clio/README.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Clio official docker image
|
||||||
|
|
||||||
|
[Clio](https://github.com/XRPLF/clio) is an XRP Ledger API server optimized for RPC calls over WebSocket or JSON-RPC.
|
||||||
|
It stores validated historical ledger and transaction data in a space efficient format.
|
||||||
|
|
||||||
|
This image contains `clio_server` binary allowing users to run Clio easily.
|
||||||
|
|
||||||
|
## Clio configuration file
|
||||||
|
|
||||||
|
Please note that while Clio requires a configuration file, this image doesn't include any default config.
|
||||||
|
Your configuration file should be mounted under the path `/opt/clio/etc/config.json`.
|
||||||
|
Clio repository provides an [example](https://github.com/XRPLF/clio/blob/develop/docs/examples/config/example-config.json) of the configuration file.
|
||||||
|
|
||||||
|
Config file recommendations:
|
||||||
|
|
||||||
|
- Set `log_to_console` to `false` if you want to avoid logs being written to `stdout`.
|
||||||
|
- Set `log_directory` to `/opt/clio/log` to store logs in a volume.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
The following command can be used to run Clio in docker (assuming server's port is `51233` in your config):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d -v <path to your config.json>:/opt/clio/etc/config.json -v <path to store logs>:/opt/clio/log -p 51233:51233 rippleci/clio
|
||||||
|
```
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -exu
|
|
||||||
|
|
||||||
#yum install wget lz4 lz4-devel git llvm13-static.x86_64 llvm13-devel.x86_64 devtoolset-11-binutils zlib-static
|
|
||||||
# it's either those or link=static that halves the failures. probably link=static
|
|
||||||
BOOST_VERSION=$1
|
|
||||||
BOOST_VERSION_=$(echo ${BOOST_VERSION} | tr . _)
|
|
||||||
echo "BOOST_VERSION: ${BOOST_VERSION}"
|
|
||||||
echo "BOOST_VERSION_: ${BOOST_VERSION_}"
|
|
||||||
curl -OJLs "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_}.tar.gz"
|
|
||||||
tar zxf "boost_${BOOST_VERSION_}.tar.gz"
|
|
||||||
cd boost_${BOOST_VERSION_} && ./bootstrap.sh && ./b2 --without-python link=static -j$(nproc)
|
|
||||||
mkdir -p /boost && mv boost /boost && mv stage /boost
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
GIT_VERSION="2.37.1"
|
|
||||||
curl -OJL https://github.com/git/git/archive/refs/tags/v${GIT_VERSION}.tar.gz
|
|
||||||
tar zxvf git-${GIT_VERSION}.tar.gz
|
|
||||||
cd git-${GIT_VERSION}
|
|
||||||
|
|
||||||
yum install -y centos-release-scl epel-release
|
|
||||||
yum update -y
|
|
||||||
yum install -y devtoolset-11 autoconf gnu-getopt gettext zlib-devel libcurl-devel
|
|
||||||
|
|
||||||
source /opt/rh/devtoolset-11/enable
|
|
||||||
make configure
|
|
||||||
./configure
|
|
||||||
make git -j$(nproc)
|
|
||||||
make install git
|
|
||||||
git --version | cut -d ' ' -f3
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
FROM centos:7
|
|
||||||
|
|
||||||
ENV CLIO_DIR=/opt/clio/
|
|
||||||
# ENV OPENSSL_DIR=/opt/openssl
|
|
||||||
|
|
||||||
RUN yum -y install git epel-release centos-release-scl perl-IPC-Cmd openssl
|
|
||||||
RUN yum install -y devtoolset-11
|
|
||||||
ENV version=3.16
|
|
||||||
ENV build=3
|
|
||||||
# RUN curl -OJL https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
|
|
||||||
COPY install_cmake.sh /install_cmake.sh
|
|
||||||
RUN /install_cmake.sh 3.16.3 /usr/local
|
|
||||||
RUN source /opt/rh/devtoolset-11/enable
|
|
||||||
WORKDIR /tmp
|
|
||||||
# RUN mkdir $OPENSSL_DIR && cd $OPENSSL_DIR
|
|
||||||
COPY build_git_centos7.sh build_git_centos7.sh
|
|
||||||
|
|
||||||
RUN ./build_git_centos7.sh
|
|
||||||
RUN git clone https://github.com/openssl/openssl
|
|
||||||
WORKDIR /tmp/openssl
|
|
||||||
RUN git checkout OpenSSL_1_1_1q
|
|
||||||
#--prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic
|
|
||||||
RUN SSLDIR=$(openssl version -d | cut -d: -f2 | tr -d [:space:]\") && ./config -fPIC --prefix=/usr --openssldir=${SSLDIR} zlib shared && \
|
|
||||||
make -j $(nproc) && \
|
|
||||||
make install_sw
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN git clone https://github.com/xrplf/clio.git
|
|
||||||
COPY build_boost.sh build_boost.sh
|
|
||||||
ENV OPENSSL_ROOT=/opt/local/openssl
|
|
||||||
ENV BOOST_ROOT=/boost
|
|
||||||
RUN source scl_source enable devtoolset-11 && /tmp/build_boost.sh 1.75.0
|
|
||||||
RUN yum install -y bison flex
|
|
||||||
RUN source /opt/rh/devtoolset-11/enable && \
|
|
||||||
cd /tmp/clio && cmake -B build -Dtests=0 -Dlocal_libarchive=1 -Dunity=0 -DBUILD_TESTS=0 && cmake --build build --parallel $(nproc)
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
CMAKE_VERSION=${1:-"3.16.3"}
|
|
||||||
cd /tmp
|
|
||||||
URL="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz"
|
|
||||||
curl -OJLs $URL
|
|
||||||
tar xzvf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
|
|
||||||
mv cmake-${CMAKE_VERSION}-Linux-x86_64 /opt/
|
|
||||||
ln -s /opt/cmake-${CMAKE_VERSION}-Linux-x86_64/bin/cmake /usr/local/bin/cmake
|
|
||||||
30
docker/compilers/clang/Dockerfile
Normal file
30
docker/compilers/clang/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
|
# hadolint ignore=DL3002
|
||||||
|
USER root
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
ARG CLANG_VERSION=16
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
|
wget \
|
||||||
|
software-properties-common \
|
||||||
|
gnupg \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN wget --progress=dot:giga https://apt.llvm.org/llvm.sh \
|
||||||
|
&& chmod +x llvm.sh \
|
||||||
|
&& ./llvm.sh ${CLANG_VERSION} \
|
||||||
|
&& rm -rf llvm.sh \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
|
libc++-${CLANG_VERSION}-dev \
|
||||||
|
libc++abi-${CLANG_VERSION}-dev \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
3
docker/compilers/clang/README.md
Normal file
3
docker/compilers/clang/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Clang compiler
|
||||||
|
|
||||||
|
This image contains clang compiler to build <https://github.com/XRPLF/clio>.
|
||||||
118
docker/compilers/gcc/Dockerfile
Normal file
118
docker/compilers/gcc/Dockerfile
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
ARG UBUNTU_VERSION=20.04
|
||||||
|
|
||||||
|
ARG GCC_MAJOR_VERSION=12
|
||||||
|
|
||||||
|
FROM ubuntu:$UBUNTU_VERSION AS build
|
||||||
|
|
||||||
|
ARG UBUNTU_VERSION
|
||||||
|
|
||||||
|
ARG GCC_MAJOR_VERSION
|
||||||
|
ARG GCC_MINOR_VERSION=3
|
||||||
|
ARG GCC_PATCH_VERSION=0
|
||||||
|
ARG GCC_VERSION=${GCC_MAJOR_VERSION}.${GCC_MINOR_VERSION}.${GCC_PATCH_VERSION}
|
||||||
|
ARG BUILD_VERSION=6
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
|
build-essential \
|
||||||
|
file \
|
||||||
|
flex \
|
||||||
|
libz-dev \
|
||||||
|
libzstd-dev \
|
||||||
|
software-properties-common \
|
||||||
|
wget \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
RUN wget --progress=dot:giga https://gcc.gnu.org/pub/gcc/releases/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.gz \
|
||||||
|
&& tar xf gcc-$GCC_VERSION.tar.gz
|
||||||
|
|
||||||
|
WORKDIR /gcc-$GCC_VERSION
|
||||||
|
RUN ./contrib/download_prerequisites
|
||||||
|
|
||||||
|
RUN mkdir /gcc-build
|
||||||
|
WORKDIR /gcc-build
|
||||||
|
RUN /gcc-$GCC_VERSION/configure \
|
||||||
|
--with-pkgversion="clio-build-$BUILD_VERSION https://github.com/XRPLF/clio" \
|
||||||
|
--enable-languages=c,c++ \
|
||||||
|
--prefix=/usr \
|
||||||
|
--with-gcc-major-version-only \
|
||||||
|
--program-suffix=-${GCC_MAJOR_VERSION} \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-linker-build-id \
|
||||||
|
--libexecdir=/usr/lib \
|
||||||
|
--without-included-gettext \
|
||||||
|
--enable-threads=posix \
|
||||||
|
--libdir=/usr/lib \
|
||||||
|
--disable-nls \
|
||||||
|
--enable-clocale=gnu \
|
||||||
|
--enable-libstdcxx-backtrace=yes \
|
||||||
|
--enable-libstdcxx-debug \
|
||||||
|
--enable-libstdcxx-time=yes \
|
||||||
|
--with-default-libstdcxx-abi=new \
|
||||||
|
--enable-gnu-unique-object \
|
||||||
|
--disable-vtable-verify \
|
||||||
|
--enable-plugin \
|
||||||
|
--enable-default-pie \
|
||||||
|
--with-system-zlib \
|
||||||
|
--enable-libphobos-checking=release \
|
||||||
|
--with-target-system-zlib=auto \
|
||||||
|
--disable-werror \
|
||||||
|
--enable-cet \
|
||||||
|
--disable-multilib \
|
||||||
|
--without-cuda-driver \
|
||||||
|
--enable-checking=release
|
||||||
|
|
||||||
|
RUN make -j "$(nproc)"
|
||||||
|
|
||||||
|
RUN make install-strip DESTDIR=/gcc-$GCC_VERSION-$BUILD_VERSION-ubuntu-$UBUNTU_VERSION \
|
||||||
|
&& mkdir -p /gcc-$GCC_VERSION-$BUILD_VERSION-ubuntu-$UBUNTU_VERSION/usr/share/gdb/auto-load/usr/lib64 \
|
||||||
|
&& mv \
|
||||||
|
/gcc-$GCC_VERSION-$BUILD_VERSION-ubuntu-$UBUNTU_VERSION/usr/lib64/libstdc++.so.6.0.30-gdb.py \
|
||||||
|
/gcc-$GCC_VERSION-$BUILD_VERSION-ubuntu-$UBUNTU_VERSION/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.30-gdb.py
|
||||||
|
|
||||||
|
# Generate deb
|
||||||
|
WORKDIR /
|
||||||
|
COPY control.m4 /
|
||||||
|
COPY ld.so.conf /gcc-$GCC_VERSION-$BUILD_VERSION-ubuntu-$UBUNTU_VERSION/etc/ld.so.conf.d/1-gcc-${GCC_MAJOR_VERSION}.conf
|
||||||
|
|
||||||
|
RUN mkdir /gcc-$GCC_VERSION-$BUILD_VERSION-ubuntu-$UBUNTU_VERSION/DEBIAN \
|
||||||
|
&& m4 \
|
||||||
|
-P \
|
||||||
|
-DUBUNTU_VERSION=$UBUNTU_VERSION \
|
||||||
|
-DVERSION=$GCC_VERSION-$BUILD_VERSION \
|
||||||
|
-DTARGETARCH=$TARGETARCH \
|
||||||
|
control.m4 > /gcc-$GCC_VERSION-$BUILD_VERSION-ubuntu-$UBUNTU_VERSION/DEBIAN/control \
|
||||||
|
&& dpkg-deb \
|
||||||
|
--build \
|
||||||
|
--root-owner-group \
|
||||||
|
/gcc-$GCC_VERSION-$BUILD_VERSION-ubuntu-$UBUNTU_VERSION \
|
||||||
|
/gcc${GCC_MAJOR_VERSION}.deb
|
||||||
|
|
||||||
|
# Create final image
|
||||||
|
FROM ubuntu:$UBUNTU_VERSION
|
||||||
|
|
||||||
|
ARG GCC_MAJOR_VERSION
|
||||||
|
|
||||||
|
COPY --from=build /gcc${GCC_MAJOR_VERSION}.deb /
|
||||||
|
|
||||||
|
# Install gcc-${GCC_MAJOR_VERSION}, but also leave gcc${GCC_MAJOR_VERSION}.deb for others to copy if needed
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
|
binutils \
|
||||||
|
libc6-dev \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& dpkg -i /gcc${GCC_MAJOR_VERSION}.deb
|
||||||
|
|
||||||
|
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCC_MAJOR_VERSION} 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-${GCC_MAJOR_VERSION} 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_MAJOR_VERSION} 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${GCC_MAJOR_VERSION} 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-${GCC_MAJOR_VERSION} 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-${GCC_MAJOR_VERSION} 100 \
|
||||||
|
&& update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-${GCC_MAJOR_VERSION} 100
|
||||||
3
docker/compilers/gcc/README.md
Normal file
3
docker/compilers/gcc/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# GCC compiler
|
||||||
|
|
||||||
|
This image contains GCC compiler to build <https://github.com/XRPLF/clio>.
|
||||||
7
docker/compilers/gcc/control.m4
Normal file
7
docker/compilers/gcc/control.m4
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Package: gcc-12-ubuntu-UBUNTUVERSION
|
||||||
|
Version: VERSION
|
||||||
|
Architecture: TARGETARCH
|
||||||
|
Maintainer: Alex Kremer <akremer@ripple.com>
|
||||||
|
Uploaders: Ayaz Salikhov <asalikhov@ripple.com>
|
||||||
|
Description: GCC VERSION build for ubuntu UBUNTUVERSION
|
||||||
|
Depends: binutils, libc6-dev
|
||||||
2
docker/compilers/gcc/ld.so.conf
Normal file
2
docker/compilers/gcc/ld.so.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Path to the directory containing libstdc++.so.6
|
||||||
|
/usr/lib64
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
version: '3.7'
|
|
||||||
services:
|
services:
|
||||||
clio_develop:
|
clio_develop:
|
||||||
image: rippleci/clio_ci:latest
|
image: ghcr.io/xrplf/clio-ci:latest
|
||||||
volumes:
|
volumes:
|
||||||
- clio_develop_conan_data:/root/.conan/data
|
- clio_develop_conan_data:/root/.conan2/p
|
||||||
- clio_develop_ccache:/root/.ccache
|
- clio_develop_ccache:/root/.ccache
|
||||||
- ../../:/root/clio
|
- ../../:/root/clio
|
||||||
- clio_develop_build:/root/clio/build_docker
|
- clio_develop_build:/root/clio/build_docker
|
||||||
|
|||||||
@@ -59,4 +59,3 @@ case $1 in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -exu
|
|
||||||
|
|
||||||
#yum install wget lz4 lz4-devel git llvm13-static.x86_64 llvm13-devel.x86_64 devtoolset-11-binutils zlib-static
|
|
||||||
# it's either those or link=static that halves the failures. probably link=static
|
|
||||||
BOOST_VERSION=$1
|
|
||||||
BOOST_VERSION_=$(echo ${BOOST_VERSION} | tr . _)
|
|
||||||
echo "BOOST_VERSION: ${BOOST_VERSION}"
|
|
||||||
echo "BOOST_VERSION_: ${BOOST_VERSION_}"
|
|
||||||
curl -OJLs "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_}.tar.gz"
|
|
||||||
tar zxf "boost_${BOOST_VERSION_}.tar.gz"
|
|
||||||
cd boost_${BOOST_VERSION_} && ./bootstrap.sh && ./b2 --without-python link=static -j$(nproc)
|
|
||||||
mkdir -p /boost && mv boost /boost && mv stage /boost
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
CMAKE_VERSION=${1:-"3.16.3"}
|
|
||||||
cd /tmp
|
|
||||||
URL="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz"
|
|
||||||
curl -OJLs $URL
|
|
||||||
tar xzvf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
|
|
||||||
mv cmake-${CMAKE_VERSION}-Linux-x86_64 /opt/
|
|
||||||
ln -s /opt/cmake-${CMAKE_VERSION}-Linux-x86_64/bin/cmake /usr/local/bin/cmake
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
64
docker/tools/Dockerfile
Normal file
64
docker/tools/Dockerfile
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
|
bison \
|
||||||
|
build-essential \
|
||||||
|
cmake \
|
||||||
|
flex \
|
||||||
|
ninja-build \
|
||||||
|
software-properties-common \
|
||||||
|
wget \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /tmp
|
||||||
|
|
||||||
|
ARG CCACHE_VERSION=4.11.3
|
||||||
|
RUN wget --progress=dot:giga "https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz" \
|
||||||
|
&& tar xf "ccache-${CCACHE_VERSION}.tar.gz" \
|
||||||
|
&& cd "ccache-${CCACHE_VERSION}" \
|
||||||
|
&& mkdir build \
|
||||||
|
&& cd build \
|
||||||
|
&& cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=False .. \
|
||||||
|
&& cmake --build . --target install \
|
||||||
|
&& rm -rf /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
ARG DOXYGEN_VERSION=1.12.0
|
||||||
|
RUN wget --progress=dot:giga "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.src.tar.gz" \
|
||||||
|
&& tar xf "doxygen-${DOXYGEN_VERSION}.src.tar.gz" \
|
||||||
|
&& cd "doxygen-${DOXYGEN_VERSION}" \
|
||||||
|
&& mkdir build \
|
||||||
|
&& cd build \
|
||||||
|
&& cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. \
|
||||||
|
&& cmake --build . --target install \
|
||||||
|
&& rm -rf /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
ARG CLANG_BUILD_ANALYZER_VERSION=1.6.0
|
||||||
|
RUN wget --progress=dot:giga "https://github.com/aras-p/ClangBuildAnalyzer/archive/refs/tags/v${CLANG_BUILD_ANALYZER_VERSION}.tar.gz" \
|
||||||
|
&& tar xf "v${CLANG_BUILD_ANALYZER_VERSION}.tar.gz" \
|
||||||
|
&& cd "ClangBuildAnalyzer-${CLANG_BUILD_ANALYZER_VERSION}" \
|
||||||
|
&& mkdir build \
|
||||||
|
&& cd build \
|
||||||
|
&& cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. \
|
||||||
|
&& cmake --build . --target install \
|
||||||
|
&& rm -rf /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
ARG GIT_CLIFF_VERSION=2.9.1
|
||||||
|
RUN wget --progress=dot:giga "https://github.com/orhun/git-cliff/releases/download/v${GIT_CLIFF_VERSION}/git-cliff-${GIT_CLIFF_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
|
||||||
|
&& tar xf git-cliff-${GIT_CLIFF_VERSION}-x86_64-unknown-linux-musl.tar.gz \
|
||||||
|
&& mv git-cliff-${GIT_CLIFF_VERSION}/git-cliff /usr/local/bin/git-cliff \
|
||||||
|
&& rm -rf /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
ARG GH_VERSION=2.74.0
|
||||||
|
RUN wget --progress=dot:giga "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${TARGETARCH}.tar.gz" \
|
||||||
|
&& tar xf gh_${GH_VERSION}_linux_${TARGETARCH}.tar.gz \
|
||||||
|
&& mv gh_${GH_VERSION}_linux_${TARGETARCH}/bin/gh /usr/local/bin/gh \
|
||||||
|
&& rm -rf /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
FROM ubuntu:20.04 AS boost
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y build-essential
|
|
||||||
ARG BOOST_VERSION_=1_75_0
|
|
||||||
ARG BOOST_VERSION=1.75.0
|
|
||||||
COPY docker/shared/build_boost.sh .
|
|
||||||
RUN apt install -y curl
|
|
||||||
RUN ./build_boost.sh ${BOOST_VERSION}
|
|
||||||
ENV BOOST_ROOT=/boost
|
|
||||||
|
|
||||||
FROM ubuntu:20.04 AS build
|
|
||||||
ENV BOOST_ROOT=/boost
|
|
||||||
COPY --from=boost /boost /boost
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
RUN apt-get update && apt-get install --no-install-recommends -y build-essential software-properties-common pkg-config libssl-dev wget curl gpg git zlib1g-dev bison flex autoconf lsb-release
|
|
||||||
RUN apt install -y gpg-agent
|
|
||||||
RUN wget https://apt.llvm.org/llvm.sh
|
|
||||||
RUN chmod +x llvm.sh && ./llvm.sh 14 && ./llvm.sh 15
|
|
||||||
# COPY . /clio
|
|
||||||
## Install cmake
|
|
||||||
ARG CMAKE_VERSION=3.16.3
|
|
||||||
COPY docker/shared/install_cmake.sh .
|
|
||||||
RUN ./install_cmake.sh ${CMAKE_VERSION}
|
|
||||||
ENV PATH="/opt/local/cmake/bin:$PATH"
|
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
cmake_minimum_required(VERSION 3.16.3)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
project(docs)
|
project(docs)
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/ClioVersion.cmake)
|
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/ClioVersion.cmake)
|
||||||
|
|
||||||
|
# cmake-format: off
|
||||||
# Generate `docs` target for doxygen documentation
|
# Generate `docs` target for doxygen documentation
|
||||||
# Note: use `cmake --build . --target docs` from your `build` directory to generate the documentation
|
# Note: use `cmake --build . --target docs` from your `build` directory to generate the documentation
|
||||||
|
# cmake-format: on
|
||||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Docs.cmake)
|
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Docs.cmake)
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ WARNINGS = ${LINT}
|
|||||||
WARN_NO_PARAMDOC = ${LINT}
|
WARN_NO_PARAMDOC = ${LINT}
|
||||||
WARN_IF_INCOMPLETE_DOC = ${LINT}
|
WARN_IF_INCOMPLETE_DOC = ${LINT}
|
||||||
WARN_IF_UNDOCUMENTED = ${LINT}
|
WARN_IF_UNDOCUMENTED = ${LINT}
|
||||||
|
WARN_AS_ERROR = ${WARN_AS_ERROR}
|
||||||
|
|
||||||
GENERATE_LATEX = NO
|
GENERATE_LATEX = NO
|
||||||
GENERATE_HTML = YES
|
GENERATE_HTML = YES
|
||||||
@@ -34,7 +35,7 @@ FULL_SIDEBAR = NO
|
|||||||
HTML_HEADER = ${SOURCE}/docs/doxygen-awesome-theme/header.html
|
HTML_HEADER = ${SOURCE}/docs/doxygen-awesome-theme/header.html
|
||||||
HTML_EXTRA_STYLESHEET = ${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome.css \
|
HTML_EXTRA_STYLESHEET = ${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome.css \
|
||||||
${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome-sidebar-only.css \
|
${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome-sidebar-only.css \
|
||||||
${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome-sidebar-only-darkmode-toggle.css
|
${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome-sidebar-only-darkmode-toggle.css
|
||||||
HTML_EXTRA_FILES = ${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome-darkmode-toggle.js \
|
HTML_EXTRA_FILES = ${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome-darkmode-toggle.js \
|
||||||
${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome-interactive-toc.js
|
${SOURCE}/docs/doxygen-awesome-theme/doxygen-awesome-interactive-toc.js
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user