mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-07 20:55:53 +00:00
Compare commits
686 Commits
1.12
...
bthomee/gi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15997b6683 | ||
|
|
f909d954ee | ||
|
|
673fb06c75 | ||
|
|
e6d3238fb1 | ||
|
|
f28ba57b81 | ||
|
|
f3a2ec1fb2 | ||
|
|
1d42c4f6de | ||
|
|
ada83564d8 | ||
|
|
b18dece145 | ||
|
|
63a08560ca | ||
|
|
8ac8a47c99 | ||
|
|
12c4b5a632 | ||
|
|
25c5e3b17f | ||
|
|
8eb233c2ea | ||
|
|
50fc93f742 | ||
|
|
ab45a8a737 | ||
|
|
dfafb141cc | ||
|
|
4e32d2ed98 | ||
|
|
fa69918124 | ||
|
|
cbbb2b1be0 | ||
|
|
cf2d763fa1 | ||
|
|
2dd1d682ac | ||
|
|
4cb1084c02 | ||
|
|
8d1b3b3994 | ||
|
|
b39d7a6519 | ||
|
|
b0910e359e | ||
|
|
44e027e516 | ||
|
|
a10f42a3aa | ||
|
|
efd4c1b95d | ||
|
|
f8b4f692f1 | ||
|
|
80a3ae6386 | ||
|
|
48d38c1e2c | ||
|
|
553fb5be3b | ||
|
|
efa917d9f3 | ||
|
|
bd3bc917f8 | ||
|
|
ed5d6f3e22 | ||
|
|
a8e4da0b11 | ||
|
|
1dd60242de | ||
|
|
76611c3f46 | ||
|
|
5efaf0c328 | ||
|
|
0aa23933ea | ||
|
|
21f3c12d85 | ||
|
|
7d5ed0cd8d | ||
|
|
d9960d5ba0 | ||
|
|
91fa6b2295 | ||
|
|
76f774e22d | ||
|
|
f4f7618173 | ||
|
|
66f16469f9 | ||
|
|
1845b1c656 | ||
|
|
e192ffe964 | ||
|
|
2bf77cc8f6 | ||
|
|
5e33ca56fd | ||
|
|
7c39c810eb | ||
|
|
a7792ebcae | ||
|
|
83ee3788e1 | ||
|
|
ae719b86d3 | ||
|
|
dd722f8b3f | ||
|
|
30190a5feb | ||
|
|
afb6e0e41b | ||
|
|
5523557226 | ||
|
|
b64707f53b | ||
|
|
0b113f371f | ||
|
|
b4c894c1ba | ||
|
|
92281a4ede | ||
|
|
e80642fc12 | ||
|
|
640ce4988f | ||
|
|
a422855ea7 | ||
|
|
108f90586c | ||
|
|
519d1dbc34 | ||
|
|
3d44758e5a | ||
|
|
97bc94a7f6 | ||
|
|
34619f2504 | ||
|
|
3509de9c5f | ||
|
|
459d0da010 | ||
|
|
8637d606a4 | ||
|
|
8456b8275e | ||
|
|
3c88786bb0 | ||
|
|
46ba8a28fe | ||
|
|
5ecde3cf39 | ||
|
|
620fb26823 | ||
|
|
6b6b213cf5 | ||
|
|
f61086b43c | ||
|
|
176fd2b6e4 | ||
|
|
2df730438d | ||
|
|
5d79bfc531 | ||
|
|
51ef35ab55 | ||
|
|
330a3215bc | ||
|
|
85c2ceacde | ||
|
|
70d5c624e8 | ||
|
|
8e4fda160d | ||
|
|
072b1c442c | ||
|
|
294e03ecf5 | ||
|
|
550f90a75e | ||
|
|
d67dcfe3c4 | ||
|
|
0fd2f715bb | ||
|
|
807462b191 | ||
|
|
19c4226d3d | ||
|
|
d02c306f1e | ||
|
|
cfd26f444c | ||
|
|
2c3024716b | ||
|
|
a12f5de68d | ||
|
|
51c5f2bfc9 | ||
|
|
73ff54143d | ||
|
|
08b136528e | ||
|
|
6b8a589447 | ||
|
|
ffeabc9642 | ||
|
|
3cbdf818a7 | ||
|
|
c46888f8f7 | ||
|
|
2ae65d2fdb | ||
|
|
bd834c87e0 | ||
|
|
dc8b37a524 | ||
|
|
617a895af5 | ||
|
|
1af1048c58 | ||
|
|
f07ba87e51 | ||
|
|
e66558a883 | ||
|
|
510314d344 | ||
|
|
37b951859c | ||
|
|
9494fc9668 | ||
|
|
8d01f35eb9 | ||
|
|
1020a32d76 | ||
|
|
17a2606591 | ||
|
|
ccb9f1e42d | ||
|
|
3e4e9a2ddc | ||
|
|
4caebfbd0e | ||
|
|
37c377a1b6 | ||
|
|
bd182c0a3e | ||
|
|
406c26cc72 | ||
|
|
9bd1ce436a | ||
|
|
f69ad4eff6 | ||
|
|
6fe0599cc2 | ||
|
|
e6f8bc720f | ||
|
|
fbd60fc000 | ||
|
|
61d628d654 | ||
|
|
3d92375d12 | ||
|
|
cdbe70b2a7 | ||
|
|
f6426ca183 | ||
|
|
e5f7a8442d | ||
|
|
e67e0395df | ||
|
|
148f669a25 | ||
|
|
f1eaa6a264 | ||
|
|
da4c8c9550 | ||
|
|
bcde2790a4 | ||
|
|
9ebeb413e4 | ||
|
|
6d40b882a4 | ||
|
|
9fe0a154f1 | ||
|
|
cb52c9af00 | ||
|
|
6bf8338038 | ||
|
|
b0f4174e47 | ||
|
|
3865dde0b8 | ||
|
|
811c980821 | ||
|
|
cf5f65b68e | ||
|
|
c38f2a3f2e | ||
|
|
16c2ff97cc | ||
|
|
32043463a8 | ||
|
|
724e9b1313 | ||
|
|
2e6f00aef2 | ||
|
|
e0b9812fc5 | ||
|
|
e4fdf33158 | ||
|
|
6e814d7ebd | ||
|
|
1e37d00d6c | ||
|
|
87ea3ba65d | ||
|
|
dedf3d3983 | ||
|
|
2df7dcfdeb | ||
|
|
1506e65558 | ||
|
|
808c86663c | ||
|
|
92431a4238 | ||
|
|
285120684c | ||
|
|
77fef8732b | ||
|
|
7775c725f3 | ||
|
|
c61096239c | ||
|
|
c5fe970646 | ||
|
|
c57cd8b23e | ||
|
|
c14ce956ad | ||
|
|
095dc4d9cc | ||
|
|
2e255812ae | ||
|
|
896b8c3b54 | ||
|
|
58dd07bbdf | ||
|
|
b13370ac0d | ||
|
|
f847e3287c | ||
|
|
56c1e078f2 | ||
|
|
afc05659ed | ||
|
|
b04d239926 | ||
|
|
dc1caa41b2 | ||
|
|
ceb0ce5634 | ||
|
|
fb89213d4d | ||
|
|
d8628d481d | ||
|
|
a14551b151 | ||
|
|
de33a6a241 | ||
|
|
28eec6ce1b | ||
|
|
c9a723128a | ||
|
|
da82e52613 | ||
|
|
c9d73b6135 | ||
|
|
b7ed99426b | ||
|
|
97f0747e10 | ||
|
|
abf12db788 | ||
|
|
bdfc376951 | ||
|
|
b40a3684ae | ||
|
|
86ef16dbeb | ||
|
|
39b5031ab5 | ||
|
|
94decc753b | ||
|
|
991891625a | ||
|
|
69314e6832 | ||
|
|
dbeb841b5a | ||
|
|
4eae037fee | ||
|
|
b5a63b39d3 | ||
|
|
6419f9a253 | ||
|
|
31c99caa65 | ||
|
|
d835e97490 | ||
|
|
baf4b8381f | ||
|
|
9b45b6888b | ||
|
|
7179ce9c58 | ||
|
|
921aef9934 | ||
|
|
e7a7bb83c1 | ||
|
|
5c2a3a2779 | ||
|
|
b2960b9e7f | ||
|
|
5713f9782a | ||
|
|
60e340d356 | ||
|
|
80d82c5b2b | ||
|
|
433eeabfa5 | ||
|
|
faa781b71f | ||
|
|
c233df720a | ||
|
|
7ff4f79d30 | ||
|
|
60909655d3 | ||
|
|
03e46cd026 | ||
|
|
e95683a0fb | ||
|
|
13353ae36d | ||
|
|
1a40f18bdd | ||
|
|
90e6380383 | ||
|
|
8bfaa7fe0a | ||
|
|
c9135a63cd | ||
|
|
452263eaa5 | ||
|
|
8aa94ea09a | ||
|
|
258ba71363 | ||
|
|
b8626ea3c6 | ||
|
|
6534757d85 | ||
|
|
8e94ea3154 | ||
|
|
b113190563 | ||
|
|
358b7f50a7 | ||
|
|
f47e2f4e82 | ||
|
|
a7eea9546f | ||
|
|
9874d47d7f | ||
|
|
c2f3e2e263 | ||
|
|
e18f27f5f7 | ||
|
|
df6daf0d8f | ||
|
|
e9d46f0bfc | ||
|
|
42fd74b77b | ||
|
|
c55ea56c5e | ||
|
|
1e01cd34f7 | ||
|
|
e2fa5c1b7c | ||
|
|
fc0984d286 | ||
|
|
8b3dcd41f7 | ||
|
|
8f2f5310e2 | ||
|
|
edb4f0342c | ||
|
|
ea17abb92a | ||
|
|
35a40a8e62 | ||
|
|
d494bf45b2 | ||
|
|
8bf4a5cbff | ||
|
|
58c2c82a30 | ||
|
|
11edaa441d | ||
|
|
a5e953b191 | ||
|
|
506ae12a8c | ||
|
|
0310c5cbe0 | ||
|
|
053e1af7ff | ||
|
|
7e24adbdd0 | ||
|
|
621df422a7 | ||
|
|
0a34b5c691 | ||
|
|
e0bc3dd51f | ||
|
|
dacecd24ba | ||
|
|
05105743e9 | ||
|
|
9e1fe9a85e | ||
|
|
d71ce51901 | ||
|
|
be668ee26d | ||
|
|
cae5294b4e | ||
|
|
cd777f79ef | ||
|
|
8b9e21e3f5 | ||
|
|
2a61aee562 | ||
|
|
40ce8a8833 | ||
|
|
7713ff8c5c | ||
|
|
70371a4344 | ||
|
|
e514de76ed | ||
|
|
dd62cfcc22 | ||
|
|
09690f1b38 | ||
|
|
380ba9f1c1 | ||
|
|
c3e9380fb4 | ||
|
|
e3ebc253fa | ||
|
|
c6c7c84355 | ||
|
|
28f50cb7cf | ||
|
|
3e152fec74 | ||
|
|
2db2791805 | ||
|
|
9ec2d7f8ff | ||
|
|
4a084ce34c | ||
|
|
3502df2174 | ||
|
|
fa1e25abef | ||
|
|
217ba8dd4d | ||
|
|
405f4613d8 | ||
|
|
cba512068b | ||
|
|
1c99ea23d1 | ||
|
|
c4308b216f | ||
|
|
aafd2d8525 | ||
|
|
a574ec6023 | ||
|
|
e429455f4d | ||
|
|
7692eeb9a0 | ||
|
|
a099f5a804 | ||
|
|
ca0bc767fe | ||
|
|
4ba9288935 | ||
|
|
e923ec6d36 | ||
|
|
851d99d99e | ||
|
|
f608e653ca | ||
|
|
72e076b694 | ||
|
|
6cf37c4abe | ||
|
|
fc204773d6 | ||
|
|
2bc5cb240f | ||
|
|
67028d6ea6 | ||
|
|
d22a5057b9 | ||
|
|
75a20194c5 | ||
|
|
7fe81fe62e | ||
|
|
345ddc7234 | ||
|
|
d167d4864f | ||
|
|
bf504912a4 | ||
|
|
a7fb8ae915 | ||
|
|
d9b7a2688f | ||
|
|
c0299dba88 | ||
|
|
c3ecdb4746 | ||
|
|
c17676a9be | ||
|
|
ed8e32cc92 | ||
|
|
2406b28e64 | ||
|
|
2216e5a13f | ||
|
|
5bf3a308d5 | ||
|
|
53ea31c69a | ||
|
|
c1c2b5bf52 | ||
|
|
af018c7b0b | ||
|
|
0a1ca0600f | ||
|
|
cd7c62818b | ||
|
|
37d06bcce8 | ||
|
|
9745718467 | ||
|
|
ab44cc31e2 | ||
|
|
dce3e1efa6 | ||
|
|
159dfb5acb | ||
|
|
844646dc50 | ||
|
|
01fc8f2209 | ||
|
|
43e1d4440e | ||
|
|
466849efe8 | ||
|
|
db0fad6826 | ||
|
|
dd5e6559dd | ||
|
|
7c9d652d9b | ||
|
|
dc9e6c37fe | ||
|
|
01fe9477f4 | ||
|
|
97e3dae6f4 | ||
|
|
e8e7888a23 | ||
|
|
b02b8d016c | ||
|
|
a079bac153 | ||
|
|
3a55a64e1c | ||
|
|
fa5a85439f | ||
|
|
81034596a8 | ||
|
|
0968cdf340 | ||
|
|
d9e4009e33 | ||
|
|
02387fd227 | ||
|
|
fb3713bc25 | ||
|
|
f6d63082c0 | ||
|
|
33e1c42599 | ||
|
|
1b75dc8bcd | ||
|
|
3d02580c09 | ||
|
|
8458233a31 | ||
|
|
cb0ddbf863 | ||
|
|
dcc4581220 | ||
|
|
50b8f19cb5 | ||
|
|
f3e201f983 | ||
|
|
b14c24960b | ||
|
|
b6e3453f49 | ||
|
|
ed4870cdb4 | ||
|
|
5fbee8c824 | ||
|
|
3868c04e99 | ||
|
|
409c1d5aa2 | ||
|
|
20710f5232 | ||
|
|
870882f567 | ||
|
|
e1e67b2c9e | ||
|
|
eac3abdca9 | ||
|
|
ebd8e63276 | ||
|
|
839d17e7bd | ||
|
|
7be5c31bc6 | ||
|
|
9e4a7d5871 | ||
|
|
ff8b9aa439 | ||
|
|
ccc0889803 | ||
|
|
07f118caec | ||
|
|
58af62f388 | ||
|
|
040cd23e4a | ||
|
|
0324764a83 | ||
|
|
679e35fd46 | ||
|
|
49e0d54c76 | ||
|
|
7506852a99 | ||
|
|
bcbfb04992 | ||
|
|
5cd72f2431 | ||
|
|
eabca8439f | ||
|
|
ea1fffeebf | ||
|
|
6d58065909 | ||
|
|
47b0543461 | ||
|
|
8215c605b4 | ||
|
|
d7e949193f | ||
|
|
f64cf9187a | ||
|
|
b54d85d862 | ||
|
|
f419c18056 | ||
|
|
0ec17b6026 | ||
|
|
838978b869 | ||
|
|
8186253707 | ||
|
|
2316d843d7 | ||
|
|
9d58f11a60 | ||
|
|
7b18006193 | ||
|
|
9e48fc0c83 | ||
|
|
8e827e32ac | ||
|
|
c5c0e70e23 | ||
|
|
ec61f5e9d3 | ||
|
|
d57cced17b | ||
|
|
54a350be79 | ||
|
|
d6dbf0e0a6 | ||
|
|
0d887ad815 | ||
|
|
d4a5f8390e | ||
|
|
ab5d450d3c | ||
|
|
23c37fa506 | ||
|
|
63209c2646 | ||
|
|
f0dabd1446 | ||
|
|
552377c76f | ||
|
|
e7cd03325b | ||
|
|
decb3c178e | ||
|
|
f6d647d6c3 | ||
|
|
bf4a7b6ce8 | ||
|
|
8e2c85d14d | ||
|
|
1fbf8da79f | ||
|
|
a75309919e | ||
|
|
0ece395c24 | ||
|
|
b6391fe011 | ||
|
|
9a6af9c431 | ||
|
|
fa1cbb0746 | ||
|
|
68e1be3cf5 | ||
|
|
9abc4868d6 | ||
|
|
23991c99c3 | ||
|
|
cc0177be87 | ||
|
|
37b3e96b04 | ||
|
|
85214bdf81 | ||
|
|
fbbea9e6e2 | ||
|
|
7741483894 | ||
|
|
2f432e812c | ||
|
|
cad8970a57 | ||
|
|
4d7aed84ec | ||
|
|
00ed7c9424 | ||
|
|
d9bd75e683 | ||
|
|
93d8bafb24 | ||
|
|
c19a88fee9 | ||
|
|
0a331ea72e | ||
|
|
7d27b11190 | ||
|
|
eedfec015e | ||
|
|
ffc343a2bc | ||
|
|
e5aa605742 | ||
|
|
8b181ed818 | ||
|
|
f5a349558e | ||
|
|
b9b75ddcf5 | ||
|
|
a39720e94a | ||
|
|
2820feb02a | ||
|
|
8fc805d2e2 | ||
|
|
d54151e7c4 | ||
|
|
21a0a64648 | ||
|
|
20707fac4a | ||
|
|
e6ef0fc26c | ||
|
|
c157816017 | ||
|
|
eba5d19377 | ||
|
|
ad14d09a2b | ||
|
|
f3bcc651c7 | ||
|
|
e8602b81fa | ||
|
|
0f32109993 | ||
|
|
a17ccca615 | ||
|
|
7a1b238035 | ||
|
|
e1534a3200 | ||
|
|
9fec615dca | ||
|
|
ef02893f2f | ||
|
|
7cf4611d7c | ||
|
|
d028005aa6 | ||
|
|
1d23148e6d | ||
|
|
e416ee72ca | ||
|
|
2e902dee53 | ||
|
|
f6879da6c9 | ||
|
|
ae20a3ad3f | ||
|
|
c706926ee3 | ||
|
|
223e6c7590 | ||
|
|
825864032a | ||
|
|
06733ec21a | ||
|
|
9f7c619e4f | ||
|
|
3f5e3212fe | ||
|
|
20d05492d2 | ||
|
|
ae7ea33b75 | ||
|
|
263e984bf4 | ||
|
|
58f3abe3c6 | ||
|
|
d576416953 | ||
|
|
e3d1bb271f | ||
|
|
2df635693d | ||
|
|
40b4adc9cc | ||
|
|
0c971b4415 | ||
|
|
f2d37da4ca | ||
|
|
d5e5c3c220 | ||
|
|
15390bedd5 | ||
|
|
7f6a079aa4 | ||
|
|
2a25f58d40 | ||
|
|
2705109592 | ||
|
|
244ac5e024 | ||
|
|
f4da2e31d9 | ||
|
|
f650949573 | ||
|
|
76128051c0 | ||
|
|
5aa1106ba1 | ||
|
|
dccf3f49ef | ||
|
|
02ec8b7962 | ||
|
|
3f7ce939c8 | ||
|
|
b65cea1984 | ||
|
|
b422e71eed | ||
|
|
e9859ac1b1 | ||
|
|
b84f7e7c10 | ||
|
|
513842b23f | ||
|
|
985c80fbc6 | ||
|
|
35fe957020 | ||
|
|
0eebe6a5f4 | ||
|
|
760f16f568 | ||
|
|
241b9ddde9 | ||
|
|
3fcfb5cd49 | ||
|
|
e2384885f5 | ||
|
|
dd312c3cc5 | ||
|
|
80379927e8 | ||
|
|
676aae2755 | ||
|
|
f20e66e6f9 | ||
|
|
cd737ad7d3 | ||
|
|
df3aa84523 | ||
|
|
24a275ba25 | ||
|
|
aae438315f | ||
|
|
8b0d049b9f | ||
|
|
659bd99a67 | ||
|
|
c88166e055 | ||
|
|
099c0bcd34 | ||
|
|
d992e63075 | ||
|
|
c187f750fe | ||
|
|
bcbf6c1973 | ||
|
|
4bcbf70cae | ||
|
|
2d1854f354 | ||
|
|
a7c4a47723 | ||
|
|
61672ad3ff | ||
|
|
cea43099d2 | ||
|
|
6edf03c152 | ||
|
|
47c8cc24f4 | ||
|
|
64e46878e0 | ||
|
|
ea9b1e3503 | ||
|
|
2e9261cb26 | ||
|
|
69143d71f8 | ||
|
|
0c32fc5f2a | ||
|
|
af9cabe100 | ||
|
|
2ecb851926 | ||
|
|
2ffead76c1 | ||
|
|
5cc377751a | ||
|
|
ad8e9764e6 | ||
|
|
4ce426d8f6 | ||
|
|
c28e005087 | ||
|
|
22b751834f | ||
|
|
cce09b717e | ||
|
|
62dae3c6c6 | ||
|
|
97863e0b62 | ||
|
|
8a2f6bec33 | ||
|
|
e718378bdb | ||
|
|
d7d15a922a | ||
|
|
e74cb35aa4 | ||
|
|
da68651f61 | ||
|
|
be12136b8a | ||
|
|
6d3c21e369 | ||
|
|
1e96a1d6eb | ||
|
|
828bb64ebc | ||
|
|
6f00d32f7e | ||
|
|
f9e365828a | ||
|
|
90d463b925 | ||
|
|
22cdb5728b | ||
|
|
901152bd93 | ||
|
|
d9a5bca625 | ||
|
|
1676e9fe21 | ||
|
|
fad9d639bf | ||
|
|
efe6722bf8 | ||
|
|
a41f38547b | ||
|
|
87ee7868ea | ||
|
|
861bd1a96e | ||
|
|
6ac2b705dd | ||
|
|
fe4d6c68b5 | ||
|
|
5a7af5bb77 | ||
|
|
d9f90c84c0 | ||
|
|
4308407dc1 | ||
|
|
2b0313d60c | ||
|
|
350d213ee8 | ||
|
|
ca3198164c | ||
|
|
c53a5e7a72 | ||
|
|
ffb53f2085 | ||
|
|
3b191a3097 | ||
|
|
656948cd0f | ||
|
|
46f3d3ef61 | ||
|
|
06251aa76f | ||
|
|
5aef102f4f | ||
|
|
431646437e | ||
|
|
fe8621b00f | ||
|
|
c045060560 | ||
|
|
8ec475b1fd | ||
|
|
e33a6d5c2b | ||
|
|
923e1cef99 | ||
|
|
2e93dd57eb | ||
|
|
92957d685d | ||
|
|
f05acbd782 | ||
|
|
44a9266c9e | ||
|
|
c1710900b4 | ||
|
|
d5059b11b9 | ||
|
|
f95fa338c9 | ||
|
|
96c926c71e | ||
|
|
4dff203787 | ||
|
|
4977a5d43c | ||
|
|
8ce85a9750 | ||
|
|
d5939727e0 | ||
|
|
7b49f1e1de | ||
|
|
ac27089c69 | ||
|
|
4cb0bcb003 | ||
|
|
cf4e9e5578 | ||
|
|
32ced493de | ||
|
|
09e0f103f4 | ||
|
|
056255e396 | ||
|
|
85342b21c8 | ||
|
|
26b0322aa5 | ||
|
|
3b624d8bf8 | ||
|
|
ac02e56519 | ||
|
|
1eac4d2c07 | ||
|
|
3e5f770a38 | ||
|
|
2a66bb3fc7 | ||
|
|
397268394b | ||
|
|
5026cbdaf3 | ||
|
|
5af9dc5abd | ||
|
|
8d86c5e17d | ||
|
|
078bd606c7 | ||
|
|
b421945e71 | ||
|
|
41cd337506 | ||
|
|
b69156ac01 | ||
|
|
be6ac7e7a1 | ||
|
|
1fc1eb9f68 | ||
|
|
1fde585003 | ||
|
|
c915984340 | ||
|
|
50cc1cf0c9 | ||
|
|
1151fba415 | ||
|
|
3e08c390f5 | ||
|
|
053b69c63f | ||
|
|
ced14ec1ab | ||
|
|
6ba9450c89 | ||
|
|
ec8626046b | ||
|
|
4e84ad6cd7 | ||
|
|
40ebbecac8 | ||
|
|
0c43eb3973 | ||
|
|
3dea78d34b | ||
|
|
e27d24ba00 | ||
|
|
925aca764b | ||
|
|
2bb8de030f | ||
|
|
b92d511558 | ||
|
|
548c91ebb6 | ||
|
|
2c56d9fc3e | ||
|
|
6b61505ac2 | ||
|
|
e4db0fba2b | ||
|
|
8f89694fae | ||
|
|
5433e133d5 | ||
|
|
2487dab194 | ||
|
|
77e0912a0e | ||
|
|
a948203dae | ||
|
|
8f65bc24a0 | ||
|
|
9f102fc99d | ||
|
|
7bff9dc7f0 | ||
|
|
e86181c096 | ||
|
|
65df4bceaa | ||
|
|
3397922989 | ||
|
|
046d0c2f0a | ||
|
|
01fc4b0203 | ||
|
|
5b7d2c133a | ||
|
|
237b406e8c | ||
|
|
5427321260 | ||
|
|
ce570c166d | ||
|
|
649c11a78e | ||
|
|
7fae1c1262 | ||
|
|
f259cc1ab6 | ||
|
|
002893f280 | ||
|
|
1d9db1bfdd | ||
|
|
3b5fcd5873 | ||
|
|
a95505739d | ||
|
|
31c8281922 | ||
|
|
c6f6375015 | ||
|
|
6f74a745db | ||
|
|
36cb5f90e2 |
@@ -1,4 +1,20 @@
|
|||||||
---
|
---
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
BraceWrapping:
|
||||||
|
AfterClass: true
|
||||||
|
AfterControlStatement: true
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: true
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: true
|
||||||
|
AfterStruct: true
|
||||||
|
AfterUnion: true
|
||||||
|
BeforeCatch: true
|
||||||
|
BeforeElse: true
|
||||||
|
IndentBraces: false
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
---
|
||||||
Language: Cpp
|
Language: Cpp
|
||||||
AccessModifierOffset: -4
|
AccessModifierOffset: -4
|
||||||
AlignAfterOpenBracket: AlwaysBreak
|
AlignAfterOpenBracket: AlwaysBreak
|
||||||
@@ -18,24 +34,11 @@ AlwaysBreakBeforeMultilineStrings: true
|
|||||||
AlwaysBreakTemplateDeclarations: true
|
AlwaysBreakTemplateDeclarations: true
|
||||||
BinPackArguments: false
|
BinPackArguments: false
|
||||||
BinPackParameters: false
|
BinPackParameters: false
|
||||||
BraceWrapping:
|
|
||||||
AfterClass: true
|
|
||||||
AfterControlStatement: true
|
|
||||||
AfterEnum: false
|
|
||||||
AfterFunction: true
|
|
||||||
AfterNamespace: false
|
|
||||||
AfterObjCDeclaration: true
|
|
||||||
AfterStruct: true
|
|
||||||
AfterUnion: true
|
|
||||||
BeforeCatch: true
|
|
||||||
BeforeElse: true
|
|
||||||
IndentBraces: false
|
|
||||||
BreakBeforeBinaryOperators: false
|
BreakBeforeBinaryOperators: false
|
||||||
BreakBeforeBraces: Custom
|
|
||||||
BreakBeforeTernaryOperators: true
|
BreakBeforeTernaryOperators: true
|
||||||
BreakConstructorInitializersBeforeComma: true
|
BreakConstructorInitializersBeforeComma: true
|
||||||
ColumnLimit: 80
|
ColumnLimit: 80
|
||||||
CommentPragmas: '^ IWYU pragma:'
|
CommentPragmas: "^ IWYU pragma:"
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
ConstructorInitializerIndentWidth: 4
|
ConstructorInitializerIndentWidth: 4
|
||||||
ContinuationIndentWidth: 4
|
ContinuationIndentWidth: 4
|
||||||
@@ -44,22 +47,28 @@ DerivePointerAlignment: false
|
|||||||
DisableFormat: false
|
DisableFormat: false
|
||||||
ExperimentalAutoDetectBinPacking: false
|
ExperimentalAutoDetectBinPacking: false
|
||||||
ForEachMacros: [Q_FOREACH, BOOST_FOREACH]
|
ForEachMacros: [Q_FOREACH, BOOST_FOREACH]
|
||||||
|
IncludeBlocks: Regroup
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
- Regex: '^<(BeastConfig)'
|
- Regex: "^<(test)/"
|
||||||
Priority: 0
|
Priority: 0
|
||||||
- Regex: '^<(ripple)/'
|
- Regex: "^<(xrpld)/"
|
||||||
|
Priority: 1
|
||||||
|
- Regex: "^<(xrpl)/"
|
||||||
Priority: 2
|
Priority: 2
|
||||||
- Regex: '^<(boost)/'
|
- Regex: "^<(boost)/"
|
||||||
Priority: 3
|
Priority: 3
|
||||||
- Regex: '.*'
|
- Regex: "^.*/"
|
||||||
Priority: 4
|
Priority: 4
|
||||||
IncludeIsMainRegex: '$'
|
- Regex: '^.*\.h'
|
||||||
|
Priority: 5
|
||||||
|
- Regex: ".*"
|
||||||
|
Priority: 6
|
||||||
|
IncludeIsMainRegex: "$"
|
||||||
IndentCaseLabels: true
|
IndentCaseLabels: true
|
||||||
IndentFunctionDeclarationAfterType: false
|
IndentFunctionDeclarationAfterType: false
|
||||||
|
IndentRequiresClause: true
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
IndentWrappedFunctionNames: false
|
IndentWrappedFunctionNames: false
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
||||||
MaxEmptyLinesToKeep: 1
|
|
||||||
NamespaceIndentation: None
|
NamespaceIndentation: None
|
||||||
ObjCSpaceAfterProperty: false
|
ObjCSpaceAfterProperty: false
|
||||||
ObjCSpaceBeforeProtocolList: false
|
ObjCSpaceBeforeProtocolList: false
|
||||||
@@ -71,6 +80,7 @@ PenaltyExcessCharacter: 1000000
|
|||||||
PenaltyReturnTypeOnItsOwnLine: 200
|
PenaltyReturnTypeOnItsOwnLine: 200
|
||||||
PointerAlignment: Left
|
PointerAlignment: Left
|
||||||
ReflowComments: true
|
ReflowComments: true
|
||||||
|
RequiresClausePosition: OwnLine
|
||||||
SortIncludes: true
|
SortIncludes: true
|
||||||
SpaceAfterCStyleCast: false
|
SpaceAfterCStyleCast: false
|
||||||
SpaceBeforeAssignmentOperators: true
|
SpaceBeforeAssignmentOperators: true
|
||||||
@@ -85,3 +95,9 @@ SpacesInSquareBrackets: false
|
|||||||
Standard: Cpp11
|
Standard: Cpp11
|
||||||
TabWidth: 8
|
TabWidth: 8
|
||||||
UseTab: Never
|
UseTab: Never
|
||||||
|
QualifierAlignment: Right
|
||||||
|
---
|
||||||
|
Language: Proto
|
||||||
|
BasedOnStyle: Google
|
||||||
|
ColumnLimit: 0
|
||||||
|
IndentWidth: 2
|
||||||
|
|||||||
41
.codecov.yml
41
.codecov.yml
@@ -1,5 +1,38 @@
|
|||||||
|
|
||||||
codecov:
|
codecov:
|
||||||
ci:
|
require_ci_to_pass: true
|
||||||
- !appveyor
|
|
||||||
- travis
|
comment:
|
||||||
|
behavior: default
|
||||||
|
layout: reach,diff,flags,tree,reach
|
||||||
|
show_carryforward_flags: false
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
range: "70..85"
|
||||||
|
precision: 1
|
||||||
|
round: nearest
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
target: 75%
|
||||||
|
threshold: 2%
|
||||||
|
patch:
|
||||||
|
default:
|
||||||
|
target: auto
|
||||||
|
threshold: 2%
|
||||||
|
changes: false
|
||||||
|
|
||||||
|
github_checks:
|
||||||
|
annotations: true
|
||||||
|
|
||||||
|
parsers:
|
||||||
|
cobertura:
|
||||||
|
partials_as_hits: true
|
||||||
|
handle_missing_conditions: true
|
||||||
|
|
||||||
|
slack_app: false
|
||||||
|
|
||||||
|
ignore:
|
||||||
|
- "src/test/"
|
||||||
|
- "src/tests/"
|
||||||
|
- "include/xrpl/beast/test/"
|
||||||
|
- "include/xrpl/beast/unit_test/"
|
||||||
|
|||||||
@@ -2,3 +2,15 @@
|
|||||||
# To use it by default in git blame:
|
# To use it by default in git blame:
|
||||||
# git config blame.ignoreRevsFile .git-blame-ignore-revs
|
# git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||||
50760c693510894ca368e90369b0cc2dabfd07f3
|
50760c693510894ca368e90369b0cc2dabfd07f3
|
||||||
|
e2384885f5f630c8f0ffe4bf21a169b433a16858
|
||||||
|
241b9ddde9e11beb7480600fd5ed90e1ef109b21
|
||||||
|
760f16f56835663d9286bd29294d074de26a7ba6
|
||||||
|
0eebe6a5f4246fced516d52b83ec4e7f47373edd
|
||||||
|
2189cc950c0cebb89e4e2fa3b2d8817205bf7cef
|
||||||
|
b9d007813378ad0ff45660dc07285b823c7e9855
|
||||||
|
fe9a5365b8a52d4acc42eb27369247e6f238a4f9
|
||||||
|
9a93577314e6a8d4b4a8368cc9d2b15a5d8303e8
|
||||||
|
552377c76f55b403a1c876df873a23d780fcc81c
|
||||||
|
97f0747e103f13e26e45b731731059b32f7679ac
|
||||||
|
b13370ac0d207217354f1fc1c29aef87769fb8a1
|
||||||
|
896b8c3b54a22b0497cb0d1ce95e1095f9a227ce
|
||||||
|
|||||||
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,10 +1,6 @@
|
|||||||
# Set default behaviour, in case users don't have core.autocrlf set.
|
# Set default behaviour, in case users don't have core.autocrlf set.
|
||||||
#* text=auto
|
#* text=auto
|
||||||
|
|
||||||
# These annoying files
|
|
||||||
rippled.1 binary
|
|
||||||
LICENSE binary
|
|
||||||
|
|
||||||
# Visual Studio
|
# Visual Studio
|
||||||
*.sln text eol=crlf
|
*.sln text eol=crlf
|
||||||
*.vcproj text eol=crlf
|
*.vcproj text eol=crlf
|
||||||
|
|||||||
8
.github/CODEOWNERS
vendored
Normal file
8
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Allow anyone to review any change by default.
|
||||||
|
*
|
||||||
|
|
||||||
|
# Require the rpc-reviewers team to review changes to the rpc code.
|
||||||
|
include/xrpl/protocol/ @xrplf/rpc-reviewers
|
||||||
|
src/libxrpl/protocol/ @xrplf/rpc-reviewers
|
||||||
|
src/xrpld/rpc/ @xrplf/rpc-reviewers
|
||||||
|
src/xrpld/app/misc/ @xrplf/rpc-reviewers
|
||||||
13
.github/ISSUE_TEMPLATE/bug_report.md
vendored
13
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -2,30 +2,35 @@
|
|||||||
name: Bug Report
|
name: Bug Report
|
||||||
about: Create a report to help us improve rippled
|
about: Create a report to help us improve rippled
|
||||||
title: "[Title with short description] (Version: [rippled version])"
|
title: "[Title with short description] (Version: [rippled version])"
|
||||||
labels: ''
|
labels: ""
|
||||||
assignees: ''
|
assignees: ""
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Please search existing issues to avoid creating duplicates.-->
|
<!-- Please search existing issues to avoid creating duplicates.-->
|
||||||
|
|
||||||
## 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 18.04 with Boost 1.70).-->
|
<!--Please describe your environment setup (such as Ubuntu 18.04 with Boost 1.70).-->
|
||||||
<!-- If you are using a formal release, please use the version returned by './rippled --version' as the version number-->
|
<!-- If you are using a formal release, please use the version returned by './rippled --version' as the version number-->
|
||||||
<!-- If you are working off of develop, please add the git hash via 'git rev-parse HEAD'-->
|
<!-- If you are working off of develop, please add the git hash via 'git rev-parse HEAD'-->
|
||||||
|
|
||||||
## 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,19 +3,23 @@ name: Feature Request
|
|||||||
about: Suggest a new feature for the rippled project
|
about: Suggest a new feature for the rippled project
|
||||||
title: "[Title with short description] (Version: [rippled version])"
|
title: "[Title with short description] (Version: [rippled version])"
|
||||||
labels: Feature Request
|
labels: Feature Request
|
||||||
assignees: ''
|
assignees: ""
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Please search existing issues to avoid creating duplicates.-->
|
<!-- Please search existing issues to avoid creating duplicates.-->
|
||||||
|
|
||||||
## 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?-->
|
||||||
|
|||||||
49
.github/actions/build-deps/action.yml
vendored
Normal file
49
.github/actions/build-deps/action.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
name: Build Conan dependencies
|
||||||
|
description: "Install Conan dependencies, optionally forcing a rebuild of all dependencies."
|
||||||
|
|
||||||
|
# Note that actions do not support 'type' and all inputs are strings, see
|
||||||
|
# https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#inputs.
|
||||||
|
inputs:
|
||||||
|
build_dir:
|
||||||
|
description: "The directory where to build."
|
||||||
|
required: true
|
||||||
|
build_type:
|
||||||
|
description: 'The build type to use ("Debug", "Release").'
|
||||||
|
required: true
|
||||||
|
build_nproc:
|
||||||
|
description: "The number of processors to use for building."
|
||||||
|
required: true
|
||||||
|
force_build:
|
||||||
|
description: 'Force building of all dependencies ("true", "false").'
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
log_verbosity:
|
||||||
|
description: "The logging verbosity."
|
||||||
|
required: false
|
||||||
|
default: "verbose"
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Install Conan dependencies
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
BUILD_DIR: ${{ inputs.build_dir }}
|
||||||
|
BUILD_NPROC: ${{ inputs.build_nproc }}
|
||||||
|
BUILD_OPTION: ${{ inputs.force_build == 'true' && '*' || 'missing' }}
|
||||||
|
BUILD_TYPE: ${{ inputs.build_type }}
|
||||||
|
LOG_VERBOSITY: ${{ inputs.log_verbosity }}
|
||||||
|
run: |
|
||||||
|
echo 'Installing dependencies.'
|
||||||
|
mkdir -p "${BUILD_DIR}"
|
||||||
|
cd "${BUILD_DIR}"
|
||||||
|
conan install \
|
||||||
|
--output-folder . \
|
||||||
|
--build="${BUILD_OPTION}" \
|
||||||
|
--options:host='&:tests=True' \
|
||||||
|
--options:host='&:xrpld=True' \
|
||||||
|
--settings:all build_type="${BUILD_TYPE}" \
|
||||||
|
--conf:all tools.build:jobs=${BUILD_NPROC} \
|
||||||
|
--conf:all tools.build:verbosity="${LOG_VERBOSITY}" \
|
||||||
|
--conf:all tools.compilation:verbosity="${LOG_VERBOSITY}" \
|
||||||
|
..
|
||||||
33
.github/actions/build/action.yml
vendored
33
.github/actions/build/action.yml
vendored
@@ -1,33 +0,0 @@
|
|||||||
name: build
|
|
||||||
inputs:
|
|
||||||
generator:
|
|
||||||
default: null
|
|
||||||
configuration:
|
|
||||||
required: true
|
|
||||||
cmake-args:
|
|
||||||
default: null
|
|
||||||
# An implicit input is the environment variable `build_dir`.
|
|
||||||
runs:
|
|
||||||
using: composite
|
|
||||||
steps:
|
|
||||||
- name: dependencies
|
|
||||||
uses: ./.github/actions/dependencies
|
|
||||||
with:
|
|
||||||
configuration: ${{ inputs.configuration }}
|
|
||||||
- name: configure
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd ${build_dir}
|
|
||||||
cmake \
|
|
||||||
${{ inputs.generator && format('-G {0}', inputs.generator) || '' }} \
|
|
||||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
|
||||||
-DCMAKE_BUILD_TYPE=${{ inputs.configuration }} \
|
|
||||||
${{ inputs.cmake-args }} \
|
|
||||||
..
|
|
||||||
- name: build
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cmake \
|
|
||||||
--build ${build_dir} \
|
|
||||||
--config ${{ inputs.configuration }} \
|
|
||||||
--parallel ${NUM_PROCESSORS:-$(nproc)}
|
|
||||||
26
.github/actions/dependencies/action.yml
vendored
26
.github/actions/dependencies/action.yml
vendored
@@ -1,26 +0,0 @@
|
|||||||
name: dependencies
|
|
||||||
inputs:
|
|
||||||
configuration:
|
|
||||||
required: true
|
|
||||||
# An implicit input is the environment variable `build_dir`.
|
|
||||||
runs:
|
|
||||||
using: composite
|
|
||||||
steps:
|
|
||||||
- name: unlock Conan
|
|
||||||
shell: bash
|
|
||||||
run: conan remove --locks
|
|
||||||
- name: export custom recipes
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
conan export external/snappy snappy/1.1.10@
|
|
||||||
conan export external/soci soci/4.0.3@
|
|
||||||
- name: install dependencies
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir ${build_dir}
|
|
||||||
cd ${build_dir}
|
|
||||||
conan install \
|
|
||||||
--output-folder . \
|
|
||||||
--build missing \
|
|
||||||
--settings build_type=${{ inputs.configuration }} \
|
|
||||||
..
|
|
||||||
43
.github/actions/print-env/action.yml
vendored
Normal file
43
.github/actions/print-env/action.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
name: Print build environment
|
||||||
|
description: "Print environment and some tooling versions"
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Check configuration (Windows)
|
||||||
|
if: ${{ runner.os == 'Windows' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo 'Checking environment variables.'
|
||||||
|
set
|
||||||
|
|
||||||
|
echo 'Checking CMake version.'
|
||||||
|
cmake --version
|
||||||
|
|
||||||
|
echo 'Checking Conan version.'
|
||||||
|
conan --version
|
||||||
|
|
||||||
|
- name: Check configuration (Linux and macOS)
|
||||||
|
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo 'Checking path.'
|
||||||
|
echo ${PATH} | tr ':' '\n'
|
||||||
|
|
||||||
|
echo 'Checking environment variables.'
|
||||||
|
env | sort
|
||||||
|
|
||||||
|
echo 'Checking CMake version.'
|
||||||
|
cmake --version
|
||||||
|
|
||||||
|
echo 'Checking compiler version.'
|
||||||
|
${{ runner.os == 'Linux' && '${CC}' || 'clang' }} --version
|
||||||
|
|
||||||
|
echo 'Checking Conan version.'
|
||||||
|
conan --version
|
||||||
|
|
||||||
|
echo 'Checking Ninja version.'
|
||||||
|
ninja --version
|
||||||
|
|
||||||
|
echo 'Checking nproc version.'
|
||||||
|
nproc --version
|
||||||
46
.github/actions/setup-conan/action.yml
vendored
Normal file
46
.github/actions/setup-conan/action.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: Setup Conan
|
||||||
|
description: "Set up Conan configuration, profile, and remote."
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
conan_remote_name:
|
||||||
|
description: "The name of the Conan remote to use."
|
||||||
|
required: false
|
||||||
|
default: xrplf
|
||||||
|
conan_remote_url:
|
||||||
|
description: "The URL of the Conan endpoint to use."
|
||||||
|
required: false
|
||||||
|
default: https://conan.ripplex.io
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Set up Conan configuration
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo 'Installing configuration.'
|
||||||
|
cat conan/global.conf ${{ runner.os == 'Linux' && '>>' || '>' }} $(conan config home)/global.conf
|
||||||
|
|
||||||
|
echo 'Conan configuration:'
|
||||||
|
conan config show '*'
|
||||||
|
|
||||||
|
- name: Set up Conan profile
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo 'Installing profile.'
|
||||||
|
conan config install conan/profiles/default -tf $(conan config home)/profiles/
|
||||||
|
|
||||||
|
echo 'Conan profile:'
|
||||||
|
conan profile show
|
||||||
|
|
||||||
|
- name: Set up Conan remote
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||||
|
CONAN_REMOTE_URL: ${{ inputs.conan_remote_url }}
|
||||||
|
run: |
|
||||||
|
echo "Adding Conan remote '${CONAN_REMOTE_NAME}' at '${CONAN_REMOTE_URL}'."
|
||||||
|
conan remote add --index 0 --force "${CONAN_REMOTE_NAME}" "${CONAN_REMOTE_URL}"
|
||||||
|
|
||||||
|
echo 'Listing Conan remotes.'
|
||||||
|
conan remote list
|
||||||
34
.github/pull_request_template.md
vendored
34
.github/pull_request_template.md
vendored
@@ -1,6 +1,12 @@
|
|||||||
<!--
|
<!--
|
||||||
This PR template helps you to write a good pull request description.
|
This PR template helps you to write a good pull request description.
|
||||||
Please feel free to include additional useful information even beyond what is requested below.
|
Please feel free to include additional useful information even beyond what is requested below.
|
||||||
|
|
||||||
|
If your branch is on a personal fork and has a name that allows it to
|
||||||
|
run CI build/test jobs (e.g. "ci/foo"), remember to rename it BEFORE
|
||||||
|
opening the PR. This avoids unnecessary redundant test runs. Renaming
|
||||||
|
the branch after opening the PR will close the PR.
|
||||||
|
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch
|
||||||
-->
|
-->
|
||||||
|
|
||||||
## High Level Overview of Change
|
## High Level Overview of Change
|
||||||
@@ -33,14 +39,38 @@ Please check [x] relevant options, delete irrelevant ones.
|
|||||||
- [ ] New feature (non-breaking change which adds functionality)
|
- [ ] New feature (non-breaking change which adds functionality)
|
||||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||||
- [ ] Refactor (non-breaking change that only restructures code)
|
- [ ] Refactor (non-breaking change that only restructures code)
|
||||||
- [ ] Tests (You added tests for code that already exists, or your new feature included in this PR)
|
- [ ] Performance (increase or change in throughput and/or latency)
|
||||||
- [ ] Documentation Updates
|
- [ ] Tests (you added tests for code that already exists, or your new feature included in this PR)
|
||||||
|
- [ ] Documentation update
|
||||||
|
- [ ] Chore (no impact to binary, e.g. `.gitignore`, formatting, dropping support for older tooling)
|
||||||
- [ ] Release
|
- [ ] Release
|
||||||
|
|
||||||
|
### API Impact
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please check [x] relevant options, delete irrelevant ones.
|
||||||
|
|
||||||
|
* If there is any impact to the public API methods (HTTP / WebSocket), please update https://github.com/xrplf/rippled/blob/develop/API-CHANGELOG.md
|
||||||
|
* Update API-CHANGELOG.md and add the change directly in this PR by pushing to your PR branch.
|
||||||
|
* libxrpl: See https://github.com/XRPLF/rippled/blob/develop/docs/build/depend.md
|
||||||
|
* Peer Protocol: See https://xrpl.org/peer-protocol.html
|
||||||
|
-->
|
||||||
|
|
||||||
|
- [ ] Public API: New feature (new methods and/or new fields)
|
||||||
|
- [ ] Public API: Breaking change (in general, breaking changes should only impact the next api_version)
|
||||||
|
- [ ] `libxrpl` change (any change that may affect `libxrpl` or dependents of `libxrpl`)
|
||||||
|
- [ ] Peer protocol change (must be backward compatible or bump the peer protocol version)
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
## Before / After
|
## Before / After
|
||||||
If relevant, use this section for an English description of the change at a technical level.
|
If relevant, use this section for an English description of the change at a technical level.
|
||||||
If this change affects an API, examples should be included here.
|
If this change affects an API, examples should be included here.
|
||||||
|
|
||||||
|
For performance-impacting changes, please provide these details:
|
||||||
|
1. Is this a new feature, bug fix, or improvement to existing functionality?
|
||||||
|
2. What behavior/functionality does the change impact?
|
||||||
|
3. In what processing can the impact be measured? Be as specific as possible - e.g. RPC client call, payment transaction that involves LOB, AMM, caching, DB operations, etc.
|
||||||
|
4. Does this change affect concurrent processing - e.g. does it involve acquiring locks, multi-threaded processing, or async processing?
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
114
.github/scripts/levelization/README.md
vendored
Normal file
114
.github/scripts/levelization/README.md
vendored
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
# Levelization
|
||||||
|
|
||||||
|
Levelization is the term used to describe efforts to prevent rippled from
|
||||||
|
having or creating cyclic dependencies.
|
||||||
|
|
||||||
|
rippled code is organized into directories under `src/rippled` (and
|
||||||
|
`src/test`) representing modules. The modules are intended to be
|
||||||
|
organized into "tiers" or "levels" such that a module from one level can
|
||||||
|
only include code from lower levels. Additionally, a module
|
||||||
|
in one level should never include code in an `impl` folder of any level
|
||||||
|
other than it's own.
|
||||||
|
|
||||||
|
Unfortunately, over time, enforcement of levelization has been
|
||||||
|
inconsistent, so the current state of the code doesn't necessarily
|
||||||
|
reflect these rules. Whenever possible, developers should refactor any
|
||||||
|
levelization violations they find (by moving files or individual
|
||||||
|
classes). At the very least, don't make things worse.
|
||||||
|
|
||||||
|
The table below summarizes the _desired_ division of modules, based on the
|
||||||
|
state of the rippled code when it was created. The levels are numbered from
|
||||||
|
the bottom up with the lower level, lower numbered, more independent
|
||||||
|
modules listed first, and the higher level, higher numbered modules with
|
||||||
|
more dependencies listed later.
|
||||||
|
|
||||||
|
**tl;dr:** The modules listed first are more independent than the modules
|
||||||
|
listed later.
|
||||||
|
|
||||||
|
| Level / Tier | Module(s) |
|
||||||
|
| ------------ | -------------------------------------------------------------------------------------------------------- |
|
||||||
|
| 01 | ripple/beast ripple/unity |
|
||||||
|
| 02 | ripple/basics |
|
||||||
|
| 03 | ripple/json ripple/crypto |
|
||||||
|
| 04 | ripple/protocol |
|
||||||
|
| 05 | ripple/core ripple/conditions ripple/consensus ripple/resource ripple/server |
|
||||||
|
| 06 | ripple/peerfinder ripple/ledger ripple/nodestore ripple/net |
|
||||||
|
| 07 | ripple/shamap ripple/overlay |
|
||||||
|
| 08 | ripple/app |
|
||||||
|
| 09 | ripple/rpc |
|
||||||
|
| 10 | ripple/perflog |
|
||||||
|
| 11 | test/jtx test/beast test/csf |
|
||||||
|
| 12 | test/unit_test |
|
||||||
|
| 13 | test/crypto test/conditions test/json test/resource test/shamap test/peerfinder test/basics test/overlay |
|
||||||
|
| 14 | test |
|
||||||
|
| 15 | test/net test/protocol test/ledger test/consensus test/core test/server test/nodestore |
|
||||||
|
| 16 | test/rpc test/app |
|
||||||
|
|
||||||
|
(Note that `test` levelization is _much_ less important and _much_ less
|
||||||
|
strictly enforced than `ripple` levelization, other than the requirement
|
||||||
|
that `test` code should _never_ be included in `ripple` code.)
|
||||||
|
|
||||||
|
## Validation
|
||||||
|
|
||||||
|
The [levelization](generate.sh) script takes no parameters,
|
||||||
|
reads no environment variables, and can be run from any directory,
|
||||||
|
as long as it is in the expected location in the rippled repo.
|
||||||
|
It can be run at any time from within a checked out repo, and will
|
||||||
|
do an analysis of all the `#include`s in
|
||||||
|
the rippled source. The only caveat is that it runs much slower
|
||||||
|
under Windows than in Linux. It hasn't yet been tested under MacOS.
|
||||||
|
It generates many files of [results](results):
|
||||||
|
|
||||||
|
- `rawincludes.txt`: The raw dump of the `#includes`
|
||||||
|
- `paths.txt`: A second dump grouping the source module
|
||||||
|
to the destination module, deduped, and with frequency counts.
|
||||||
|
- `includes/`: A directory where each file represents a module and
|
||||||
|
contains a list of modules and counts that the module _includes_.
|
||||||
|
- `includedby/`: Similar to `includes/`, but the other way around. Each
|
||||||
|
file represents a module and contains a list of modules and counts
|
||||||
|
that _include_ the module.
|
||||||
|
- [`loops.txt`](results/loops.txt): A list of direct loops detected
|
||||||
|
between modules as they actually exist, as opposed to how they are
|
||||||
|
desired as described above. In a perfect repo, this file will be
|
||||||
|
empty.
|
||||||
|
This file is committed to the repo, and is used by the [levelization
|
||||||
|
Github workflow](../../workflows/reusable-check-levelization.yml) to validate
|
||||||
|
that nothing changed.
|
||||||
|
- [`ordering.txt`](results/ordering.txt): A list showing relationships
|
||||||
|
between modules where there are no loops as they actually exist, as
|
||||||
|
opposed to how they are desired as described above.
|
||||||
|
This file is committed to the repo, and is used by the [levelization
|
||||||
|
Github workflow](../../workflows/reusable-check-levelization.yml) to validate
|
||||||
|
that nothing changed.
|
||||||
|
- [`levelization.yml`](../../workflows/reusable-check-levelization.yml)
|
||||||
|
Github Actions workflow to test that levelization loops haven't
|
||||||
|
changed. Unfortunately, if changes are detected, it can't tell if
|
||||||
|
they are improvements or not, so if you have resolved any issues or
|
||||||
|
done anything else to improve levelization, run `levelization.sh`,
|
||||||
|
and commit the updated results.
|
||||||
|
|
||||||
|
The `loops.txt` and `ordering.txt` files relate the modules
|
||||||
|
using comparison signs, which indicate the number of times each
|
||||||
|
module is included in the other.
|
||||||
|
|
||||||
|
- `A > B` means that A should probably be at a higher level than B,
|
||||||
|
because B is included in A significantly more than A is included in B.
|
||||||
|
These results can be included in both `loops.txt` and `ordering.txt`.
|
||||||
|
Because `ordering.txt`only includes relationships where B is not
|
||||||
|
included in A at all, it will only include these types of results.
|
||||||
|
- `A ~= B` means that A and B are included in each other a different
|
||||||
|
number of times, but the values are so close that the script can't
|
||||||
|
definitively say that one should be above the other. These results
|
||||||
|
will only be included in `loops.txt`.
|
||||||
|
- `A == B` means that A and B include each other the same number of
|
||||||
|
times, so the script has no clue which should be higher. These results
|
||||||
|
will only be included in `loops.txt`.
|
||||||
|
|
||||||
|
The committed files hide the detailed values intentionally, to
|
||||||
|
prevent false alarms and merging issues, and because it's easy to
|
||||||
|
get those details locally.
|
||||||
|
|
||||||
|
1. Run `levelization.sh`
|
||||||
|
2. Grep the modules in `paths.txt`.
|
||||||
|
- For example, if a cycle is found `A ~= B`, simply `grep -w
|
||||||
|
A .github/scripts/levelization/results/paths.txt | grep -w B`
|
||||||
130
.github/scripts/levelization/generate.sh
vendored
Executable file
130
.github/scripts/levelization/generate.sh
vendored
Executable file
@@ -0,0 +1,130 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Usage: generate.sh
|
||||||
|
# This script takes no parameters, reads no environment variables,
|
||||||
|
# and can be run from any directory, as long as it is in the expected
|
||||||
|
# location in the repo.
|
||||||
|
|
||||||
|
pushd $( dirname $0 )
|
||||||
|
|
||||||
|
if [ -v PS1 ]
|
||||||
|
then
|
||||||
|
# if the shell is interactive, clean up any flotsam before analyzing
|
||||||
|
git clean -ix
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure all sorting is ASCII-order consistently across platforms.
|
||||||
|
export LANG=C
|
||||||
|
|
||||||
|
rm -rfv results
|
||||||
|
mkdir results
|
||||||
|
includes="$( pwd )/results/rawincludes.txt"
|
||||||
|
pushd ../../..
|
||||||
|
echo Raw includes:
|
||||||
|
grep -r '^[ ]*#include.*/.*\.h' include src | \
|
||||||
|
grep -v boost | tee ${includes}
|
||||||
|
popd
|
||||||
|
pushd results
|
||||||
|
|
||||||
|
oldifs=${IFS}
|
||||||
|
IFS=:
|
||||||
|
mkdir includes
|
||||||
|
mkdir includedby
|
||||||
|
echo Build levelization paths
|
||||||
|
exec 3< ${includes} # open rawincludes.txt for input
|
||||||
|
while read -r -u 3 file include
|
||||||
|
do
|
||||||
|
level=$( echo ${file} | cut -d/ -f 2,3 )
|
||||||
|
# If the "level" indicates a file, cut off the filename
|
||||||
|
if [[ "${level##*.}" != "${level}" ]]
|
||||||
|
then
|
||||||
|
# Use the "toplevel" label as a workaround for `sort`
|
||||||
|
# inconsistencies between different utility versions
|
||||||
|
level="$( dirname ${level} )/toplevel"
|
||||||
|
fi
|
||||||
|
level=$( echo ${level} | tr '/' '.' )
|
||||||
|
|
||||||
|
includelevel=$( echo ${include} | sed 's/.*["<]//; s/[">].*//' | \
|
||||||
|
cut -d/ -f 1,2 )
|
||||||
|
if [[ "${includelevel##*.}" != "${includelevel}" ]]
|
||||||
|
then
|
||||||
|
# Use the "toplevel" label as a workaround for `sort`
|
||||||
|
# inconsistencies between different utility versions
|
||||||
|
includelevel="$( dirname ${includelevel} )/toplevel"
|
||||||
|
fi
|
||||||
|
includelevel=$( echo ${includelevel} | tr '/' '.' )
|
||||||
|
|
||||||
|
if [[ "$level" != "$includelevel" ]]
|
||||||
|
then
|
||||||
|
echo $level $includelevel | tee -a paths.txt
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo Sort and dedup paths
|
||||||
|
sort -ds paths.txt | uniq -c | tee sortedpaths.txt
|
||||||
|
mv sortedpaths.txt paths.txt
|
||||||
|
exec 3>&- #close fd 3
|
||||||
|
IFS=${oldifs}
|
||||||
|
unset oldifs
|
||||||
|
|
||||||
|
echo Split into flat-file database
|
||||||
|
exec 4<paths.txt # open paths.txt for input
|
||||||
|
while read -r -u 4 count level include
|
||||||
|
do
|
||||||
|
echo ${include} ${count} | tee -a includes/${level}
|
||||||
|
echo ${level} ${count} | tee -a includedby/${include}
|
||||||
|
done
|
||||||
|
exec 4>&- #close fd 4
|
||||||
|
|
||||||
|
loops="$( pwd )/loops.txt"
|
||||||
|
ordering="$( pwd )/ordering.txt"
|
||||||
|
pushd includes
|
||||||
|
echo Search for loops
|
||||||
|
# Redirect stdout to a file
|
||||||
|
exec 4>&1
|
||||||
|
exec 1>"${loops}"
|
||||||
|
for source in *
|
||||||
|
do
|
||||||
|
if [[ -f "$source" ]]
|
||||||
|
then
|
||||||
|
exec 5<"${source}" # open for input
|
||||||
|
while read -r -u 5 include includefreq
|
||||||
|
do
|
||||||
|
if [[ -f $include ]]
|
||||||
|
then
|
||||||
|
if grep -q -w $source $include
|
||||||
|
then
|
||||||
|
if grep -q -w "Loop: $include $source" "${loops}"
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
sourcefreq=$( grep -w $source $include | cut -d\ -f2 )
|
||||||
|
echo "Loop: $source $include"
|
||||||
|
# If the counts are close, indicate that the two modules are
|
||||||
|
# on the same level, though they shouldn't be
|
||||||
|
if [[ $(( $includefreq - $sourcefreq )) -gt 3 ]]
|
||||||
|
then
|
||||||
|
echo -e " $source > $include\n"
|
||||||
|
elif [[ $(( $sourcefreq - $includefreq )) -gt 3 ]]
|
||||||
|
then
|
||||||
|
echo -e " $include > $source\n"
|
||||||
|
elif [[ $sourcefreq -eq $includefreq ]]
|
||||||
|
then
|
||||||
|
echo -e " $include == $source\n"
|
||||||
|
else
|
||||||
|
echo -e " $include ~= $source\n"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$source > $include" >> "${ordering}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exec 5>&- #close fd 5
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exec 1>&4 #close fd 1
|
||||||
|
exec 4>&- #close fd 4
|
||||||
|
cat "${ordering}"
|
||||||
|
cat "${loops}"
|
||||||
|
popd
|
||||||
|
popd
|
||||||
|
popd
|
||||||
30
.github/scripts/levelization/results/loops.txt
vendored
Normal file
30
.github/scripts/levelization/results/loops.txt
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
Loop: test.jtx test.toplevel
|
||||||
|
test.toplevel > test.jtx
|
||||||
|
|
||||||
|
Loop: test.jtx test.unit_test
|
||||||
|
test.unit_test == test.jtx
|
||||||
|
|
||||||
|
Loop: xrpld.app xrpld.core
|
||||||
|
xrpld.app > xrpld.core
|
||||||
|
|
||||||
|
Loop: xrpld.app xrpld.overlay
|
||||||
|
xrpld.overlay > xrpld.app
|
||||||
|
|
||||||
|
Loop: xrpld.app xrpld.peerfinder
|
||||||
|
xrpld.peerfinder ~= xrpld.app
|
||||||
|
|
||||||
|
Loop: xrpld.app xrpld.rpc
|
||||||
|
xrpld.rpc > xrpld.app
|
||||||
|
|
||||||
|
Loop: xrpld.app xrpld.shamap
|
||||||
|
xrpld.shamap ~= xrpld.app
|
||||||
|
|
||||||
|
Loop: xrpld.core xrpld.perflog
|
||||||
|
xrpld.perflog == xrpld.core
|
||||||
|
|
||||||
|
Loop: xrpld.overlay xrpld.rpc
|
||||||
|
xrpld.rpc ~= xrpld.overlay
|
||||||
|
|
||||||
|
Loop: xrpld.perflog xrpld.rpc
|
||||||
|
xrpld.rpc ~= xrpld.perflog
|
||||||
|
|
||||||
209
.github/scripts/levelization/results/ordering.txt
vendored
Normal file
209
.github/scripts/levelization/results/ordering.txt
vendored
Normal file
@@ -0,0 +1,209 @@
|
|||||||
|
libxrpl.basics > xrpl.basics
|
||||||
|
libxrpl.crypto > xrpl.basics
|
||||||
|
libxrpl.json > xrpl.basics
|
||||||
|
libxrpl.json > xrpl.json
|
||||||
|
libxrpl.ledger > xrpl.basics
|
||||||
|
libxrpl.ledger > xrpl.json
|
||||||
|
libxrpl.ledger > xrpl.ledger
|
||||||
|
libxrpl.ledger > xrpl.protocol
|
||||||
|
libxrpl.net > xrpl.basics
|
||||||
|
libxrpl.net > xrpl.net
|
||||||
|
libxrpl.nodestore > xrpl.basics
|
||||||
|
libxrpl.nodestore > xrpl.json
|
||||||
|
libxrpl.nodestore > xrpl.nodestore
|
||||||
|
libxrpl.nodestore > xrpl.protocol
|
||||||
|
libxrpl.protocol > xrpl.basics
|
||||||
|
libxrpl.protocol > xrpl.json
|
||||||
|
libxrpl.protocol > xrpl.protocol
|
||||||
|
libxrpl.resource > xrpl.basics
|
||||||
|
libxrpl.resource > xrpl.json
|
||||||
|
libxrpl.resource > xrpl.resource
|
||||||
|
libxrpl.server > xrpl.basics
|
||||||
|
libxrpl.server > xrpl.json
|
||||||
|
libxrpl.server > xrpl.protocol
|
||||||
|
libxrpl.server > xrpl.server
|
||||||
|
libxrpl.shamap > xrpl.basics
|
||||||
|
libxrpl.shamap > xrpl.protocol
|
||||||
|
libxrpl.shamap > xrpl.shamap
|
||||||
|
test.app > test.jtx
|
||||||
|
test.app > test.rpc
|
||||||
|
test.app > test.toplevel
|
||||||
|
test.app > test.unit_test
|
||||||
|
test.app > xrpl.basics
|
||||||
|
test.app > xrpld.app
|
||||||
|
test.app > xrpld.core
|
||||||
|
test.app > xrpld.overlay
|
||||||
|
test.app > xrpld.rpc
|
||||||
|
test.app > xrpl.json
|
||||||
|
test.app > xrpl.ledger
|
||||||
|
test.app > xrpl.nodestore
|
||||||
|
test.app > xrpl.protocol
|
||||||
|
test.app > xrpl.resource
|
||||||
|
test.basics > test.jtx
|
||||||
|
test.basics > test.unit_test
|
||||||
|
test.basics > xrpl.basics
|
||||||
|
test.basics > xrpld.perflog
|
||||||
|
test.basics > xrpld.rpc
|
||||||
|
test.basics > xrpl.json
|
||||||
|
test.basics > xrpl.protocol
|
||||||
|
test.beast > xrpl.basics
|
||||||
|
test.conditions > xrpl.basics
|
||||||
|
test.conditions > xrpld.conditions
|
||||||
|
test.consensus > test.csf
|
||||||
|
test.consensus > test.toplevel
|
||||||
|
test.consensus > test.unit_test
|
||||||
|
test.consensus > xrpl.basics
|
||||||
|
test.consensus > xrpld.app
|
||||||
|
test.consensus > xrpld.consensus
|
||||||
|
test.consensus > xrpl.json
|
||||||
|
test.consensus > xrpl.ledger
|
||||||
|
test.core > test.jtx
|
||||||
|
test.core > test.toplevel
|
||||||
|
test.core > test.unit_test
|
||||||
|
test.core > xrpl.basics
|
||||||
|
test.core > xrpld.core
|
||||||
|
test.core > xrpld.perflog
|
||||||
|
test.core > xrpl.json
|
||||||
|
test.core > xrpl.server
|
||||||
|
test.csf > xrpl.basics
|
||||||
|
test.csf > xrpld.consensus
|
||||||
|
test.csf > xrpl.json
|
||||||
|
test.csf > xrpl.protocol
|
||||||
|
test.json > test.jtx
|
||||||
|
test.json > xrpl.json
|
||||||
|
test.jtx > xrpl.basics
|
||||||
|
test.jtx > xrpld.app
|
||||||
|
test.jtx > xrpld.core
|
||||||
|
test.jtx > xrpld.rpc
|
||||||
|
test.jtx > xrpl.json
|
||||||
|
test.jtx > xrpl.ledger
|
||||||
|
test.jtx > xrpl.net
|
||||||
|
test.jtx > xrpl.protocol
|
||||||
|
test.jtx > xrpl.resource
|
||||||
|
test.jtx > xrpl.server
|
||||||
|
test.ledger > test.jtx
|
||||||
|
test.ledger > test.toplevel
|
||||||
|
test.ledger > xrpl.basics
|
||||||
|
test.ledger > xrpld.app
|
||||||
|
test.ledger > xrpld.core
|
||||||
|
test.ledger > xrpl.ledger
|
||||||
|
test.ledger > xrpl.protocol
|
||||||
|
test.nodestore > test.jtx
|
||||||
|
test.nodestore > test.toplevel
|
||||||
|
test.nodestore > test.unit_test
|
||||||
|
test.nodestore > xrpl.basics
|
||||||
|
test.nodestore > xrpld.core
|
||||||
|
test.nodestore > xrpl.nodestore
|
||||||
|
test.overlay > test.jtx
|
||||||
|
test.overlay > test.toplevel
|
||||||
|
test.overlay > test.unit_test
|
||||||
|
test.overlay > xrpl.basics
|
||||||
|
test.overlay > xrpld.app
|
||||||
|
test.overlay > xrpld.overlay
|
||||||
|
test.overlay > xrpld.peerfinder
|
||||||
|
test.overlay > xrpl.protocol
|
||||||
|
test.overlay > xrpl.shamap
|
||||||
|
test.peerfinder > test.beast
|
||||||
|
test.peerfinder > test.unit_test
|
||||||
|
test.peerfinder > xrpl.basics
|
||||||
|
test.peerfinder > xrpld.core
|
||||||
|
test.peerfinder > xrpld.peerfinder
|
||||||
|
test.peerfinder > xrpl.protocol
|
||||||
|
test.protocol > test.toplevel
|
||||||
|
test.protocol > xrpl.basics
|
||||||
|
test.protocol > xrpl.json
|
||||||
|
test.protocol > xrpl.protocol
|
||||||
|
test.resource > test.unit_test
|
||||||
|
test.resource > xrpl.basics
|
||||||
|
test.resource > xrpl.resource
|
||||||
|
test.rpc > test.jtx
|
||||||
|
test.rpc > test.toplevel
|
||||||
|
test.rpc > xrpl.basics
|
||||||
|
test.rpc > xrpld.app
|
||||||
|
test.rpc > xrpld.core
|
||||||
|
test.rpc > xrpld.overlay
|
||||||
|
test.rpc > xrpld.rpc
|
||||||
|
test.rpc > xrpl.json
|
||||||
|
test.rpc > xrpl.protocol
|
||||||
|
test.rpc > xrpl.resource
|
||||||
|
test.server > test.jtx
|
||||||
|
test.server > test.toplevel
|
||||||
|
test.server > test.unit_test
|
||||||
|
test.server > xrpl.basics
|
||||||
|
test.server > xrpld.app
|
||||||
|
test.server > xrpld.core
|
||||||
|
test.server > xrpld.rpc
|
||||||
|
test.server > xrpl.json
|
||||||
|
test.server > xrpl.server
|
||||||
|
test.shamap > test.unit_test
|
||||||
|
test.shamap > xrpl.basics
|
||||||
|
test.shamap > xrpl.nodestore
|
||||||
|
test.shamap > xrpl.protocol
|
||||||
|
test.shamap > xrpl.shamap
|
||||||
|
test.toplevel > test.csf
|
||||||
|
test.toplevel > xrpl.json
|
||||||
|
test.unit_test > xrpl.basics
|
||||||
|
tests.libxrpl > xrpl.basics
|
||||||
|
tests.libxrpl > xrpl.json
|
||||||
|
tests.libxrpl > xrpl.net
|
||||||
|
xrpl.json > xrpl.basics
|
||||||
|
xrpl.ledger > xrpl.basics
|
||||||
|
xrpl.ledger > xrpl.protocol
|
||||||
|
xrpl.net > xrpl.basics
|
||||||
|
xrpl.nodestore > xrpl.basics
|
||||||
|
xrpl.nodestore > xrpl.protocol
|
||||||
|
xrpl.protocol > xrpl.basics
|
||||||
|
xrpl.protocol > xrpl.json
|
||||||
|
xrpl.resource > xrpl.basics
|
||||||
|
xrpl.resource > xrpl.json
|
||||||
|
xrpl.resource > xrpl.protocol
|
||||||
|
xrpl.server > xrpl.basics
|
||||||
|
xrpl.server > xrpl.json
|
||||||
|
xrpl.server > xrpl.protocol
|
||||||
|
xrpl.shamap > xrpl.basics
|
||||||
|
xrpl.shamap > xrpl.nodestore
|
||||||
|
xrpl.shamap > xrpl.protocol
|
||||||
|
xrpld.app > test.unit_test
|
||||||
|
xrpld.app > xrpl.basics
|
||||||
|
xrpld.app > xrpld.conditions
|
||||||
|
xrpld.app > xrpld.consensus
|
||||||
|
xrpld.app > xrpld.perflog
|
||||||
|
xrpld.app > xrpl.json
|
||||||
|
xrpld.app > xrpl.ledger
|
||||||
|
xrpld.app > xrpl.net
|
||||||
|
xrpld.app > xrpl.nodestore
|
||||||
|
xrpld.app > xrpl.protocol
|
||||||
|
xrpld.app > xrpl.resource
|
||||||
|
xrpld.app > xrpl.shamap
|
||||||
|
xrpld.conditions > xrpl.basics
|
||||||
|
xrpld.conditions > xrpl.protocol
|
||||||
|
xrpld.consensus > xrpl.basics
|
||||||
|
xrpld.consensus > xrpl.json
|
||||||
|
xrpld.consensus > xrpl.protocol
|
||||||
|
xrpld.core > xrpl.basics
|
||||||
|
xrpld.core > xrpl.json
|
||||||
|
xrpld.core > xrpl.net
|
||||||
|
xrpld.core > xrpl.protocol
|
||||||
|
xrpld.overlay > xrpl.basics
|
||||||
|
xrpld.overlay > xrpld.core
|
||||||
|
xrpld.overlay > xrpld.peerfinder
|
||||||
|
xrpld.overlay > xrpld.perflog
|
||||||
|
xrpld.overlay > xrpl.json
|
||||||
|
xrpld.overlay > xrpl.protocol
|
||||||
|
xrpld.overlay > xrpl.resource
|
||||||
|
xrpld.overlay > xrpl.server
|
||||||
|
xrpld.peerfinder > xrpl.basics
|
||||||
|
xrpld.peerfinder > xrpld.core
|
||||||
|
xrpld.peerfinder > xrpl.protocol
|
||||||
|
xrpld.perflog > xrpl.basics
|
||||||
|
xrpld.perflog > xrpl.json
|
||||||
|
xrpld.rpc > xrpl.basics
|
||||||
|
xrpld.rpc > xrpld.core
|
||||||
|
xrpld.rpc > xrpl.json
|
||||||
|
xrpld.rpc > xrpl.ledger
|
||||||
|
xrpld.rpc > xrpl.net
|
||||||
|
xrpld.rpc > xrpl.nodestore
|
||||||
|
xrpld.rpc > xrpl.protocol
|
||||||
|
xrpld.rpc > xrpl.resource
|
||||||
|
xrpld.rpc > xrpl.server
|
||||||
|
xrpld.shamap > xrpl.shamap
|
||||||
36
.github/scripts/rename/README.md
vendored
Normal file
36
.github/scripts/rename/README.md
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
## Renaming ripple(d) to xrpl(d)
|
||||||
|
|
||||||
|
In the initial phases of development of the XRPL, the open source codebase was
|
||||||
|
called "rippled" and it remains with that name even today. Today, over 1000
|
||||||
|
nodes run the application, and code contributions have been submitted by
|
||||||
|
developers located around the world. The XRPL community is larger than ever.
|
||||||
|
In light of the decentralized and diversified nature of XRPL, we will rename any
|
||||||
|
references to `ripple` and `rippled` to `xrpl` and `xrpld`, when appropriate.
|
||||||
|
|
||||||
|
See [here](https://xls.xrpl.org/xls/XLS-0095-rename-rippled-to-xrpld.html) for
|
||||||
|
more information.
|
||||||
|
|
||||||
|
### Scripts
|
||||||
|
|
||||||
|
To facilitate this transition, there will be multiple scripts that developers
|
||||||
|
can run on their own PRs and forks to minimize conflicts. Each script should be
|
||||||
|
run from the repository root.
|
||||||
|
|
||||||
|
1. `.github/scripts/rename/definitions.sh`: This script will rename all
|
||||||
|
definitions, such as include guards, from `RIPPLE_XXX` and `RIPPLED_XXX` to
|
||||||
|
`XRPL_XXX`.
|
||||||
|
2. `.github/scripts/rename/copyright.sh`: This script will remove superflous
|
||||||
|
copyright notices.
|
||||||
|
3. `.github/scripts/rename/cmake.sh`: This script will rename all CMake files
|
||||||
|
from `RippleXXX.cmake` or `RippledXXX.cmake` to `XrplXXX.cmake`, and any
|
||||||
|
references to `ripple` and `rippled` (with or without capital letters) to
|
||||||
|
`xrpl` and `xrpld`, respectively. The name of the binary will remain as-is,
|
||||||
|
and will only be renamed to `xrpld` by a later script.
|
||||||
|
|
||||||
|
You can run all these scripts from the repository root as follows:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
./.github/scripts/rename/definitions.sh .
|
||||||
|
./.github/scripts/rename/copyright.sh .
|
||||||
|
./.github/scripts/rename/cmake.sh .
|
||||||
|
```
|
||||||
85
.github/scripts/rename/cmake.sh
vendored
Executable file
85
.github/scripts/rename/cmake.sh
vendored
Executable file
@@ -0,0 +1,85 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Exit the script as soon as an error occurs.
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# On MacOS, ensure that GNU sed and head are installed and available as `gsed`
|
||||||
|
# and `ghead`, respectively.
|
||||||
|
SED_COMMAND=sed
|
||||||
|
HEAD_COMMAND=head
|
||||||
|
if [[ "${OSTYPE}" == 'darwin'* ]]; then
|
||||||
|
if ! command -v gsed &> /dev/null; then
|
||||||
|
echo "Error: gsed is not installed. Please install it using 'brew install gnu-sed'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
SED_COMMAND=gsed
|
||||||
|
if ! command -v ghead &> /dev/null; then
|
||||||
|
echo "Error: ghead is not installed. Please install it using 'brew install coreutils'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
HEAD_COMMAND=ghead
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This script renames CMake files from `RippleXXX.cmake` or `RippledXXX.cmake`
|
||||||
|
# to `XrplXXX.cmake`, and any references to `ripple` and `rippled` (with or
|
||||||
|
# without capital letters) to `xrpl` and `xrpld`, respectively. The name of the
|
||||||
|
# binary will remain as-is, and will only be renamed to `xrpld` in a different
|
||||||
|
# script, but the proto file will be renamed.
|
||||||
|
# Usage: .github/scripts/rename/cmake.sh <repository directory>
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "Usage: $0 <repository directory>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DIRECTORY=$1
|
||||||
|
echo "Processing directory: ${DIRECTORY}"
|
||||||
|
if [ ! -d "${DIRECTORY}" ]; then
|
||||||
|
echo "Error: Directory '${DIRECTORY}' does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
pushd ${DIRECTORY}
|
||||||
|
|
||||||
|
# Rename the files.
|
||||||
|
find cmake -type f -name 'Rippled*.cmake' -exec bash -c 'mv "${1}" "${1/Rippled/Xrpl}"' - {} \;
|
||||||
|
find cmake -type f -name 'Ripple*.cmake' -exec bash -c 'mv "${1}" "${1/Ripple/Xrpl}"' - {} \;
|
||||||
|
if [ -e cmake/xrpl_add_test.cmake ]; then
|
||||||
|
mv cmake/xrpl_add_test.cmake cmake/XrplAddTest.cmake
|
||||||
|
fi
|
||||||
|
if [ -e include/xrpl/proto/ripple.proto ]; then
|
||||||
|
mv include/xrpl/proto/ripple.proto include/xrpl/proto/xrpl.proto
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Rename inside the files.
|
||||||
|
find cmake -type f -name '*.cmake' | while read -r FILE; do
|
||||||
|
echo "Processing file: ${FILE}"
|
||||||
|
${SED_COMMAND} -i 's/Rippled/Xrpld/g' "${FILE}"
|
||||||
|
${SED_COMMAND} -i 's/Ripple/Xrpl/g' "${FILE}"
|
||||||
|
${SED_COMMAND} -i 's/rippled/xrpld/g' "${FILE}"
|
||||||
|
${SED_COMMAND} -i 's/ripple/xrpl/g' "${FILE}"
|
||||||
|
done
|
||||||
|
${SED_COMMAND} -i -E 's/Rippled?/Xrpl/g' CMakeLists.txt
|
||||||
|
${SED_COMMAND} -i 's/ripple/xrpl/g' CMakeLists.txt
|
||||||
|
${SED_COMMAND} -i 's/include(xrpl_add_test)/include(XrplAddTest)/' src/tests/libxrpl/CMakeLists.txt
|
||||||
|
${SED_COMMAND} -i 's/ripple.pb.h/xrpl.pb.h/' include/xrpl/protocol/messages.h
|
||||||
|
${SED_COMMAND} -i 's/ripple.pb.h/xrpl.pb.h/' BUILD.md
|
||||||
|
${SED_COMMAND} -i 's/ripple.pb.h/xrpl.pb.h/' BUILD.md
|
||||||
|
|
||||||
|
# Restore the name of the validator keys repository.
|
||||||
|
${SED_COMMAND} -i 's@xrpl/validator-keys-tool@ripple/validator-keys-tool@' cmake/XrplValidatorKeys.cmake
|
||||||
|
|
||||||
|
# Ensure the name of the binary and config remain 'rippled' for now.
|
||||||
|
${SED_COMMAND} -i -E 's/xrpld(-example)?\.cfg/rippled\1.cfg/g' cmake/XrplInstall.cmake
|
||||||
|
if grep -q '"xrpld"' cmake/XrplCore.cmake; then
|
||||||
|
# The script has been rerun, so just restore the name of the binary.
|
||||||
|
${SED_COMMAND} -i 's/"xrpld"/"rippled"/' cmake/XrplCore.cmake
|
||||||
|
elif ! grep -q '"rippled"' cmake/XrplCore.cmake; then
|
||||||
|
ghead -n -1 cmake/XrplCore.cmake > cmake.tmp
|
||||||
|
echo ' # For the time being, we will keep the name of the binary as it was.' >> cmake.tmp
|
||||||
|
echo ' set_target_properties(xrpld PROPERTIES OUTPUT_NAME "rippled")' >> cmake.tmp
|
||||||
|
tail -1 cmake/XrplCore.cmake >> cmake.tmp
|
||||||
|
mv cmake.tmp cmake/XrplCore.cmake
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
echo "Renaming complete."
|
||||||
106
.github/scripts/rename/copyright.sh
vendored
Executable file
106
.github/scripts/rename/copyright.sh
vendored
Executable file
@@ -0,0 +1,106 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Exit the script as soon as an error occurs.
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# On MacOS, ensure that GNU sed is installed and available as `gsed`.
|
||||||
|
SED_COMMAND=sed
|
||||||
|
if [[ "${OSTYPE}" == 'darwin'* ]]; then
|
||||||
|
if ! command -v gsed &> /dev/null; then
|
||||||
|
echo "Error: gsed is not installed. Please install it using 'brew install gnu-sed'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
SED_COMMAND=gsed
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This script removes superfluous copyright notices in source and header files
|
||||||
|
# in this project. Specifically, it removes all notices referencing Ripple,
|
||||||
|
# XRPLF, and certain individual contributors upon mutual agreement, so the one
|
||||||
|
# in the LICENSE.md file applies throughout. Copyright notices referencing
|
||||||
|
# external contributions, e.g. from Bitcoin, remain as-is.
|
||||||
|
# Usage: .github/scripts/rename/copyright.sh <repository directory>
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "Usage: $0 <repository directory>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DIRECTORY=$1
|
||||||
|
echo "Processing directory: ${DIRECTORY}"
|
||||||
|
if [ ! -d "${DIRECTORY}" ]; then
|
||||||
|
echo "Error: Directory '${DIRECTORY}' does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
pushd ${DIRECTORY}
|
||||||
|
|
||||||
|
# Prevent sed and echo from removing newlines and tabs in string literals by
|
||||||
|
# temporarily replacing them with placeholders. This only affects one file.
|
||||||
|
PLACEHOLDER_NEWLINE="__NEWLINE__"
|
||||||
|
PLACEHOLDER_TAB="__TAB__"
|
||||||
|
${SED_COMMAND} -i -E "s@\\\n@${PLACEHOLDER_NEWLINE}@g" src/test/rpc/ValidatorInfo_test.cpp
|
||||||
|
${SED_COMMAND} -i -E "s@\\\t@${PLACEHOLDER_TAB}@g" src/test/rpc/ValidatorInfo_test.cpp
|
||||||
|
|
||||||
|
# Process the include/ and src/ directories.
|
||||||
|
DIRECTORIES=("include" "src")
|
||||||
|
for DIRECTORY in "${DIRECTORIES[@]}"; do
|
||||||
|
echo "Processing directory: ${DIRECTORY}"
|
||||||
|
|
||||||
|
find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" -o -name "*.macro" \) | while read -r FILE; do
|
||||||
|
echo "Processing file: ${FILE}"
|
||||||
|
# Handle the cases where the copyright notice is enclosed in /* ... */
|
||||||
|
# and usually surrounded by //---- and //======.
|
||||||
|
${SED_COMMAND} -z -i -E 's@^//-------+\n+@@' "${FILE}"
|
||||||
|
${SED_COMMAND} -z -i -E 's@^.*Copyright.+(Ripple|Bougalis|Falco|Hinnant|Null|Ritchford|XRPLF).+PERFORMANCE OF THIS SOFTWARE\.\n\*/\n+@@' "${FILE}"
|
||||||
|
${SED_COMMAND} -z -i -E 's@^//=======+\n+@@' "${FILE}"
|
||||||
|
|
||||||
|
# Handle the cases where the copyright notice is commented out with //.
|
||||||
|
${SED_COMMAND} -z -i -E 's@^//\n// Copyright.+Falco \(vinnie dot falco at gmail dot com\)\n//\n+@@' "${FILE}"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# Restore copyright notices that were removed from specific files, without
|
||||||
|
# restoring the verbiage that is already present in LICENSE.md. Ensure that if
|
||||||
|
# the script is run multiple times, duplicate notices are not added.
|
||||||
|
if ! grep -q 'Raw Material Software' include/xrpl/beast/core/CurrentThreadName.h; then
|
||||||
|
echo -e "// Portions of this file are from JUCE (http://www.juce.com).\n// Copyright (c) 2013 - Raw Material Software Ltd.\n// Please visit http://www.juce.com\n\n$(cat include/xrpl/beast/core/CurrentThreadName.h)" > include/xrpl/beast/core/CurrentThreadName.h
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Dev Null' src/test/app/NetworkID_test.cpp; then
|
||||||
|
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/app/NetworkID_test.cpp)" > src/test/app/NetworkID_test.cpp
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Dev Null' src/test/app/tx/apply_test.cpp; then
|
||||||
|
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/app/tx/apply_test.cpp)" > src/test/app/tx/apply_test.cpp
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Dev Null' src/test/app/NetworkOPs_test.cpp; then
|
||||||
|
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/app/NetworkOPs_test.cpp)" > src/test/app/NetworkOPs_test.cpp
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Dev Null' src/test/rpc/ManifestRPC_test.cpp; then
|
||||||
|
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/rpc/ManifestRPC_test.cpp)" > src/test/rpc/ManifestRPC_test.cpp
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Dev Null' src/test/rpc/ValidatorInfo_test.cpp; then
|
||||||
|
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/rpc/ValidatorInfo_test.cpp)" > src/test/rpc/ValidatorInfo_test.cpp
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/DoManifest.cpp; then
|
||||||
|
echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/DoManifest.cpp)" > src/xrpld/rpc/handlers/DoManifest.cpp
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/ValidatorInfo.cpp; then
|
||||||
|
echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/ValidatorInfo.cpp)" > src/xrpld/rpc/handlers/ValidatorInfo.cpp
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Bougalis' include/xrpl/basics/SlabAllocator.h; then
|
||||||
|
echo -e "// Copyright (c) 2022, Nikolaos D. Bougalis <nikb@bougalis.net>\n\n$(cat include/xrpl/basics/SlabAllocator.h)" > include/xrpl/basics/SlabAllocator.h
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Bougalis' include/xrpl/basics/spinlock.h; then
|
||||||
|
echo -e "// Copyright (c) 2022, Nikolaos D. Bougalis <nikb@bougalis.net>\n\n$(cat include/xrpl/basics/spinlock.h)" > include/xrpl/basics/spinlock.h
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Bougalis' include/xrpl/basics/tagged_integer.h; then
|
||||||
|
echo -e "// Copyright (c) 2014, Nikolaos D. Bougalis <nikb@bougalis.net>\n\n$(cat include/xrpl/basics/tagged_integer.h)" > include/xrpl/basics/tagged_integer.h
|
||||||
|
fi
|
||||||
|
if ! grep -q 'Ritchford' include/xrpl/beast/utility/Zero.h; then
|
||||||
|
echo -e "// Copyright (c) 2014, Tom Ritchford <tom@swirly.com>\n\n$(cat include/xrpl/beast/utility/Zero.h)" > include/xrpl/beast/utility/Zero.h
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restore newlines and tabs in string literals in the affected file.
|
||||||
|
${SED_COMMAND} -i -E "s@${PLACEHOLDER_NEWLINE}@\\\n@g" src/test/rpc/ValidatorInfo_test.cpp
|
||||||
|
${SED_COMMAND} -i -E "s@${PLACEHOLDER_TAB}@\\\t@g" src/test/rpc/ValidatorInfo_test.cpp
|
||||||
|
|
||||||
|
popd
|
||||||
|
echo "Removal complete."
|
||||||
42
.github/scripts/rename/definitions.sh
vendored
Executable file
42
.github/scripts/rename/definitions.sh
vendored
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Exit the script as soon as an error occurs.
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# On MacOS, ensure that GNU sed is installed and available as `gsed`.
|
||||||
|
SED_COMMAND=sed
|
||||||
|
if [[ "${OSTYPE}" == 'darwin'* ]]; then
|
||||||
|
if ! command -v gsed &> /dev/null; then
|
||||||
|
echo "Error: gsed is not installed. Please install it using 'brew install gnu-sed'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
SED_COMMAND=gsed
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This script renames definitions, such as include guards, in this project.
|
||||||
|
# Specifically, it renames "RIPPLED_XXX" and "RIPPLE_XXX" to "XRPL_XXX" by
|
||||||
|
# scanning all cmake, header, and source files in the specified directory and
|
||||||
|
# its subdirectories.
|
||||||
|
# Usage: .github/scripts/rename/definitions.sh <repository directory>
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "Usage: $0 <repository directory>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DIRECTORY=$1
|
||||||
|
echo "Processing directory: ${DIRECTORY}"
|
||||||
|
if [ ! -d "${DIRECTORY}" ]; then
|
||||||
|
echo "Error: Directory '${DIRECTORY}' does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" \) | while read -r FILE; do
|
||||||
|
echo "Processing file: ${FILE}"
|
||||||
|
${SED_COMMAND} -i -E 's@#(define|endif|if|ifdef|ifndef)(.*)(RIPPLED_|RIPPLE_)([A-Z0-9_]+)@#\1\2XRPL_\4@g' "${FILE}"
|
||||||
|
done
|
||||||
|
find "${DIRECTORY}" -type f \( -name "*.cmake" -o -name "*.txt" \) | while read -r FILE; do
|
||||||
|
echo "Processing file: ${FILE}"
|
||||||
|
${SED_COMMAND} -i -E 's@(RIPPLED_|RIPPLE_)([A-Z0-9_]+)@XRPL_\2@g' "${FILE}"
|
||||||
|
done
|
||||||
|
echo "Renaming complete."
|
||||||
197
.github/scripts/strategy-matrix/generate.py
vendored
Executable file
197
.github/scripts/strategy-matrix/generate.py
vendored
Executable file
@@ -0,0 +1,197 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import argparse
|
||||||
|
import itertools
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
THIS_DIR = Path(__file__).parent.resolve()
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Config:
|
||||||
|
architecture: list[dict]
|
||||||
|
os: list[dict]
|
||||||
|
build_type: list[str]
|
||||||
|
cmake_args: list[str]
|
||||||
|
|
||||||
|
'''
|
||||||
|
Generate a strategy matrix for GitHub Actions CI.
|
||||||
|
|
||||||
|
On each PR commit we will build a selection of Debian, RHEL, Ubuntu, MacOS, and
|
||||||
|
Windows configurations, while upon merge into the develop, release, or master
|
||||||
|
branches, we will build all configurations, and test most of them.
|
||||||
|
|
||||||
|
We will further set additional CMake arguments as follows:
|
||||||
|
- All builds will have the `tests`, `werr`, and `xrpld` options.
|
||||||
|
- All builds will have the `wextra` option except for GCC 12 and Clang 16.
|
||||||
|
- All release builds will have the `assert` option.
|
||||||
|
- Certain Debian Bookworm configurations will change the reference fee, enable
|
||||||
|
codecov, and enable voidstar in PRs.
|
||||||
|
'''
|
||||||
|
def generate_strategy_matrix(all: bool, config: Config) -> list:
|
||||||
|
configurations = []
|
||||||
|
for architecture, os, build_type, cmake_args in itertools.product(config.architecture, config.os, config.build_type, config.cmake_args):
|
||||||
|
# The default CMake target is 'all' for Linux and MacOS and 'install'
|
||||||
|
# for Windows, but it can get overridden for certain configurations.
|
||||||
|
cmake_target = 'install' if os["distro_name"] == 'windows' else 'all'
|
||||||
|
|
||||||
|
# We build and test all configurations by default, except for Windows in
|
||||||
|
# Debug, because it is too slow, as well as when code coverage is
|
||||||
|
# enabled as that mode already runs the tests.
|
||||||
|
build_only = False
|
||||||
|
if os['distro_name'] == 'windows' and build_type == 'Debug':
|
||||||
|
build_only = True
|
||||||
|
|
||||||
|
# Only generate a subset of configurations in PRs.
|
||||||
|
if not all:
|
||||||
|
# Debian:
|
||||||
|
# - Bookworm using GCC 13: Release and Unity on linux/amd64, set
|
||||||
|
# the reference fee to 500.
|
||||||
|
# - Bookworm using GCC 15: Debug and no Unity on linux/amd64, enable
|
||||||
|
# code coverage (which will be done below).
|
||||||
|
# - Bookworm using Clang 16: Debug and no Unity on linux/arm64,
|
||||||
|
# enable voidstar.
|
||||||
|
# - Bookworm using Clang 17: Release and no Unity on linux/amd64,
|
||||||
|
# set the reference fee to 1000.
|
||||||
|
# - Bookworm using Clang 20: Debug and Unity on linux/amd64.
|
||||||
|
if os['distro_name'] == 'debian':
|
||||||
|
skip = True
|
||||||
|
if os['distro_version'] == 'bookworm':
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-13' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||||
|
cmake_args = f'-DUNIT_TEST_REFERENCE_FEE=500 {cmake_args}'
|
||||||
|
skip = False
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-15' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||||
|
skip = False
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-16' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/arm64':
|
||||||
|
cmake_args = f'-Dvoidstar=ON {cmake_args}'
|
||||||
|
skip = False
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-17' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||||
|
cmake_args = f'-DUNIT_TEST_REFERENCE_FEE=1000 {cmake_args}'
|
||||||
|
skip = False
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and build_type == 'Debug' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||||
|
skip = False
|
||||||
|
if skip:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# RHEL:
|
||||||
|
# - 9 using GCC 12: Debug and Unity on linux/amd64.
|
||||||
|
# - 10 using Clang: Release and no Unity on linux/amd64.
|
||||||
|
if os['distro_name'] == 'rhel':
|
||||||
|
skip = True
|
||||||
|
if os['distro_version'] == '9':
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-12' and build_type == 'Debug' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||||
|
skip = False
|
||||||
|
elif os['distro_version'] == '10':
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-any' and build_type == 'Release' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||||
|
skip = False
|
||||||
|
if skip:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Ubuntu:
|
||||||
|
# - Jammy using GCC 12: Debug and no Unity on linux/arm64.
|
||||||
|
# - Noble using GCC 14: Release and Unity on linux/amd64.
|
||||||
|
# - Noble using Clang 18: Debug and no Unity on linux/amd64.
|
||||||
|
# - Noble using Clang 19: Release and Unity on linux/arm64.
|
||||||
|
if os['distro_name'] == 'ubuntu':
|
||||||
|
skip = True
|
||||||
|
if os['distro_version'] == 'jammy':
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-12' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/arm64':
|
||||||
|
skip = False
|
||||||
|
elif os['distro_version'] == 'noble':
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-14' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||||
|
skip = False
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-18' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||||
|
skip = False
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-19' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/arm64':
|
||||||
|
skip = False
|
||||||
|
if skip:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# MacOS:
|
||||||
|
# - Debug and no Unity on macos/arm64.
|
||||||
|
if os['distro_name'] == 'macos' and not (build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'macos/arm64'):
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Windows:
|
||||||
|
# - Release and Unity on windows/amd64.
|
||||||
|
if os['distro_name'] == 'windows' and not (build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'windows/amd64'):
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
# Additional CMake arguments.
|
||||||
|
cmake_args = f'{cmake_args} -Dtests=ON -Dwerr=ON -Dxrpld=ON'
|
||||||
|
if not f'{os['compiler_name']}-{os['compiler_version']}' in ['gcc-12', 'clang-16']:
|
||||||
|
cmake_args = f'{cmake_args} -Dwextra=ON'
|
||||||
|
if build_type == 'Release':
|
||||||
|
cmake_args = f'{cmake_args} -Dassert=ON'
|
||||||
|
|
||||||
|
# We skip all RHEL on arm64 due to a build failure that needs further
|
||||||
|
# investigation.
|
||||||
|
if os['distro_name'] == 'rhel' and architecture['platform'] == 'linux/arm64':
|
||||||
|
continue
|
||||||
|
|
||||||
|
# We skip all clang-20 on arm64 due to boost 1.86 build error
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and architecture['platform'] == 'linux/arm64':
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Enable code coverage for Debian Bookworm using GCC 15 in Debug and no
|
||||||
|
# Unity on linux/amd64
|
||||||
|
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-15' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||||
|
cmake_args = f'-Dcoverage=ON -Dcoverage_format=xml -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_C_FLAGS=-O0 -DCMAKE_CXX_FLAGS=-O0 {cmake_args}'
|
||||||
|
cmake_target = 'coverage'
|
||||||
|
build_only = True
|
||||||
|
|
||||||
|
# Generate a unique name for the configuration, e.g. macos-arm64-debug
|
||||||
|
# or debian-bookworm-gcc-12-amd64-release-unity.
|
||||||
|
config_name = os['distro_name']
|
||||||
|
if (n := os['distro_version']) != '':
|
||||||
|
config_name += f'-{n}'
|
||||||
|
if (n := os['compiler_name']) != '':
|
||||||
|
config_name += f'-{n}'
|
||||||
|
if (n := os['compiler_version']) != '':
|
||||||
|
config_name += f'-{n}'
|
||||||
|
config_name += f'-{architecture['platform'][architecture['platform'].find('/')+1:]}'
|
||||||
|
config_name += f'-{build_type.lower()}'
|
||||||
|
if '-Dunity=ON' in cmake_args:
|
||||||
|
config_name += '-unity'
|
||||||
|
|
||||||
|
# Add the configuration to the list, with the most unique fields first,
|
||||||
|
# so that they are easier to identify in the GitHub Actions UI, as long
|
||||||
|
# names get truncated.
|
||||||
|
configurations.append({
|
||||||
|
'config_name': config_name,
|
||||||
|
'cmake_args': cmake_args,
|
||||||
|
'cmake_target': cmake_target,
|
||||||
|
'build_only': build_only,
|
||||||
|
'build_type': build_type,
|
||||||
|
'os': os,
|
||||||
|
'architecture': architecture,
|
||||||
|
})
|
||||||
|
|
||||||
|
return configurations
|
||||||
|
|
||||||
|
|
||||||
|
def read_config(file: Path) -> Config:
|
||||||
|
config = json.loads(file.read_text())
|
||||||
|
if config['architecture'] is None or config['os'] is None or config['build_type'] is None or config['cmake_args'] is None:
|
||||||
|
raise Exception('Invalid configuration file.')
|
||||||
|
|
||||||
|
return Config(**config)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('-a', '--all', help='Set to generate all configurations (generally used when merging a PR) or leave unset to generate a subset of configurations (generally used when committing to a PR).', action="store_true")
|
||||||
|
parser.add_argument('-c', '--config', help='Path to the JSON file containing the strategy matrix configurations.', required=False, type=Path)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
matrix = []
|
||||||
|
if args.config is None or args.config == '':
|
||||||
|
matrix += generate_strategy_matrix(args.all, read_config(THIS_DIR / "linux.json"))
|
||||||
|
matrix += generate_strategy_matrix(args.all, read_config(THIS_DIR / "macos.json"))
|
||||||
|
matrix += generate_strategy_matrix(args.all, read_config(THIS_DIR / "windows.json"))
|
||||||
|
else:
|
||||||
|
matrix += generate_strategy_matrix(args.all, read_config(args.config))
|
||||||
|
|
||||||
|
# Generate the strategy matrix.
|
||||||
|
print(f'matrix={json.dumps({"include": matrix})}')
|
||||||
184
.github/scripts/strategy-matrix/linux.json
vendored
Normal file
184
.github/scripts/strategy-matrix/linux.json
vendored
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
{
|
||||||
|
"architecture": [
|
||||||
|
{
|
||||||
|
"platform": "linux/amd64",
|
||||||
|
"runner": ["self-hosted", "Linux", "X64", "heavy"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"platform": "linux/arm64",
|
||||||
|
"runner": ["self-hosted", "Linux", "ARM64", "heavy-arm64"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"os": [
|
||||||
|
{
|
||||||
|
"distro_name": "debian",
|
||||||
|
"distro_version": "bookworm",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "12",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "debian",
|
||||||
|
"distro_version": "bookworm",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "13",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "debian",
|
||||||
|
"distro_version": "bookworm",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "14",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "debian",
|
||||||
|
"distro_version": "bookworm",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "15",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "debian",
|
||||||
|
"distro_version": "bookworm",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "16",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "debian",
|
||||||
|
"distro_version": "bookworm",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "17",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "debian",
|
||||||
|
"distro_version": "bookworm",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "18",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "debian",
|
||||||
|
"distro_version": "bookworm",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "19",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "debian",
|
||||||
|
"distro_version": "bookworm",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "20",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "rhel",
|
||||||
|
"distro_version": "8",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "14",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "rhel",
|
||||||
|
"distro_version": "8",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "any",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "rhel",
|
||||||
|
"distro_version": "9",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "12",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "rhel",
|
||||||
|
"distro_version": "9",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "13",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "rhel",
|
||||||
|
"distro_version": "9",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "14",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "rhel",
|
||||||
|
"distro_version": "9",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "any",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "rhel",
|
||||||
|
"distro_version": "10",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "14",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "rhel",
|
||||||
|
"distro_version": "10",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "any",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "ubuntu",
|
||||||
|
"distro_version": "jammy",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "12",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "ubuntu",
|
||||||
|
"distro_version": "noble",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "13",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "ubuntu",
|
||||||
|
"distro_version": "noble",
|
||||||
|
"compiler_name": "gcc",
|
||||||
|
"compiler_version": "14",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "ubuntu",
|
||||||
|
"distro_version": "noble",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "16",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "ubuntu",
|
||||||
|
"distro_version": "noble",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "17",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "ubuntu",
|
||||||
|
"distro_version": "noble",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "18",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"distro_name": "ubuntu",
|
||||||
|
"distro_version": "noble",
|
||||||
|
"compiler_name": "clang",
|
||||||
|
"compiler_version": "19",
|
||||||
|
"image_sha": "97ba375"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build_type": ["Debug", "Release"],
|
||||||
|
"cmake_args": ["-Dunity=OFF", "-Dunity=ON"]
|
||||||
|
}
|
||||||
22
.github/scripts/strategy-matrix/macos.json
vendored
Normal file
22
.github/scripts/strategy-matrix/macos.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"architecture": [
|
||||||
|
{
|
||||||
|
"platform": "macos/arm64",
|
||||||
|
"runner": ["self-hosted", "macOS", "ARM64", "mac-runner-m1"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"os": [
|
||||||
|
{
|
||||||
|
"distro_name": "macos",
|
||||||
|
"distro_version": "",
|
||||||
|
"compiler_name": "",
|
||||||
|
"compiler_version": "",
|
||||||
|
"image_sha": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build_type": ["Debug", "Release"],
|
||||||
|
"cmake_args": [
|
||||||
|
"-Dunity=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5",
|
||||||
|
"-Dunity=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5"
|
||||||
|
]
|
||||||
|
}
|
||||||
19
.github/scripts/strategy-matrix/windows.json
vendored
Normal file
19
.github/scripts/strategy-matrix/windows.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"architecture": [
|
||||||
|
{
|
||||||
|
"platform": "windows/amd64",
|
||||||
|
"runner": ["self-hosted", "Windows", "devbox"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"os": [
|
||||||
|
{
|
||||||
|
"distro_name": "windows",
|
||||||
|
"distro_version": "",
|
||||||
|
"compiler_name": "",
|
||||||
|
"compiler_version": "",
|
||||||
|
"image_sha": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build_type": ["Debug", "Release"],
|
||||||
|
"cmake_args": ["-Dunity=OFF", "-Dunity=ON"]
|
||||||
|
}
|
||||||
61
.github/workflows/clang-format.yml
vendored
61
.github/workflows/clang-format.yml
vendored
@@ -1,61 +0,0 @@
|
|||||||
name: clang-format
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
env:
|
|
||||||
CLANG_VERSION: 10
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Install clang-format
|
|
||||||
run: |
|
|
||||||
codename=$( lsb_release --codename --short )
|
|
||||||
sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null <<EOF
|
|
||||||
deb http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
|
||||||
deb-src http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
|
||||||
EOF
|
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install clang-format-${CLANG_VERSION}
|
|
||||||
- name: Format src/ripple
|
|
||||||
run: find src/ripple -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${CLANG_VERSION} -i
|
|
||||||
- name: Format src/test
|
|
||||||
run: find src/test -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${CLANG_VERSION} -i
|
|
||||||
- name: Check for differences
|
|
||||||
id: assert
|
|
||||||
run: |
|
|
||||||
set -o pipefail
|
|
||||||
git diff --exit-code | tee "clang-format.patch"
|
|
||||||
- name: Upload patch
|
|
||||||
if: failure() && steps.assert.outcome == 'failure'
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
name: clang-format.patch
|
|
||||||
if-no-files-found: ignore
|
|
||||||
path: clang-format.patch
|
|
||||||
- name: What happened?
|
|
||||||
if: failure() && steps.assert.outcome == 'failure'
|
|
||||||
env:
|
|
||||||
PREAMBLE: |
|
|
||||||
If you are reading this, you are looking at a failed Github Actions
|
|
||||||
job. That means you pushed one or more files that did not conform
|
|
||||||
to the formatting specified in .clang-format. That may be because
|
|
||||||
you neglected to run 'git clang-format' or 'clang-format' before
|
|
||||||
committing, or that your version of clang-format has an
|
|
||||||
incompatibility with the one on this
|
|
||||||
machine, which is:
|
|
||||||
SUGGESTION: |
|
|
||||||
|
|
||||||
To fix it, you can do one of two things:
|
|
||||||
1. Download and apply the patch generated as an artifact of this
|
|
||||||
job to your repo, commit, and push.
|
|
||||||
2. Run 'git-clang-format --extensions c,cpp,h,cxx,ipp develop'
|
|
||||||
in your repo, commit, and push.
|
|
||||||
run: |
|
|
||||||
echo "${PREAMBLE}"
|
|
||||||
clang-format-${CLANG_VERSION} --version
|
|
||||||
echo "${SUGGESTION}"
|
|
||||||
exit 1
|
|
||||||
35
.github/workflows/doxygen.yml
vendored
35
.github/workflows/doxygen.yml
vendored
@@ -1,35 +0,0 @@
|
|||||||
name: Build and publish Doxygen documentation
|
|
||||||
# To test this workflow, push your changes to your fork's `develop` branch.
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
job:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: docker://rippleci/rippled-ci-builder:2944b78d22db
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: check environment
|
|
||||||
run: |
|
|
||||||
echo ${PATH} | tr ':' '\n'
|
|
||||||
cmake --version
|
|
||||||
doxygen --version
|
|
||||||
env | sort
|
|
||||||
- name: build
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -Donly_docs=TRUE ..
|
|
||||||
cmake --build . --target docs --parallel $(nproc)
|
|
||||||
- name: publish
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: build/docs/html
|
|
||||||
49
.github/workflows/levelization.yml
vendored
49
.github/workflows/levelization.yml
vendored
@@ -1,49 +0,0 @@
|
|||||||
name: levelization
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CLANG_VERSION: 10
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Check levelization
|
|
||||||
run: Builds/levelization/levelization.sh
|
|
||||||
- name: Check for differences
|
|
||||||
id: assert
|
|
||||||
run: |
|
|
||||||
set -o pipefail
|
|
||||||
git diff --exit-code | tee "levelization.patch"
|
|
||||||
- name: Upload patch
|
|
||||||
if: failure() && steps.assert.outcome == 'failure'
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
name: levelization.patch
|
|
||||||
if-no-files-found: ignore
|
|
||||||
path: levelization.patch
|
|
||||||
- name: What happened?
|
|
||||||
if: failure() && steps.assert.outcome == 'failure'
|
|
||||||
env:
|
|
||||||
MESSAGE: |
|
|
||||||
If you are reading this, you are looking at a failed Github
|
|
||||||
Actions job. That means you changed the dependency relationships
|
|
||||||
between the modules in rippled. That may be an improvement or a
|
|
||||||
regression. This check doesn't judge.
|
|
||||||
|
|
||||||
A rule of thumb, though, is that if your changes caused
|
|
||||||
something to be removed from loops.txt, that's probably an
|
|
||||||
improvement. If something was added, it's probably a regression.
|
|
||||||
|
|
||||||
To fix it, you can do one of two things:
|
|
||||||
1. Download and apply the patch generated as an artifact of this
|
|
||||||
job to your repo, commit, and push.
|
|
||||||
2. Run './Builds/levelization/levelization.sh' in your repo,
|
|
||||||
commit, and push.
|
|
||||||
|
|
||||||
See Builds/levelization/README.md for more info.
|
|
||||||
run: |
|
|
||||||
echo "${MESSAGE}"
|
|
||||||
exit 1
|
|
||||||
47
.github/workflows/macos.yml
vendored
47
.github/workflows/macos.yml
vendored
@@ -1,47 +0,0 @@
|
|||||||
name: macos
|
|
||||||
on: [push, pull_request]
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
test:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- macos
|
|
||||||
generator:
|
|
||||||
- Ninja
|
|
||||||
configuration:
|
|
||||||
- Release
|
|
||||||
runs-on: [self-hosted, macOS]
|
|
||||||
env:
|
|
||||||
# The `build` action requires these variables.
|
|
||||||
build_dir: .build
|
|
||||||
NUM_PROCESSORS: 12
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: install Ninja
|
|
||||||
if: matrix.generator == 'Ninja'
|
|
||||||
run: brew install ninja
|
|
||||||
- name: check environment
|
|
||||||
run: |
|
|
||||||
echo ${PATH} | tr ':' '\n'
|
|
||||||
python --version
|
|
||||||
conan --version
|
|
||||||
cmake --version
|
|
||||||
env | sort
|
|
||||||
- name: configure Conan
|
|
||||||
run : |
|
|
||||||
conan profile get env.CXXFLAGS default || true
|
|
||||||
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
|
|
||||||
- name: build
|
|
||||||
uses: ./.github/actions/build
|
|
||||||
with:
|
|
||||||
generator: ${{ matrix.generator }}
|
|
||||||
configuration: ${{ matrix.configuration }}
|
|
||||||
- name: test
|
|
||||||
run: |
|
|
||||||
${build_dir}/rippled --unittest
|
|
||||||
157
.github/workflows/nix.yml
vendored
157
.github/workflows/nix.yml
vendored
@@ -1,157 +0,0 @@
|
|||||||
name: nix
|
|
||||||
on: [push, pull_request]
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
# This workflow has two job matrixes.
|
|
||||||
# They can be considered phases because the second matrix ("test")
|
|
||||||
# depends on the first ("dependencies").
|
|
||||||
#
|
|
||||||
# The first phase has a job in the matrix for each combination of
|
|
||||||
# variables that affects dependency ABI:
|
|
||||||
# platform, compiler, and configuration.
|
|
||||||
# It creates a GitHub artifact holding the Conan profile,
|
|
||||||
# and builds and caches binaries for all the dependencies.
|
|
||||||
# If an Artifactory remote is configured, they are cached there.
|
|
||||||
# If not, they are added to the GitHub artifact.
|
|
||||||
# GitHub's "cache" action has a size limit (10 GB) that is too small
|
|
||||||
# to hold the binaries if they are built locally.
|
|
||||||
# We must use the "{upload,download}-artifact" actions instead.
|
|
||||||
#
|
|
||||||
# The second phase has a job in the matrix for each test configuration.
|
|
||||||
# It installs dependency binaries from the cache, whichever was used,
|
|
||||||
# and builds and tests rippled.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- linux
|
|
||||||
compiler:
|
|
||||||
- gcc
|
|
||||||
- clang
|
|
||||||
configuration:
|
|
||||||
- Debug
|
|
||||||
- Release
|
|
||||||
include:
|
|
||||||
- compiler: gcc
|
|
||||||
profile:
|
|
||||||
version: 11
|
|
||||||
cc: /usr/bin/gcc
|
|
||||||
cxx: /usr/bin/g++
|
|
||||||
- compiler: clang
|
|
||||||
profile:
|
|
||||||
version: 14
|
|
||||||
cc: /usr/bin/clang-14
|
|
||||||
cxx: /usr/bin/clang++-14
|
|
||||||
runs-on: [self-hosted, heavy]
|
|
||||||
container: thejohnfreeman/rippled-build-ubuntu:12e19cd9034b
|
|
||||||
env:
|
|
||||||
build_dir: .build
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: check environment
|
|
||||||
run: |
|
|
||||||
echo ${PATH} | tr ':' '\n'
|
|
||||||
conan --version
|
|
||||||
cmake --version
|
|
||||||
env | sort
|
|
||||||
- name: configure Conan
|
|
||||||
env:
|
|
||||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
run: |
|
|
||||||
conan profile new default --detect
|
|
||||||
conan profile update settings.compiler.cppstd=20 default
|
|
||||||
conan profile update settings.compiler=${{ matrix.compiler }} default
|
|
||||||
conan profile update settings.compiler.version=${{ matrix.profile.version }} default
|
|
||||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
||||||
conan profile update env.CC=${{ matrix.profile.cc }} default
|
|
||||||
conan profile update env.CXX=${{ matrix.profile.cxx }} default
|
|
||||||
conan profile update conf.tools.build:compiler_executables='{"c": "${{ matrix.profile.cc }}", "cpp": "${{ matrix.profile.cxx }}"}' default
|
|
||||||
# Do not quote the URL. An empty string will be accepted (with
|
|
||||||
# a non-fatal warning), but a missing argument will not.
|
|
||||||
conan remote add ripple ${{ env.CONAN_URL }} --insert 0
|
|
||||||
- name: try to authenticate to ripple Conan remote
|
|
||||||
id: remote
|
|
||||||
run: |
|
|
||||||
echo outcome=$(conan user --remote ripple ${{ secrets.CONAN_USERNAME }} --password ${{ secrets.CONAN_TOKEN }} && echo success || echo failure) | tee ${GITHUB_OUTPUT}
|
|
||||||
- name: archive profile
|
|
||||||
# Create this archive before dependencies are added to the local cache.
|
|
||||||
run: tar -czf conan.tar -C ~/.conan .
|
|
||||||
- name: list missing binaries
|
|
||||||
id: binaries
|
|
||||||
# Print the list of dependencies that would need to be built locally.
|
|
||||||
# A non-empty list means we have "failed" to cache binaries remotely.
|
|
||||||
run: |
|
|
||||||
echo missing=$(conan info . --build missing --json 2>/dev/null | grep '^\[') | tee ${GITHUB_OUTPUT}
|
|
||||||
- name: build dependencies
|
|
||||||
if: (steps.binaries.outputs.missing != '[]')
|
|
||||||
uses: ./.github/actions/dependencies
|
|
||||||
with:
|
|
||||||
configuration: ${{ matrix.configuration }}
|
|
||||||
- name: upload dependencies to remote
|
|
||||||
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'success')
|
|
||||||
run: conan upload --remote ripple '*' --all --parallel --confirm
|
|
||||||
- name: recreate archive with dependencies
|
|
||||||
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'failure')
|
|
||||||
run: tar -czf conan.tar -C ~/.conan .
|
|
||||||
- name: upload archive
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
|
||||||
path: conan.tar
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
|
|
||||||
test:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- linux
|
|
||||||
compiler:
|
|
||||||
- gcc
|
|
||||||
- clang
|
|
||||||
configuration:
|
|
||||||
- Debug
|
|
||||||
- Release
|
|
||||||
cmake-args:
|
|
||||||
-
|
|
||||||
- "-Dunity=ON"
|
|
||||||
needs: dependencies
|
|
||||||
runs-on: [self-hosted, heavy]
|
|
||||||
container: thejohnfreeman/rippled-build-ubuntu:12e19cd9034b
|
|
||||||
env:
|
|
||||||
build_dir: .build
|
|
||||||
steps:
|
|
||||||
- name: download cache
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
|
||||||
- name: extract cache
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.conan
|
|
||||||
tar -xzf conan.tar -C ~/.conan
|
|
||||||
- name: check environment
|
|
||||||
run: |
|
|
||||||
echo ${PATH} | tr ':' '\n'
|
|
||||||
conan --version
|
|
||||||
cmake --version
|
|
||||||
env | sort
|
|
||||||
ls ~/.conan
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: build
|
|
||||||
uses: ./.github/actions/build
|
|
||||||
with:
|
|
||||||
generator: Ninja
|
|
||||||
configuration: ${{ matrix.configuration }}
|
|
||||||
cmake-args: ${{ matrix.cmake-args }}
|
|
||||||
- name: test
|
|
||||||
run: |
|
|
||||||
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
|
||||||
140
.github/workflows/on-pr.yml
vendored
Normal file
140
.github/workflows/on-pr.yml
vendored
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
# This workflow runs all workflows to check, build and test the project on
|
||||||
|
# various Linux flavors, as well as on MacOS and Windows, on every push to a
|
||||||
|
# user branch. However, it will not run if the pull request is a draft unless it
|
||||||
|
# has the 'DraftRunCI' label.
|
||||||
|
name: PR
|
||||||
|
|
||||||
|
on:
|
||||||
|
merge_group:
|
||||||
|
types:
|
||||||
|
- checks_requested
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
- ready_for_review
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# This job determines whether the rest of the workflow should run. It runs
|
||||||
|
# when the PR is not a draft (which should also cover merge-group) or
|
||||||
|
# has the 'DraftRunCI' label.
|
||||||
|
should-run:
|
||||||
|
if: ${{ !github.event.pull_request.draft || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
- name: Determine changed files
|
||||||
|
# This step checks whether any files have changed that should
|
||||||
|
# cause the next jobs to run. We do it this way rather than
|
||||||
|
# using `paths` in the `on:` section, because all required
|
||||||
|
# checks must pass, even for changes that do not modify anything
|
||||||
|
# that affects those checks. We would therefore like to make the
|
||||||
|
# checks required only if the job runs, but GitHub does not
|
||||||
|
# support that directly. By always executing the workflow on new
|
||||||
|
# commits and by using the changed-files action below, we ensure
|
||||||
|
# that Github considers any skipped jobs to have passed, and in
|
||||||
|
# turn the required checks as well.
|
||||||
|
id: changes
|
||||||
|
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
# These paths are unique to `on-pr.yml`.
|
||||||
|
.github/scripts/levelization/**
|
||||||
|
.github/scripts/rename/**
|
||||||
|
.github/workflows/reusable-check-levelization.yml
|
||||||
|
.github/workflows/reusable-check-rename.yml
|
||||||
|
.github/workflows/reusable-notify-clio.yml
|
||||||
|
.github/workflows/on-pr.yml
|
||||||
|
|
||||||
|
# Keep the paths below in sync with those in `on-trigger.yml`.
|
||||||
|
.github/actions/build-deps/**
|
||||||
|
.github/actions/build-test/**
|
||||||
|
.github/actions/setup-conan/**
|
||||||
|
.github/scripts/strategy-matrix/**
|
||||||
|
.github/workflows/reusable-build.yml
|
||||||
|
.github/workflows/reusable-build-test-config.yml
|
||||||
|
.github/workflows/reusable-build-test.yml
|
||||||
|
.github/workflows/reusable-strategy-matrix.yml
|
||||||
|
.github/workflows/reusable-test.yml
|
||||||
|
.codecov.yml
|
||||||
|
cmake/**
|
||||||
|
conan/**
|
||||||
|
external/**
|
||||||
|
include/**
|
||||||
|
src/**
|
||||||
|
tests/**
|
||||||
|
CMakeLists.txt
|
||||||
|
conanfile.py
|
||||||
|
conan.lock
|
||||||
|
- name: Check whether to run
|
||||||
|
# This step determines whether the rest of the workflow should
|
||||||
|
# run. The rest of the workflow will run if this job runs AND at
|
||||||
|
# least one of:
|
||||||
|
# * Any of the files checked in the `changes` step were modified
|
||||||
|
# * The PR is NOT a draft and is labeled "Ready to merge"
|
||||||
|
# * The workflow is running from the merge queue
|
||||||
|
id: go
|
||||||
|
env:
|
||||||
|
FILES: ${{ steps.changes.outputs.any_changed }}
|
||||||
|
DRAFT: ${{ github.event.pull_request.draft }}
|
||||||
|
READY: ${{ contains(github.event.pull_request.labels.*.name, 'Ready to merge') }}
|
||||||
|
MERGE: ${{ github.event_name == 'merge_group' }}
|
||||||
|
run: |
|
||||||
|
echo "go=${{ (env.DRAFT != 'true' && env.READY == 'true') || env.FILES == 'true' || env.MERGE == 'true' }}" >> "${GITHUB_OUTPUT}"
|
||||||
|
cat "${GITHUB_OUTPUT}"
|
||||||
|
outputs:
|
||||||
|
go: ${{ steps.go.outputs.go == 'true' }}
|
||||||
|
|
||||||
|
check-levelization:
|
||||||
|
needs: should-run
|
||||||
|
if: ${{ needs.should-run.outputs.go == 'true' }}
|
||||||
|
uses: ./.github/workflows/reusable-check-levelization.yml
|
||||||
|
|
||||||
|
check-rename:
|
||||||
|
needs: should-run
|
||||||
|
if: ${{ needs.should-run.outputs.go == 'true' }}
|
||||||
|
uses: ./.github/workflows/reusable-check-rename.yml
|
||||||
|
|
||||||
|
build-test:
|
||||||
|
needs: should-run
|
||||||
|
if: ${{ needs.should-run.outputs.go == 'true' }}
|
||||||
|
uses: ./.github/workflows/reusable-build-test.yml
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [linux, macos, windows]
|
||||||
|
with:
|
||||||
|
os: ${{ matrix.os }}
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
|
notify-clio:
|
||||||
|
needs:
|
||||||
|
- should-run
|
||||||
|
- build-test
|
||||||
|
if: ${{ needs.should-run.outputs.go == 'true' && contains(fromJSON('["release", "master"]'), github.ref_name) }}
|
||||||
|
uses: ./.github/workflows/reusable-notify-clio.yml
|
||||||
|
secrets:
|
||||||
|
clio_notify_token: ${{ secrets.CLIO_NOTIFY_TOKEN }}
|
||||||
|
conan_remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||||
|
conan_remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||||
|
|
||||||
|
passed:
|
||||||
|
if: failure() || cancelled()
|
||||||
|
needs:
|
||||||
|
- build-test
|
||||||
|
- check-levelization
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Fail
|
||||||
|
run: false
|
||||||
80
.github/workflows/on-trigger.yml
vendored
Normal file
80
.github/workflows/on-trigger.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
# This workflow runs all workflows to build the dependencies required for the
|
||||||
|
# project on various Linux flavors, as well as on MacOS and Windows, on a
|
||||||
|
# scheduled basis, on merge into the 'develop', 'release', or 'master' branches,
|
||||||
|
# or manually. The missing commits check is only run when the code is merged
|
||||||
|
# into the 'develop' or 'release' branches, and the documentation is built when
|
||||||
|
# the code is merged into the 'develop' branch.
|
||||||
|
name: Trigger
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "develop"
|
||||||
|
- "release*"
|
||||||
|
- "master"
|
||||||
|
paths:
|
||||||
|
# These paths are unique to `on-trigger.yml`.
|
||||||
|
- ".github/workflows/reusable-check-missing-commits.yml"
|
||||||
|
- ".github/workflows/on-trigger.yml"
|
||||||
|
- ".github/workflows/publish-docs.yml"
|
||||||
|
|
||||||
|
# Keep the paths below in sync with those in `on-pr.yml`.
|
||||||
|
- ".github/actions/build-deps/**"
|
||||||
|
- ".github/actions/build-test/**"
|
||||||
|
- ".github/actions/setup-conan/**"
|
||||||
|
- ".github/scripts/strategy-matrix/**"
|
||||||
|
- ".github/workflows/reusable-build.yml"
|
||||||
|
- ".github/workflows/reusable-build-test-config.yml"
|
||||||
|
- ".github/workflows/reusable-build-test.yml"
|
||||||
|
- ".github/workflows/reusable-strategy-matrix.yml"
|
||||||
|
- ".github/workflows/reusable-test.yml"
|
||||||
|
- ".codecov.yml"
|
||||||
|
- "cmake/**"
|
||||||
|
- "conan/**"
|
||||||
|
- "external/**"
|
||||||
|
- "include/**"
|
||||||
|
- "src/**"
|
||||||
|
- "tests/**"
|
||||||
|
- "CMakeLists.txt"
|
||||||
|
- "conanfile.py"
|
||||||
|
- "conan.lock"
|
||||||
|
|
||||||
|
# Run at 06:32 UTC on every day of the week from Monday through Friday. This
|
||||||
|
# will force all dependencies to be rebuilt, which is useful to verify that
|
||||||
|
# all dependencies can be built successfully. Only the dependencies that
|
||||||
|
# are actually missing from the remote will be uploaded.
|
||||||
|
schedule:
|
||||||
|
- cron: "32 6 * * 1-5"
|
||||||
|
|
||||||
|
# Run when manually triggered via the GitHub UI or API.
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# When a PR is merged into the develop branch it will be assigned a unique
|
||||||
|
# group identifier, so execution will continue even if another PR is merged
|
||||||
|
# while it is still running. In all other cases the group identifier is shared
|
||||||
|
# per branch, so that any in-progress runs are cancelled when a new commit is
|
||||||
|
# pushed.
|
||||||
|
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' && github.sha || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-missing-commits:
|
||||||
|
if: ${{ github.event_name == 'push' && github.ref_type == 'branch' && contains(fromJSON('["develop", "release"]'), github.ref_name) }}
|
||||||
|
uses: ./.github/workflows/reusable-check-missing-commits.yml
|
||||||
|
|
||||||
|
build-test:
|
||||||
|
uses: ./.github/workflows/reusable-build-test.yml
|
||||||
|
strategy:
|
||||||
|
fail-fast: ${{ github.event_name == 'merge_group' }}
|
||||||
|
matrix:
|
||||||
|
os: [linux, macos, windows]
|
||||||
|
with:
|
||||||
|
os: ${{ matrix.os }}
|
||||||
|
strategy_matrix: ${{ github.event_name == 'schedule' && 'all' || 'minimal' }}
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
15
.github/workflows/pre-commit.yml
vendored
Normal file
15
.github/workflows/pre-commit.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: Run pre-commit hooks
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [develop, release, master]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Call the workflow in the XRPLF/actions repo that runs the pre-commit hooks.
|
||||||
|
run-hooks:
|
||||||
|
uses: XRPLF/actions/.github/workflows/pre-commit.yml@34790936fae4c6c751f62ec8c06696f9c1a5753a
|
||||||
|
with:
|
||||||
|
runs_on: ubuntu-latest
|
||||||
|
container: '{ "image": "ghcr.io/xrplf/ci/tools-rippled-pre-commit:sha-a8c7be1" }'
|
||||||
72
.github/workflows/publish-docs.yml
vendored
Normal file
72
.github/workflows/publish-docs.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
# This workflow builds the documentation for the repository, and publishes it to
|
||||||
|
# GitHub Pages when changes are merged into the default branch.
|
||||||
|
name: Build and publish documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/publish-docs.yml"
|
||||||
|
- "*.md"
|
||||||
|
- "**/*.md"
|
||||||
|
- "docs/**"
|
||||||
|
- "include/**"
|
||||||
|
- "src/libxrpl/**"
|
||||||
|
- "src/xrpld/**"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILD_DIR: .build
|
||||||
|
NPROC_SUBTRACT: 2
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: ghcr.io/xrplf/ci/tools-rippled-documentation:sha-a8c7be1
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
|
||||||
|
- name: Get number of processors
|
||||||
|
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
|
||||||
|
id: nproc
|
||||||
|
with:
|
||||||
|
subtract: ${{ env.NPROC_SUBTRACT }}
|
||||||
|
|
||||||
|
- name: Check configuration
|
||||||
|
run: |
|
||||||
|
echo 'Checking path.'
|
||||||
|
echo ${PATH} | tr ':' '\n'
|
||||||
|
|
||||||
|
echo 'Checking environment variables.'
|
||||||
|
env | sort
|
||||||
|
|
||||||
|
echo 'Checking CMake version.'
|
||||||
|
cmake --version
|
||||||
|
|
||||||
|
echo 'Checking Doxygen version.'
|
||||||
|
doxygen --version
|
||||||
|
|
||||||
|
- name: Build documentation
|
||||||
|
env:
|
||||||
|
BUILD_NPROC: ${{ steps.nproc.outputs.nproc }}
|
||||||
|
run: |
|
||||||
|
mkdir -p "${BUILD_DIR}"
|
||||||
|
cd "${BUILD_DIR}"
|
||||||
|
cmake -Donly_docs=ON ..
|
||||||
|
cmake --build . --target docs --parallel ${BUILD_NPROC}
|
||||||
|
|
||||||
|
- name: Publish documentation
|
||||||
|
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
|
||||||
|
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ${{ env.BUILD_DIR }}/docs/html
|
||||||
77
.github/workflows/reusable-build-test-config.yml
vendored
Normal file
77
.github/workflows/reusable-build-test-config.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
name: Build and test configuration
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_dir:
|
||||||
|
description: "The directory where to build."
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
build_only:
|
||||||
|
description: 'Whether to only build or to build and test the code ("true", "false").'
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
build_type:
|
||||||
|
description: 'The build type to use ("Debug", "Release").'
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
cmake_args:
|
||||||
|
description: "Additional arguments to pass to CMake."
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
cmake_target:
|
||||||
|
description: "The CMake target to build."
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs_on:
|
||||||
|
description: Runner to run the job on as a JSON string
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
image:
|
||||||
|
description: "The image to run in (leave empty to run natively)"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
config_name:
|
||||||
|
description: "The configuration string (used for naming artifacts and such)."
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
nproc_subtract:
|
||||||
|
description: "The number of processors to subtract when calculating parallelism."
|
||||||
|
required: false
|
||||||
|
type: number
|
||||||
|
default: 2
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN:
|
||||||
|
description: "The Codecov token to use for uploading coverage reports."
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
|
with:
|
||||||
|
build_dir: ${{ inputs.build_dir }}
|
||||||
|
build_type: ${{ inputs.build_type }}
|
||||||
|
cmake_args: ${{ inputs.cmake_args }}
|
||||||
|
cmake_target: ${{ inputs.cmake_target }}
|
||||||
|
runs_on: ${{ inputs.runs_on }}
|
||||||
|
image: ${{ inputs.image }}
|
||||||
|
config_name: ${{ inputs.config_name }}
|
||||||
|
nproc_subtract: ${{ inputs.nproc_subtract }}
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
|
test:
|
||||||
|
needs: build
|
||||||
|
uses: ./.github/workflows/reusable-test.yml
|
||||||
|
with:
|
||||||
|
run_tests: ${{ !inputs.build_only }}
|
||||||
|
verify_voidstar: ${{ contains(inputs.cmake_args, '-Dvoidstar=ON') }}
|
||||||
|
runs_on: ${{ inputs.runs_on }}
|
||||||
|
image: ${{ inputs.image }}
|
||||||
|
config_name: ${{ inputs.config_name }}
|
||||||
|
nproc_subtract: ${{ inputs.nproc_subtract }}
|
||||||
58
.github/workflows/reusable-build-test.yml
vendored
Normal file
58
.github/workflows/reusable-build-test.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# This workflow builds and tests the binary for various configurations.
|
||||||
|
name: Build and test
|
||||||
|
|
||||||
|
# This workflow can only be triggered by other workflows. Note that the
|
||||||
|
# workflow_call event does not support the 'choice' input type, see
|
||||||
|
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onworkflow_callinputsinput_idtype,
|
||||||
|
# so we use 'string' instead.
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_dir:
|
||||||
|
description: "The directory where to build."
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ".build"
|
||||||
|
os:
|
||||||
|
description: 'The operating system to use for the build ("linux", "macos", "windows").'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
strategy_matrix:
|
||||||
|
# TODO: Support additional strategies, e.g. "ubuntu" for generating all Ubuntu configurations.
|
||||||
|
description: 'The strategy matrix to use for generating the configurations ("minimal", "all").'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: "minimal"
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN:
|
||||||
|
description: "The Codecov token to use for uploading coverage reports."
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Generate the strategy matrix to be used by the following job.
|
||||||
|
generate-matrix:
|
||||||
|
uses: ./.github/workflows/reusable-strategy-matrix.yml
|
||||||
|
with:
|
||||||
|
os: ${{ inputs.os }}
|
||||||
|
strategy_matrix: ${{ inputs.strategy_matrix }}
|
||||||
|
|
||||||
|
# Build and test the binary for each configuration.
|
||||||
|
build-test-config:
|
||||||
|
needs:
|
||||||
|
- generate-matrix
|
||||||
|
uses: ./.github/workflows/reusable-build-test-config.yml
|
||||||
|
strategy:
|
||||||
|
fail-fast: ${{ github.event_name == 'merge_group' }}
|
||||||
|
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
|
||||||
|
max-parallel: 10
|
||||||
|
with:
|
||||||
|
build_dir: ${{ inputs.build_dir }}
|
||||||
|
build_only: ${{ matrix.build_only }}
|
||||||
|
build_type: ${{ matrix.build_type }}
|
||||||
|
cmake_args: ${{ matrix.cmake_args }}
|
||||||
|
cmake_target: ${{ matrix.cmake_target }}
|
||||||
|
runs_on: ${{ toJSON(matrix.architecture.runner) }}
|
||||||
|
image: ${{ contains(matrix.architecture.platform, 'linux') && format('ghcr.io/xrplf/ci/{0}-{1}:{2}-{3}-sha-{4}', matrix.os.distro_name, matrix.os.distro_version, matrix.os.compiler_name, matrix.os.compiler_version, matrix.os.image_sha) || '' }}
|
||||||
|
config_name: ${{ matrix.config_name }}
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
154
.github/workflows/reusable-build.yml
vendored
Normal file
154
.github/workflows/reusable-build.yml
vendored
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
name: Build rippled
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_dir:
|
||||||
|
description: "The directory where to build."
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
build_type:
|
||||||
|
description: 'The build type to use ("Debug", "Release").'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
cmake_args:
|
||||||
|
description: "Additional arguments to pass to CMake."
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
cmake_target:
|
||||||
|
description: "The CMake target to build."
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
runs_on:
|
||||||
|
description: Runner to run the job on as a JSON string
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
image:
|
||||||
|
description: "The image to run in (leave empty to run natively)"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
config_name:
|
||||||
|
description: "The name of the configuration."
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
nproc_subtract:
|
||||||
|
description: "The number of processors to subtract when calculating parallelism."
|
||||||
|
required: true
|
||||||
|
type: number
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN:
|
||||||
|
description: "The Codecov token to use for uploading coverage reports."
|
||||||
|
required: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build ${{ inputs.config_name }}
|
||||||
|
runs-on: ${{ fromJSON(inputs.runs_on) }}
|
||||||
|
container: ${{ inputs.image != '' && inputs.image || null }}
|
||||||
|
timeout-minutes: 60
|
||||||
|
steps:
|
||||||
|
- name: Cleanup workspace
|
||||||
|
if: ${{ runner.os == 'macOS' }}
|
||||||
|
uses: XRPLF/actions/.github/actions/cleanup-workspace@3f044c7478548e3c32ff68980eeb36ece02b364e
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
|
||||||
|
- name: Prepare runner
|
||||||
|
uses: XRPLF/actions/.github/actions/prepare-runner@99685816bb60a95a66852f212f382580e180df3a
|
||||||
|
with:
|
||||||
|
disable_ccache: false
|
||||||
|
|
||||||
|
- name: Print build environment
|
||||||
|
uses: ./.github/actions/print-env
|
||||||
|
|
||||||
|
- name: Get number of processors
|
||||||
|
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
|
||||||
|
id: nproc
|
||||||
|
with:
|
||||||
|
subtract: ${{ inputs.nproc_subtract }}
|
||||||
|
|
||||||
|
- name: Setup Conan
|
||||||
|
uses: ./.github/actions/setup-conan
|
||||||
|
|
||||||
|
- name: Build dependencies
|
||||||
|
uses: ./.github/actions/build-deps
|
||||||
|
with:
|
||||||
|
build_dir: ${{ inputs.build_dir }}
|
||||||
|
build_nproc: ${{ steps.nproc.outputs.nproc }}
|
||||||
|
build_type: ${{ inputs.build_type }}
|
||||||
|
# Set the verbosity to "quiet" for Windows to avoid an excessive
|
||||||
|
# amount of logs. For other OSes, the "verbose" logs are more useful.
|
||||||
|
log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }}
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ inputs.build_dir }}
|
||||||
|
env:
|
||||||
|
BUILD_TYPE: ${{ inputs.build_type }}
|
||||||
|
CMAKE_ARGS: ${{ inputs.cmake_args }}
|
||||||
|
run: |
|
||||||
|
cmake \
|
||||||
|
-G '${{ runner.os == 'Windows' && 'Visual Studio 17 2022' || 'Ninja' }}' \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
||||||
|
${CMAKE_ARGS} \
|
||||||
|
..
|
||||||
|
|
||||||
|
- name: Build the binary
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ inputs.build_dir }}
|
||||||
|
env:
|
||||||
|
BUILD_NPROC: ${{ steps.nproc.outputs.nproc }}
|
||||||
|
BUILD_TYPE: ${{ inputs.build_type }}
|
||||||
|
CMAKE_TARGET: ${{ inputs.cmake_target }}
|
||||||
|
run: |
|
||||||
|
cmake \
|
||||||
|
--build . \
|
||||||
|
--config "${BUILD_TYPE}" \
|
||||||
|
--parallel ${BUILD_NPROC} \
|
||||||
|
--target "${CMAKE_TARGET}"
|
||||||
|
|
||||||
|
- name: Put built binaries in one location
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ inputs.build_dir }}
|
||||||
|
env:
|
||||||
|
BUILD_TYPE_DIR: ${{ runner.os == 'Windows' && inputs.build_type || '' }}
|
||||||
|
CMAKE_TARGET: ${{ inputs.cmake_target }}
|
||||||
|
run: |
|
||||||
|
mkdir -p ./binaries/doctest/
|
||||||
|
|
||||||
|
cp ./${BUILD_TYPE_DIR}/rippled* ./binaries/
|
||||||
|
if [ "${CMAKE_TARGET}" != 'coverage' ]; then
|
||||||
|
cp ./src/tests/libxrpl/${BUILD_TYPE_DIR}/xrpl.test.* ./binaries/doctest/
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload rippled artifact
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
env:
|
||||||
|
BUILD_DIR: ${{ inputs.build_dir }}
|
||||||
|
with:
|
||||||
|
name: rippled-${{ inputs.config_name }}
|
||||||
|
path: ${{ env.BUILD_DIR }}/binaries/
|
||||||
|
retention-days: 3
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload coverage report
|
||||||
|
if: ${{ github.repository_owner == 'XRPLF' && inputs.cmake_target == 'coverage' }}
|
||||||
|
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
|
||||||
|
with:
|
||||||
|
disable_search: true
|
||||||
|
disable_telem: true
|
||||||
|
fail_ci_if_error: true
|
||||||
|
files: ${{ inputs.build_dir }}/coverage.xml
|
||||||
|
plugins: noop
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
verbose: true
|
||||||
46
.github/workflows/reusable-check-levelization.yml
vendored
Normal file
46
.github/workflows/reusable-check-levelization.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# This workflow checks if the dependencies between the modules are correctly
|
||||||
|
# indexed.
|
||||||
|
name: Check levelization
|
||||||
|
|
||||||
|
# This workflow can only be triggered by other workflows.
|
||||||
|
on: workflow_call
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}-levelization
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
levelization:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
- name: Check levelization
|
||||||
|
run: .github/scripts/levelization/generate.sh
|
||||||
|
- name: Check for differences
|
||||||
|
env:
|
||||||
|
MESSAGE: |
|
||||||
|
|
||||||
|
The dependency relationships between the modules in rippled have
|
||||||
|
changed, which may be an improvement or a regression.
|
||||||
|
|
||||||
|
A rule of thumb is that if your changes caused something to be
|
||||||
|
removed from loops.txt, it's probably an improvement, while if
|
||||||
|
something was added, it's probably a regression.
|
||||||
|
|
||||||
|
Run '.github/scripts/levelization/generate.sh' in your repo, commit
|
||||||
|
and push the changes. See .github/scripts/levelization/README.md for
|
||||||
|
more info.
|
||||||
|
run: |
|
||||||
|
DIFF=$(git status --porcelain)
|
||||||
|
if [ -n "${DIFF}" ]; then
|
||||||
|
# Print the differences to give the contributor a hint about what to
|
||||||
|
# expect when running levelization on their own machine.
|
||||||
|
git diff
|
||||||
|
echo "${MESSAGE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
62
.github/workflows/reusable-check-missing-commits.yml
vendored
Normal file
62
.github/workflows/reusable-check-missing-commits.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# This workflow checks that all commits in the "master" branch are also in the
|
||||||
|
# "release" and "develop" branches, and that all commits in the "release" branch
|
||||||
|
# are also in the "develop" branch.
|
||||||
|
name: Check for missing commits
|
||||||
|
|
||||||
|
# This workflow can only be triggered by other workflows.
|
||||||
|
on: workflow_call
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}-missing-commits
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Check for missing commits
|
||||||
|
env:
|
||||||
|
MESSAGE: |
|
||||||
|
|
||||||
|
If you are reading this, then the commits indicated above are missing
|
||||||
|
from the "develop" and/or "release" branch. Do a reverse-merge as soon
|
||||||
|
as possible. See CONTRIBUTING.md for instructions.
|
||||||
|
run: |
|
||||||
|
set -o pipefail
|
||||||
|
# Branches are ordered by how "canonical" they are. Every commit in one
|
||||||
|
# branch should be in all the branches behind it.
|
||||||
|
order=(master release develop)
|
||||||
|
branches=()
|
||||||
|
for branch in "${order[@]}"; do
|
||||||
|
# Check that the branches exist so that this job will work on forked
|
||||||
|
# repos, which don't necessarily have master and release branches.
|
||||||
|
echo "Checking if ${branch} exists."
|
||||||
|
if git ls-remote --exit-code --heads origin \
|
||||||
|
refs/heads/${branch} > /dev/null; then
|
||||||
|
branches+=(origin/${branch})
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
prior=()
|
||||||
|
for branch in "${branches[@]}"; do
|
||||||
|
if [[ ${#prior[@]} -ne 0 ]]; then
|
||||||
|
echo "Checking ${prior[@]} for commits missing from ${branch}."
|
||||||
|
git log --oneline --no-merges "${prior[@]}" \
|
||||||
|
^$branch | tee -a "missing-commits.txt"
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
prior+=("${branch}")
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $(cat missing-commits.txt | wc -l) -ne 0 ]]; then
|
||||||
|
echo "${MESSAGE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
46
.github/workflows/reusable-check-rename.yml
vendored
Normal file
46
.github/workflows/reusable-check-rename.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# This workflow checks if the codebase is properly renamed, see more info in
|
||||||
|
# .github/scripts/rename/README.md.
|
||||||
|
name: Check rename
|
||||||
|
|
||||||
|
# This workflow can only be triggered by other workflows.
|
||||||
|
on: workflow_call
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}-rename
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rename:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
- name: Check definitions
|
||||||
|
run: .github/scripts/rename/definitions.sh .
|
||||||
|
- name: Check copyright notices
|
||||||
|
run: .github/scripts/rename/copyright.sh .
|
||||||
|
- name: Check CMake configs
|
||||||
|
run: .github/scripts/rename/cmake.sh .
|
||||||
|
- name: Check for differences
|
||||||
|
env:
|
||||||
|
MESSAGE: |
|
||||||
|
|
||||||
|
One or more files contain changes that do not adhere to new naming
|
||||||
|
conventions.
|
||||||
|
|
||||||
|
Run the scripts in '.github/scripts/rename/' in your repo, commit
|
||||||
|
and push the changes. See .github/scripts/rename/README.md for
|
||||||
|
more info.
|
||||||
|
run: |
|
||||||
|
DIFF=$(git status --porcelain)
|
||||||
|
if [ -n "${DIFF}" ]; then
|
||||||
|
# Print the differences to give the contributor a hint about what to
|
||||||
|
# expect when running the renaming scripts on their own machine.
|
||||||
|
git diff
|
||||||
|
echo "${MESSAGE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
91
.github/workflows/reusable-notify-clio.yml
vendored
Normal file
91
.github/workflows/reusable-notify-clio.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
# This workflow exports the built libxrpl package to the Conan remote on a
|
||||||
|
# a channel named after the pull request, and notifies the Clio repository about
|
||||||
|
# the new version so it can check for compatibility.
|
||||||
|
name: Notify Clio
|
||||||
|
|
||||||
|
# This workflow can only be triggered by other workflows.
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
conan_remote_name:
|
||||||
|
description: "The name of the Conan remote to use."
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: xrplf
|
||||||
|
conan_remote_url:
|
||||||
|
description: "The URL of the Conan endpoint to use."
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: https://conan.ripplex.io
|
||||||
|
secrets:
|
||||||
|
clio_notify_token:
|
||||||
|
description: "The GitHub token to notify Clio about new versions."
|
||||||
|
required: true
|
||||||
|
conan_remote_username:
|
||||||
|
description: "The username for logging into the Conan remote."
|
||||||
|
required: true
|
||||||
|
conan_remote_password:
|
||||||
|
description: "The password for logging into the Conan remote."
|
||||||
|
required: true
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}-clio
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
upload:
|
||||||
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: ghcr.io/xrplf/ci/ubuntu-noble:gcc-13-sha-5dd7158
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
- name: Generate outputs
|
||||||
|
id: generate
|
||||||
|
env:
|
||||||
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
run: |
|
||||||
|
echo 'Generating user and channel.'
|
||||||
|
echo "user=clio" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "channel=pr_${PR_NUMBER}" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo 'Extracting version.'
|
||||||
|
echo "version=$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" | awk -F '"' '{print $2}')" >> "${GITHUB_OUTPUT}"
|
||||||
|
- name: Calculate conan reference
|
||||||
|
id: conan_ref
|
||||||
|
run: |
|
||||||
|
echo "conan_ref=${{ steps.generate.outputs.version }}@${{ steps.generate.outputs.user }}/${{ steps.generate.outputs.channel }}" >> "${GITHUB_OUTPUT}"
|
||||||
|
- name: Set up Conan
|
||||||
|
uses: ./.github/actions/setup-conan
|
||||||
|
with:
|
||||||
|
conan_remote_name: ${{ inputs.conan_remote_name }}
|
||||||
|
conan_remote_url: ${{ inputs.conan_remote_url }}
|
||||||
|
- name: Log into Conan remote
|
||||||
|
env:
|
||||||
|
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||||
|
run: conan remote login "${CONAN_REMOTE_NAME}" "${{ secrets.conan_remote_username }}" --password "${{ secrets.conan_remote_password }}"
|
||||||
|
- name: Upload package
|
||||||
|
env:
|
||||||
|
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||||
|
run: |
|
||||||
|
conan export --user=${{ steps.generate.outputs.user }} --channel=${{ steps.generate.outputs.channel }} .
|
||||||
|
conan upload --confirm --check --remote="${CONAN_REMOTE_NAME}" xrpl/${{ steps.conan_ref.outputs.conan_ref }}
|
||||||
|
outputs:
|
||||||
|
conan_ref: ${{ steps.conan_ref.outputs.conan_ref }}
|
||||||
|
|
||||||
|
notify:
|
||||||
|
needs: upload
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Notify Clio
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.clio_notify_token }}
|
||||||
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||||
|
run: |
|
||||||
|
gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
|
/repos/xrplf/clio/dispatches -f "event_type=check_libxrpl" \
|
||||||
|
-F "client_payload[conan_ref]=${{ needs.upload.outputs.conan_ref }}" \
|
||||||
|
-F "client_payload[pr_url]=${PR_URL}"
|
||||||
41
.github/workflows/reusable-strategy-matrix.yml
vendored
Normal file
41
.github/workflows/reusable-strategy-matrix.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
name: Generate strategy matrix
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
os:
|
||||||
|
description: 'The operating system to use for the build ("linux", "macos", "windows").'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
strategy_matrix:
|
||||||
|
# TODO: Support additional strategies, e.g. "ubuntu" for generating all Ubuntu configurations.
|
||||||
|
description: 'The strategy matrix to use for generating the configurations ("minimal", "all").'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: "minimal"
|
||||||
|
outputs:
|
||||||
|
matrix:
|
||||||
|
description: "The generated strategy matrix."
|
||||||
|
value: ${{ jobs.generate-matrix.outputs.matrix }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate-matrix:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.generate.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||||
|
with:
|
||||||
|
python-version: 3.13
|
||||||
|
|
||||||
|
- name: Generate strategy matrix
|
||||||
|
working-directory: .github/scripts/strategy-matrix
|
||||||
|
id: generate
|
||||||
|
env:
|
||||||
|
GENERATE_CONFIG: ${{ inputs.os != '' && format('--config={0}.json', inputs.os) || '' }}
|
||||||
|
GENERATE_OPTION: ${{ inputs.strategy_matrix == 'all' && '--all' || '' }}
|
||||||
|
run: ./generate.py ${GENERATE_OPTION} ${GENERATE_CONFIG} >> "${GITHUB_OUTPUT}"
|
||||||
111
.github/workflows/reusable-test.yml
vendored
Normal file
111
.github/workflows/reusable-test.yml
vendored
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
name: Test rippled
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
verify_voidstar:
|
||||||
|
description: "Whether to verify the presence of voidstar instrumentation."
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
run_tests:
|
||||||
|
description: "Whether to run unit tests"
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
runs_on:
|
||||||
|
description: Runner to run the job on as a JSON string
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
image:
|
||||||
|
description: "The image to run in (leave empty to run natively)"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
config_name:
|
||||||
|
description: "The name of the configuration."
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
nproc_subtract:
|
||||||
|
description: "The number of processors to subtract when calculating parallelism."
|
||||||
|
required: true
|
||||||
|
type: number
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test ${{ inputs.config_name }}
|
||||||
|
runs-on: ${{ fromJSON(inputs.runs_on) }}
|
||||||
|
container: ${{ inputs.image != '' && inputs.image || null }}
|
||||||
|
timeout-minutes: 30
|
||||||
|
steps:
|
||||||
|
- name: Cleanup workspace
|
||||||
|
if: ${{ runner.os == 'macOS' }}
|
||||||
|
uses: XRPLF/actions/.github/actions/cleanup-workspace@3f044c7478548e3c32ff68980eeb36ece02b364e
|
||||||
|
|
||||||
|
- name: Get number of processors
|
||||||
|
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
|
||||||
|
id: nproc
|
||||||
|
with:
|
||||||
|
subtract: ${{ inputs.nproc_subtract }}
|
||||||
|
|
||||||
|
- name: Download rippled artifact
|
||||||
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
|
with:
|
||||||
|
name: rippled-${{ inputs.config_name }}
|
||||||
|
|
||||||
|
- name: Make binary executable (Linux and macOS)
|
||||||
|
shell: bash
|
||||||
|
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
|
||||||
|
run: |
|
||||||
|
chmod +x ./rippled
|
||||||
|
|
||||||
|
- name: Check linking (Linux)
|
||||||
|
if: ${{ runner.os == 'Linux' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
ldd ./rippled
|
||||||
|
if [ "$(ldd ./rippled | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then
|
||||||
|
echo 'The binary is statically linked.'
|
||||||
|
else
|
||||||
|
echo 'The binary is dynamically linked.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Verifying presence of instrumentation
|
||||||
|
if: ${{ inputs.verify_voidstar }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
./rippled --version | grep libvoidstar
|
||||||
|
|
||||||
|
- name: Run the embedded tests
|
||||||
|
if: ${{ inputs.run_tests }}
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
BUILD_NPROC: ${{ steps.nproc.outputs.nproc }}
|
||||||
|
run: |
|
||||||
|
./rippled --unittest --unittest-jobs ${BUILD_NPROC}
|
||||||
|
|
||||||
|
- name: Run the separate tests
|
||||||
|
if: ${{ inputs.run_tests }}
|
||||||
|
env:
|
||||||
|
EXT: ${{ runner.os == 'Windows' && '.exe' || '' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
for test_file in ./doctest/*${EXT}; do
|
||||||
|
echo "Executing $test_file"
|
||||||
|
chmod +x "$test_file"
|
||||||
|
if [[ "${{ runner.os }}" == "Windows" && "$test_file" == "./doctest/xrpl.test.net.exe" ]]; then
|
||||||
|
echo "Skipping $test_file on Windows"
|
||||||
|
else
|
||||||
|
"$test_file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Debug failure (Linux)
|
||||||
|
if: ${{ failure() && runner.os == 'Linux' && inputs.run_tests }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "IPv4 local port range:"
|
||||||
|
cat /proc/sys/net/ipv4/ip_local_port_range
|
||||||
|
echo "Netstat:"
|
||||||
|
netstat -an
|
||||||
107
.github/workflows/upload-conan-deps.yml
vendored
Normal file
107
.github/workflows/upload-conan-deps.yml
vendored
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
name: Upload Conan Dependencies
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 3 * * 2-6"
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
force_source_build:
|
||||||
|
description: "Force source build of all dependencies"
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
force_upload:
|
||||||
|
description: "Force upload of all dependencies"
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
pull_request:
|
||||||
|
branches: [develop]
|
||||||
|
paths:
|
||||||
|
# This allows testing changes to the upload workflow in a PR
|
||||||
|
- .github/workflows/upload-conan-deps.yml
|
||||||
|
push:
|
||||||
|
branches: [develop]
|
||||||
|
paths:
|
||||||
|
- .github/workflows/upload-conan-deps.yml
|
||||||
|
- .github/workflows/reusable-strategy-matrix.yml
|
||||||
|
- .github/actions/build-deps/action.yml
|
||||||
|
- .github/actions/setup-conan/action.yml
|
||||||
|
- ".github/scripts/strategy-matrix/**"
|
||||||
|
- conanfile.py
|
||||||
|
- conan.lock
|
||||||
|
|
||||||
|
env:
|
||||||
|
CONAN_REMOTE_NAME: xrplf
|
||||||
|
CONAN_REMOTE_URL: https://conan.ripplex.io
|
||||||
|
NPROC_SUBTRACT: 2
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Generate the strategy matrix to be used by the following job.
|
||||||
|
generate-matrix:
|
||||||
|
uses: ./.github/workflows/reusable-strategy-matrix.yml
|
||||||
|
with:
|
||||||
|
strategy_matrix: ${{ github.event_name == 'pull_request' && 'minimal' || 'all' }}
|
||||||
|
|
||||||
|
# Build and upload the dependencies for each configuration.
|
||||||
|
run-upload-conan-deps:
|
||||||
|
needs:
|
||||||
|
- generate-matrix
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
|
||||||
|
max-parallel: 10
|
||||||
|
runs-on: ${{ matrix.architecture.runner }}
|
||||||
|
container: ${{ contains(matrix.architecture.platform, 'linux') && format('ghcr.io/xrplf/ci/{0}-{1}:{2}-{3}-sha-{4}', matrix.os.distro_name, matrix.os.distro_version, matrix.os.compiler_name, matrix.os.compiler_version, matrix.os.image_sha) || null }}
|
||||||
|
steps:
|
||||||
|
- name: Cleanup workspace
|
||||||
|
if: ${{ runner.os == 'macOS' }}
|
||||||
|
uses: XRPLF/actions/.github/actions/cleanup-workspace@3f044c7478548e3c32ff68980eeb36ece02b364e
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
|
||||||
|
- name: Prepare runner
|
||||||
|
uses: XRPLF/actions/.github/actions/prepare-runner@99685816bb60a95a66852f212f382580e180df3a
|
||||||
|
with:
|
||||||
|
disable_ccache: false
|
||||||
|
|
||||||
|
- name: Print build environment
|
||||||
|
uses: ./.github/actions/print-env
|
||||||
|
|
||||||
|
- name: Get number of processors
|
||||||
|
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
|
||||||
|
id: nproc
|
||||||
|
with:
|
||||||
|
subtract: ${{ env.NPROC_SUBTRACT }}
|
||||||
|
|
||||||
|
- name: Setup Conan
|
||||||
|
uses: ./.github/actions/setup-conan
|
||||||
|
with:
|
||||||
|
conan_remote_name: ${{ env.CONAN_REMOTE_NAME }}
|
||||||
|
conan_remote_url: ${{ env.CONAN_REMOTE_URL }}
|
||||||
|
|
||||||
|
- name: Build dependencies
|
||||||
|
uses: ./.github/actions/build-deps
|
||||||
|
with:
|
||||||
|
build_dir: .build
|
||||||
|
build_nproc: ${{ steps.nproc.outputs.nproc }}
|
||||||
|
build_type: ${{ matrix.build_type }}
|
||||||
|
force_build: ${{ github.event_name == 'schedule' || github.event.inputs.force_source_build == 'true' }}
|
||||||
|
# Set the verbosity to "quiet" for Windows to avoid an excessive
|
||||||
|
# amount of logs. For other OSes, the "verbose" logs are more useful.
|
||||||
|
log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }}
|
||||||
|
|
||||||
|
- name: Log into Conan remote
|
||||||
|
if: ${{ github.repository_owner == 'XRPLF' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
|
||||||
|
run: conan remote login "${CONAN_REMOTE_NAME}" "${{ secrets.CONAN_REMOTE_USERNAME }}" --password "${{ secrets.CONAN_REMOTE_PASSWORD }}"
|
||||||
|
|
||||||
|
- name: Upload Conan packages
|
||||||
|
if: ${{ github.repository_owner == 'XRPLF' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
|
||||||
|
env:
|
||||||
|
FORCE_OPTION: ${{ github.event.inputs.force_upload == 'true' && '--force' || '' }}
|
||||||
|
run: conan upload "*" --remote="${CONAN_REMOTE_NAME}" --confirm ${FORCE_OPTION}
|
||||||
99
.github/workflows/windows.yml
vendored
99
.github/workflows/windows.yml
vendored
@@ -1,99 +0,0 @@
|
|||||||
name: windows
|
|
||||||
# We have disabled this workflow because it fails in our CI Windows
|
|
||||||
# environment, but we cannot replicate the failure in our personal Windows
|
|
||||||
# test environments, nor have we gone through the trouble of setting up an
|
|
||||||
# interactive CI Windows environment.
|
|
||||||
# We welcome contributions to diagnose or debug the problems on Windows. Until
|
|
||||||
# then, we leave this tombstone as a reminder that we have tried (but failed)
|
|
||||||
# to write a reliable test for Windows.
|
|
||||||
# on: [push, pull_request]
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'action'
|
|
||||||
paths:
|
|
||||||
- '.github/workflow/windows.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
test:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
generator:
|
|
||||||
- Visual Studio 16 2019
|
|
||||||
configuration:
|
|
||||||
- Release
|
|
||||||
runs-on: windows-2019
|
|
||||||
env:
|
|
||||||
build_dir: .build
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: choose Python
|
|
||||||
uses: actions/setup-python@v3
|
|
||||||
with:
|
|
||||||
python-version: 3.9
|
|
||||||
- name: learn Python cache directory
|
|
||||||
id: pip-cache
|
|
||||||
run: |
|
|
||||||
pip install --upgrade pip
|
|
||||||
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
|
||||||
- name: restore Python cache directory
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pip-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/windows.yml') }}
|
|
||||||
- name: install Conan
|
|
||||||
run: pip install wheel 'conan<2'
|
|
||||||
- name: check environment
|
|
||||||
run: |
|
|
||||||
$env:PATH -split ';'
|
|
||||||
python --version
|
|
||||||
conan --version
|
|
||||||
cmake --version
|
|
||||||
dir env:
|
|
||||||
- name: configure Conan
|
|
||||||
run: |
|
|
||||||
conan profile new default --detect
|
|
||||||
conan profile update settings.compiler.cppstd=20 default
|
|
||||||
conan profile update settings.compiler.runtime=MT default
|
|
||||||
conan profile update settings.compiler.toolset=v141 default
|
|
||||||
- name: learn Conan cache directory
|
|
||||||
id: conan-cache
|
|
||||||
run: |
|
|
||||||
echo "dir=$(conan config get storage.path)" >> $GITHUB_OUTPUT
|
|
||||||
- name: restore Conan cache directory
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ${{ steps.conan-cache.outputs.dir }}
|
|
||||||
key: ${{ hashFiles('~/.conan/profiles/default', 'conanfile.py', 'external/rocksdb/*', '.github/workflows/windows.yml') }}
|
|
||||||
- name: export custom recipes
|
|
||||||
run: |
|
|
||||||
conan export external/snappy snappy/1.1.9@
|
|
||||||
conan export external/soci soci/4.0.3@
|
|
||||||
- name: install dependencies
|
|
||||||
run: |
|
|
||||||
mkdir $env:build_dir
|
|
||||||
cd $env:build_dir
|
|
||||||
conan install .. --build missing --settings build_type=${{ matrix.configuration }}
|
|
||||||
- name: configure
|
|
||||||
run: |
|
|
||||||
$env:build_dir
|
|
||||||
cd $env:build_dir
|
|
||||||
pwd
|
|
||||||
ls
|
|
||||||
cmake `
|
|
||||||
-G "${{ matrix.generator }}" `
|
|
||||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake `
|
|
||||||
-Dassert=ON `
|
|
||||||
-Dreporting=OFF `
|
|
||||||
-Dunity=OFF `
|
|
||||||
..
|
|
||||||
- name: build
|
|
||||||
run: |
|
|
||||||
cmake --build $env:build_dir --target rippled --config ${{ matrix.configuration }} --parallel $env:NUMBER_OF_PROCESSORS
|
|
||||||
- name: test
|
|
||||||
run: |
|
|
||||||
& "$env:build_dir\${{ matrix.configuration }}\rippled.exe" --unittest
|
|
||||||
109
.gitignore
vendored
109
.gitignore
vendored
@@ -1,70 +1,42 @@
|
|||||||
# .gitignore
|
# .gitignore
|
||||||
|
|
||||||
bin/boostbook_catalog.xml
|
# Macintosh Desktop Services Store files.
|
||||||
bin/config.log
|
|
||||||
bin/project-cache.jam
|
|
||||||
|
|
||||||
# Ignore vim swap files.
|
|
||||||
*.swp
|
|
||||||
|
|
||||||
# Ignore SCons support files.
|
|
||||||
.sconsign.dblite
|
|
||||||
|
|
||||||
# Ignore python compiled files.
|
|
||||||
*.pyc
|
|
||||||
|
|
||||||
# Ignore Macintosh Desktop Services Store files.
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# Ignore backup/temps
|
# Build, intermediate, and temporary artifacts.
|
||||||
*~
|
*~
|
||||||
|
|
||||||
# Ignore object files.
|
|
||||||
*.o
|
*.o
|
||||||
.nih_c
|
*.pdb
|
||||||
tags
|
*.swp
|
||||||
TAGS
|
.clangd
|
||||||
GTAGS
|
Debug/
|
||||||
GRTAGS
|
Release/
|
||||||
GPATH
|
/.build/
|
||||||
bin/rippled
|
/build/
|
||||||
Debug/*.*
|
/db/
|
||||||
Release/*.*
|
/out.txt
|
||||||
|
/tmp/
|
||||||
|
CMakeSettings.json
|
||||||
|
CMakeUserPresets.json
|
||||||
|
|
||||||
# Ignore coverage files.
|
# Coverage files.
|
||||||
*.gcno
|
*.gcno
|
||||||
*.gcda
|
*.gcda
|
||||||
*.gcov
|
*.gcov
|
||||||
|
|
||||||
# Levelization checking
|
# Profiling data.
|
||||||
Builds/levelization/results/rawincludes.txt
|
gmon.out
|
||||||
Builds/levelization/results/paths.txt
|
|
||||||
Builds/levelization/results/includes/
|
|
||||||
Builds/levelization/results/includedby/
|
|
||||||
|
|
||||||
# Ignore tmp directory.
|
# Levelization data.
|
||||||
tmp
|
.github/scripts/levelization/results/*
|
||||||
|
!.github/scripts/levelization/results/loops.txt
|
||||||
|
!.github/scripts/levelization/results/ordering.txt
|
||||||
|
|
||||||
# Ignore database directory.
|
# Customized configs.
|
||||||
db/
|
|
||||||
db/*.db
|
|
||||||
db/*.db-*
|
|
||||||
|
|
||||||
# Ignore debug logs
|
|
||||||
debug_log.txt
|
|
||||||
|
|
||||||
# Ignore customized configs
|
|
||||||
rippled.cfg
|
rippled.cfg
|
||||||
validators.txt
|
validators.txt
|
||||||
|
|
||||||
# Doxygen generated documentation output
|
# XCode IDE.
|
||||||
HtmlDocumentation
|
|
||||||
docs/html_doc
|
|
||||||
|
|
||||||
# Xcode user-specific project settings
|
|
||||||
# Xcode
|
|
||||||
.DS_Store
|
|
||||||
/build/
|
|
||||||
*.pbxuser
|
*.pbxuser
|
||||||
!default.pbxuser
|
!default.pbxuser
|
||||||
*.mode1v3
|
*.mode1v3
|
||||||
@@ -77,35 +49,14 @@ xcuserdata
|
|||||||
profile
|
profile
|
||||||
*.moved-aside
|
*.moved-aside
|
||||||
DerivedData
|
DerivedData
|
||||||
.idea/
|
|
||||||
*.hmap
|
*.hmap
|
||||||
|
|
||||||
# Intel Parallel Studio 2013 XE
|
# JetBrains IDE.
|
||||||
My Amplifier XE Results - RippleD
|
/.idea/
|
||||||
|
|
||||||
# Compiler intermediate output
|
# Microsoft Visual Studio IDE.
|
||||||
/out.txt
|
|
||||||
|
|
||||||
# Build Log
|
|
||||||
rippled-build.log
|
|
||||||
|
|
||||||
# Profiling data
|
|
||||||
gmon.out
|
|
||||||
|
|
||||||
Builds/VisualStudio2015/*.db
|
|
||||||
Builds/VisualStudio2015/*.user
|
|
||||||
Builds/VisualStudio2015/*.opendb
|
|
||||||
Builds/VisualStudio2015/*.sdf
|
|
||||||
|
|
||||||
# MSVC
|
|
||||||
*.pdb
|
|
||||||
.vs/
|
.vs/
|
||||||
CMakeSettings.json
|
.vscode/
|
||||||
compile_commands.json
|
|
||||||
.clangd
|
# AI tools.
|
||||||
packages
|
.augment
|
||||||
pkg_out
|
|
||||||
pkg
|
|
||||||
CMakeUserPresets.json
|
|
||||||
bld.rippled/
|
|
||||||
.vscode
|
|
||||||
|
|||||||
@@ -1,6 +1,39 @@
|
|||||||
# .pre-commit-config.yaml
|
# To run pre-commit hooks, first install pre-commit:
|
||||||
|
# - `pip install pre-commit==${PRE_COMMIT_VERSION}`
|
||||||
|
#
|
||||||
|
# Then, run the following command to install the git hook scripts:
|
||||||
|
# - `pre-commit install`
|
||||||
|
# You can run all configured hooks against all files with:
|
||||||
|
# - `pre-commit run --all-files`
|
||||||
|
# To manually run a specific hook, use:
|
||||||
|
# - `pre-commit run <hook_id> --all-files`
|
||||||
|
# To run the hooks against only the staged files, use:
|
||||||
|
# - `pre-commit run`
|
||||||
repos:
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: mixed-line-ending
|
||||||
|
- id: check-merge-conflict
|
||||||
|
args: [--assume-in-merge]
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
rev: v10.0.1
|
rev: 7d85583be209cb547946c82fbe51f4bc5dd1d017 # frozen: v18.1.8
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
|
args: [--style=file]
|
||||||
|
"types_or": [c++, c, proto]
|
||||||
|
|
||||||
|
- repo: https://github.com/rbubley/mirrors-prettier
|
||||||
|
rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2
|
||||||
|
hooks:
|
||||||
|
- id: prettier
|
||||||
|
|
||||||
|
exclude: |
|
||||||
|
(?x)^(
|
||||||
|
external/.*|
|
||||||
|
.github/scripts/levelization/results/.*\.txt|
|
||||||
|
conan\.lock
|
||||||
|
)$
|
||||||
|
|||||||
1
.prettierignore
Normal file
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
external
|
||||||
170
API-CHANGELOG.md
170
API-CHANGELOG.md
@@ -1,40 +1,145 @@
|
|||||||
# API Changelog
|
# API Changelog
|
||||||
|
|
||||||
This changelog is intended to list all updates to the API.
|
This changelog is intended to list all updates to the [public API methods](https://xrpl.org/public-api-methods.html).
|
||||||
|
|
||||||
For info about how API versioning works, view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155).
|
For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior.
|
||||||
|
|
||||||
The API version controls the API behavior you see. This includes what properties you see in responses, what parameters you're permitted to send in requests, and so on. You specify the API version in each of your requests. When a breaking change is introduced to the `rippled` API, a new version is released. To avoid breaking your code, you should set (or increase) your version when you're ready to upgrade.
|
The API version controls the API behavior you see. This includes what properties you see in responses, what parameters you're permitted to send in requests, and so on. You specify the API version in each of your requests. When a breaking change is introduced to the `rippled` API, a new version is released. To avoid breaking your code, you should set (or increase) your version when you're ready to upgrade.
|
||||||
|
|
||||||
For a log of breaking changes, see the **API Version [number]** headings. Breaking changes are associated with a particular API Version number. For non-breaking changes, scroll to the **XRP Ledger version [x.y.z]** headings. Non-breaking changes are associated with a particular XRP Ledger (`rippled`) release.
|
For a log of breaking changes, see the **API Version [number]** headings. In general, breaking changes are associated with a particular API Version number. For non-breaking changes, scroll to the **XRP Ledger version [x.y.z]** headings. Non-breaking changes are associated with a particular XRP Ledger (`rippled`) release.
|
||||||
|
|
||||||
## API Version 2
|
## API Version 2
|
||||||
This version will be supported by `rippled` version 1.12.
|
|
||||||
|
|
||||||
#### V2 account_info response
|
API version 2 is available in `rippled` version 2.0.0 and later. To use this API, clients specify `"api_version" : 2` in each request.
|
||||||
|
|
||||||
`signer_lists` is returned in the root of the response, instead of being nested under `account_data` (as it was in API version 1). ([#3770](https://github.com/XRPLF/rippled/pull/3770))
|
#### Removed methods
|
||||||
|
|
||||||
|
In API version 2, the following deprecated methods are no longer available: (https://github.com/XRPLF/rippled/pull/4759)
|
||||||
|
|
||||||
|
- `tx_history` - Instead, use other methods such as `account_tx` or `ledger` with the `transactions` field set to `true`.
|
||||||
|
- `ledger_header` - Instead, use the `ledger` method.
|
||||||
|
|
||||||
|
#### Modifications to JSON transaction element in V2
|
||||||
|
|
||||||
|
In API version 2, JSON elements for transaction output have been changed and made consistent for all methods which output transactions. (https://github.com/XRPLF/rippled/pull/4775)
|
||||||
|
This helps to unify the JSON serialization format of transactions. (https://github.com/XRPLF/clio/issues/722, https://github.com/XRPLF/rippled/issues/4727)
|
||||||
|
|
||||||
|
- JSON transaction element is named `tx_json`
|
||||||
|
- Binary transaction element is named `tx_blob`
|
||||||
|
- JSON transaction metadata element is named `meta`
|
||||||
|
- Binary transaction metadata element is named `meta_blob`
|
||||||
|
|
||||||
|
Additionally, these elements are now consistently available next to `tx_json` (i.e. sibling elements), where possible:
|
||||||
|
|
||||||
|
- `hash` - Transaction ID. This data was stored inside transaction output in API version 1, but in API version 2 is a sibling element.
|
||||||
|
- `ledger_index` - Ledger index (only set on validated ledgers)
|
||||||
|
- `ledger_hash` - Ledger hash (only set on closed or validated ledgers)
|
||||||
|
- `close_time_iso` - Ledger close time expressed in ISO 8601 time format (only set on validated ledgers)
|
||||||
|
- `validated` - Bool element set to `true` if the transaction is in a validated ledger, otherwise `false`
|
||||||
|
|
||||||
|
This change affects the following methods:
|
||||||
|
|
||||||
|
- `tx` - Transaction data moved into element `tx_json` (was inline inside `result`) or, if binary output was requested, moved from `tx` to `tx_blob`. Renamed binary transaction metadata element (if it was requested) from `meta` to `meta_blob`. Changed location of `hash` and added new elements
|
||||||
|
- `account_tx` - Renamed transaction element from `tx` to `tx_json`. Renamed binary transaction metadata element (if it was requested) from `meta` to `meta_blob`. Changed location of `hash` and added new elements
|
||||||
|
- `transaction_entry` - Renamed transaction metadata element from `metadata` to `meta`. Changed location of `hash` and added new elements
|
||||||
|
- `subscribe` - Renamed transaction element from `transaction` to `tx_json`. Changed location of `hash` and added new elements
|
||||||
|
- `sign`, `sign_for`, `submit` and `submit_multisigned` - Changed location of `hash` element.
|
||||||
|
|
||||||
|
#### Modification to `Payment` transaction JSON schema
|
||||||
|
|
||||||
|
When reading Payments, the `Amount` field should generally **not** be used. Instead, use [delivered_amount](https://xrpl.org/partial-payments.html#the-delivered_amount-field) to see the amount that the Payment delivered. To clarify its meaning, the `Amount` field is being renamed to `DeliverMax`. (https://github.com/XRPLF/rippled/pull/4733)
|
||||||
|
|
||||||
|
- In `Payment` transaction type, JSON RPC field `Amount` is renamed to `DeliverMax`. To enable smooth client transition, `Amount` is still handled, as described below: (https://github.com/XRPLF/rippled/pull/4733)
|
||||||
|
- On JSON RPC input (e.g. `submit_multisigned` etc. methods), `Amount` is recognized as an alias to `DeliverMax` for both API version 1 and version 2 clients.
|
||||||
|
- On JSON RPC input, submitting both `Amount` and `DeliverMax` fields is allowed _only_ if they are identical; otherwise such input is rejected with `rpcINVALID_PARAMS` error.
|
||||||
|
- On JSON RPC output (e.g. `subscribe`, `account_tx` etc. methods), `DeliverMax` is present in both API version 1 and version 2.
|
||||||
|
- On JSON RPC output, `Amount` is only present in API version 1 and _not_ in version 2.
|
||||||
|
|
||||||
|
#### Modifications to account_info response
|
||||||
|
|
||||||
|
- `signer_lists` is returned in the root of the response. (In API version 1, it was nested under `account_data`.) (https://github.com/XRPLF/rippled/pull/3770)
|
||||||
|
- When using an invalid `signer_lists` value, the API now returns an "invalidParams" error. (https://github.com/XRPLF/rippled/pull/4585)
|
||||||
|
- (`signer_lists` must be a boolean. In API version 1, strings were accepted and may return a normal response - i.e. as if `signer_lists` were `true`.)
|
||||||
|
|
||||||
|
#### Modifications to [account_tx](https://xrpl.org/account_tx.html#account_tx) response
|
||||||
|
|
||||||
|
- Using `ledger_index_min`, `ledger_index_max`, and `ledger_index` returns `invalidParams` because if you use `ledger_index_min` or `ledger_index_max`, then it does not make sense to also specify `ledger_index`. In API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4571)
|
||||||
|
- The same applies for `ledger_index_min`, `ledger_index_max`, and `ledger_hash`. (https://github.com/XRPLF/rippled/issues/4545#issuecomment-1565065579)
|
||||||
|
- Using a `ledger_index_min` or `ledger_index_max` beyond the range of ledgers that the server has:
|
||||||
|
- returns `lgrIdxMalformed` in API version 2. Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/issues/4288)
|
||||||
|
- Attempting to use a non-boolean value (such as a string) for the `binary` or `forward` parameters returns `invalidParams` (`rpcINVALID_PARAMS`). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)
|
||||||
|
|
||||||
|
#### Modifications to [noripple_check](https://xrpl.org/noripple_check.html#noripple_check) response
|
||||||
|
|
||||||
|
- Attempting to use a non-boolean value (such as a string) for the `transactions` parameter returns `invalidParams` (`rpcINVALID_PARAMS`). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)
|
||||||
|
|
||||||
## API Version 1
|
## API Version 1
|
||||||
This version is supported by `rippled` version 1.11.
|
|
||||||
|
|
||||||
### Idiosyncrasies
|
This version is supported by all `rippled` versions. For WebSocket and HTTP JSON-RPC requests, it is currently the default API version used when no `api_version` is specified.
|
||||||
|
|
||||||
#### V1 account_info response
|
The [commandline](https://xrpl.org/docs/references/http-websocket-apis/api-conventions/request-formatting/#commandline-format) always uses the latest API version. The command line is intended for ad-hoc usage by humans, not programs or automated scripts. The command line is not meant for use in production code.
|
||||||
|
|
||||||
In [the response to the `account_info` command](https://xrpl.org/account_info.html#response-format), there is `account_data` - which is supposed to be an `AccountRoot` object - and `signer_lists` is in this object. However, the docs say that `signer_lists` should be at the root level of the reponse - and this makes sense, since signer lists are not part of the AccountRoot object. (First reported in [xrpl-dev-portal#938](https://github.com/XRPLF/xrpl-dev-portal/issues/938).) Thanks to [rippled#3770](https://github.com/XRPLF/rippled/pull/3770), this field will be moved in `api_version: 2`, to the root level of the response.
|
### Inconsistency: server_info - network_id
|
||||||
|
|
||||||
#### server_info - network_id
|
The `network_id` field was added in the `server_info` response in version 1.5.0 (2019), but it is not returned in [reporting mode](https://xrpl.org/rippled-server-modes.html#reporting-mode). However, use of reporting mode is now discouraged, in favor of using [Clio](https://github.com/XRPLF/clio) instead.
|
||||||
|
|
||||||
The `network_id` field was added in the `server_info` response in version 1.5.0 (2019), but it was not returned in [reporting mode](https://xrpl.org/rippled-server-modes.html#reporting-mode).
|
## XRP Ledger server version 2.5.0
|
||||||
|
|
||||||
## XRP Ledger version 1.12.0
|
As of 2025-04-04, version 2.5.0 is in development. You can use a pre-release version by building from source or [using the `nightly` package](https://xrpl.org/docs/infrastructure/installation/install-rippled-on-ubuntu).
|
||||||
|
|
||||||
Version 1.12.0 is in development.
|
### Additions and bugfixes in 2.5.0
|
||||||
|
|
||||||
### Additions in 1.12
|
- `channel_authorize`: If `signing_support` is not enabled in the config, the RPC is disabled.
|
||||||
|
|
||||||
Additions are intended to be non-breaking (because they are purely additive).
|
## XRP Ledger server version 2.4.0
|
||||||
|
|
||||||
|
[Version 2.4.0](https://github.com/XRPLF/rippled/releases/tag/2.4.0) was released on March 4, 2025.
|
||||||
|
|
||||||
|
### Additions and bugfixes in 2.4.0
|
||||||
|
|
||||||
|
- `ledger_entry`: `state` is added an alias for `ripple_state`.
|
||||||
|
- `ledger_entry`: Enables case-insensitive filtering by canonical name in addition to case-sensitive filtering by RPC name.
|
||||||
|
- `validators`: Added new field `validator_list_threshold` in response.
|
||||||
|
- `simulate`: A new RPC that executes a [dry run of a transaction submission](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0069d-simulate#2-rpc-simulate)
|
||||||
|
- Signing methods autofill fees better and properly handle transactions that don't have a base fee, and will also autofill the `NetworkID` field.
|
||||||
|
|
||||||
|
## XRP Ledger server version 2.3.0
|
||||||
|
|
||||||
|
[Version 2.3.0](https://github.com/XRPLF/rippled/releases/tag/2.3.0) was released on Nov 25, 2024.
|
||||||
|
|
||||||
|
### Breaking changes in 2.3.0
|
||||||
|
|
||||||
|
- `book_changes`: If the requested ledger version is not available on this node, a `ledgerNotFound` error is returned and the node does not attempt to acquire the ledger from the p2p network (as with other non-admin RPCs).
|
||||||
|
|
||||||
|
Admins can still attempt to retrieve old ledgers with the `ledger_request` RPC.
|
||||||
|
|
||||||
|
### Additions and bugfixes in 2.3.0
|
||||||
|
|
||||||
|
- `book_changes`: Returns a `validated` field in its response, which was missing in prior versions.
|
||||||
|
|
||||||
|
## XRP Ledger server version 2.2.0
|
||||||
|
|
||||||
|
[Version 2.2.0](https://github.com/XRPLF/rippled/releases/tag/2.2.0) was released on Jun 5, 2024. The following additions are non-breaking (because they are purely additive):
|
||||||
|
|
||||||
|
- The `feature` method now has a non-admin mode for users. (It was previously only available to admin connections.) The method returns an updated list of amendments, including their names and other information. ([#4781](https://github.com/XRPLF/rippled/pull/4781))
|
||||||
|
|
||||||
|
## XRP Ledger server version 2.0.0
|
||||||
|
|
||||||
|
[Version 2.0.0](https://github.com/XRPLF/rippled/releases/tag/2.0.0) was released on Jan 9, 2024. The following additions are non-breaking (because they are purely additive):
|
||||||
|
|
||||||
|
- `server_definitions`: A new RPC that generates a `definitions.json`-like output that can be used in XRPL libraries.
|
||||||
|
- In `Payment` transactions, `DeliverMax` has been added. This is a replacement for the `Amount` field, which should not be used. Typically, the `delivered_amount` (in transaction metadata) should be used. To ease the transition, `DeliverMax` is present regardless of API version, since adding a field is non-breaking.
|
||||||
|
- API version 2 has been moved from beta to supported, meaning that it is generally available (regardless of the `beta_rpc_api` setting).
|
||||||
|
|
||||||
|
## XRP Ledger server version 2.2.0
|
||||||
|
|
||||||
|
The following is a non-breaking addition to the API.
|
||||||
|
|
||||||
|
- The `feature` method now has a non-admin mode for users. (It was previously only available to admin connections.) The method returns an updated list of amendments, including their names and other information. ([#4781](https://github.com/XRPLF/rippled/pull/4781))
|
||||||
|
|
||||||
|
## XRP Ledger server version 1.12.0
|
||||||
|
|
||||||
|
[Version 1.12.0](https://github.com/XRPLF/rippled/releases/tag/1.12.0) was released on Sep 6, 2023. The following additions are non-breaking (because they are purely additive).
|
||||||
|
|
||||||
- `server_info`: Added `ports`, an array which advertises the RPC and WebSocket ports. This information is also included in the `/crawl` endpoint (which calls `server_info` internally). `grpc` and `peer` ports are also included. (https://github.com/XRPLF/rippled/pull/4427)
|
- `server_info`: Added `ports`, an array which advertises the RPC and WebSocket ports. This information is also included in the `/crawl` endpoint (which calls `server_info` internally). `grpc` and `peer` ports are also included. (https://github.com/XRPLF/rippled/pull/4427)
|
||||||
- `ports` contains objects, each containing a `port` for the listening port (a number string), and a `protocol` array listing the supported protocols on that port.
|
- `ports` contains objects, each containing a `port` for the listening port (a number string), and a `protocol` array listing the supported protocols on that port.
|
||||||
@@ -65,20 +170,22 @@ Additions are intended to be non-breaking (because they are purely additive).
|
|||||||
- tecAMM_BALANCE: AMM has invalid balance. Calculated balances greater than the current pool balances.
|
- tecAMM_BALANCE: AMM has invalid balance. Calculated balances greater than the current pool balances.
|
||||||
- tecAMM_FAILED: AMM transaction failed. Fails due to a processing failure.
|
- tecAMM_FAILED: AMM transaction failed. Fails due to a processing failure.
|
||||||
- tecAMM_INVALID_TOKENS: AMM invalid LP tokens. Invalid input values, format, or calculated values.
|
- tecAMM_INVALID_TOKENS: AMM invalid LP tokens. Invalid input values, format, or calculated values.
|
||||||
- tecAMM_EMPTY: AMM is in empty state. Transaction expects AMM in non-empty state (LP tokens > 0).
|
- tecAMM_EMPTY: AMM is in empty state. Transaction requires AMM in non-empty state (LP tokens > 0).
|
||||||
- tecAMM_NOT_EMPTY: AMM is not in empty state. Transaction expects AMM in empty state (LP tokens == 0).
|
- tecAMM_NOT_EMPTY: AMM is not in empty state. Transaction requires AMM in empty state (LP tokens == 0).
|
||||||
- tecAMM_ACCOUNT: AMM account. Clawback of AMM account.
|
- tecAMM_ACCOUNT: AMM account. Clawback of AMM account.
|
||||||
- tecINCOMPLETE: Some work was completed, but more submissions required to finish. AMMDelete partially deletes the trustlines.
|
- tecINCOMPLETE: Some work was completed, but more submissions required to finish. AMMDelete partially deletes the trustlines.
|
||||||
|
|
||||||
## XRP Ledger version 1.11.0
|
## XRP Ledger server version 1.11.0
|
||||||
|
|
||||||
[Version 1.11.0](https://github.com/XRPLF/rippled/releases/tag/1.11.0) was released on Jun 20, 2023.
|
[Version 1.11.0](https://github.com/XRPLF/rippled/releases/tag/1.11.0) was released on Jun 20, 2023.
|
||||||
|
|
||||||
### Breaking changes in 1.11
|
### Breaking changes in 1.11
|
||||||
|
|
||||||
- Added the ability to mark amendments as obsolete. For the `feature` admin API, there is a new possible value for the `vetoed` field. ([#4291](https://github.com/XRPLF/rippled/pull/4291))
|
- Added the ability to mark amendments as obsolete. For the `feature` admin API, there is a new possible value for the `vetoed` field. (https://github.com/XRPLF/rippled/pull/4291)
|
||||||
- The API now won't accept seeds or public keys in place of account addresses. ([#4404](https://github.com/XRPLF/rippled/pull/4404))
|
- The value of `vetoed` can now be `true`, `false`, or `"Obsolete"`.
|
||||||
- For the `ledger_data` method, when all entries are filtered out, the API now returns an empty list (an empty array, `[]`). (Previously, it would return `null`.) While this is technically a breaking change, the new behavior is consistent with the documentation, so this is considered only a bug fix. ([#4398](https://github.com/XRPLF/rippled/pull/4398))
|
- Removed the acceptance of seeds or public keys in place of account addresses. (https://github.com/XRPLF/rippled/pull/4404)
|
||||||
|
- This simplifies the API and encourages better security practices (i.e. seeds should never be sent over the network).
|
||||||
|
- For the `ledger_data` method, when all entries are filtered out, the `state` field of the response is now an empty list (in other words, an empty array, `[]`). (Previously, it would return `null`.) While this is technically a breaking change, the new behavior is consistent with the documentation, so this is considered only a bug fix. (https://github.com/XRPLF/rippled/pull/4398)
|
||||||
- If and when the `fixNFTokenRemint` amendment activates, there will be a new AccountRoot field, `FirstNFTSequence`. This field is set to the current account sequence when the account issues their first NFT. If an account has not issued any NFTs, then the field is not set. ([#4406](https://github.com/XRPLF/rippled/pull/4406))
|
- If and when the `fixNFTokenRemint` amendment activates, there will be a new AccountRoot field, `FirstNFTSequence`. This field is set to the current account sequence when the account issues their first NFT. If an account has not issued any NFTs, then the field is not set. ([#4406](https://github.com/XRPLF/rippled/pull/4406))
|
||||||
- There is a new account deletion restriction: an account can only be deleted if `FirstNFTSequence` + `MintedNFTokens` + `256` is less than the current ledger sequence.
|
- There is a new account deletion restriction: an account can only be deleted if `FirstNFTSequence` + `MintedNFTokens` + `256` is less than the current ledger sequence.
|
||||||
- This is potentially a breaking change if clients have logic for determining whether an account can be deleted.
|
- This is potentially a breaking change if clients have logic for determining whether an account can be deleted.
|
||||||
@@ -97,3 +204,22 @@ Additions are intended to be non-breaking (because they are purely additive).
|
|||||||
- Added an `account_flags` object to the `account_info` method response. (https://github.com/XRPLF/rippled/pull/4459)
|
- Added an `account_flags` object to the `account_info` method response. (https://github.com/XRPLF/rippled/pull/4459)
|
||||||
- Added `NFTokenPages` to the `account_objects` RPC. (https://github.com/XRPLF/rippled/pull/4352)
|
- Added `NFTokenPages` to the `account_objects` RPC. (https://github.com/XRPLF/rippled/pull/4352)
|
||||||
- Fixed: `marker` returned from the `account_lines` command would not work on subsequent commands. (https://github.com/XRPLF/rippled/pull/4361)
|
- Fixed: `marker` returned from the `account_lines` command would not work on subsequent commands. (https://github.com/XRPLF/rippled/pull/4361)
|
||||||
|
|
||||||
|
## XRP Ledger server version 1.10.0
|
||||||
|
|
||||||
|
[Version 1.10.0](https://github.com/XRPLF/rippled/releases/tag/1.10.0)
|
||||||
|
was released on Mar 14, 2023.
|
||||||
|
|
||||||
|
### Breaking changes in 1.10
|
||||||
|
|
||||||
|
- If the `XRPFees` feature is enabled, the `fee_ref` field will be
|
||||||
|
removed from the [ledger subscription stream](https://xrpl.org/subscribe.html#ledger-stream), because it will no longer
|
||||||
|
have any meaning.
|
||||||
|
|
||||||
|
# Unit tests for API changes
|
||||||
|
|
||||||
|
The following information is useful to developers contributing to this project:
|
||||||
|
|
||||||
|
The purpose of unit tests is to catch bugs and prevent regressions. In general, it often makes sense to create a test function when there is a breaking change to the API. For APIs that have changed in a new API version, the tests should be modified so that both the prior version and the new version are properly tested.
|
||||||
|
|
||||||
|
To take one example: for `account_info` version 1, WebSocket and JSON-RPC behavior should be tested. The latest API version, i.e. API version 2, should be tested over WebSocket, JSON-RPC, and command line.
|
||||||
|
|||||||
552
BUILD.md
552
BUILD.md
@@ -1,130 +1,338 @@
|
|||||||
> These instructions assume you have a C++ development environment ready
|
| :warning: **WARNING** :warning:
|
||||||
> with Git, Python, Conan, CMake, and a C++ compiler. For help setting one up
|
|---|
|
||||||
> on Linux, macOS, or Windows, see [our guide](./docs/build/environment.md).
|
| These instructions assume you have a C++ development environment ready with Git, Python, Conan, CMake, and a C++ compiler. For help setting one up on Linux, macOS, or Windows, [see this guide](./docs/build/environment.md). |
|
||||||
>
|
|
||||||
> These instructions also assume a basic familiarity with Conan and CMake.
|
> These instructions also assume a basic familiarity with Conan and CMake.
|
||||||
> If you are unfamiliar with Conan,
|
> If you are unfamiliar with Conan, you can read our
|
||||||
> you can read our [crash course](./docs/build/conan.md)
|
> [crash course](./docs/build/conan.md) or the official [Getting Started][3]
|
||||||
> or the official [Getting Started][3] walkthrough.
|
> walkthrough.
|
||||||
|
|
||||||
## Branches
|
## Branches
|
||||||
|
|
||||||
For a stable release, choose the `master` branch or one of the [tagged
|
For a stable release, choose the `master` branch or one of the [tagged
|
||||||
releases](https://github.com/ripple/rippled/releases).
|
releases](https://github.com/ripple/rippled/releases).
|
||||||
|
|
||||||
```
|
```bash
|
||||||
git checkout master
|
git checkout master
|
||||||
```
|
```
|
||||||
|
|
||||||
For the latest release candidate, choose the `release` branch.
|
For the latest release candidate, choose the `release` branch.
|
||||||
|
|
||||||
```
|
```bash
|
||||||
git checkout release
|
git checkout release
|
||||||
```
|
```
|
||||||
|
|
||||||
For the latest set of untested features, or to contribute, choose the `develop`
|
For the latest set of untested features, or to contribute, choose the `develop`
|
||||||
branch.
|
branch.
|
||||||
|
|
||||||
```
|
```bash
|
||||||
git checkout develop
|
git checkout develop
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Minimum Requirements
|
## Minimum Requirements
|
||||||
|
|
||||||
- [Python 3.7](https://www.python.org/downloads/)
|
See [System Requirements](https://xrpl.org/system-requirements.html).
|
||||||
- [Conan 1.55](https://conan.io/downloads.html)
|
|
||||||
- [CMake 3.16](https://cmake.org/download/)
|
Building rippled generally requires git, Python, Conan, CMake, and a C++
|
||||||
|
compiler. Some guidance on setting up such a [C++ development environment can be
|
||||||
|
found here](./docs/build/environment.md).
|
||||||
|
|
||||||
|
- [Python 3.11](https://www.python.org/downloads/), or higher
|
||||||
|
- [Conan 2.17](https://conan.io/downloads.html)[^1], or higher
|
||||||
|
- [CMake 3.22](https://cmake.org/download/), or higher
|
||||||
|
|
||||||
|
[^1]:
|
||||||
|
It is possible to build with Conan 1.60+, but the instructions are
|
||||||
|
significantly different, which is why we are not recommending it.
|
||||||
|
|
||||||
`rippled` is written in the C++20 dialect and includes the `<concepts>` header.
|
`rippled` is written in the C++20 dialect and includes the `<concepts>` header.
|
||||||
The [minimum compiler versions][2] required are:
|
The [minimum compiler versions][2] required are:
|
||||||
|
|
||||||
| Compiler | Version |
|
| Compiler | Version |
|
||||||
|-------------|---------|
|
| ----------- | --------- |
|
||||||
| GCC | 10 |
|
| GCC | 12 |
|
||||||
| Clang | 13 |
|
| Clang | 16 |
|
||||||
| Apple Clang | 13.1.6 |
|
| Apple Clang | 16 |
|
||||||
| MSVC | 19.23 |
|
| MSVC | 19.44[^3] |
|
||||||
|
|
||||||
We don't recommend Windows for `rippled` production at this time. As of
|
### Linux
|
||||||
January 2023, Ubuntu has the highest level of quality assurance, testing,
|
|
||||||
and support.
|
|
||||||
|
|
||||||
Windows developers should use Visual Studio 2019. `rippled` isn't
|
The Ubuntu Linux distribution has received the highest level of quality
|
||||||
compatible with [Boost](https://www.boost.org/) 1.78 or 1.79, and Conan
|
assurance, testing, and support. We also support Red Hat and use Debian
|
||||||
can't build earlier Boost versions.
|
internally.
|
||||||
|
|
||||||
**Note:** 32-bit Windows development isn't supported.
|
Here are [sample instructions for setting up a C++ development environment on
|
||||||
|
Linux](./docs/build/environment.md#linux).
|
||||||
|
|
||||||
|
### Mac
|
||||||
|
|
||||||
|
Many rippled engineers use macOS for development.
|
||||||
|
|
||||||
|
Here are [sample instructions for setting up a C++ development environment on
|
||||||
|
macOS](./docs/build/environment.md#macos).
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
Windows is used by some engineers for development only.
|
||||||
|
|
||||||
|
[^3]: Windows is not recommended for production use.
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
|
|
||||||
|
|
||||||
### Set Up Conan
|
### Set Up Conan
|
||||||
|
|
||||||
1. (Optional) If you've never used Conan, use autodetect to set up a default profile.
|
After you have a [C++ development environment](./docs/build/environment.md) ready with Git, Python,
|
||||||
|
Conan, CMake, and a C++ compiler, you may need to set up your Conan profile.
|
||||||
|
|
||||||
```
|
These instructions assume a basic familiarity with Conan and CMake. If you are
|
||||||
conan profile new default --detect
|
unfamiliar with Conan, then please read [this crash course](./docs/build/conan.md) or the official
|
||||||
|
[Getting Started][3] walkthrough.
|
||||||
|
|
||||||
|
#### Default profile
|
||||||
|
|
||||||
|
We recommend that you import the provided `conan/profiles/default` profile:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
conan config install conan/profiles/ -tf $(conan config home)/profiles/
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Update the compiler settings.
|
You can check your Conan profile by running:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
conan profile update settings.compiler.cppstd=20 default
|
conan profile show
|
||||||
```
|
```
|
||||||
|
|
||||||
Linux developers will commonly have a default Conan [profile][] that compiles
|
#### Custom profile
|
||||||
with GCC and links with libstdc++.
|
|
||||||
If you are linking with libstdc++ (see profile setting `compiler.libcxx`),
|
|
||||||
then you will need to choose the `libstdc++11` ABI.
|
|
||||||
|
|
||||||
```
|
If the default profile does not work for you and you do not yet have a Conan
|
||||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
profile, you can create one by running:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
conan profile detect
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows, you should use the x64 native build tools.
|
You may need to make changes to the profile to suit your environment. You can
|
||||||
An easy way to do that is to run the shortcut "x64 Native Tools Command
|
refer to the provided `conan/profiles/default` profile for inspiration, and you
|
||||||
Prompt" for the version of Visual Studio that you have installed.
|
may also need to apply the required [tweaks](#conan-profile-tweaks) to this
|
||||||
|
default profile.
|
||||||
|
|
||||||
|
### Patched recipes
|
||||||
|
|
||||||
|
The recipes in Conan Center occasionally need to be patched for compatibility
|
||||||
|
with the latest version of `rippled`. We maintain a fork of the Conan Center
|
||||||
|
[here](https://github.com/XRPLF/conan-center-index/) containing the patches.
|
||||||
|
|
||||||
|
To ensure our patched recipes are used, you must add our Conan remote at a
|
||||||
|
higher index than the default Conan Center remote, so it is consulted first. You
|
||||||
|
can do this by running:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
conan remote add --index 0 xrplf https://conan.ripplex.io
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you can pull the patched recipes into the repository and use them
|
||||||
|
locally:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd external
|
||||||
|
git init
|
||||||
|
git remote add origin git@github.com:XRPLF/conan-center-index.git
|
||||||
|
git sparse-checkout init
|
||||||
|
git sparse-checkout set recipes/snappy
|
||||||
|
git sparse-checkout add recipes/soci
|
||||||
|
git fetch origin master
|
||||||
|
git checkout master
|
||||||
|
conan export --version 1.1.10 recipes/snappy/all
|
||||||
|
conan export --version 4.0.3 recipes/soci/all
|
||||||
|
rm -rf .git
|
||||||
|
```
|
||||||
|
|
||||||
|
In the case we switch to a newer version of a dependency that still requires a
|
||||||
|
patch, it will be necessary for you to pull in the changes and re-export the
|
||||||
|
updated dependencies with the newer version. However, if we switch to a newer
|
||||||
|
version that no longer requires a patch, no action is required on your part, as
|
||||||
|
the new recipe will be automatically pulled from the official Conan Center.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> You might need to add `--lockfile=""` to your `conan install` command
|
||||||
|
> to avoid automatic use of the existing `conan.lock` file when you run `conan export` manually on your machine
|
||||||
|
|
||||||
|
### Conan profile tweaks
|
||||||
|
|
||||||
|
#### Missing compiler version
|
||||||
|
|
||||||
|
If you see an error similar to the following after running `conan profile show`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ERROR: Invalid setting '17' is not a valid 'settings.compiler.version' value.
|
||||||
|
Possible values are ['5.0', '5.1', '6.0', '6.1', '7.0', '7.3', '8.0', '8.1',
|
||||||
|
'9.0', '9.1', '10.0', '11.0', '12.0', '13', '13.0', '13.1', '14', '14.0', '15',
|
||||||
|
'15.0', '16', '16.0']
|
||||||
|
Read "http://docs.conan.io/2/knowledge/faq.html#error-invalid-setting"
|
||||||
|
```
|
||||||
|
|
||||||
|
you need to amend the list of compiler versions in
|
||||||
|
`$(conan config home)/settings.yml`, by appending the required version number(s)
|
||||||
|
to the `version` array specific for your compiler. For example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apple-clang:
|
||||||
|
version:
|
||||||
|
[
|
||||||
|
"5.0",
|
||||||
|
"5.1",
|
||||||
|
"6.0",
|
||||||
|
"6.1",
|
||||||
|
"7.0",
|
||||||
|
"7.3",
|
||||||
|
"8.0",
|
||||||
|
"8.1",
|
||||||
|
"9.0",
|
||||||
|
"9.1",
|
||||||
|
"10.0",
|
||||||
|
"11.0",
|
||||||
|
"12.0",
|
||||||
|
"13",
|
||||||
|
"13.0",
|
||||||
|
"13.1",
|
||||||
|
"14",
|
||||||
|
"14.0",
|
||||||
|
"15",
|
||||||
|
"15.0",
|
||||||
|
"16",
|
||||||
|
"16.0",
|
||||||
|
"17",
|
||||||
|
"17.0",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Multiple compilers
|
||||||
|
|
||||||
|
If you have multiple compilers installed, make sure to select the one to use in
|
||||||
|
your default Conan configuration **before** running `conan profile detect`, by
|
||||||
|
setting the `CC` and `CXX` environment variables.
|
||||||
|
|
||||||
|
For example, if you are running MacOS and have [homebrew
|
||||||
|
LLVM@18](https://formulae.brew.sh/formula/llvm@18), and want to use it as a
|
||||||
|
compiler in the new Conan profile:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export CC=$(brew --prefix llvm@18)/bin/clang
|
||||||
|
export CXX=$(brew --prefix llvm@18)/bin/clang++
|
||||||
|
conan profile detect
|
||||||
|
```
|
||||||
|
|
||||||
|
You should also explicitly set the path to the compiler in the profile file,
|
||||||
|
which helps to avoid errors when `CC` and/or `CXX` are set and disagree with the
|
||||||
|
selected Conan profile. For example:
|
||||||
|
|
||||||
|
```text
|
||||||
|
[conf]
|
||||||
|
tools.build:compiler_executables={'c':'/usr/bin/gcc','cpp':'/usr/bin/g++'}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Multiple profiles
|
||||||
|
|
||||||
|
You can manage multiple Conan profiles in the directory
|
||||||
|
`$(conan config home)/profiles`, for example renaming `default` to a different
|
||||||
|
name and then creating a new `default` profile for a different compiler.
|
||||||
|
|
||||||
|
#### Select language
|
||||||
|
|
||||||
|
The default profile created by Conan will typically select different C++ dialect
|
||||||
|
than C++20 used by this project. You should set `20` in the profile line
|
||||||
|
starting with `compiler.cppstd=`. For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sed -i.bak -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Select standard library in Linux
|
||||||
|
|
||||||
|
**Linux** developers will commonly have a default Conan [profile][] that
|
||||||
|
compiles with GCC and links with libstdc++. If you are linking with libstdc++
|
||||||
|
(see profile setting `compiler.libcxx`), then you will need to choose the
|
||||||
|
`libstdc++11` ABI:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sed -i.bak -e 's|^compiler\.libcxx=.*$|compiler.libcxx=libstdc++11|' $(conan config home)/profiles/default
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Select architecture and runtime in Windows
|
||||||
|
|
||||||
|
**Windows** developers may need to use the x64 native build tools. An easy way
|
||||||
|
to do that is to run the shortcut "x64 Native Tools Command Prompt" for the
|
||||||
|
version of Visual Studio that you have installed.
|
||||||
|
|
||||||
Windows developers must also build `rippled` and its dependencies for the x64
|
Windows developers must also build `rippled` and its dependencies for the x64
|
||||||
architecture.
|
architecture:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
conan profile update settings.arch=x86_64 default
|
sed -i.bak -e 's|^arch=.*$|arch=x86_64|' $(conan config home)/profiles/default
|
||||||
```
|
```
|
||||||
|
|
||||||
3. (Optional) If you have multiple compilers installed on your platform,
|
**Windows** developers also must select static runtime:
|
||||||
make sure that Conan and CMake select the one you want to use.
|
|
||||||
This setting will set the correct variables (`CMAKE_<LANG>_COMPILER`)
|
|
||||||
in the generated CMake toolchain file.
|
|
||||||
|
|
||||||
```
|
```bash
|
||||||
conan profile update 'conf.tools.build:compiler_executables={"c": "<path>", "cpp": "<path>"}' default
|
sed -i.bak -e 's|^compiler\.runtime=.*$|compiler.runtime=static|' $(conan config home)/profiles/default
|
||||||
```
|
```
|
||||||
|
|
||||||
It should choose the compiler for dependencies as well,
|
#### Clang workaround for grpc
|
||||||
but not all of them have a Conan recipe that respects this setting (yet).
|
|
||||||
For the rest, you can set these environment variables:
|
|
||||||
|
|
||||||
```
|
If your compiler is clang, version 19 or later, or apple-clang, version 17 or
|
||||||
conan profile update env.CC=<path> default
|
later, you may encounter a compilation error while building the `grpc`
|
||||||
conan profile update env.CXX=<path> default
|
dependency:
|
||||||
|
|
||||||
|
```text
|
||||||
|
In file included from .../lib/promise/try_seq.h:26:
|
||||||
|
.../lib/promise/detail/basic_seq.h:499:38: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
|
||||||
|
499 | Traits::template CallSeqFactory(f_, *cur_, std::move(arg)));
|
||||||
|
| ^
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Export our [Conan recipe for Snappy](./external/snappy).
|
The workaround for this error is to add two lines to profile:
|
||||||
It doesn't explicitly link the C++ standard library,
|
|
||||||
which allows you to statically link it with GCC, if you want.
|
|
||||||
|
|
||||||
```
|
```text
|
||||||
conan export external/snappy snappy/1.1.10@
|
[conf]
|
||||||
|
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw']
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Export our [Conan recipe for SOCI](./external/soci).
|
#### Workaround for gcc 12
|
||||||
It patches their CMake to correctly import its dependencies.
|
|
||||||
|
|
||||||
|
If your compiler is gcc, version 12, and you have enabled `werr` option, you may
|
||||||
|
encounter a compilation error such as:
|
||||||
|
|
||||||
|
```text
|
||||||
|
/usr/include/c++/12/bits/char_traits.h:435:56: error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict]
|
||||||
|
435 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
|
||||||
|
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
||||||
|
cc1plus: all warnings being treated as errors
|
||||||
```
|
```
|
||||||
conan export external/soci soci/4.0.3@
|
|
||||||
|
The workaround for this error is to add two lines to your profile:
|
||||||
|
|
||||||
|
```text
|
||||||
|
[conf]
|
||||||
|
tools.build:cxxflags=['-Wno-restrict']
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Workaround for clang 16
|
||||||
|
|
||||||
|
If your compiler is clang, version 16, you may encounter compilation error such
|
||||||
|
as:
|
||||||
|
|
||||||
|
```text
|
||||||
|
In file included from .../boost/beast/websocket/stream.hpp:2857:
|
||||||
|
.../boost/beast/websocket/impl/read.hpp:695:17: error: call to 'async_teardown' is ambiguous
|
||||||
|
async_teardown(impl.role, impl.stream(),
|
||||||
|
^~~~~~~~~~~~~~
|
||||||
|
```
|
||||||
|
|
||||||
|
The workaround for this error is to add two lines to your profile:
|
||||||
|
|
||||||
|
```text
|
||||||
|
[conf]
|
||||||
|
tools.build:cxxflags=['-DBOOST_ASIO_DISABLE_CONCEPTS']
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build and Test
|
### Build and Test
|
||||||
@@ -145,13 +353,15 @@ can't build earlier Boost versions.
|
|||||||
the `install-folder` or `-if` option to every `conan install` command
|
the `install-folder` or `-if` option to every `conan install` command
|
||||||
in the next step.
|
in the next step.
|
||||||
|
|
||||||
2. Generate CMake files for every configuration you want to build.
|
2. Use conan to generate CMake files for every configuration you want to build:
|
||||||
|
|
||||||
```
|
```
|
||||||
conan install .. --output-folder . --build missing --settings build_type=Release
|
conan install .. --output-folder . --build missing --settings build_type=Release
|
||||||
conan install .. --output-folder . --build missing --settings build_type=Debug
|
conan install .. --output-folder . --build missing --settings build_type=Debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To build Debug, in the next step, be sure to set `-DCMAKE_BUILD_TYPE=Debug`
|
||||||
|
|
||||||
For a single-configuration generator, e.g. `Unix Makefiles` or `Ninja`,
|
For a single-configuration generator, e.g. `Unix Makefiles` or `Ninja`,
|
||||||
you only need to run this command once.
|
you only need to run this command once.
|
||||||
For a multi-configuration generator, e.g. `Visual Studio`, you may want to
|
For a multi-configuration generator, e.g. `Visual Studio`, you may want to
|
||||||
@@ -181,18 +391,20 @@ can't build earlier Boost versions.
|
|||||||
|
|
||||||
Single-config generators:
|
Single-config generators:
|
||||||
|
|
||||||
```
|
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
||||||
```
|
|
||||||
|
|
||||||
Pass the CMake variable [`CMAKE_BUILD_TYPE`][build_type]
|
Pass the CMake variable [`CMAKE_BUILD_TYPE`][build_type]
|
||||||
and make sure it matches the `build_type` setting you chose in the previous
|
and make sure it matches the one of the `build_type` settings
|
||||||
step.
|
you chose in the previous step.
|
||||||
|
|
||||||
Multi-config gnerators:
|
For example, to build Debug, in the next command, replace "Release" with "Debug"
|
||||||
|
|
||||||
```
|
```
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake ..
|
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -Dxrpld=ON -Dtests=ON ..
|
||||||
|
```
|
||||||
|
|
||||||
|
Multi-config generators:
|
||||||
|
|
||||||
|
```
|
||||||
|
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -Dxrpld=ON -Dtests=ON ..
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** You can pass build options for `rippled` in this step.
|
**Note:** You can pass build options for `rippled` in this step.
|
||||||
@@ -200,8 +412,8 @@ can't build earlier Boost versions.
|
|||||||
4. Build `rippled`.
|
4. Build `rippled`.
|
||||||
|
|
||||||
For a single-configuration generator, it will build whatever configuration
|
For a single-configuration generator, it will build whatever configuration
|
||||||
you passed for `CMAKE_BUILD_TYPE`. For a multi-configuration generator,
|
you passed for `CMAKE_BUILD_TYPE`. For a multi-configuration generator, you
|
||||||
you must pass the option `--config` to select the build configuration.
|
must pass the option `--config` to select the build configuration.
|
||||||
|
|
||||||
Single-config generators:
|
Single-config generators:
|
||||||
|
|
||||||
@@ -221,97 +433,173 @@ can't build earlier Boost versions.
|
|||||||
Single-config generators:
|
Single-config generators:
|
||||||
|
|
||||||
```
|
```
|
||||||
./rippled --unittest
|
./rippled --unittest --unittest-jobs N
|
||||||
```
|
```
|
||||||
|
|
||||||
Multi-config generators:
|
Multi-config generators:
|
||||||
|
|
||||||
```
|
```
|
||||||
./Release/rippled --unittest
|
./Release/rippled --unittest --unittest-jobs N
|
||||||
./Debug/rippled --unittest
|
./Debug/rippled --unittest --unittest-jobs N
|
||||||
```
|
```
|
||||||
|
|
||||||
The location of `rippled` in your build directory depends on your CMake
|
Replace the `--unittest-jobs` parameter N with the desired unit tests
|
||||||
generator. Pass `--help` to see the rest of the command line options.
|
concurrency. Recommended setting is half of the number of available CPU
|
||||||
|
cores.
|
||||||
|
|
||||||
|
The location of `rippled` binary in your build directory depends on your
|
||||||
|
CMake generator. Pass `--help` to see the rest of the command line options.
|
||||||
|
|
||||||
|
#### Conan lockfile
|
||||||
|
|
||||||
|
To achieve reproducible dependencies, we use [Conan lockfile](https://docs.conan.io/2/tutorial/versioning/lockfiles.html).
|
||||||
|
|
||||||
|
The `conan.lock` file in the repository contains a "snapshot" of the current dependencies.
|
||||||
|
It is implicitly used when running `conan` commands, you don't need to specify it.
|
||||||
|
|
||||||
|
You have to update this file every time you add a new dependency or change a revision or version of an existing dependency.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> Conan uses local cache by default when creating a lockfile.
|
||||||
|
>
|
||||||
|
> To ensure, that lockfile creation works the same way on all developer machines, you should clear the local cache before creating a new lockfile.
|
||||||
|
|
||||||
|
To create a new lockfile, run the following commands in the repository root:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
conan remove '*' --confirm
|
||||||
|
rm conan.lock
|
||||||
|
# This ensure that xrplf remote is the first to be consulted
|
||||||
|
conan remote add --force --index 0 xrplf https://conan.ripplex.io
|
||||||
|
conan lock create . -o '&:jemalloc=True' -o '&:rocksdb=True'
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> If some dependencies are exclusive for some OS, you may need to run the last command for them adding `--profile:all <PROFILE>`.
|
||||||
|
|
||||||
|
## Coverage report
|
||||||
|
|
||||||
|
The coverage report is intended for developers using compilers GCC
|
||||||
|
or Clang (including Apple Clang). It is generated by the build target `coverage`,
|
||||||
|
which is only enabled when the `coverage` option is set, e.g. with
|
||||||
|
`--options coverage=True` in `conan` or `-Dcoverage=ON` variable in `cmake`
|
||||||
|
|
||||||
|
Prerequisites for the coverage report:
|
||||||
|
|
||||||
|
- [gcovr tool][gcovr] (can be installed e.g. with [pip][python-pip])
|
||||||
|
- `gcov` for GCC (installed with the compiler by default) or
|
||||||
|
- `llvm-cov` for Clang (installed with the compiler by default)
|
||||||
|
- `Debug` build type
|
||||||
|
|
||||||
|
A coverage report is created when the following steps are completed, in order:
|
||||||
|
|
||||||
|
1. `rippled` binary built with instrumentation data, enabled by the `coverage`
|
||||||
|
option mentioned above
|
||||||
|
2. completed run of unit tests, which populates coverage capture data
|
||||||
|
3. completed run of the `gcovr` tool (which internally invokes either `gcov` or `llvm-cov`)
|
||||||
|
to assemble both instrumentation data and the coverage capture data into a coverage report
|
||||||
|
|
||||||
|
The above steps are automated into a single target `coverage`. The instrumented
|
||||||
|
`rippled` binary can also be used for regular development or testing work, at
|
||||||
|
the cost of extra disk space utilization and a small performance hit
|
||||||
|
(to store coverage capture). In case of a spurious failure of unit tests, it is
|
||||||
|
possible to re-run the `coverage` target without rebuilding the `rippled` binary
|
||||||
|
(since it is simply a dependency of the coverage report target). It is also possible
|
||||||
|
to select only specific tests for the purpose of the coverage report, by setting
|
||||||
|
the `coverage_test` variable in `cmake`
|
||||||
|
|
||||||
|
The default coverage report format is `html-details`, but the user
|
||||||
|
can override it to any of the formats listed in `Builds/CMake/CodeCoverage.cmake`
|
||||||
|
by setting the `coverage_format` variable in `cmake`. It is also possible
|
||||||
|
to generate more than one format at a time by setting the `coverage_extra_args`
|
||||||
|
variable in `cmake`. The specific command line used to run the `gcovr` tool will be
|
||||||
|
displayed if the `CODE_COVERAGE_VERBOSE` variable is set.
|
||||||
|
|
||||||
|
By default, the code coverage tool runs parallel unit tests with `--unittest-jobs`
|
||||||
|
set to the number of available CPU cores. This may cause spurious test
|
||||||
|
errors on Apple. Developers can override the number of unit test jobs with
|
||||||
|
the `coverage_test_parallelism` variable in `cmake`.
|
||||||
|
|
||||||
|
Example use with some cmake variables set:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd .build
|
||||||
|
conan install .. --output-folder . --build missing --settings build_type=Debug
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Debug -Dcoverage=ON -Dxrpld=ON -Dtests=ON -Dcoverage_test_parallelism=2 -Dcoverage_format=html-details -Dcoverage_extra_args="--json coverage.json" -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake ..
|
||||||
|
cmake --build . --target coverage
|
||||||
|
```
|
||||||
|
|
||||||
|
After the `coverage` target is completed, the generated coverage report will be
|
||||||
|
stored inside the build directory, as either of:
|
||||||
|
|
||||||
|
- file named `coverage.`_extension_, with a suitable extension for the report format, or
|
||||||
|
- directory named `coverage`, with the `index.html` and other files inside, for the `html-details` or `html-nested` report formats.
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
| Option | Default Value | Description |
|
| Option | Default Value | Description |
|
||||||
| --- | ---| ---|
|
| ---------- | ------------- | -------------------------------------------------------------------------- |
|
||||||
| `assert` | OFF | Enable assertions.
|
| `assert` | OFF | Enable assertions. |
|
||||||
| `reporting` | OFF | Build the reporting mode feature. |
|
| `coverage` | OFF | Prepare the coverage report. |
|
||||||
| `tests` | ON | Build tests. |
|
|
||||||
| `unity` | ON | Configure a unity build. |
|
|
||||||
| `san` | N/A | Enable a sanitizer with Clang. Choices are `thread` and `address`. |
|
| `san` | N/A | Enable a sanitizer with Clang. Choices are `thread` and `address`. |
|
||||||
|
| `tests` | OFF | Build tests. |
|
||||||
|
| `unity` | OFF | Configure a unity build. |
|
||||||
|
| `xrpld` | OFF | Build the xrpld (`rippled`) application, and not just the libxrpl library. |
|
||||||
|
| `werr` | OFF | Treat compilation warnings as errors |
|
||||||
|
| `wextra` | OFF | Enable additional compilation warnings |
|
||||||
|
|
||||||
[Unity builds][5] may be faster for the first build
|
[Unity builds][5] may be faster for the first build
|
||||||
(at the cost of much more memory) since they concatenate sources into fewer
|
(at the cost of much more memory) since they concatenate sources into fewer
|
||||||
translation units. Non-unity builds may be faster for incremental builds,
|
translation units. Non-unity builds may be faster for incremental builds,
|
||||||
and can be helpful for detecting `#include` omissions.
|
and can be helpful for detecting `#include` omissions.
|
||||||
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
|
||||||
### Conan
|
### Conan
|
||||||
|
|
||||||
After any updates or changes to dependencies, you may need to do the following:
|
After any updates or changes to dependencies, you may need to do the following:
|
||||||
|
|
||||||
1. Remove your build directory.
|
1. Remove your build directory.
|
||||||
2. Remove the Conan cache:
|
2. Remove individual libraries from the Conan cache, e.g.
|
||||||
```
|
|
||||||
rm -rf ~/.conan/data
|
|
||||||
```
|
|
||||||
4. Re-run [conan install](#build-and-test).
|
|
||||||
|
|
||||||
|
```bash
|
||||||
### no std::result_of
|
conan remove 'grpc/*'
|
||||||
|
|
||||||
If your compiler version is recent enough to have removed `std::result_of` as
|
|
||||||
part of C++20, e.g. Apple Clang 15.0, then you might need to add a preprocessor
|
|
||||||
definition to your build.
|
|
||||||
|
|
||||||
```
|
|
||||||
conan profile update 'options.boost:extra_b2_flags="define=BOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
|
|
||||||
conan profile update 'env.CFLAGS="-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
|
|
||||||
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
|
|
||||||
conan profile update 'conf.tools.build:cflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
|
|
||||||
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**or**
|
||||||
|
|
||||||
### call to 'async_teardown' is ambiguous
|
Remove all libraries from Conan cache:
|
||||||
|
|
||||||
If you are compiling with an early version of Clang 16, then you might hit
|
```bash
|
||||||
a [regression][6] when compiling C++20 that manifests as an [error in a Boost
|
conan remove '*'
|
||||||
header][7]. You can workaround it by adding this preprocessor definition:
|
|
||||||
|
|
||||||
```
|
|
||||||
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_DISABLE_CONCEPTS"' default
|
|
||||||
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
3. Re-run [conan export](#patched-recipes) if needed.
|
||||||
|
4. [Regenerate lockfile](#conan-lockfile).
|
||||||
|
5. Re-run [conan install](#build-and-test).
|
||||||
|
|
||||||
### recompile with -fPIC
|
#### ERROR: Package not resolved
|
||||||
|
|
||||||
If you get a linker error suggesting that you recompile Boost with
|
If you're seeing an error like `ERROR: Package 'snappy/1.1.10' not resolved: Unable to find 'snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1756234314.246' in remotes.`,
|
||||||
position-independent code, such as:
|
please add `xrplf` remote or re-run `conan export` for [patched recipes](#patched-recipes).
|
||||||
|
|
||||||
|
### `protobuf/port_def.inc` file not found
|
||||||
|
|
||||||
|
If `cmake --build .` results in an error due to a missing a protobuf file, then
|
||||||
|
you might have generated CMake files for a different `build_type` than the
|
||||||
|
`CMAKE_BUILD_TYPE` you passed to Conan.
|
||||||
|
|
||||||
```
|
```
|
||||||
/usr/bin/ld.gold: error: /home/username/.conan/data/boost/1.77.0/_/_/package/.../lib/libboost_container.a(alloc_lib.o):
|
/rippled/.build/pb-xrpl.libpb/xrpl/proto/xrpl.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
|
||||||
requires unsupported dynamic reloc 11; recompile with -fPIC
|
10 | #include <google/protobuf/port_def.inc>
|
||||||
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
1 error generated.
|
||||||
```
|
```
|
||||||
|
|
||||||
Conan most likely downloaded a bad binary distribution of the dependency.
|
For example, if you want to build Debug:
|
||||||
This seems to be a [bug][1] in Conan just for Boost 1.77.0 compiled with GCC
|
|
||||||
for Linux. The solution is to build the dependency locally by passing
|
|
||||||
`--build boost` when calling `conan install`.
|
|
||||||
|
|
||||||
```
|
|
||||||
conan install --build boost ...
|
|
||||||
```
|
|
||||||
|
|
||||||
|
1. For conan install, pass `--settings build_type=Debug`
|
||||||
|
2. For cmake, pass `-DCMAKE_BUILD_TYPE=Debug`
|
||||||
|
|
||||||
## Add a Dependency
|
## Add a Dependency
|
||||||
|
|
||||||
@@ -328,19 +616,13 @@ If you want to experiment with a new package, follow these steps:
|
|||||||
(search for the existing call to `target_link_libraries(ripple_libs INTERFACE ...)`).
|
(search for the existing call to `target_link_libraries(ripple_libs INTERFACE ...)`).
|
||||||
4. Start coding! Don't forget to include whatever headers you need from the package.
|
4. Start coding! Don't forget to include whatever headers you need from the package.
|
||||||
|
|
||||||
|
|
||||||
[1]: https://github.com/conan-io/conan-center-index/issues/13168
|
[1]: https://github.com/conan-io/conan-center-index/issues/13168
|
||||||
[2]: https://en.cppreference.com/w/cpp/compiler_support/20
|
[2]: https://en.cppreference.com/w/cpp/compiler_support/20
|
||||||
[3]: https://docs.conan.io/en/latest/getting_started.html
|
[3]: https://docs.conan.io/en/latest/getting_started.html
|
||||||
[5]: https://en.wikipedia.org/wiki/Unity_build
|
[5]: https://en.wikipedia.org/wiki/Unity_build
|
||||||
[6]: https://github.com/boostorg/beast/issues/2648
|
[6]: https://github.com/boostorg/beast/issues/2648
|
||||||
[7]: https://github.com/boostorg/beast/issues/2661
|
[7]: https://github.com/boostorg/beast/issues/2661
|
||||||
|
[gcovr]: https://gcovr.com/en/stable/getting-started.html
|
||||||
|
[python-pip]: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/
|
||||||
[build_type]: https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
|
[build_type]: https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
|
||||||
[runtime]: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
|
|
||||||
[toolchain]: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
|
|
||||||
[pcf]: https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#package-configuration-file
|
|
||||||
[pvf]: https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#package-version-file
|
|
||||||
[find_package]: https://cmake.org/cmake/help/latest/command/find_package.html
|
|
||||||
[search]: https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure
|
|
||||||
[prefix_path]: https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html
|
|
||||||
[profile]: https://docs.conan.io/en/latest/reference/profiles.html
|
[profile]: https://docs.conan.io/en/latest/reference/profiles.html
|
||||||
|
|||||||
@@ -1,207 +0,0 @@
|
|||||||
|
|
||||||
macro(group_sources_in source_dir curdir)
|
|
||||||
file(GLOB children RELATIVE ${source_dir}/${curdir}
|
|
||||||
${source_dir}/${curdir}/*)
|
|
||||||
foreach (child ${children})
|
|
||||||
if (IS_DIRECTORY ${source_dir}/${curdir}/${child})
|
|
||||||
group_sources_in(${source_dir} ${curdir}/${child})
|
|
||||||
else()
|
|
||||||
string(REPLACE "/" "\\" groupname ${curdir})
|
|
||||||
source_group(${groupname} FILES
|
|
||||||
${source_dir}/${curdir}/${child})
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
macro(group_sources curdir)
|
|
||||||
group_sources_in(${PROJECT_SOURCE_DIR} ${curdir})
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
macro (exclude_from_default target_)
|
|
||||||
set_target_properties (${target_} PROPERTIES EXCLUDE_FROM_ALL ON)
|
|
||||||
set_target_properties (${target_} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD ON)
|
|
||||||
endmacro ()
|
|
||||||
|
|
||||||
macro (exclude_if_included target_)
|
|
||||||
get_directory_property(has_parent PARENT_DIRECTORY)
|
|
||||||
if (has_parent)
|
|
||||||
exclude_from_default (${target_})
|
|
||||||
endif ()
|
|
||||||
endmacro ()
|
|
||||||
|
|
||||||
function (print_ep_logs _target)
|
|
||||||
ExternalProject_Get_Property (${_target} STAMP_DIR)
|
|
||||||
add_custom_command(TARGET ${_target} POST_BUILD
|
|
||||||
COMMENT "${_target} BUILD OUTPUT"
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DIN_FILE=${STAMP_DIR}/${_target}-build-out.log
|
|
||||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/echo_file.cmake
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DIN_FILE=${STAMP_DIR}/${_target}-build-err.log
|
|
||||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/echo_file.cmake)
|
|
||||||
endfunction ()
|
|
||||||
|
|
||||||
#[=========================================================[
|
|
||||||
This is a function override for one function in the
|
|
||||||
standard ExternalProject module. We want to change
|
|
||||||
the generated build script slightly to include printing
|
|
||||||
the build logs in the case of failure. Those modifications
|
|
||||||
have been made here. This function override could break
|
|
||||||
in the future if the ExternalProject module changes internal
|
|
||||||
function names or changes the way it generates the build
|
|
||||||
scripts.
|
|
||||||
See:
|
|
||||||
https://gitlab.kitware.com/cmake/cmake/blob/df1ddeec128d68cc636f2dde6c2acd87af5658b6/Modules/ExternalProject.cmake#L1855-1952
|
|
||||||
#]=========================================================]
|
|
||||||
|
|
||||||
function(_ep_write_log_script name step cmd_var)
|
|
||||||
ExternalProject_Get_Property(${name} stamp_dir)
|
|
||||||
set(command "${${cmd_var}}")
|
|
||||||
|
|
||||||
set(make "")
|
|
||||||
set(code_cygpath_make "")
|
|
||||||
if(command MATCHES "^\\$\\(MAKE\\)")
|
|
||||||
# GNU make recognizes the string "$(MAKE)" as recursive make, so
|
|
||||||
# ensure that it appears directly in the makefile.
|
|
||||||
string(REGEX REPLACE "^\\$\\(MAKE\\)" "\${make}" command "${command}")
|
|
||||||
set(make "-Dmake=$(MAKE)")
|
|
||||||
|
|
||||||
if(WIN32 AND NOT CYGWIN)
|
|
||||||
set(code_cygpath_make "
|
|
||||||
if(\${make} MATCHES \"^/\")
|
|
||||||
execute_process(
|
|
||||||
COMMAND cygpath -w \${make}
|
|
||||||
OUTPUT_VARIABLE cygpath_make
|
|
||||||
ERROR_VARIABLE cygpath_make
|
|
||||||
RESULT_VARIABLE cygpath_error
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
|
||||||
if(NOT cygpath_error)
|
|
||||||
set(make \${cygpath_make})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(config "")
|
|
||||||
if("${CMAKE_CFG_INTDIR}" MATCHES "^\\$")
|
|
||||||
string(REPLACE "${CMAKE_CFG_INTDIR}" "\${config}" command "${command}")
|
|
||||||
set(config "-Dconfig=${CMAKE_CFG_INTDIR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Wrap multiple 'COMMAND' lines up into a second-level wrapper
|
|
||||||
# script so all output can be sent to one log file.
|
|
||||||
if(command MATCHES "(^|;)COMMAND;")
|
|
||||||
set(code_execute_process "
|
|
||||||
${code_cygpath_make}
|
|
||||||
execute_process(COMMAND \${command} RESULT_VARIABLE result)
|
|
||||||
if(result)
|
|
||||||
set(msg \"Command failed (\${result}):\\n\")
|
|
||||||
foreach(arg IN LISTS command)
|
|
||||||
set(msg \"\${msg} '\${arg}'\")
|
|
||||||
endforeach()
|
|
||||||
message(FATAL_ERROR \"\${msg}\")
|
|
||||||
endif()
|
|
||||||
")
|
|
||||||
set(code "")
|
|
||||||
set(cmd "")
|
|
||||||
set(sep "")
|
|
||||||
foreach(arg IN LISTS command)
|
|
||||||
if("x${arg}" STREQUAL "xCOMMAND")
|
|
||||||
if(NOT "x${cmd}" STREQUAL "x")
|
|
||||||
string(APPEND code "set(command \"${cmd}\")${code_execute_process}")
|
|
||||||
endif()
|
|
||||||
set(cmd "")
|
|
||||||
set(sep "")
|
|
||||||
else()
|
|
||||||
string(APPEND cmd "${sep}${arg}")
|
|
||||||
set(sep ";")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
string(APPEND code "set(command \"${cmd}\")${code_execute_process}")
|
|
||||||
file(GENERATE OUTPUT "${stamp_dir}/${name}-${step}-$<CONFIG>-impl.cmake" CONTENT "${code}")
|
|
||||||
set(command ${CMAKE_COMMAND} "-Dmake=\${make}" "-Dconfig=\${config}" -P ${stamp_dir}/${name}-${step}-$<CONFIG>-impl.cmake)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Wrap the command in a script to log output to files.
|
|
||||||
set(script ${stamp_dir}/${name}-${step}-$<CONFIG>.cmake)
|
|
||||||
set(logbase ${stamp_dir}/${name}-${step})
|
|
||||||
set(code "
|
|
||||||
${code_cygpath_make}
|
|
||||||
function (_echo_file _fil)
|
|
||||||
file (READ \${_fil} _cont)
|
|
||||||
execute_process (COMMAND \${CMAKE_COMMAND} -E echo \"\${_cont}\")
|
|
||||||
endfunction ()
|
|
||||||
set(command \"${command}\")
|
|
||||||
execute_process(
|
|
||||||
COMMAND \${command}
|
|
||||||
RESULT_VARIABLE result
|
|
||||||
OUTPUT_FILE \"${logbase}-out.log\"
|
|
||||||
ERROR_FILE \"${logbase}-err.log\"
|
|
||||||
)
|
|
||||||
if(result)
|
|
||||||
set(msg \"Command failed: \${result}\\n\")
|
|
||||||
foreach(arg IN LISTS command)
|
|
||||||
set(msg \"\${msg} '\${arg}'\")
|
|
||||||
endforeach()
|
|
||||||
execute_process (COMMAND \${CMAKE_COMMAND} -E echo \"Build output for ${logbase} : \")
|
|
||||||
_echo_file (\"${logbase}-out.log\")
|
|
||||||
_echo_file (\"${logbase}-err.log\")
|
|
||||||
set(msg \"\${msg}\\nSee above\\n\")
|
|
||||||
message(FATAL_ERROR \"\${msg}\")
|
|
||||||
else()
|
|
||||||
set(msg \"${name} ${step} command succeeded. See also ${logbase}-*.log\")
|
|
||||||
message(STATUS \"\${msg}\")
|
|
||||||
endif()
|
|
||||||
")
|
|
||||||
file(GENERATE OUTPUT "${script}" CONTENT "${code}")
|
|
||||||
set(command ${CMAKE_COMMAND} ${make} ${config} -P ${script})
|
|
||||||
set(${cmd_var} "${command}" PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
find_package(Git)
|
|
||||||
|
|
||||||
# function that calls git log to get current hash
|
|
||||||
function (git_hash hash_val)
|
|
||||||
# note: optional second extra string argument not in signature
|
|
||||||
if (NOT GIT_FOUND)
|
|
||||||
return ()
|
|
||||||
endif ()
|
|
||||||
set (_hash "")
|
|
||||||
set (_format "%H")
|
|
||||||
if (ARGC GREATER_EQUAL 2)
|
|
||||||
string (TOLOWER ${ARGV1} _short)
|
|
||||||
if (_short STREQUAL "short")
|
|
||||||
set (_format "%h")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
execute_process (COMMAND ${GIT_EXECUTABLE} "log" "--pretty=${_format}" "-n1"
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
RESULT_VARIABLE _git_exit_code
|
|
||||||
OUTPUT_VARIABLE _temp_hash
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
ERROR_QUIET)
|
|
||||||
if (_git_exit_code EQUAL 0)
|
|
||||||
set (_hash ${_temp_hash})
|
|
||||||
endif ()
|
|
||||||
set (${hash_val} "${_hash}" PARENT_SCOPE)
|
|
||||||
endfunction ()
|
|
||||||
|
|
||||||
function (git_branch branch_val)
|
|
||||||
if (NOT GIT_FOUND)
|
|
||||||
return ()
|
|
||||||
endif ()
|
|
||||||
set (_branch "")
|
|
||||||
execute_process (COMMAND ${GIT_EXECUTABLE} "rev-parse" "--abbrev-ref" "HEAD"
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
RESULT_VARIABLE _git_exit_code
|
|
||||||
OUTPUT_VARIABLE _temp_branch
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
ERROR_QUIET)
|
|
||||||
if (_git_exit_code EQUAL 0)
|
|
||||||
set (_branch ${_temp_branch})
|
|
||||||
endif ()
|
|
||||||
set (${branch_val} "${_branch}" PARENT_SCOPE)
|
|
||||||
endfunction ()
|
|
||||||
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
|
|
||||||
#[=========================================================[
|
|
||||||
SQLITE doesn't provide build files in the
|
|
||||||
standard source-only distribution. So we wrote
|
|
||||||
a simple cmake file and we copy it to the
|
|
||||||
external project folder so that we can use
|
|
||||||
this file to build the lib with ExternalProject
|
|
||||||
#]=========================================================]
|
|
||||||
|
|
||||||
add_library (sqlite3 STATIC sqlite3.c)
|
|
||||||
#[=========================================================[
|
|
||||||
When compiled with SQLITE_THREADSAFE=1, SQLite operates
|
|
||||||
in serialized mode. In this mode, SQLite can be safely
|
|
||||||
used by multiple threads with no restriction.
|
|
||||||
|
|
||||||
NOTE: This implies a global mutex!
|
|
||||||
|
|
||||||
When compiled with SQLITE_THREADSAFE=2, SQLite can be
|
|
||||||
used in a multithreaded program so long as no two
|
|
||||||
threads attempt to use the same database connection at
|
|
||||||
the same time.
|
|
||||||
|
|
||||||
NOTE: This is the preferred threading model, but not
|
|
||||||
currently enabled because we need to investigate our
|
|
||||||
use-model and concurrency requirements.
|
|
||||||
|
|
||||||
TODO: consider whether any other options should be
|
|
||||||
used: https://www.sqlite.org/compile.html
|
|
||||||
#]=========================================================]
|
|
||||||
|
|
||||||
target_compile_definitions (sqlite3
|
|
||||||
PRIVATE
|
|
||||||
SQLITE_THREADSAFE=1
|
|
||||||
HAVE_USLEEP=1)
|
|
||||||
target_compile_options (sqlite3
|
|
||||||
PRIVATE
|
|
||||||
$<$<BOOL:${MSVC}>:
|
|
||||||
-wd4100
|
|
||||||
-wd4127
|
|
||||||
-wd4232
|
|
||||||
-wd4244
|
|
||||||
-wd4701
|
|
||||||
-wd4706
|
|
||||||
-wd4996
|
|
||||||
>
|
|
||||||
$<$<NOT:$<BOOL:${MSVC}>>:-Wno-array-bounds>)
|
|
||||||
install (
|
|
||||||
TARGETS
|
|
||||||
sqlite3
|
|
||||||
LIBRARY DESTINATION lib
|
|
||||||
ARCHIVE DESTINATION lib
|
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
INCLUDES DESTINATION include)
|
|
||||||
install (
|
|
||||||
FILES
|
|
||||||
sqlite3.h
|
|
||||||
sqlite3ext.h
|
|
||||||
DESTINATION include)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
include (CMakeFindDependencyMacro)
|
|
||||||
# need to represent system dependencies of the lib here
|
|
||||||
#[=========================================================[
|
|
||||||
Boost
|
|
||||||
#]=========================================================]
|
|
||||||
if (static OR APPLE OR MSVC)
|
|
||||||
set (Boost_USE_STATIC_LIBS ON)
|
|
||||||
endif ()
|
|
||||||
set (Boost_USE_MULTITHREADED ON)
|
|
||||||
if (static OR MSVC)
|
|
||||||
set (Boost_USE_STATIC_RUNTIME ON)
|
|
||||||
else ()
|
|
||||||
set (Boost_USE_STATIC_RUNTIME OFF)
|
|
||||||
endif ()
|
|
||||||
find_dependency (Boost 1.70
|
|
||||||
COMPONENTS
|
|
||||||
chrono
|
|
||||||
container
|
|
||||||
context
|
|
||||||
coroutine
|
|
||||||
date_time
|
|
||||||
filesystem
|
|
||||||
program_options
|
|
||||||
regex
|
|
||||||
system
|
|
||||||
thread)
|
|
||||||
#[=========================================================[
|
|
||||||
OpenSSL
|
|
||||||
#]=========================================================]
|
|
||||||
if (NOT DEFINED OPENSSL_ROOT_DIR)
|
|
||||||
if (DEFINED ENV{OPENSSL_ROOT})
|
|
||||||
set (OPENSSL_ROOT_DIR $ENV{OPENSSL_ROOT})
|
|
||||||
elseif (APPLE)
|
|
||||||
find_program (homebrew brew)
|
|
||||||
if (homebrew)
|
|
||||||
execute_process (COMMAND ${homebrew} --prefix openssl
|
|
||||||
OUTPUT_VARIABLE OPENSSL_ROOT_DIR
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
file (TO_CMAKE_PATH "${OPENSSL_ROOT_DIR}" OPENSSL_ROOT_DIR)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (static OR APPLE OR MSVC)
|
|
||||||
set (OPENSSL_USE_STATIC_LIBS ON)
|
|
||||||
endif ()
|
|
||||||
set (OPENSSL_MSVC_STATIC_RT ON)
|
|
||||||
find_dependency (OpenSSL 1.1.1 REQUIRED)
|
|
||||||
find_dependency (ZLIB)
|
|
||||||
find_dependency (date)
|
|
||||||
if (TARGET ZLIB::ZLIB)
|
|
||||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
|
||||||
INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
include ("${CMAKE_CURRENT_LIST_DIR}/RippleTargets.cmake")
|
|
||||||
@@ -1,183 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
setup project-wide compiler settings
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
#[=========================================================[
|
|
||||||
TODO some/most of these common settings belong in a
|
|
||||||
toolchain file, especially the ABI-impacting ones
|
|
||||||
#]=========================================================]
|
|
||||||
add_library (common INTERFACE)
|
|
||||||
add_library (Ripple::common ALIAS common)
|
|
||||||
# add a single global dependency on this interface lib
|
|
||||||
link_libraries (Ripple::common)
|
|
||||||
set_target_properties (common
|
|
||||||
PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON)
|
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
||||||
target_compile_definitions (common
|
|
||||||
INTERFACE
|
|
||||||
$<$<CONFIG:Debug>:DEBUG _DEBUG>
|
|
||||||
$<$<AND:$<BOOL:${profile}>,$<NOT:$<BOOL:${assert}>>>:NDEBUG>)
|
|
||||||
# ^^^^ NOTE: CMAKE release builds already have NDEBUG
|
|
||||||
# defined, so no need to add it explicitly except for
|
|
||||||
# this special case of (profile ON) and (assert OFF)
|
|
||||||
# -- presumably this is because we don't want profile
|
|
||||||
# builds asserting unless asserts were specifically
|
|
||||||
# requested
|
|
||||||
|
|
||||||
if (MSVC)
|
|
||||||
# remove existing exception flag since we set it to -EHa
|
|
||||||
string (REGEX REPLACE "[-/]EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
||||||
|
|
||||||
foreach (var_
|
|
||||||
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
|
||||||
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE)
|
|
||||||
|
|
||||||
# also remove dynamic runtime
|
|
||||||
string (REGEX REPLACE "[-/]MD[d]*" " " ${var_} "${${var_}}")
|
|
||||||
|
|
||||||
# /ZI (Edit & Continue debugging information) is incompatible with Gy-
|
|
||||||
string (REPLACE "/ZI" "/Zi" ${var_} "${${var_}}")
|
|
||||||
|
|
||||||
# omit debug info completely under CI (not needed)
|
|
||||||
if (is_ci)
|
|
||||||
string (REPLACE "/Zi" " " ${var_} "${${var_}}")
|
|
||||||
endif ()
|
|
||||||
endforeach ()
|
|
||||||
|
|
||||||
target_compile_options (common
|
|
||||||
INTERFACE
|
|
||||||
-bigobj # Increase object file max size
|
|
||||||
-fp:precise # Floating point behavior
|
|
||||||
-Gd # __cdecl calling convention
|
|
||||||
-Gm- # Minimal rebuild: disabled
|
|
||||||
-Gy- # Function level linking: disabled
|
|
||||||
-MP # Multiprocessor compilation
|
|
||||||
-openmp- # pragma omp: disabled
|
|
||||||
-errorReport:none # No error reporting to Internet
|
|
||||||
-nologo # Suppress login banner
|
|
||||||
-wd4018 # Disable signed/unsigned comparison warnings
|
|
||||||
-wd4244 # Disable float to int possible loss of data warnings
|
|
||||||
-wd4267 # Disable size_t to T possible loss of data warnings
|
|
||||||
-wd4800 # Disable C4800(int to bool performance)
|
|
||||||
-wd4503 # Decorated name length exceeded, name was truncated
|
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:
|
|
||||||
-EHa
|
|
||||||
-GR
|
|
||||||
>
|
|
||||||
$<$<CONFIG:Release>:-Ox>
|
|
||||||
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:Debug>>:
|
|
||||||
-GS
|
|
||||||
-Zc:forScope
|
|
||||||
>
|
|
||||||
# static runtime
|
|
||||||
$<$<CONFIG:Debug>:-MTd>
|
|
||||||
$<$<NOT:$<CONFIG:Debug>>:-MT>
|
|
||||||
$<$<BOOL:${werr}>:-WX>
|
|
||||||
)
|
|
||||||
target_compile_definitions (common
|
|
||||||
INTERFACE
|
|
||||||
_WIN32_WINNT=0x6000
|
|
||||||
_SCL_SECURE_NO_WARNINGS
|
|
||||||
_CRT_SECURE_NO_WARNINGS
|
|
||||||
WIN32_CONSOLE
|
|
||||||
WIN32_LEAN_AND_MEAN
|
|
||||||
NOMINMAX
|
|
||||||
# TODO: Resolve these warnings, don't just silence them
|
|
||||||
_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
|
|
||||||
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:Debug>>:_CRTDBG_MAP_ALLOC>)
|
|
||||||
target_link_libraries (common
|
|
||||||
INTERFACE
|
|
||||||
-errorreport:none
|
|
||||||
-machine:X64)
|
|
||||||
else ()
|
|
||||||
# HACK : because these need to come first, before any warning demotion
|
|
||||||
string (APPEND CMAKE_CXX_FLAGS " -Wall -Wdeprecated")
|
|
||||||
if (wextra)
|
|
||||||
string (APPEND CMAKE_CXX_FLAGS " -Wextra -Wno-unused-parameter")
|
|
||||||
endif ()
|
|
||||||
# not MSVC
|
|
||||||
target_compile_options (common
|
|
||||||
INTERFACE
|
|
||||||
$<$<BOOL:${werr}>:-Werror>
|
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:
|
|
||||||
-frtti
|
|
||||||
-Wnon-virtual-dtor
|
|
||||||
>
|
|
||||||
-Wno-sign-compare
|
|
||||||
-Wno-char-subscripts
|
|
||||||
-Wno-format
|
|
||||||
-Wno-unused-local-typedefs
|
|
||||||
-fstack-protector
|
|
||||||
$<$<BOOL:${is_gcc}>:
|
|
||||||
-Wno-unused-but-set-variable
|
|
||||||
-Wno-deprecated
|
|
||||||
>
|
|
||||||
$<$<NOT:$<CONFIG:Debug>>:-fno-strict-aliasing>
|
|
||||||
# tweak gcc optimization for debug
|
|
||||||
$<$<AND:$<BOOL:${is_gcc}>,$<CONFIG:Debug>>:-O0>
|
|
||||||
# Add debug symbols to release config
|
|
||||||
$<$<CONFIG:Release>:-g>)
|
|
||||||
target_link_libraries (common
|
|
||||||
INTERFACE
|
|
||||||
-rdynamic
|
|
||||||
$<$<BOOL:${is_linux}>:-Wl,-z,relro,-z,now>
|
|
||||||
# link to static libc/c++ iff:
|
|
||||||
# * static option set and
|
|
||||||
# * NOT APPLE (AppleClang does not support static libc/c++) and
|
|
||||||
# * NOT san (sanitizers typically don't work with static libc/c++)
|
|
||||||
$<$<AND:$<BOOL:${static}>,$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:
|
|
||||||
-static-libstdc++
|
|
||||||
-static-libgcc
|
|
||||||
>)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (use_gold AND is_gcc)
|
|
||||||
# use gold linker if available
|
|
||||||
execute_process (
|
|
||||||
COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=gold -Wl,--version
|
|
||||||
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
|
||||||
#[=========================================================[
|
|
||||||
NOTE: THE gold linker inserts -rpath as DT_RUNPATH by
|
|
||||||
default intead of DT_RPATH, so you might have slightly
|
|
||||||
unexpected runtime ld behavior if you were expecting
|
|
||||||
DT_RPATH. Specify --disable-new-dtags to gold if you do
|
|
||||||
not want the default DT_RUNPATH behavior. This rpath
|
|
||||||
treatment as well as static/dynamic selection means that
|
|
||||||
gold does not currently have ideal default behavior when
|
|
||||||
we are using jemalloc. Thus for simplicity we don't use
|
|
||||||
it when jemalloc is requested. An alternative to
|
|
||||||
disabling would be to figure out all the settings
|
|
||||||
required to make gold play nicely with jemalloc.
|
|
||||||
#]=========================================================]
|
|
||||||
if (("${LD_VERSION}" MATCHES "GNU gold") AND (NOT jemalloc))
|
|
||||||
target_link_libraries (common
|
|
||||||
INTERFACE
|
|
||||||
-fuse-ld=gold
|
|
||||||
-Wl,--no-as-needed
|
|
||||||
#[=========================================================[
|
|
||||||
see https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1253638/comments/5
|
|
||||||
DT_RUNPATH does not work great for transitive
|
|
||||||
dependencies (of which boost has a few) - so just
|
|
||||||
switch to DT_RPATH if doing dynamic linking with gold
|
|
||||||
#]=========================================================]
|
|
||||||
$<$<NOT:$<BOOL:${static}>>:-Wl,--disable-new-dtags>)
|
|
||||||
endif ()
|
|
||||||
unset (LD_VERSION)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (use_lld)
|
|
||||||
# use lld linker if available
|
|
||||||
execute_process (
|
|
||||||
COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=lld -Wl,--version
|
|
||||||
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
|
||||||
if ("${LD_VERSION}" MATCHES "LLD")
|
|
||||||
target_link_libraries (common INTERFACE -fuse-ld=lld)
|
|
||||||
endif ()
|
|
||||||
unset (LD_VERSION)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (assert)
|
|
||||||
foreach (var_ CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE)
|
|
||||||
STRING (REGEX REPLACE "[-/]DNDEBUG" "" ${var_} "${${var_}}")
|
|
||||||
endforeach ()
|
|
||||||
endif ()
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,98 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
coverage report target
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
if (coverage)
|
|
||||||
if (is_clang)
|
|
||||||
if (APPLE)
|
|
||||||
execute_process (COMMAND xcrun -f llvm-profdata
|
|
||||||
OUTPUT_VARIABLE LLVM_PROFDATA
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
else ()
|
|
||||||
find_program (LLVM_PROFDATA llvm-profdata)
|
|
||||||
endif ()
|
|
||||||
if (NOT LLVM_PROFDATA)
|
|
||||||
message (WARNING "unable to find llvm-profdata - skipping coverage_report target")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
execute_process (COMMAND xcrun -f llvm-cov
|
|
||||||
OUTPUT_VARIABLE LLVM_COV
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
else ()
|
|
||||||
find_program (LLVM_COV llvm-cov)
|
|
||||||
endif ()
|
|
||||||
if (NOT LLVM_COV)
|
|
||||||
message (WARNING "unable to find llvm-cov - skipping coverage_report target")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set (extract_pattern "")
|
|
||||||
if (coverage_core_only)
|
|
||||||
set (extract_pattern "${CMAKE_CURRENT_SOURCE_DIR}/src/ripple/")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (LLVM_COV AND LLVM_PROFDATA)
|
|
||||||
add_custom_target (coverage_report
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Generating coverage - results will be in ${CMAKE_BINARY_DIR}/coverage/index.html."
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Running rippled tests."
|
|
||||||
COMMAND rippled --unittest$<$<BOOL:${coverage_test}>:=${coverage_test}> --quiet --unittest-log
|
|
||||||
COMMAND ${LLVM_PROFDATA}
|
|
||||||
merge -sparse default.profraw -o rip.profdata
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Summary of coverage:"
|
|
||||||
COMMAND ${LLVM_COV}
|
|
||||||
report -instr-profile=rip.profdata
|
|
||||||
$<TARGET_FILE:rippled> ${extract_pattern}
|
|
||||||
# generate html report
|
|
||||||
COMMAND ${LLVM_COV}
|
|
||||||
show -format=html -output-dir=${CMAKE_BINARY_DIR}/coverage
|
|
||||||
-instr-profile=rip.profdata
|
|
||||||
$<TARGET_FILE:rippled> ${extract_pattern}
|
|
||||||
BYPRODUCTS coverage/index.html)
|
|
||||||
endif ()
|
|
||||||
elseif (is_gcc)
|
|
||||||
find_program (LCOV lcov)
|
|
||||||
if (NOT LCOV)
|
|
||||||
message (WARNING "unable to find lcov - skipping coverage_report target")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
find_program (GENHTML genhtml)
|
|
||||||
if (NOT GENHTML)
|
|
||||||
message (WARNING "unable to find genhtml - skipping coverage_report target")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set (extract_pattern "*")
|
|
||||||
if (coverage_core_only)
|
|
||||||
set (extract_pattern "*/src/ripple/*")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (LCOV AND GENHTML)
|
|
||||||
add_custom_target (coverage_report
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Generating coverage- results will be in ${CMAKE_BINARY_DIR}/coverage/index.html."
|
|
||||||
# create baseline info file
|
|
||||||
COMMAND ${LCOV}
|
|
||||||
--no-external -d "${CMAKE_CURRENT_SOURCE_DIR}" -c -d . -i -o baseline.info
|
|
||||||
| grep -v "ignoring data for external file"
|
|
||||||
# run tests
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Running rippled tests for coverage report."
|
|
||||||
COMMAND rippled --unittest$<$<BOOL:${coverage_test}>:=${coverage_test}> --quiet --unittest-log
|
|
||||||
# Create test coverage data file
|
|
||||||
COMMAND ${LCOV}
|
|
||||||
--no-external -d "${CMAKE_CURRENT_SOURCE_DIR}" -c -d . -o tests.info
|
|
||||||
| grep -v "ignoring data for external file"
|
|
||||||
# Combine baseline and test coverage data
|
|
||||||
COMMAND ${LCOV}
|
|
||||||
-a baseline.info -a tests.info -o lcov-all.info
|
|
||||||
# extract our files
|
|
||||||
COMMAND ${LCOV}
|
|
||||||
-e lcov-all.info "${extract_pattern}" -o lcov.info
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Summary of coverage:"
|
|
||||||
COMMAND ${LCOV} --summary lcov.info
|
|
||||||
# generate HTML report
|
|
||||||
COMMAND ${GENHTML}
|
|
||||||
-o ${CMAKE_BINARY_DIR}/coverage lcov.info
|
|
||||||
BYPRODUCTS coverage/index.html)
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
docs target (optional)
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
option(with_docs "Include the docs target?" FALSE)
|
|
||||||
|
|
||||||
if(NOT (with_docs OR only_docs))
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(Doxygen)
|
|
||||||
if(NOT TARGET Doxygen::doxygen)
|
|
||||||
message(STATUS "doxygen executable not found -- skipping docs target")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(doxygen_output_directory "${CMAKE_BINARY_DIR}/docs")
|
|
||||||
set(doxygen_include_path "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
|
||||||
set(doxygen_index_file "${doxygen_output_directory}/html/index.html")
|
|
||||||
set(doxyfile "${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile")
|
|
||||||
|
|
||||||
file(GLOB_RECURSE doxygen_input
|
|
||||||
docs/*.md
|
|
||||||
src/ripple/*.h
|
|
||||||
src/ripple/*.cpp
|
|
||||||
src/ripple/*.md
|
|
||||||
src/test/*.h
|
|
||||||
src/test/*.md
|
|
||||||
Builds/*/README.md)
|
|
||||||
list(APPEND doxygen_input
|
|
||||||
README.md
|
|
||||||
RELEASENOTES.md
|
|
||||||
src/README.md)
|
|
||||||
set(dependencies "${doxygen_input}" "${doxyfile}")
|
|
||||||
|
|
||||||
function(verbose_find_path variable name)
|
|
||||||
# find_path sets a CACHE variable, so don't try using a "local" variable.
|
|
||||||
find_path(${variable} "${name}" ${ARGN})
|
|
||||||
if(NOT ${variable})
|
|
||||||
message(NOTICE "could not find ${name}")
|
|
||||||
else()
|
|
||||||
message(STATUS "found ${name}: ${${variable}}/${name}")
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
verbose_find_path(doxygen_plantuml_jar_path plantuml.jar PATH_SUFFIXES share/plantuml)
|
|
||||||
verbose_find_path(doxygen_dot_path dot)
|
|
||||||
|
|
||||||
# https://en.cppreference.com/w/Cppreference:Archives
|
|
||||||
# https://stackoverflow.com/questions/60822559/how-to-move-a-file-download-from-configure-step-to-build-step
|
|
||||||
set(download_script "${CMAKE_BINARY_DIR}/docs/download-cppreference.cmake")
|
|
||||||
file(WRITE
|
|
||||||
"${download_script}"
|
|
||||||
"file(DOWNLOAD \
|
|
||||||
http://upload.cppreference.com/mwiki/images/b/b2/html_book_20190607.zip \
|
|
||||||
${CMAKE_BINARY_DIR}/docs/cppreference.zip \
|
|
||||||
EXPECTED_HASH MD5=82b3a612d7d35a83e3cb1195a63689ab \
|
|
||||||
)\n \
|
|
||||||
execute_process( \
|
|
||||||
COMMAND \"${CMAKE_COMMAND}\" -E tar -xf cppreference.zip \
|
|
||||||
)\n"
|
|
||||||
)
|
|
||||||
set(tagfile "${CMAKE_BINARY_DIR}/docs/cppreference-doxygen-web.tag.xml")
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${tagfile}"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -P "${download_script}"
|
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs"
|
|
||||||
)
|
|
||||||
set(doxygen_tagfiles "${tagfile}=http://en.cppreference.com/w/")
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${doxygen_index_file}"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E env
|
|
||||||
"DOXYGEN_OUTPUT_DIRECTORY=${doxygen_output_directory}"
|
|
||||||
"DOXYGEN_INCLUDE_PATH=${doxygen_include_path}"
|
|
||||||
"DOXYGEN_TAGFILES=${doxygen_tagfiles}"
|
|
||||||
"DOXYGEN_PLANTUML_JAR_PATH=${doxygen_plantuml_jar_path}"
|
|
||||||
"DOXYGEN_DOT_PATH=${doxygen_dot_path}"
|
|
||||||
"${DOXYGEN_EXECUTABLE}" "${doxyfile}"
|
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
||||||
DEPENDS "${dependencies}" "${tagfile}")
|
|
||||||
add_custom_target(docs
|
|
||||||
DEPENDS "${doxygen_index_file}"
|
|
||||||
SOURCES "${dependencies}")
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
install stuff
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
install (
|
|
||||||
TARGETS
|
|
||||||
common
|
|
||||||
opts
|
|
||||||
ripple_syslibs
|
|
||||||
ripple_boost
|
|
||||||
xrpl_core
|
|
||||||
EXPORT RippleExports
|
|
||||||
LIBRARY DESTINATION lib
|
|
||||||
ARCHIVE DESTINATION lib
|
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
INCLUDES DESTINATION include)
|
|
||||||
|
|
||||||
install (EXPORT RippleExports
|
|
||||||
FILE RippleTargets.cmake
|
|
||||||
NAMESPACE Ripple::
|
|
||||||
DESTINATION lib/cmake/ripple)
|
|
||||||
include (CMakePackageConfigHelpers)
|
|
||||||
write_basic_package_version_file (
|
|
||||||
RippleConfigVersion.cmake
|
|
||||||
VERSION ${rippled_version}
|
|
||||||
COMPATIBILITY SameMajorVersion)
|
|
||||||
|
|
||||||
if (is_root_project)
|
|
||||||
install (TARGETS rippled RUNTIME DESTINATION bin)
|
|
||||||
set_target_properties(rippled PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON)
|
|
||||||
install (
|
|
||||||
FILES
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/RippleConfig.cmake
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/RippleConfigVersion.cmake
|
|
||||||
DESTINATION lib/cmake/ripple)
|
|
||||||
# sample configs should not overwrite existing files
|
|
||||||
# install if-not-exists workaround as suggested by
|
|
||||||
# https://cmake.org/Bug/view.php?id=12646
|
|
||||||
install(CODE "
|
|
||||||
macro (copy_if_not_exists SRC DEST NEWNAME)
|
|
||||||
if (NOT EXISTS \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DEST}/\${NEWNAME}\")
|
|
||||||
file (INSTALL FILE_PERMISSIONS OWNER_READ OWNER_WRITE DESTINATION \"\${CMAKE_INSTALL_PREFIX}/\${DEST}\" FILES \"\${SRC}\" RENAME \"\${NEWNAME}\")
|
|
||||||
else ()
|
|
||||||
message (\"-- Skipping : \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DEST}/\${NEWNAME}\")
|
|
||||||
endif ()
|
|
||||||
endmacro()
|
|
||||||
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/rippled-example.cfg\" etc rippled.cfg)
|
|
||||||
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/validators-example.txt\" etc validators.txt)
|
|
||||||
")
|
|
||||||
endif ()
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
rippled compile options/settings via an interface library
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
add_library (opts INTERFACE)
|
|
||||||
add_library (Ripple::opts ALIAS opts)
|
|
||||||
target_compile_definitions (opts
|
|
||||||
INTERFACE
|
|
||||||
BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS
|
|
||||||
$<$<BOOL:${boost_show_deprecated}>:
|
|
||||||
BOOST_ASIO_NO_DEPRECATED
|
|
||||||
BOOST_FILESYSTEM_NO_DEPRECATED
|
|
||||||
>
|
|
||||||
$<$<NOT:$<BOOL:${boost_show_deprecated}>>:
|
|
||||||
BOOST_COROUTINES_NO_DEPRECATION_WARNING
|
|
||||||
BOOST_BEAST_ALLOW_DEPRECATED
|
|
||||||
BOOST_FILESYSTEM_DEPRECATED
|
|
||||||
>
|
|
||||||
$<$<BOOL:${beast_no_unit_test_inline}>:BEAST_NO_UNIT_TEST_INLINE=1>
|
|
||||||
$<$<BOOL:${beast_disable_autolink}>:BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES=1>
|
|
||||||
$<$<BOOL:${single_io_service_thread}>:RIPPLE_SINGLE_IO_SERVICE_THREAD=1>)
|
|
||||||
target_compile_options (opts
|
|
||||||
INTERFACE
|
|
||||||
$<$<AND:$<BOOL:${is_gcc}>,$<COMPILE_LANGUAGE:CXX>>:-Wsuggest-override>
|
|
||||||
$<$<BOOL:${perf}>:-fno-omit-frame-pointer>
|
|
||||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${coverage}>>:-fprofile-arcs -ftest-coverage>
|
|
||||||
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>>:-fprofile-instr-generate -fcoverage-mapping>
|
|
||||||
$<$<BOOL:${profile}>:-pg>
|
|
||||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${profile}>>:-p>)
|
|
||||||
|
|
||||||
target_link_libraries (opts
|
|
||||||
INTERFACE
|
|
||||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${coverage}>>:-fprofile-arcs -ftest-coverage>
|
|
||||||
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>>:-fprofile-instr-generate -fcoverage-mapping>
|
|
||||||
$<$<BOOL:${profile}>:-pg>
|
|
||||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${profile}>>:-p>)
|
|
||||||
|
|
||||||
if(jemalloc)
|
|
||||||
find_package(jemalloc REQUIRED)
|
|
||||||
target_compile_definitions(opts INTERFACE PROFILE_JEMALLOC)
|
|
||||||
target_link_libraries(opts INTERFACE jemalloc::jemalloc)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (san)
|
|
||||||
target_compile_options (opts
|
|
||||||
INTERFACE
|
|
||||||
# sanitizers recommend minimum of -O1 for reasonable performance
|
|
||||||
$<$<CONFIG:Debug>:-O1>
|
|
||||||
${SAN_FLAG}
|
|
||||||
-fno-omit-frame-pointer)
|
|
||||||
target_compile_definitions (opts
|
|
||||||
INTERFACE
|
|
||||||
$<$<STREQUAL:${san},address>:SANITIZER=ASAN>
|
|
||||||
$<$<STREQUAL:${san},thread>:SANITIZER=TSAN>
|
|
||||||
$<$<STREQUAL:${san},memory>:SANITIZER=MSAN>
|
|
||||||
$<$<STREQUAL:${san},undefined>:SANITIZER=UBSAN>)
|
|
||||||
target_link_libraries (opts INTERFACE ${SAN_FLAG} ${SAN_LIB})
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
#[===================================================================[
|
|
||||||
rippled transitive library deps via an interface library
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
add_library (ripple_syslibs INTERFACE)
|
|
||||||
add_library (Ripple::syslibs ALIAS ripple_syslibs)
|
|
||||||
target_link_libraries (ripple_syslibs
|
|
||||||
INTERFACE
|
|
||||||
$<$<BOOL:${MSVC}>:
|
|
||||||
legacy_stdio_definitions.lib
|
|
||||||
Shlwapi
|
|
||||||
kernel32
|
|
||||||
user32
|
|
||||||
gdi32
|
|
||||||
winspool
|
|
||||||
comdlg32
|
|
||||||
advapi32
|
|
||||||
shell32
|
|
||||||
ole32
|
|
||||||
oleaut32
|
|
||||||
uuid
|
|
||||||
odbc32
|
|
||||||
odbccp32
|
|
||||||
crypt32
|
|
||||||
>
|
|
||||||
$<$<NOT:$<BOOL:${MSVC}>>:dl>
|
|
||||||
$<$<NOT:$<OR:$<BOOL:${MSVC}>,$<BOOL:${APPLE}>>>:rt>)
|
|
||||||
|
|
||||||
if (NOT MSVC)
|
|
||||||
set (THREADS_PREFER_PTHREAD_FLAG ON)
|
|
||||||
find_package (Threads)
|
|
||||||
target_link_libraries (ripple_syslibs INTERFACE Threads::Threads)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_library (ripple_libs INTERFACE)
|
|
||||||
add_library (Ripple::libs ALIAS ripple_libs)
|
|
||||||
target_link_libraries (ripple_libs INTERFACE Ripple::syslibs)
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
multiconfig misc
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
if (is_multiconfig)
|
|
||||||
# This code finds all source files in the src subdirectory for inclusion
|
|
||||||
# in the IDE file tree as non-compiled sources. Since this file list will
|
|
||||||
# have some overlap with files we have already added to our targets to
|
|
||||||
# be compiled, we explicitly remove any of these target source files from
|
|
||||||
# this list.
|
|
||||||
file (GLOB_RECURSE all_sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
CONFIGURE_DEPENDS
|
|
||||||
src/*.* Builds/*.md docs/*.md src/*.md Builds/*.cmake)
|
|
||||||
file(GLOB md_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS
|
|
||||||
*.md)
|
|
||||||
LIST(APPEND all_sources ${md_files})
|
|
||||||
foreach (_target secp256k1::secp256k1 ed25519::ed25519 xrpl_core rippled)
|
|
||||||
get_target_property (_type ${_target} TYPE)
|
|
||||||
if(_type STREQUAL "INTERFACE_LIBRARY")
|
|
||||||
continue()
|
|
||||||
endif()
|
|
||||||
get_target_property (_src ${_target} SOURCES)
|
|
||||||
list (REMOVE_ITEM all_sources ${_src})
|
|
||||||
endforeach ()
|
|
||||||
target_sources (rippled PRIVATE ${all_sources})
|
|
||||||
set_property (
|
|
||||||
SOURCE ${all_sources}
|
|
||||||
APPEND
|
|
||||||
PROPERTY HEADER_FILE_ONLY true)
|
|
||||||
if (MSVC)
|
|
||||||
set_property(
|
|
||||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
PROPERTY VS_STARTUP_PROJECT rippled)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
group_sources(src)
|
|
||||||
group_sources(docs)
|
|
||||||
group_sources(Builds)
|
|
||||||
endif ()
|
|
||||||
@@ -1,180 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
package/container targets - (optional)
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
if (is_root_project)
|
|
||||||
if (NOT DOCKER)
|
|
||||||
find_program (DOCKER docker)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (DOCKER)
|
|
||||||
# if no container label is provided, use current git hash
|
|
||||||
git_hash (commit_hash)
|
|
||||||
if (NOT container_label)
|
|
||||||
set (container_label ${commit_hash})
|
|
||||||
endif ()
|
|
||||||
message (STATUS "using [${container_label}] as build container tag...")
|
|
||||||
|
|
||||||
file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/packages)
|
|
||||||
|
|
||||||
#[===================================================================[
|
|
||||||
rpm
|
|
||||||
#]===================================================================]
|
|
||||||
add_custom_target (rpm_container
|
|
||||||
docker build
|
|
||||||
--pull
|
|
||||||
--build-arg GIT_COMMIT=${commit_hash}
|
|
||||||
-t rippleci/rippled-rpm-builder:${container_label}
|
|
||||||
$<$<BOOL:${rpm_cache_from}>:--cache-from=${rpm_cache_from}>
|
|
||||||
-f centos-builder/Dockerfile .
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Builds/containers
|
|
||||||
VERBATIM
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
SOURCES
|
|
||||||
Builds/containers/centos-builder/Dockerfile
|
|
||||||
Builds/containers/centos-builder/centos_setup.sh
|
|
||||||
Builds/containers/shared/update-rippled.sh
|
|
||||||
Builds/containers/shared/update_sources.sh
|
|
||||||
Builds/containers/shared/rippled.service
|
|
||||||
Builds/containers/shared/rippled-reporting.service
|
|
||||||
Builds/containers/packaging/rpm/rippled.spec
|
|
||||||
Builds/containers/packaging/rpm/build_rpm.sh
|
|
||||||
Builds/containers/packaging/rpm/50-rippled.preset
|
|
||||||
Builds/containers/packaging/rpm/50-rippled-reporting.preset
|
|
||||||
bin/getRippledInfo
|
|
||||||
)
|
|
||||||
exclude_from_default (rpm_container)
|
|
||||||
add_custom_target (rpm
|
|
||||||
docker run
|
|
||||||
-v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
|
|
||||||
-v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
|
|
||||||
-t rippled-rpm-builder:${container_label}
|
|
||||||
/bin/bash -c "cp -fpu rippled/Builds/containers/packaging/rpm/build_rpm.sh . && ./build_rpm.sh"
|
|
||||||
VERBATIM
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
SOURCES
|
|
||||||
Builds/containers/packaging/rpm/rippled.spec
|
|
||||||
)
|
|
||||||
exclude_from_default (rpm)
|
|
||||||
if (NOT have_package_container)
|
|
||||||
add_dependencies(rpm rpm_container)
|
|
||||||
endif ()
|
|
||||||
#[===================================================================[
|
|
||||||
dpkg
|
|
||||||
#]===================================================================]
|
|
||||||
# currently use ubuntu 18.04 as a base b/c it has one of
|
|
||||||
# the lower versions of libc among ubuntu and debian releases.
|
|
||||||
# we could change this in the future and build with some other deb
|
|
||||||
# based system.
|
|
||||||
add_custom_target (dpkg_container
|
|
||||||
docker build
|
|
||||||
--pull
|
|
||||||
--build-arg DIST_TAG=18.04
|
|
||||||
--build-arg GIT_COMMIT=${commit_hash}
|
|
||||||
-t rippled-dpkg-builder:${container_label}
|
|
||||||
$<$<BOOL:${dpkg_cache_from}>:--cache-from=${dpkg_cache_from}>
|
|
||||||
-f ubuntu-builder/Dockerfile .
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Builds/containers
|
|
||||||
VERBATIM
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
SOURCES
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled-reporting.links
|
|
||||||
Builds/containers/packaging/dpkg/debian/copyright
|
|
||||||
Builds/containers/packaging/dpkg/debian/rules
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled-reporting.install
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled-reporting.postinst
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled.links
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled.prerm
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled.postinst
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled-dev.install
|
|
||||||
Builds/containers/packaging/dpkg/debian/dirs
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled.postrm
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled.conffiles
|
|
||||||
Builds/containers/packaging/dpkg/debian/compat
|
|
||||||
Builds/containers/packaging/dpkg/debian/source/format
|
|
||||||
Builds/containers/packaging/dpkg/debian/source/local-options
|
|
||||||
Builds/containers/packaging/dpkg/debian/README.Debian
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled.install
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled.preinst
|
|
||||||
Builds/containers/packaging/dpkg/debian/docs
|
|
||||||
Builds/containers/packaging/dpkg/debian/control
|
|
||||||
Builds/containers/packaging/dpkg/debian/rippled-reporting.dirs
|
|
||||||
Builds/containers/packaging/dpkg/build_dpkg.sh
|
|
||||||
Builds/containers/ubuntu-builder/Dockerfile
|
|
||||||
Builds/containers/ubuntu-builder/ubuntu_setup.sh
|
|
||||||
bin/getRippledInfo
|
|
||||||
Builds/containers/shared/install_cmake.sh
|
|
||||||
Builds/containers/shared/update-rippled.sh
|
|
||||||
Builds/containers/shared/update_sources.sh
|
|
||||||
Builds/containers/shared/rippled.service
|
|
||||||
Builds/containers/shared/rippled-reporting.service
|
|
||||||
Builds/containers/shared/rippled-logrotate
|
|
||||||
Builds/containers/shared/update-rippled-cron
|
|
||||||
)
|
|
||||||
exclude_from_default (dpkg_container)
|
|
||||||
add_custom_target (dpkg
|
|
||||||
docker run
|
|
||||||
-v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
|
|
||||||
-v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
|
|
||||||
-t rippled-dpkg-builder:${container_label}
|
|
||||||
/bin/bash -c "cp -fpu rippled/Builds/containers/packaging/dpkg/build_dpkg.sh . && ./build_dpkg.sh"
|
|
||||||
VERBATIM
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
SOURCES
|
|
||||||
Builds/containers/packaging/dpkg/debian/control
|
|
||||||
)
|
|
||||||
exclude_from_default (dpkg)
|
|
||||||
if (NOT have_package_container)
|
|
||||||
add_dependencies(dpkg dpkg_container)
|
|
||||||
endif ()
|
|
||||||
#[===================================================================[
|
|
||||||
ci container
|
|
||||||
#]===================================================================]
|
|
||||||
# now use the same ubuntu image for our travis-ci docker images,
|
|
||||||
# but we use a newer distro (18.04 vs 16.04).
|
|
||||||
#
|
|
||||||
# the following steps assume the github pkg repo, but it's possible to
|
|
||||||
# adapt these for other docker hub repositories.
|
|
||||||
#
|
|
||||||
# steps for publishing a new CI image when you make changes:
|
|
||||||
#
|
|
||||||
# mkdir bld.ci && cd bld.ci && cmake -Dpackages_only=ON -Dcontainer_label=CI_LATEST
|
|
||||||
# cmake --build . --target ci_container --verbose
|
|
||||||
# docker tag rippled-ci-builder:CI_LATEST <HUB REPO PATH>/rippled-ci-builder:YYYY-MM-DD
|
|
||||||
# (NOTE: change YYYY-MM-DD to match current date, or use a different
|
|
||||||
# tag/version scheme if you prefer)
|
|
||||||
# docker push <HUB REPO PATH>/rippled-ci-builder:YYYY-MM-DD
|
|
||||||
# (NOTE: <HUB REPO PATH> is probably your user or org name if using
|
|
||||||
# docker hub, or it might be something like
|
|
||||||
# docker.pkg.github.com/ripple/rippled if using the github pkg
|
|
||||||
# registry. for any registry, you will need to be logged-in via
|
|
||||||
# docker and have push access.)
|
|
||||||
#
|
|
||||||
# ...then change the DOCKER_IMAGE line in .travis.yml :
|
|
||||||
# - DOCKER_IMAGE="<HUB REPO PATH>/rippled-ci-builder:YYYY-MM-DD"
|
|
||||||
add_custom_target (ci_container
|
|
||||||
docker build
|
|
||||||
--pull
|
|
||||||
--build-arg DIST_TAG=18.04
|
|
||||||
--build-arg GIT_COMMIT=${commit_hash}
|
|
||||||
--build-arg CI_USE=true
|
|
||||||
-t rippled-ci-builder:${container_label}
|
|
||||||
$<$<BOOL:${ci_cache_from}>:--cache-from=${ci_cache_from}>
|
|
||||||
-f ubuntu-builder/Dockerfile .
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Builds/containers
|
|
||||||
VERBATIM
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
SOURCES
|
|
||||||
Builds/containers/ubuntu-builder/Dockerfile
|
|
||||||
Builds/containers/ubuntu-builder/ubuntu_setup.sh
|
|
||||||
)
|
|
||||||
exclude_from_default (ci_container)
|
|
||||||
else ()
|
|
||||||
message (STATUS "docker NOT found -- won't be able to build containers for packaging")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
convenience variables and sanity checks
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
if (NOT ep_procs)
|
|
||||||
ProcessorCount(ep_procs)
|
|
||||||
if (ep_procs GREATER 1)
|
|
||||||
# never use more than half of cores for EP builds
|
|
||||||
math (EXPR ep_procs "${ep_procs} / 2")
|
|
||||||
message (STATUS "Using ${ep_procs} cores for ExternalProject builds.")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
get_property(is_multiconfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
|
||||||
|
|
||||||
set (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
|
||||||
if (NOT is_multiconfig)
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
|
||||||
message (STATUS "Build type not specified - defaulting to Release")
|
|
||||||
set (CMAKE_BUILD_TYPE Release CACHE STRING "build type" FORCE)
|
|
||||||
elseif (NOT (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL Release))
|
|
||||||
# for simplicity, these are the only two config types we care about. Limiting
|
|
||||||
# the build types simplifies dealing with external project builds especially
|
|
||||||
message (FATAL_ERROR " *** Only Debug or Release build types are currently supported ***")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
get_directory_property(has_parent PARENT_DIRECTORY)
|
|
||||||
if (has_parent)
|
|
||||||
set (is_root_project OFF)
|
|
||||||
else ()
|
|
||||||
set (is_root_project ON)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang") # both Clang and AppleClang
|
|
||||||
set (is_clang TRUE)
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND
|
|
||||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
|
|
||||||
message (FATAL_ERROR "This project requires clang 8 or later")
|
|
||||||
endif ()
|
|
||||||
# TODO min AppleClang version check ?
|
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
||||||
set (is_gcc TRUE)
|
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
|
|
||||||
message (FATAL_ERROR "This project requires GCC 8 or later")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
||||||
set (is_linux TRUE)
|
|
||||||
else ()
|
|
||||||
set (is_linux FALSE)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if ("$ENV{CI}" STREQUAL "true" OR "$ENV{CONTINUOUS_INTEGRATION}" STREQUAL "true")
|
|
||||||
set (is_ci TRUE)
|
|
||||||
else ()
|
|
||||||
set (is_ci FALSE)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# check for in-source build and fail
|
|
||||||
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
|
||||||
message (FATAL_ERROR "Builds (in-source) are not allowed in "
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}. Please remove CMakeCache.txt and the CMakeFiles "
|
|
||||||
"directory from ${CMAKE_CURRENT_SOURCE_DIR} and try building in a separate directory.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (MSVC AND CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
|
|
||||||
message (FATAL_ERROR "Visual Studio 32-bit build is not supported.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
||||||
message (FATAL_ERROR "Rippled requires a 64 bit target architecture.\n"
|
|
||||||
"The most likely cause of this warning is trying to build rippled with a 32-bit OS.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (APPLE AND NOT HOMEBREW)
|
|
||||||
find_program (HOMEBREW brew)
|
|
||||||
endif ()
|
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
declare user options/settings
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
option (assert "Enables asserts, even in release builds" OFF)
|
|
||||||
|
|
||||||
option (reporting "Build rippled with reporting mode enabled" OFF)
|
|
||||||
|
|
||||||
option (tests "Build tests" ON)
|
|
||||||
|
|
||||||
option (unity "Creates a build using UNITY support in cmake. This is the default" ON)
|
|
||||||
if (unity)
|
|
||||||
if (NOT is_ci)
|
|
||||||
set (CMAKE_UNITY_BUILD_BATCH_SIZE 15 CACHE STRING "")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
if (is_gcc OR is_clang)
|
|
||||||
option (coverage "Generates coverage info." OFF)
|
|
||||||
option (profile "Add profiling flags" OFF)
|
|
||||||
set (coverage_test "" CACHE STRING
|
|
||||||
"On gcc & clang, the specific unit test(s) to run for coverage. Default is all tests.")
|
|
||||||
if (coverage_test AND NOT coverage)
|
|
||||||
set (coverage ON CACHE BOOL "gcc/clang only" FORCE)
|
|
||||||
endif ()
|
|
||||||
option (coverage_core_only
|
|
||||||
"Include only src/ripple files when generating coverage report. \
|
|
||||||
Set to OFF to include all sources in coverage report."
|
|
||||||
ON)
|
|
||||||
option (wextra "compile with extra gcc/clang warnings enabled" ON)
|
|
||||||
else ()
|
|
||||||
set (profile OFF CACHE BOOL "gcc/clang only" FORCE)
|
|
||||||
set (coverage OFF CACHE BOOL "gcc/clang only" FORCE)
|
|
||||||
set (wextra OFF CACHE BOOL "gcc/clang only" FORCE)
|
|
||||||
endif ()
|
|
||||||
if (is_linux)
|
|
||||||
option (BUILD_SHARED_LIBS "build shared ripple libraries" OFF)
|
|
||||||
option (static "link protobuf, openssl, libc++, and boost statically" ON)
|
|
||||||
option (perf "Enables flags that assist with perf recording" OFF)
|
|
||||||
option (use_gold "enables detection of gold (binutils) linker" ON)
|
|
||||||
else ()
|
|
||||||
# we are not ready to allow shared-libs on windows because it would require
|
|
||||||
# export declarations. On macos it's more feasible, but static openssl
|
|
||||||
# produces odd linker errors, thus we disable shared lib builds for now.
|
|
||||||
set (BUILD_SHARED_LIBS OFF CACHE BOOL "build shared ripple libraries - OFF for win/macos" FORCE)
|
|
||||||
set (static ON CACHE BOOL "static link, linux only. ON for WIN/macos" FORCE)
|
|
||||||
set (perf OFF CACHE BOOL "perf flags, linux only" FORCE)
|
|
||||||
set (use_gold OFF CACHE BOOL "gold linker, linux only" FORCE)
|
|
||||||
endif ()
|
|
||||||
if (is_clang)
|
|
||||||
option (use_lld "enables detection of lld linker" ON)
|
|
||||||
else ()
|
|
||||||
set (use_lld OFF CACHE BOOL "try lld linker, clang only" FORCE)
|
|
||||||
endif ()
|
|
||||||
option (jemalloc "Enables jemalloc for heap profiling" OFF)
|
|
||||||
option (werr "treat warnings as errors" OFF)
|
|
||||||
option (local_protobuf
|
|
||||||
"Force a local build of protobuf instead of looking for an installed version." OFF)
|
|
||||||
option (local_grpc
|
|
||||||
"Force a local build of gRPC instead of looking for an installed version." OFF)
|
|
||||||
|
|
||||||
# this one is a string and therefore can't be an option
|
|
||||||
set (san "" CACHE STRING "On gcc & clang, add sanitizer instrumentation")
|
|
||||||
set_property (CACHE san PROPERTY STRINGS ";undefined;memory;address;thread")
|
|
||||||
if (san)
|
|
||||||
string (TOLOWER ${san} san)
|
|
||||||
set (SAN_FLAG "-fsanitize=${san}")
|
|
||||||
set (SAN_LIB "")
|
|
||||||
if (is_gcc)
|
|
||||||
if (san STREQUAL "address")
|
|
||||||
set (SAN_LIB "asan")
|
|
||||||
elseif (san STREQUAL "thread")
|
|
||||||
set (SAN_LIB "tsan")
|
|
||||||
elseif (san STREQUAL "memory")
|
|
||||||
set (SAN_LIB "msan")
|
|
||||||
elseif (san STREQUAL "undefined")
|
|
||||||
set (SAN_LIB "ubsan")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
set (_saved_CRL ${CMAKE_REQUIRED_LIBRARIES})
|
|
||||||
set (CMAKE_REQUIRED_LIBRARIES "${SAN_FLAG};${SAN_LIB}")
|
|
||||||
check_cxx_compiler_flag (${SAN_FLAG} COMPILER_SUPPORTS_SAN)
|
|
||||||
set (CMAKE_REQUIRED_LIBRARIES ${_saved_CRL})
|
|
||||||
if (NOT COMPILER_SUPPORTS_SAN)
|
|
||||||
message (FATAL_ERROR "${san} sanitizer does not seem to be supported by your compiler")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
set (container_label "" CACHE STRING "tag to use for package building containers")
|
|
||||||
option (packages_only
|
|
||||||
"ONLY generate package building targets. This is special use-case and almost \
|
|
||||||
certainly not what you want. Use with caution as you won't be able to build \
|
|
||||||
any compiled targets locally." OFF)
|
|
||||||
option (have_package_container
|
|
||||||
"Sometimes you already have the tagged container you want to use for package \
|
|
||||||
building and you don't want docker to rebuild it. This flag will detach the \
|
|
||||||
dependency of the package build from the container build. It's an advanced \
|
|
||||||
use case and most likely you should not be touching this flag." OFF)
|
|
||||||
|
|
||||||
# the remaining options are obscure and rarely used
|
|
||||||
option (beast_no_unit_test_inline
|
|
||||||
"Prevents unit test definitions from being inserted into global table"
|
|
||||||
OFF)
|
|
||||||
option (single_io_service_thread
|
|
||||||
"Restricts the number of threads calling io_service::run to one. \
|
|
||||||
This can be useful when debugging."
|
|
||||||
OFF)
|
|
||||||
option (boost_show_deprecated
|
|
||||||
"Allow boost to fail on deprecated usage. Only useful if you're trying\
|
|
||||||
to find deprecated calls."
|
|
||||||
OFF)
|
|
||||||
option (beast_hashers
|
|
||||||
"Use local implementations for sha/ripemd hashes (experimental, not recommended)"
|
|
||||||
OFF)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
option (beast_disable_autolink "Disables autolinking of system libraries on WIN32" OFF)
|
|
||||||
else ()
|
|
||||||
set (beast_disable_autolink OFF CACHE BOOL "WIN32 only" FORCE)
|
|
||||||
endif ()
|
|
||||||
if (coverage)
|
|
||||||
message (STATUS "coverage build requested - forcing Debug build")
|
|
||||||
set (CMAKE_BUILD_TYPE Debug CACHE STRING "build type" FORCE)
|
|
||||||
endif ()
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
option (validator_keys "Enables building of validator-keys-tool as a separate target (imported via FetchContent)" OFF)
|
|
||||||
|
|
||||||
if (validator_keys)
|
|
||||||
git_branch (current_branch)
|
|
||||||
# default to tracking VK develop branch unless we are on master/release
|
|
||||||
if (NOT (current_branch STREQUAL "master" OR current_branch STREQUAL "release"))
|
|
||||||
set (current_branch "develop")
|
|
||||||
endif ()
|
|
||||||
message (STATUS "tracking ValidatorKeys branch: ${current_branch}")
|
|
||||||
|
|
||||||
FetchContent_Declare (
|
|
||||||
validator_keys_src
|
|
||||||
GIT_REPOSITORY https://github.com/ripple/validator-keys-tool.git
|
|
||||||
GIT_TAG "${current_branch}"
|
|
||||||
)
|
|
||||||
FetchContent_GetProperties (validator_keys_src)
|
|
||||||
if (NOT validator_keys_src_POPULATED)
|
|
||||||
message (STATUS "Pausing to download ValidatorKeys...")
|
|
||||||
FetchContent_Populate (validator_keys_src)
|
|
||||||
endif ()
|
|
||||||
add_subdirectory (${validator_keys_src_SOURCE_DIR} ${CMAKE_BINARY_DIR}/validator-keys)
|
|
||||||
endif ()
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
read version from source
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
file (STRINGS src/ripple/protocol/impl/BuildInfo.cpp BUILD_INFO)
|
|
||||||
foreach (line_ ${BUILD_INFO})
|
|
||||||
if (line_ MATCHES "versionString[ ]*=[ ]*\"(.+)\"")
|
|
||||||
set (rippled_version ${CMAKE_MATCH_1})
|
|
||||||
endif ()
|
|
||||||
endforeach ()
|
|
||||||
if (rippled_version)
|
|
||||||
message (STATUS "rippled version: ${rippled_version}")
|
|
||||||
else ()
|
|
||||||
message (FATAL_ERROR "unable to determine rippled version")
|
|
||||||
endif ()
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
# SociConfig.cmake - CMake build configuration of SOCI library
|
|
||||||
################################################################################
|
|
||||||
# Copyright (C) 2010 Mateusz Loskot <mateusz@loskot.net>
|
|
||||||
#
|
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
|
||||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
# http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
include(CheckCXXSymbolExists)
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
check_cxx_symbol_exists("_M_AMD64" "" SOCI_TARGET_ARCH_X64)
|
|
||||||
if(NOT RTC_ARCH_X64)
|
|
||||||
check_cxx_symbol_exists("_M_IX86" "" SOCI_TARGET_ARCH_X86)
|
|
||||||
endif(NOT RTC_ARCH_X64)
|
|
||||||
# add check for arm here
|
|
||||||
# see http://msdn.microsoft.com/en-us/library/b0084kay.aspx
|
|
||||||
else(WIN32)
|
|
||||||
check_cxx_symbol_exists("__i386__" "" SOCI_TARGET_ARCH_X86)
|
|
||||||
check_cxx_symbol_exists("__x86_64__" "" SOCI_TARGET_ARCH_X64)
|
|
||||||
check_cxx_symbol_exists("__arm__" "" SOCI_TARGET_ARCH_ARM)
|
|
||||||
endif(WIN32)
|
|
||||||
|
|
||||||
if(NOT DEFINED LIB_SUFFIX)
|
|
||||||
if(SOCI_TARGET_ARCH_X64)
|
|
||||||
set(_lib_suffix "64")
|
|
||||||
else()
|
|
||||||
set(_lib_suffix "")
|
|
||||||
endif()
|
|
||||||
set(LIB_SUFFIX ${_lib_suffix} CACHE STRING "Specifies suffix for the lib directory")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#
|
|
||||||
# C++11 Option
|
|
||||||
#
|
|
||||||
|
|
||||||
if(NOT SOCI_CXX_C11)
|
|
||||||
set (SOCI_CXX_C11 OFF CACHE BOOL "Build to the C++11 standard")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#
|
|
||||||
# Force compilation flags and set desired warnings level
|
|
||||||
#
|
|
||||||
|
|
||||||
if (MSVC)
|
|
||||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
||||||
add_definitions(-D_CRT_NONSTDC_NO_WARNING)
|
|
||||||
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
|
|
||||||
|
|
||||||
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
|
||||||
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
||||||
else()
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /we4266")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
else()
|
|
||||||
|
|
||||||
set(SOCI_GCC_CLANG_COMMON_FLAGS "")
|
|
||||||
# "-pedantic -Werror -Wno-error=parentheses -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Woverloaded-virtual -Wredundant-decls -Wno-long-long")
|
|
||||||
|
|
||||||
|
|
||||||
if (SOCI_CXX_C11)
|
|
||||||
set(SOCI_CXX_VERSION_FLAGS "-std=c++11")
|
|
||||||
else()
|
|
||||||
set(SOCI_CXX_VERSION_FLAGS "-std=gnu++98")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "clang")
|
|
||||||
|
|
||||||
if(NOT CMAKE_CXX_COMPILER_VERSION LESS 3.1 AND SOCI_ASAN)
|
|
||||||
set(SOCI_GCC_CLANG_COMMON_FLAGS "${SOCI_GCC_CLANG_COMMON_FLAGS} -fsanitize=address")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# enforce C++11 for Clang
|
|
||||||
set(SOCI_CXX_C11 ON)
|
|
||||||
set(SOCI_CXX_VERSION_FLAGS "-std=c++11")
|
|
||||||
add_definitions(-DCATCH_CONFIG_CPP11_NO_IS_ENUM)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SOCI_GCC_CLANG_COMMON_FLAGS} ${SOCI_CXX_VERSION_FLAGS}")
|
|
||||||
|
|
||||||
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
|
||||||
|
|
||||||
if(NOT CMAKE_CXX_COMPILER_VERSION LESS 4.8 AND SOCI_ASAN)
|
|
||||||
set(SOCI_GCC_CLANG_COMMON_FLAGS "${SOCI_GCC_CLANG_COMMON_FLAGS} -fsanitize=address")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SOCI_GCC_CLANG_COMMON_FLAGS} ${SOCI_CXX_VERSION_FLAGS} ")
|
|
||||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
|
||||||
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
||||||
else()
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
else()
|
|
||||||
message(WARNING "Unknown toolset - using default flags to build SOCI")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Set SOCI_HAVE_* variables for soci-config.h generator
|
|
||||||
set(SOCI_HAVE_CXX_C11 ${SOCI_CXX_C11} CACHE INTERNAL "Enables C++11 support")
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
find_package(Boost 1.70 REQUIRED
|
|
||||||
COMPONENTS
|
|
||||||
chrono
|
|
||||||
container
|
|
||||||
context
|
|
||||||
coroutine
|
|
||||||
date_time
|
|
||||||
filesystem
|
|
||||||
program_options
|
|
||||||
regex
|
|
||||||
system
|
|
||||||
thread
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(ripple_boost INTERFACE)
|
|
||||||
add_library(Ripple::boost ALIAS ripple_boost)
|
|
||||||
if(XCODE)
|
|
||||||
target_include_directories(ripple_boost BEFORE INTERFACE ${Boost_INCLUDE_DIRS})
|
|
||||||
target_compile_options(ripple_boost INTERFACE --system-header-prefix="boost/")
|
|
||||||
else()
|
|
||||||
target_include_directories(ripple_boost SYSTEM BEFORE INTERFACE ${Boost_INCLUDE_DIRS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(ripple_boost
|
|
||||||
INTERFACE
|
|
||||||
Boost::boost
|
|
||||||
Boost::chrono
|
|
||||||
Boost::container
|
|
||||||
Boost::coroutine
|
|
||||||
Boost::date_time
|
|
||||||
Boost::filesystem
|
|
||||||
Boost::program_options
|
|
||||||
Boost::regex
|
|
||||||
Boost::system
|
|
||||||
Boost::thread)
|
|
||||||
if(Boost_COMPILER)
|
|
||||||
target_link_libraries(ripple_boost INTERFACE Boost::disable_autolinking)
|
|
||||||
endif()
|
|
||||||
if(san AND is_clang)
|
|
||||||
# TODO: gcc does not support -fsanitize-blacklist...can we do something else
|
|
||||||
# for gcc ?
|
|
||||||
if(NOT Boost_INCLUDE_DIRS AND TARGET Boost::headers)
|
|
||||||
get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES)
|
|
||||||
endif()
|
|
||||||
message(STATUS "Adding [${Boost_INCLUDE_DIRS}] to sanitizer blacklist")
|
|
||||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt "src:${Boost_INCLUDE_DIRS}/*")
|
|
||||||
target_compile_options(opts
|
|
||||||
INTERFACE
|
|
||||||
# ignore boost headers for sanitizing
|
|
||||||
-fsanitize-blacklist=${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt)
|
|
||||||
endif()
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
find_package(Protobuf 3.8)
|
|
||||||
|
|
||||||
set(output_dir ${CMAKE_BINARY_DIR}/proto_gen)
|
|
||||||
file(MAKE_DIRECTORY ${output_dir})
|
|
||||||
set(ccbd ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
set(CMAKE_CURRENT_BINARY_DIR ${output_dir})
|
|
||||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS src/ripple/proto/ripple.proto)
|
|
||||||
set(CMAKE_CURRENT_BINARY_DIR ${ccbd})
|
|
||||||
|
|
||||||
target_include_directories(xrpl_core SYSTEM PUBLIC
|
|
||||||
# The generated implementation imports the header relative to the output
|
|
||||||
# directory.
|
|
||||||
$<BUILD_INTERFACE:${output_dir}>
|
|
||||||
$<BUILD_INTERFACE:${output_dir}/src>
|
|
||||||
)
|
|
||||||
target_sources(xrpl_core PRIVATE ${output_dir}/src/ripple/proto/ripple.pb.cc)
|
|
||||||
install(
|
|
||||||
FILES ${output_dir}/src/ripple/proto/ripple.pb.h
|
|
||||||
DESTINATION include/ripple/proto)
|
|
||||||
target_link_libraries(xrpl_core PUBLIC protobuf::libprotobuf)
|
|
||||||
target_compile_options(xrpl_core
|
|
||||||
PUBLIC
|
|
||||||
$<$<BOOL:${XCODE}>:
|
|
||||||
--system-header-prefix="google/protobuf"
|
|
||||||
-Wno-deprecated-dynamic-exception-spec
|
|
||||||
>
|
|
||||||
)
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
find_package(gRPC 1.23)
|
|
||||||
|
|
||||||
#[=================================[
|
|
||||||
generate protobuf sources for
|
|
||||||
grpc defs and bundle into a
|
|
||||||
static lib
|
|
||||||
#]=================================]
|
|
||||||
set(output_dir "${CMAKE_BINARY_DIR}/proto_gen_grpc")
|
|
||||||
set(GRPC_GEN_DIR "${output_dir}/ripple/proto")
|
|
||||||
file(MAKE_DIRECTORY ${GRPC_GEN_DIR})
|
|
||||||
set(GRPC_PROTO_SRCS)
|
|
||||||
set(GRPC_PROTO_HDRS)
|
|
||||||
set(GRPC_PROTO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/src/ripple/proto/org")
|
|
||||||
file(GLOB_RECURSE GRPC_DEFINITION_FILES "${GRPC_PROTO_ROOT}/*.proto")
|
|
||||||
foreach(file ${GRPC_DEFINITION_FILES})
|
|
||||||
# /home/user/rippled/src/ripple/proto/org/.../v1/get_ledger.proto
|
|
||||||
get_filename_component(_abs_file ${file} ABSOLUTE)
|
|
||||||
# /home/user/rippled/src/ripple/proto/org/.../v1
|
|
||||||
get_filename_component(_abs_dir ${_abs_file} DIRECTORY)
|
|
||||||
# get_ledger
|
|
||||||
get_filename_component(_basename ${file} NAME_WE)
|
|
||||||
# /home/user/rippled/src/ripple/proto
|
|
||||||
get_filename_component(_proto_inc ${GRPC_PROTO_ROOT} DIRECTORY) # updir one level
|
|
||||||
# org/.../v1/get_ledger.proto
|
|
||||||
file(RELATIVE_PATH _rel_root_file ${_proto_inc} ${_abs_file})
|
|
||||||
# org/.../v1
|
|
||||||
get_filename_component(_rel_root_dir ${_rel_root_file} DIRECTORY)
|
|
||||||
# src/ripple/proto/org/.../v1
|
|
||||||
file(RELATIVE_PATH _rel_dir ${CMAKE_CURRENT_SOURCE_DIR} ${_abs_dir})
|
|
||||||
|
|
||||||
# .cmake/proto_gen_grpc/ripple/proto/org/.../v1/get_ledger.grpc.pb.cc
|
|
||||||
set(src_1 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.grpc.pb.cc")
|
|
||||||
set(src_2 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.pb.cc")
|
|
||||||
set(hdr_1 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.grpc.pb.h")
|
|
||||||
set(hdr_2 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.pb.h")
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT ${src_1} ${src_2} ${hdr_1} ${hdr_2}
|
|
||||||
COMMAND protobuf::protoc
|
|
||||||
ARGS --grpc_out=${GRPC_GEN_DIR}
|
|
||||||
--cpp_out=${GRPC_GEN_DIR}
|
|
||||||
--plugin=protoc-gen-grpc=$<TARGET_FILE:gRPC::grpc_cpp_plugin>
|
|
||||||
-I ${_proto_inc} -I ${_rel_dir}
|
|
||||||
${_abs_file}
|
|
||||||
DEPENDS ${_abs_file} protobuf::protoc gRPC::grpc_cpp_plugin
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
COMMENT "Running gRPC C++ protocol buffer compiler on ${file}"
|
|
||||||
VERBATIM)
|
|
||||||
set_source_files_properties(${src_1} ${src_2} ${hdr_1} ${hdr_2} PROPERTIES
|
|
||||||
GENERATED TRUE
|
|
||||||
SKIP_UNITY_BUILD_INCLUSION ON
|
|
||||||
)
|
|
||||||
list(APPEND GRPC_PROTO_SRCS ${src_1} ${src_2})
|
|
||||||
list(APPEND GRPC_PROTO_HDRS ${hdr_1} ${hdr_2})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
target_include_directories(xrpl_core SYSTEM PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${output_dir}>
|
|
||||||
$<BUILD_INTERFACE:${output_dir}/ripple/proto>
|
|
||||||
# The generated sources include headers relative to this path. Fix it later.
|
|
||||||
$<INSTALL_INTERFACE:include/ripple/proto>
|
|
||||||
)
|
|
||||||
target_sources(xrpl_core PRIVATE ${GRPC_PROTO_SRCS})
|
|
||||||
install(
|
|
||||||
DIRECTORY ${output_dir}/ripple
|
|
||||||
DESTINATION include/
|
|
||||||
FILES_MATCHING PATTERN "*.h"
|
|
||||||
)
|
|
||||||
target_link_libraries(xrpl_core PUBLIC
|
|
||||||
"gRPC::grpc++"
|
|
||||||
# libgrpc is missing references.
|
|
||||||
absl::random_random
|
|
||||||
)
|
|
||||||
target_compile_options(xrpl_core
|
|
||||||
PRIVATE
|
|
||||||
$<$<BOOL:${MSVC}>:-wd4065>
|
|
||||||
$<$<NOT:$<BOOL:${MSVC}>>:-Wno-deprecated-declarations>
|
|
||||||
PUBLIC
|
|
||||||
$<$<BOOL:${MSVC}>:-wd4996>
|
|
||||||
$<$<BOOL:${XCODE}>:
|
|
||||||
--system-header-prefix="google/protobuf"
|
|
||||||
-Wno-deprecated-dynamic-exception-spec
|
|
||||||
>)
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#[=========================================================[
|
|
||||||
This is a CMake script file that is used to write
|
|
||||||
the contents of a file to stdout (using the cmake
|
|
||||||
echo command). The input file is passed via the
|
|
||||||
IN_FILE variable.
|
|
||||||
#]=========================================================]
|
|
||||||
|
|
||||||
if (EXISTS ${IN_FILE})
|
|
||||||
file (READ ${IN_FILE} contents)
|
|
||||||
## only print files that actually have some text in them
|
|
||||||
if (contents MATCHES "[a-z0-9A-Z]+")
|
|
||||||
execute_process(
|
|
||||||
COMMAND
|
|
||||||
${CMAKE_COMMAND} -E echo "${contents}")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
[Please see the BUILD instructions here](../BUILD.md)
|
|
||||||
405
Builds/Test.py
405
Builds/Test.py
@@ -1,405 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
# This file is part of rippled: https://github.com/ripple/rippled
|
|
||||||
# Copyright (c) 2012 - 2017 Ripple Labs Inc.
|
|
||||||
#
|
|
||||||
# Permission to use, copy, modify, and/or 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.
|
|
||||||
|
|
||||||
"""
|
|
||||||
Invocation:
|
|
||||||
|
|
||||||
./Builds/Test.py - builds and tests all configurations
|
|
||||||
|
|
||||||
The build must succeed without shell aliases for this to work.
|
|
||||||
|
|
||||||
To pass flags to cmake, put them at the very end of the command line, after
|
|
||||||
the -- flag - like this:
|
|
||||||
|
|
||||||
./Builds/Test.py -- -j4 # Pass -j4 to cmake --build
|
|
||||||
|
|
||||||
|
|
||||||
Common problems:
|
|
||||||
|
|
||||||
1) Boost not found. Solution: export BOOST_ROOT=[path to boost folder]
|
|
||||||
|
|
||||||
2) OpenSSL not found. Solution: export OPENSSL_ROOT=[path to OpenSSL folder]
|
|
||||||
|
|
||||||
3) cmake is not found. Solution: Be sure cmake directory is on your $PATH
|
|
||||||
|
|
||||||
"""
|
|
||||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import itertools
|
|
||||||
import os
|
|
||||||
import platform
|
|
||||||
import re
|
|
||||||
import shutil
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
|
|
||||||
def powerset(iterable):
|
|
||||||
"""powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)"""
|
|
||||||
s = list(iterable)
|
|
||||||
return itertools.chain.from_iterable(itertools.combinations(s, r) for r in range(len(s) + 1))
|
|
||||||
|
|
||||||
IS_WINDOWS = platform.system().lower() == 'windows'
|
|
||||||
IS_OS_X = platform.system().lower() == 'darwin'
|
|
||||||
|
|
||||||
# CMake
|
|
||||||
if IS_WINDOWS:
|
|
||||||
CMAKE_UNITY_CONFIGS = ['Debug', 'Release']
|
|
||||||
CMAKE_NONUNITY_CONFIGS = ['Debug', 'Release']
|
|
||||||
else:
|
|
||||||
CMAKE_UNITY_CONFIGS = []
|
|
||||||
CMAKE_NONUNITY_CONFIGS = []
|
|
||||||
CMAKE_UNITY_COMBOS = { '' : [['rippled'], CMAKE_UNITY_CONFIGS],
|
|
||||||
'.nounity' : [['rippled'], CMAKE_NONUNITY_CONFIGS] }
|
|
||||||
|
|
||||||
if IS_WINDOWS:
|
|
||||||
CMAKE_DIR_TARGETS = { ('msvc' + unity,) : targets for unity, targets in
|
|
||||||
CMAKE_UNITY_COMBOS.items() }
|
|
||||||
elif IS_OS_X:
|
|
||||||
CMAKE_DIR_TARGETS = { (build + unity,) : targets
|
|
||||||
for build in ['debug', 'release']
|
|
||||||
for unity, targets in CMAKE_UNITY_COMBOS.items() }
|
|
||||||
else:
|
|
||||||
CMAKE_DIR_TARGETS = { (cc + "." + build + unity,) : targets
|
|
||||||
for cc in ['gcc', 'clang']
|
|
||||||
for build in ['debug', 'release', 'coverage', 'profile']
|
|
||||||
for unity, targets in CMAKE_UNITY_COMBOS.items() }
|
|
||||||
|
|
||||||
# list of tuples of all possible options
|
|
||||||
if IS_WINDOWS or IS_OS_X:
|
|
||||||
CMAKE_ALL_GENERATE_OPTIONS = [tuple(x) for x in powerset(['-GNinja', '-Dassert=true'])]
|
|
||||||
else:
|
|
||||||
CMAKE_ALL_GENERATE_OPTIONS = list(set(
|
|
||||||
[tuple(x) for x in powerset(['-GNinja', '-Dstatic=true', '-Dassert=true', '-Dsan=address'])] +
|
|
||||||
[tuple(x) for x in powerset(['-GNinja', '-Dstatic=true', '-Dassert=true', '-Dsan=thread'])]))
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
|
||||||
description='Test.py - run ripple tests'
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--all', '-a',
|
|
||||||
action='store_true',
|
|
||||||
help='Build all configurations.',
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--keep_going', '-k',
|
|
||||||
action='store_true',
|
|
||||||
help='Keep going after one configuration has failed.',
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--silent', '-s',
|
|
||||||
action='store_true',
|
|
||||||
help='Silence all messages except errors',
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--verbose', '-v',
|
|
||||||
action='store_true',
|
|
||||||
help=('Report more information about which commands are executed and the '
|
|
||||||
'results.'),
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--test', '-t',
|
|
||||||
default='',
|
|
||||||
help='Add a prefix for unit tests',
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--testjobs',
|
|
||||||
default='0',
|
|
||||||
type=int,
|
|
||||||
help='Run tests in parallel'
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--ipv6',
|
|
||||||
action='store_true',
|
|
||||||
help='Use IPv6 localhost when running unit tests.',
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--clean', '-c',
|
|
||||||
action='store_true',
|
|
||||||
help='delete all build artifacts after testing',
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--quiet', '-q',
|
|
||||||
action='store_true',
|
|
||||||
help='Reduce output where possible (unit tests)',
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--dir', '-d',
|
|
||||||
default=(),
|
|
||||||
nargs='*',
|
|
||||||
help='Specify one or more CMake dir names. '
|
|
||||||
'Will also be used as -Dtarget=<dir> running cmake.'
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--target',
|
|
||||||
default=(),
|
|
||||||
nargs='*',
|
|
||||||
help='Specify one or more CMake build targets. '
|
|
||||||
'Will be used as --target <target> running cmake --build.'
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--config',
|
|
||||||
default=(),
|
|
||||||
nargs='*',
|
|
||||||
help='Specify one or more CMake build configs. '
|
|
||||||
'Will be used as --config <config> running cmake --build.'
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--generator_option',
|
|
||||||
action='append',
|
|
||||||
help='Specify a CMake generator option. Repeat for multiple options. '
|
|
||||||
'Will be passed to the cmake generator. '
|
|
||||||
'Due to limits of the argument parser, arguments starting with \'-\' '
|
|
||||||
'must be attached to this option. e.g. --generator_option=-GNinja.')
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--build_option',
|
|
||||||
action='append',
|
|
||||||
help='Specify a build option. Repeat for multiple options. '
|
|
||||||
'Will be passed to the build tool via cmake --build. '
|
|
||||||
'Due to limits of the argument parser, arguments starting with \'-\' '
|
|
||||||
'must be attached to this option. e.g. --build_option=-j8.')
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'extra_args',
|
|
||||||
default=(),
|
|
||||||
nargs='*',
|
|
||||||
help='Extra arguments are passed through to the tools'
|
|
||||||
)
|
|
||||||
|
|
||||||
ARGS = parser.parse_args()
|
|
||||||
|
|
||||||
def decodeString(line):
|
|
||||||
# Python 2 vs. Python 3
|
|
||||||
if isinstance(line, str):
|
|
||||||
return line
|
|
||||||
else:
|
|
||||||
return line.decode()
|
|
||||||
|
|
||||||
def shell(cmd, args=(), silent=False, cust_env=None):
|
|
||||||
""""Execute a shell command and return the output."""
|
|
||||||
silent = ARGS.silent or silent
|
|
||||||
verbose = not silent and ARGS.verbose
|
|
||||||
if verbose:
|
|
||||||
print('$' + cmd, *args)
|
|
||||||
|
|
||||||
command = (cmd,) + args
|
|
||||||
|
|
||||||
# shell is needed in Windows to find executable in the path
|
|
||||||
process = subprocess.Popen(
|
|
||||||
command,
|
|
||||||
stdin=subprocess.PIPE,
|
|
||||||
stdout=subprocess.PIPE,
|
|
||||||
stderr=subprocess.STDOUT,
|
|
||||||
env=cust_env,
|
|
||||||
shell=IS_WINDOWS)
|
|
||||||
lines = []
|
|
||||||
count = 0
|
|
||||||
# readline returns '' at EOF
|
|
||||||
for line in iter(process.stdout.readline, ''):
|
|
||||||
if process.poll() is None:
|
|
||||||
decoded = decodeString(line)
|
|
||||||
lines.append(decoded)
|
|
||||||
if verbose:
|
|
||||||
print(decoded, end='')
|
|
||||||
elif not silent:
|
|
||||||
count += 1
|
|
||||||
if count >= 80:
|
|
||||||
print()
|
|
||||||
count = 0
|
|
||||||
else:
|
|
||||||
print('.', end='')
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
|
|
||||||
if not verbose and count:
|
|
||||||
print()
|
|
||||||
process.wait()
|
|
||||||
return process.returncode, lines
|
|
||||||
|
|
||||||
def get_cmake_dir(cmake_dir):
|
|
||||||
return os.path.join('build' , 'cmake' , cmake_dir)
|
|
||||||
|
|
||||||
def run_cmake(directory, cmake_dir, args):
|
|
||||||
print('Generating build in', directory, 'with', *args or ('default options',))
|
|
||||||
old_dir = os.getcwd()
|
|
||||||
if not os.path.exists(directory):
|
|
||||||
os.makedirs(directory)
|
|
||||||
os.chdir(directory)
|
|
||||||
if IS_WINDOWS and not any(arg.startswith("-G") for arg in args) and not os.path.exists("CMakeCache.txt"):
|
|
||||||
if '--ninja' in args:
|
|
||||||
args += ( '-GNinja', )
|
|
||||||
else:
|
|
||||||
args += ( '-GVisual Studio 14 2015 Win64', )
|
|
||||||
# hack to extract cmake options/args from the legacy target format
|
|
||||||
if re.search('\.unity', cmake_dir):
|
|
||||||
args += ( '-Dunity=ON', )
|
|
||||||
if re.search('\.nounity', cmake_dir):
|
|
||||||
args += ( '-Dunity=OFF', )
|
|
||||||
if re.search('coverage', cmake_dir):
|
|
||||||
args += ( '-Dcoverage=ON', )
|
|
||||||
if re.search('profile', cmake_dir):
|
|
||||||
args += ( '-Dprofile=ON', )
|
|
||||||
if re.search('debug', cmake_dir):
|
|
||||||
args += ( '-DCMAKE_BUILD_TYPE=Debug', )
|
|
||||||
if re.search('release', cmake_dir):
|
|
||||||
args += ( '-DCMAKE_BUILD_TYPE=Release', )
|
|
||||||
m = re.search('gcc(-[^.]*)', cmake_dir)
|
|
||||||
if m:
|
|
||||||
args += ( '-DCMAKE_C_COMPILER=' + m.group(0),
|
|
||||||
'-DCMAKE_CXX_COMPILER=g++' + m.group(1), )
|
|
||||||
elif re.search('gcc', cmake_dir):
|
|
||||||
args += ( '-DCMAKE_C_COMPILER=gcc', '-DCMAKE_CXX_COMPILER=g++', )
|
|
||||||
m = re.search('clang(-[^.]*)', cmake_dir)
|
|
||||||
if m:
|
|
||||||
args += ( '-DCMAKE_C_COMPILER=' + m.group(0),
|
|
||||||
'-DCMAKE_CXX_COMPILER=clang++' + m.group(1), )
|
|
||||||
elif re.search('clang', cmake_dir):
|
|
||||||
args += ( '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', )
|
|
||||||
|
|
||||||
args += ( os.path.join('..', '..', '..'), )
|
|
||||||
resultcode, lines = shell('cmake', args)
|
|
||||||
|
|
||||||
if resultcode:
|
|
||||||
print('Generating FAILED:')
|
|
||||||
if not ARGS.verbose:
|
|
||||||
print(*lines, sep='')
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
os.chdir(old_dir)
|
|
||||||
|
|
||||||
def run_cmake_build(directory, target, config, args):
|
|
||||||
print('Building', target, config, 'in', directory, 'with', *args or ('default options',))
|
|
||||||
build_args=('--build', directory)
|
|
||||||
if target:
|
|
||||||
build_args += ('--target', target)
|
|
||||||
if config:
|
|
||||||
build_args += ('--config', config)
|
|
||||||
if args:
|
|
||||||
build_args += ('--',)
|
|
||||||
build_args += tuple(args)
|
|
||||||
resultcode, lines = shell('cmake', build_args)
|
|
||||||
|
|
||||||
if resultcode:
|
|
||||||
print('Build FAILED:')
|
|
||||||
if not ARGS.verbose:
|
|
||||||
print(*lines, sep='')
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def run_cmake_tests(directory, target, config):
|
|
||||||
failed = []
|
|
||||||
if IS_WINDOWS:
|
|
||||||
target += '.exe'
|
|
||||||
executable = os.path.join(directory, config if config else 'Debug', target)
|
|
||||||
if(not os.path.exists(executable)):
|
|
||||||
executable = os.path.join(directory, target)
|
|
||||||
print('Unit tests for', executable)
|
|
||||||
testflag = '--unittest'
|
|
||||||
quiet = ''
|
|
||||||
testjobs = ''
|
|
||||||
ipv6 = ''
|
|
||||||
if ARGS.test:
|
|
||||||
testflag += ('=' + ARGS.test)
|
|
||||||
if ARGS.quiet:
|
|
||||||
quiet = '-q'
|
|
||||||
if ARGS.ipv6:
|
|
||||||
ipv6 = '--unittest-ipv6'
|
|
||||||
if ARGS.testjobs:
|
|
||||||
testjobs = ('--unittest-jobs=' + str(ARGS.testjobs))
|
|
||||||
resultcode, lines = shell(executable, (testflag, quiet, testjobs, ipv6))
|
|
||||||
|
|
||||||
if resultcode:
|
|
||||||
if not ARGS.verbose:
|
|
||||||
print('ERROR:', *lines, sep='')
|
|
||||||
failed.append([target, 'unittest'])
|
|
||||||
|
|
||||||
return failed
|
|
||||||
|
|
||||||
def main():
|
|
||||||
all_failed = []
|
|
||||||
if ARGS.all:
|
|
||||||
build_dir_targets = CMAKE_DIR_TARGETS
|
|
||||||
generator_options = CMAKE_ALL_GENERATE_OPTIONS
|
|
||||||
else:
|
|
||||||
build_dir_targets = { tuple(ARGS.dir) : [ARGS.target, ARGS.config] }
|
|
||||||
if ARGS.generator_option:
|
|
||||||
generator_options = [tuple(ARGS.generator_option)]
|
|
||||||
else:
|
|
||||||
generator_options = [tuple()]
|
|
||||||
|
|
||||||
if not build_dir_targets:
|
|
||||||
# Let CMake choose the build tool.
|
|
||||||
build_dir_targets = { () : [] }
|
|
||||||
|
|
||||||
if ARGS.build_option:
|
|
||||||
ARGS.build_option = ARGS.build_option + list(ARGS.extra_args)
|
|
||||||
else:
|
|
||||||
ARGS.build_option = list(ARGS.extra_args)
|
|
||||||
|
|
||||||
for args in generator_options:
|
|
||||||
for build_dirs, (build_targets, build_configs) in build_dir_targets.items():
|
|
||||||
if not build_dirs:
|
|
||||||
build_dirs = ('default',)
|
|
||||||
if not build_targets:
|
|
||||||
build_targets = ('rippled',)
|
|
||||||
if not build_configs:
|
|
||||||
build_configs = ('',)
|
|
||||||
for cmake_dir in build_dirs:
|
|
||||||
cmake_full_dir = get_cmake_dir(cmake_dir)
|
|
||||||
run_cmake(cmake_full_dir, cmake_dir, args)
|
|
||||||
|
|
||||||
for target in build_targets:
|
|
||||||
for config in build_configs:
|
|
||||||
run_cmake_build(cmake_full_dir, target, config, ARGS.build_option)
|
|
||||||
failed = run_cmake_tests(cmake_full_dir, target, config)
|
|
||||||
|
|
||||||
if failed:
|
|
||||||
print('FAILED:', *(':'.join(f) for f in failed))
|
|
||||||
if not ARGS.keep_going:
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
all_failed.extend([decodeString(cmake_dir +
|
|
||||||
"." + target + "." + config), ':'.join(f)]
|
|
||||||
for f in failed)
|
|
||||||
else:
|
|
||||||
print('Success')
|
|
||||||
if ARGS.clean:
|
|
||||||
shutil.rmtree(cmake_full_dir)
|
|
||||||
|
|
||||||
if all_failed:
|
|
||||||
if len(all_failed) > 1:
|
|
||||||
print()
|
|
||||||
print('FAILED:', *(':'.join(f) for f in all_failed))
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
sys.exit(0)
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
num_procs=$(lscpu -p | grep -v '^#' | sort -u -t, -k 2,4 | wc -l) # number of physical cores
|
|
||||||
|
|
||||||
path=$(cd $(dirname $0) && pwd)
|
|
||||||
cd $(dirname $path)
|
|
||||||
${path}/Test.py -a -c --testjobs=${num_procs} -- -j${num_procs}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
# rippled Packaging and Containers
|
|
||||||
|
|
||||||
This folder contains docker container definitions and configuration
|
|
||||||
files to support building rpm and deb packages of rippled. The container
|
|
||||||
definitions include some additional software/packages that are used
|
|
||||||
for general build/test CI workflows of rippled but are not explicitly
|
|
||||||
needed for the package building workflow.
|
|
||||||
|
|
||||||
## CMake Targets
|
|
||||||
|
|
||||||
If you have docker installed on your local system, then the main
|
|
||||||
CMake file will enable several targets related to building packages:
|
|
||||||
`rpm_container`, `rpm`, `dpkg_container`, and `dpkg`. The package targets
|
|
||||||
depend on the container targets and will trigger a build of those first.
|
|
||||||
The container builds can take several dozen minutes to complete (depending
|
|
||||||
on hardware specs), so quick build cycles are not possible currently. As
|
|
||||||
such, these targets are often best suited to CI/automated build systems.
|
|
||||||
|
|
||||||
The package build can be invoked like any other cmake target from the
|
|
||||||
rippled root folder:
|
|
||||||
```
|
|
||||||
mkdir -p build/pkg && cd build/pkg
|
|
||||||
cmake -Dpackages_only=ON ../..
|
|
||||||
cmake --build . --target rpm
|
|
||||||
```
|
|
||||||
Upon successful completion, the generated package files will be in
|
|
||||||
the `build/pkg/packages` directory. For deb packages, simply replace
|
|
||||||
`rpm` with `dpkg` in the build command above.
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
FROM rippleci/centos:7
|
|
||||||
ARG GIT_COMMIT=unknown
|
|
||||||
ARG CI_USE=false
|
|
||||||
|
|
||||||
LABEL git-commit=$GIT_COMMIT
|
|
||||||
|
|
||||||
COPY centos-builder/centos_setup.sh /tmp/
|
|
||||||
COPY shared/install_cmake.sh /tmp/
|
|
||||||
RUN chmod +x /tmp/centos_setup.sh && \
|
|
||||||
chmod +x /tmp/install_cmake.sh
|
|
||||||
RUN /tmp/centos_setup.sh
|
|
||||||
|
|
||||||
RUN /tmp/install_cmake.sh 3.16.3 /opt/local/cmake-3.16
|
|
||||||
RUN ln -s /opt/local/cmake-3.16 /opt/local/cmake
|
|
||||||
ENV PATH="/opt/local/cmake/bin:$PATH"
|
|
||||||
# TODO: Install latest CMake for testing
|
|
||||||
RUN if [ "${CI_USE}" = true ] ; then /tmp/install_cmake.sh 3.16.3 /opt/local/cmake-3.16; fi
|
|
||||||
|
|
||||||
RUN mkdir -m 777 -p /opt/rippled_bld/pkg
|
|
||||||
|
|
||||||
WORKDIR /opt/rippled_bld/pkg
|
|
||||||
RUN mkdir -m 777 ./rpmbuild
|
|
||||||
RUN mkdir -m 777 ./rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
|
||||||
|
|
||||||
COPY packaging/rpm/build_rpm.sh ./
|
|
||||||
CMD ./build_rpm.sh
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
source /etc/os-release
|
|
||||||
|
|
||||||
yum -y upgrade
|
|
||||||
yum -y update
|
|
||||||
yum -y install epel-release centos-release-scl
|
|
||||||
yum -y install \
|
|
||||||
wget curl time gcc-c++ yum-utils autoconf automake pkgconfig libtool \
|
|
||||||
libstdc++-static rpm-build gnupg which make cmake \
|
|
||||||
devtoolset-11 devtoolset-11-gdb devtoolset-11-binutils devtoolset-11-libstdc++-devel \
|
|
||||||
devtoolset-11-libasan-devel devtoolset-11-libtsan-devel devtoolset-11-libubsan-devel devtoolset-11-liblsan-devel \
|
|
||||||
flex flex-devel bison bison-devel parallel \
|
|
||||||
ncurses ncurses-devel ncurses-libs graphviz graphviz-devel \
|
|
||||||
lzip p7zip bzip2 bzip2-devel lzma-sdk lzma-sdk-devel xz-devel \
|
|
||||||
zlib zlib-devel zlib-static texinfo openssl openssl-static \
|
|
||||||
jemalloc jemalloc-devel \
|
|
||||||
libicu-devel htop \
|
|
||||||
rh-python38 \
|
|
||||||
ninja-build git svn \
|
|
||||||
swig perl-Digest-MD5
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -ex
|
|
||||||
pkgtype=$1
|
|
||||||
if [ "${pkgtype}" = "rpm" ] ; then
|
|
||||||
container_name="${RPM_CONTAINER_NAME}"
|
|
||||||
elif [ "${pkgtype}" = "dpkg" ] ; then
|
|
||||||
container_name="${DPKG_CONTAINER_NAME}"
|
|
||||||
else
|
|
||||||
echo "invalid package type"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if docker pull "${ARTIFACTORY_HUB}/${container_name}:latest_${CI_COMMIT_REF_SLUG}"; then
|
|
||||||
echo "found container for latest - using as cache."
|
|
||||||
docker tag \
|
|
||||||
"${ARTIFACTORY_HUB}/${container_name}:latest_${CI_COMMIT_REF_SLUG}" \
|
|
||||||
"${container_name}:latest_${CI_COMMIT_REF_SLUG}"
|
|
||||||
CMAKE_EXTRA="-D${pkgtype}_cache_from=${container_name}:latest_${CI_COMMIT_REF_SLUG}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake --version
|
|
||||||
test -d build && rm -rf build
|
|
||||||
mkdir -p build/container && cd build/container
|
|
||||||
eval time \
|
|
||||||
cmake -Dpackages_only=ON -DCMAKE_VERBOSE_MAKEFILE=ON ${CMAKE_EXTRA} \
|
|
||||||
-G Ninja ../..
|
|
||||||
time cmake --build . --target "${pkgtype}_container" -- -v
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -ex
|
|
||||||
pkgtype=$1
|
|
||||||
if [ "${pkgtype}" = "rpm" ] ; then
|
|
||||||
container_name="${RPM_CONTAINER_FULLNAME}"
|
|
||||||
container_tag="${RPM_CONTAINER_TAG}"
|
|
||||||
elif [ "${pkgtype}" = "dpkg" ] ; then
|
|
||||||
container_name="${DPKG_CONTAINER_FULLNAME}"
|
|
||||||
container_tag="${DPKG_CONTAINER_TAG}"
|
|
||||||
else
|
|
||||||
echo "invalid package type"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
time docker pull "${ARTIFACTORY_HUB}/${container_name}"
|
|
||||||
docker tag \
|
|
||||||
"${ARTIFACTORY_HUB}/${container_name}" \
|
|
||||||
"${container_name}"
|
|
||||||
docker images
|
|
||||||
test -d build && rm -rf build
|
|
||||||
mkdir -p build/${pkgtype} && cd build/${pkgtype}
|
|
||||||
time cmake \
|
|
||||||
-Dpackages_only=ON \
|
|
||||||
-Dcontainer_label="${container_tag}" \
|
|
||||||
-Dhave_package_container=ON \
|
|
||||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
||||||
-Dunity=OFF \
|
|
||||||
-G Ninja ../..
|
|
||||||
time cmake --build . --target ${pkgtype} -- -v
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
# used as a before/setup script for docker steps in gitlab-ci
|
|
||||||
# expects to be run in standard alpine/dind image
|
|
||||||
echo $(nproc)
|
|
||||||
docker login -u rippled \
|
|
||||||
-p ${ARTIFACTORY_DEPLOY_KEY_RIPPLED} ${ARTIFACTORY_HUB}
|
|
||||||
apk add --update py-pip
|
|
||||||
apk add \
|
|
||||||
bash util-linux coreutils binutils grep \
|
|
||||||
make ninja cmake build-base gcc g++ abuild git \
|
|
||||||
python3 python3-dev
|
|
||||||
pip3 install awscli
|
|
||||||
# list curdir contents to build log:
|
|
||||||
ls -la
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
case ${CI_COMMIT_REF_NAME} in
|
|
||||||
develop)
|
|
||||||
export COMPONENT="nightly"
|
|
||||||
;;
|
|
||||||
release)
|
|
||||||
export COMPONENT="unstable"
|
|
||||||
;;
|
|
||||||
master)
|
|
||||||
export COMPONENT="stable"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
export COMPONENT="_unknown_"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
@@ -1,646 +0,0 @@
|
|||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## gitlab CI defintition for rippled build containers and distro ##
|
|
||||||
## packages (rpm and dpkg). ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
# NOTE: these are sensible defaults for Ripple pipelines. These
|
|
||||||
# can be overridden by project or group variables as needed.
|
|
||||||
variables:
|
|
||||||
# these containers are built manually using the rippled
|
|
||||||
# cmake build (container targets) and tagged/pushed so they
|
|
||||||
# can be used here
|
|
||||||
RPM_CONTAINER_TAG: "2023-02-13"
|
|
||||||
RPM_CONTAINER_NAME: "rippled-rpm-builder"
|
|
||||||
RPM_CONTAINER_FULLNAME: "${RPM_CONTAINER_NAME}:${RPM_CONTAINER_TAG}"
|
|
||||||
DPKG_CONTAINER_TAG: "2023-07-31"
|
|
||||||
DPKG_CONTAINER_NAME: "rippled-dpkg-builder"
|
|
||||||
DPKG_CONTAINER_FULLNAME: "${DPKG_CONTAINER_NAME}:${DPKG_CONTAINER_TAG}"
|
|
||||||
ARTIFACTORY_HOST: "artifactory.ops.ripple.com"
|
|
||||||
ARTIFACTORY_HUB: "${ARTIFACTORY_HOST}:6555"
|
|
||||||
GIT_SIGN_PUBKEYS_URL: "https://gitlab.ops.ripple.com/xrpledger/rippled-packages/snippets/49/raw"
|
|
||||||
PUBLIC_REPO_ROOT: "https://repos.ripple.com/repos"
|
|
||||||
# also need to define this variable ONLY for the primary
|
|
||||||
# build/publish pipeline on the mainline repo:
|
|
||||||
# IS_PRIMARY_REPO = "true"
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build_packages
|
|
||||||
- sign_packages
|
|
||||||
- smoketest
|
|
||||||
- verify_sig
|
|
||||||
- tag_images
|
|
||||||
- push_to_test
|
|
||||||
- verify_from_test
|
|
||||||
- wait_approval_prod
|
|
||||||
- push_to_prod
|
|
||||||
- verify_from_prod
|
|
||||||
- get_final_hashes
|
|
||||||
- build_containers
|
|
||||||
|
|
||||||
.dind_template: &dind_param
|
|
||||||
before_script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/docker_alpine_setup.sh
|
|
||||||
variables:
|
|
||||||
docker_driver: overlay2
|
|
||||||
DOCKER_TLS_CERTDIR: ""
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/docker:latest
|
|
||||||
services:
|
|
||||||
# workaround for TLS issues - consider going back
|
|
||||||
# back to unversioned `dind` when issues are resolved
|
|
||||||
- name: artifactory.ops.ripple.com/docker:stable-dind
|
|
||||||
alias: docker
|
|
||||||
tags:
|
|
||||||
- 4xlarge
|
|
||||||
|
|
||||||
.only_primary_template: &only_primary
|
|
||||||
only:
|
|
||||||
refs:
|
|
||||||
- /^(master|release|develop)$/
|
|
||||||
variables:
|
|
||||||
- $IS_PRIMARY_REPO == "true"
|
|
||||||
|
|
||||||
.smoketest_local_template: &run_local_smoketest
|
|
||||||
tags:
|
|
||||||
- xlarge
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/smoketest.sh local
|
|
||||||
|
|
||||||
.smoketest_repo_template: &run_repo_smoketest
|
|
||||||
tags:
|
|
||||||
- xlarge
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/smoketest.sh repo
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: build_packages ##
|
|
||||||
## ##
|
|
||||||
## build packages using containers from previous stage. ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
rpm_build:
|
|
||||||
timeout: "1h 30m"
|
|
||||||
stage: build_packages
|
|
||||||
<<: *dind_param
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/rpm/packages/
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/build_package.sh rpm
|
|
||||||
|
|
||||||
dpkg_build:
|
|
||||||
timeout: "1h 30m"
|
|
||||||
stage: build_packages
|
|
||||||
<<: *dind_param
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/dpkg/packages/
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/build_package.sh dpkg
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: sign_packages ##
|
|
||||||
## ##
|
|
||||||
## build packages using containers from previous stage. ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
rpm_sign:
|
|
||||||
stage: sign_packages
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/centos:7
|
|
||||||
<<: *only_primary
|
|
||||||
before_script:
|
|
||||||
- |
|
|
||||||
# Make sure GnuPG is installed
|
|
||||||
yum -y install gnupg rpm-sign
|
|
||||||
# checking GPG signing support
|
|
||||||
if [ -n "$GPG_KEY_B64" ]; then
|
|
||||||
echo "$GPG_KEY_B64"| base64 -d | gpg --batch --no-tty --allow-secret-key-import --import -
|
|
||||||
unset GPG_KEY_B64
|
|
||||||
export GPG_PASSPHRASE=$(echo $GPG_KEY_PASS_B64 | base64 -di)
|
|
||||||
unset GPG_KEY_PASS_B64
|
|
||||||
export GPG_KEYID=$(gpg --with-colon --list-secret-keys | head -n1 | cut -d : -f 5)
|
|
||||||
else
|
|
||||||
echo -e "\033[0;31m****** GPG signing disabled ******\033[0m"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/rpm/packages/
|
|
||||||
script:
|
|
||||||
- ls -alh build/rpm/packages
|
|
||||||
- . ./Builds/containers/gitlab-ci/sign_package.sh rpm
|
|
||||||
|
|
||||||
dpkg_sign:
|
|
||||||
stage: sign_packages
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:18.04
|
|
||||||
<<: *only_primary
|
|
||||||
before_script:
|
|
||||||
- |
|
|
||||||
# make sure we have GnuPG
|
|
||||||
apt update
|
|
||||||
apt install -y gpg dpkg-sig
|
|
||||||
# checking GPG signing support
|
|
||||||
if [ -n "$GPG_KEY_B64" ]; then
|
|
||||||
echo "$GPG_KEY_B64"| base64 -d | gpg --batch --no-tty --allow-secret-key-import --import -
|
|
||||||
unset GPG_KEY_B64
|
|
||||||
export GPG_PASSPHRASE=$(echo $GPG_KEY_PASS_B64 | base64 -di)
|
|
||||||
unset GPG_KEY_PASS_B64
|
|
||||||
export GPG_KEYID=$(gpg --with-colon --list-secret-keys | head -n1 | cut -d : -f 5)
|
|
||||||
else
|
|
||||||
echo -e "\033[0;31m****** GPG signing disabled ******\033[0m"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/dpkg/packages/
|
|
||||||
script:
|
|
||||||
- ls -alh build/dpkg/packages
|
|
||||||
- . ./Builds/containers/gitlab-ci/sign_package.sh dpkg
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: smoketest ##
|
|
||||||
## ##
|
|
||||||
## install unsigned packages from previous step and run unit tests. ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
centos_7_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/centos:7
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
rocky_8_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
fedora_37_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:37
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
fedora_38_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:38
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
ubuntu_18_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:18.04
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
ubuntu_20_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:20.04
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
ubuntu_22_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:22.04
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
debian_10_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:10
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
debian_11_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:11
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: verify_sig ##
|
|
||||||
## ##
|
|
||||||
## use git/gpg to verify that HEAD is signed by an approved ##
|
|
||||||
## committer. The whitelist of pubkeys is manually mantained ##
|
|
||||||
## and fetched from GIT_SIGN_PUBKEYS_URL (currently a snippet ##
|
|
||||||
## link). ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
verify_head_signed:
|
|
||||||
stage: verify_sig
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:latest
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/verify_head_commit.sh
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: tag_images ##
|
|
||||||
## ##
|
|
||||||
## apply rippled version tag to containers from previous stage. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
tag_bld_images:
|
|
||||||
stage: tag_images
|
|
||||||
variables:
|
|
||||||
docker_driver: overlay2
|
|
||||||
DOCKER_TLS_CERTDIR: ""
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/docker:latest
|
|
||||||
services:
|
|
||||||
# workaround for TLS issues - consider going back
|
|
||||||
# back to unversioned `dind` when issues are resolved
|
|
||||||
- name: artifactory.ops.ripple.com/docker:stable-dind
|
|
||||||
alias: docker
|
|
||||||
tags:
|
|
||||||
- large
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/tag_docker_image.sh
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: push_to_test ##
|
|
||||||
## ##
|
|
||||||
## push packages to artifactory repositories (test) ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
push_test:
|
|
||||||
stage: push_to_test
|
|
||||||
variables:
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/alpine:latest
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- files.info
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/push_to_artifactory.sh "PUT" "."
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: verify_from_test ##
|
|
||||||
## ##
|
|
||||||
## install/test packages from test repos. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
centos_7_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/centos:7
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
|
|
||||||
rocky_8_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
fedora_37_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:37
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
fedora_38_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:38
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_18_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "bionic"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:18.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_20_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "focal"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:20.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_22_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "jammy"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:22.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_10_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "buster"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:10
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_11_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "bullseye"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:11
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: wait_approval_prod ##
|
|
||||||
## ##
|
|
||||||
## wait for manual approval before proceeding to next stage ##
|
|
||||||
## which pushes to prod repo. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
wait_before_push_prod:
|
|
||||||
stage: wait_approval_prod
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/alpine:latest
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- echo "proceeding to next stage"
|
|
||||||
when: manual
|
|
||||||
allow_failure: false
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: push_to_prod ##
|
|
||||||
## ##
|
|
||||||
## push packages to artifactory repositories (prod) ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
push_prod:
|
|
||||||
variables:
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/alpine:latest
|
|
||||||
stage: push_to_prod
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- files.info
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/push_to_artifactory.sh "PUT" "."
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: verify_from_prod ##
|
|
||||||
## ##
|
|
||||||
## install/test packages from prod repos. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
centos_7_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/centos:7
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
rocky_8_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
fedora_37_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:37
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
fedora_38_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:38
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_18_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "bionic"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:18.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_20_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "focal"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:20.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_22_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "jammy"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:22.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_10_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "buster"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:10
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_11_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "bullseye"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:11
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: get_final_hashes ##
|
|
||||||
## ##
|
|
||||||
## fetch final hashes from artifactory. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
get_prod_hashes:
|
|
||||||
variables:
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/alpine:latest
|
|
||||||
stage: get_final_hashes
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- files.info
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/push_to_artifactory.sh "GET" ".checksums"
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: build_containers ##
|
|
||||||
## ##
|
|
||||||
## build containers from docker definitions. These containers are NOT ##
|
|
||||||
## used for the package build. This step is only used to ensure that ##
|
|
||||||
## the package build targets and files are still working properly. ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
build_centos_container:
|
|
||||||
stage: build_containers
|
|
||||||
<<: *dind_param
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/build_container.sh rpm
|
|
||||||
|
|
||||||
build_ubuntu_container:
|
|
||||||
stage: build_containers
|
|
||||||
<<: *dind_param
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/build_container.sh dpkg
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
action=$1
|
|
||||||
filter=$2
|
|
||||||
|
|
||||||
. ./Builds/containers/gitlab-ci/get_component.sh
|
|
||||||
|
|
||||||
apk add curl jq coreutils util-linux
|
|
||||||
TOPDIR=$(pwd)
|
|
||||||
|
|
||||||
# DPKG
|
|
||||||
|
|
||||||
cd $TOPDIR
|
|
||||||
cd build/dpkg/packages
|
|
||||||
CURLARGS="-sk -X${action} -urippled:${ARTIFACTORY_DEPLOY_KEY_RIPPLED}"
|
|
||||||
RIPPLED_PKG=$(ls rippled_*.deb)
|
|
||||||
RIPPLED_REPORTING_PKG=$(ls rippled-reporting_*.deb)
|
|
||||||
RIPPLED_DBG_PKG=$(ls rippled-dbgsym_*.*deb)
|
|
||||||
RIPPLED_REPORTING_DBG_PKG=$(ls rippled-reporting-dbgsym_*.*deb)
|
|
||||||
# TODO - where to upload src tgz?
|
|
||||||
RIPPLED_SRC=$(ls rippled_*.orig.tar.gz)
|
|
||||||
DEB_MATRIX=";deb.component=${COMPONENT};deb.architecture=amd64"
|
|
||||||
for dist in buster bullseye bionic focal jammy; do
|
|
||||||
DEB_MATRIX="${DEB_MATRIX};deb.distribution=${dist}"
|
|
||||||
done
|
|
||||||
echo "{ \"debs\": {" > "${TOPDIR}/files.info"
|
|
||||||
for deb in ${RIPPLED_PKG} ${RIPPLED_DBG_PKG} ${RIPPLED_REPORTING_PKG} ${RIPPLED_REPORTING_DBG_PKG}; do
|
|
||||||
# first item doesn't get a comma separator
|
|
||||||
if [ $deb != $RIPPLED_PKG ] ; then
|
|
||||||
echo "," >> "${TOPDIR}/files.info"
|
|
||||||
fi
|
|
||||||
echo "\"${deb}\"": | tee -a "${TOPDIR}/files.info"
|
|
||||||
ca="${CURLARGS}"
|
|
||||||
if [ "${action}" = "PUT" ] ; then
|
|
||||||
url="https://${ARTIFACTORY_HOST}/artifactory/${DEB_REPO}/pool/${COMPONENT}/${deb}${DEB_MATRIX}"
|
|
||||||
ca="${ca} -T${deb}"
|
|
||||||
elif [ "${action}" = "GET" ] ; then
|
|
||||||
url="https://${ARTIFACTORY_HOST}/artifactory/api/storage/${DEB_REPO}/pool/${COMPONENT}/${deb}"
|
|
||||||
fi
|
|
||||||
echo "file info request url --> ${url}"
|
|
||||||
eval "curl ${ca} \"${url}\"" | jq -M "${filter}" | tee -a "${TOPDIR}/files.info"
|
|
||||||
done
|
|
||||||
echo "}," >> "${TOPDIR}/files.info"
|
|
||||||
|
|
||||||
# RPM
|
|
||||||
|
|
||||||
cd $TOPDIR
|
|
||||||
cd build/rpm/packages
|
|
||||||
RIPPLED_PKG=$(ls rippled-[0-9]*.x86_64.rpm)
|
|
||||||
RIPPLED_DEV_PKG=$(ls rippled-devel*.rpm)
|
|
||||||
RIPPLED_DBG_PKG=$(ls rippled-debuginfo*.rpm)
|
|
||||||
RIPPLED_REPORTING_PKG=$(ls rippled-reporting*.rpm)
|
|
||||||
# TODO - where to upload src rpm ?
|
|
||||||
RIPPLED_SRC=$(ls rippled-[0-9]*.src.rpm)
|
|
||||||
echo "\"rpms\": {" >> "${TOPDIR}/files.info"
|
|
||||||
for rpm in ${RIPPLED_PKG} ${RIPPLED_DEV_PKG} ${RIPPLED_DBG_PKG} ${RIPPLED_REPORTING_PKG}; do
|
|
||||||
# first item doesn't get a comma separator
|
|
||||||
if [ $rpm != $RIPPLED_PKG ] ; then
|
|
||||||
echo "," >> "${TOPDIR}/files.info"
|
|
||||||
fi
|
|
||||||
echo "\"${rpm}\"": | tee -a "${TOPDIR}/files.info"
|
|
||||||
ca="${CURLARGS}"
|
|
||||||
if [ "${action}" = "PUT" ] ; then
|
|
||||||
url="https://${ARTIFACTORY_HOST}/artifactory/${RPM_REPO}/${COMPONENT}/"
|
|
||||||
ca="${ca} -T${rpm}"
|
|
||||||
elif [ "${action}" = "GET" ] ; then
|
|
||||||
url="https://${ARTIFACTORY_HOST}/artifactory/api/storage/${RPM_REPO}/${COMPONENT}/${rpm}"
|
|
||||||
fi
|
|
||||||
echo "file info request url --> ${url}"
|
|
||||||
eval "curl ${ca} \"${url}\"" | jq -M "${filter}" | tee -a "${TOPDIR}/files.info"
|
|
||||||
done
|
|
||||||
echo "}}" >> "${TOPDIR}/files.info"
|
|
||||||
jq '.' "${TOPDIR}/files.info" > "${TOPDIR}/files.info.tmp"
|
|
||||||
mv "${TOPDIR}/files.info.tmp" "${TOPDIR}/files.info"
|
|
||||||
|
|
||||||
if [ ! -z "${SLACK_NOTIFY_URL}" ] && [ "${action}" = "GET" ] ; then
|
|
||||||
# extract files.info content to variable and sanitize so it can
|
|
||||||
# be interpolated into a slack text field below
|
|
||||||
finfo=$(cat ${TOPDIR}/files.info | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g' | sed -E 's/"/\\"/g')
|
|
||||||
# try posting file info to slack.
|
|
||||||
# can add channel field to payload if the
|
|
||||||
# default channel is incorrect. Get rid of
|
|
||||||
# newlines in payload json since slack doesn't accept them
|
|
||||||
CONTENT=$(tr -d '[\n]' <<JSON
|
|
||||||
payload={
|
|
||||||
"username": "GitlabCI",
|
|
||||||
"text": "The package build for branch \`${CI_COMMIT_REF_NAME}\` is complete. File hashes are: \`\`\`${finfo}\`\`\`",
|
|
||||||
"icon_emoji": ":package:"}
|
|
||||||
JSON
|
|
||||||
)
|
|
||||||
curl ${SLACK_NOTIFY_URL} --data-urlencode "${CONTENT}"
|
|
||||||
fi
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
sign_dpkg() {
|
|
||||||
if [ -n "${GPG_KEYID}" ]; then
|
|
||||||
dpkg-sig \
|
|
||||||
-g "--no-tty --digest-algo 'sha512' --passphrase '${GPG_PASSPHRASE}' --pinentry-mode=loopback" \
|
|
||||||
-k "${GPG_KEYID}" \
|
|
||||||
--sign builder \
|
|
||||||
"build/dpkg/packages/*.deb"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
sign_rpm() {
|
|
||||||
if [ -n "${GPG_KEYID}" ] ; then
|
|
||||||
find build/rpm/packages -name "*.rpm" -exec bash -c '
|
|
||||||
echo "yes" | setsid rpm \
|
|
||||||
--define "_gpg_name ${GPG_KEYID}" \
|
|
||||||
--define "_signature gpg" \
|
|
||||||
--define "__gpg_check_password_cmd /bin/true" \
|
|
||||||
--define "__gpg_sign_cmd %{__gpg} gpg --batch --no-armor --digest-algo 'sha512' --passphrase '${GPG_PASSPHRASE}' --no-secmem-warning -u '%{_gpg_name}' --sign --detach-sign --output %{__signature_filename} %{__plaintext_filename}" \
|
|
||||||
--addsign '{} \;
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case "${1}" in
|
|
||||||
dpkg)
|
|
||||||
sign_dpkg
|
|
||||||
;;
|
|
||||||
rpm)
|
|
||||||
sign_rpm
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: ${0} (dpkg|rpm)"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
install_from=$1
|
|
||||||
use_private=${2:-0} # this option not currently needed by any CI scripts,
|
|
||||||
# reserved for possible future use
|
|
||||||
if [ "$use_private" -gt 0 ] ; then
|
|
||||||
REPO_ROOT="https://rippled:${ARTIFACTORY_DEPLOY_KEY_RIPPLED}@${ARTIFACTORY_HOST}/artifactory"
|
|
||||||
else
|
|
||||||
REPO_ROOT="${PUBLIC_REPO_ROOT}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
. ./Builds/containers/gitlab-ci/get_component.sh
|
|
||||||
|
|
||||||
. /etc/os-release
|
|
||||||
case ${ID} in
|
|
||||||
ubuntu|debian)
|
|
||||||
pkgtype="dpkg"
|
|
||||||
;;
|
|
||||||
fedora|centos|rhel|scientific|rocky)
|
|
||||||
pkgtype="rpm"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "unrecognized distro!"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# this script provides info variables about pkg version
|
|
||||||
. build/${pkgtype}/packages/build_vars
|
|
||||||
|
|
||||||
if [ "${pkgtype}" = "dpkg" ] ; then
|
|
||||||
# sometimes update fails and requires a cleanup
|
|
||||||
updateWithRetry()
|
|
||||||
{
|
|
||||||
if ! apt-get -y update ; then
|
|
||||||
rm -rvf /var/lib/apt/lists/*
|
|
||||||
apt-get -y clean
|
|
||||||
apt-get -y update
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
if [ "${install_from}" = "repo" ] ; then
|
|
||||||
apt-get -y upgrade
|
|
||||||
updateWithRetry
|
|
||||||
apt-get -y install apt apt-transport-https ca-certificates coreutils util-linux wget gnupg
|
|
||||||
wget -q -O - "${REPO_ROOT}/api/gpg/key/public" | apt-key add -
|
|
||||||
echo "deb ${REPO_ROOT}/${DEB_REPO} ${DISTRO} ${COMPONENT}" >> /etc/apt/sources.list
|
|
||||||
updateWithRetry
|
|
||||||
# uncomment this next line if you want to see the available package versions
|
|
||||||
# apt-cache policy rippled
|
|
||||||
apt-get -y install rippled=${dpkg_full_version}
|
|
||||||
elif [ "${install_from}" = "local" ] ; then
|
|
||||||
# cached pkg install
|
|
||||||
updateWithRetry
|
|
||||||
apt-get -y install libprotobuf-dev libprotoc-dev protobuf-compiler libssl-dev
|
|
||||||
rm -f build/dpkg/packages/rippled-dbgsym*.*
|
|
||||||
dpkg --no-debsig -i build/dpkg/packages/*.deb
|
|
||||||
else
|
|
||||||
echo "unrecognized pkg source!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
yum -y update
|
|
||||||
if [ "${install_from}" = "repo" ] ; then
|
|
||||||
pkgs=("yum-utils coreutils util-linux")
|
|
||||||
if [ "$ID" = "rocky" ]; then
|
|
||||||
pkgs="${pkgs[@]/coreutils}"
|
|
||||||
fi
|
|
||||||
yum install -y $pkgs
|
|
||||||
REPOFILE="/etc/yum.repos.d/artifactory.repo"
|
|
||||||
echo "[Artifactory]" > ${REPOFILE}
|
|
||||||
echo "name=Artifactory" >> ${REPOFILE}
|
|
||||||
echo "baseurl=${REPO_ROOT}/${RPM_REPO}/${COMPONENT}/" >> ${REPOFILE}
|
|
||||||
echo "enabled=1" >> ${REPOFILE}
|
|
||||||
echo "gpgcheck=0" >> ${REPOFILE}
|
|
||||||
echo "gpgkey=${REPO_ROOT}/${RPM_REPO}/${COMPONENT}/repodata/repomd.xml.key" >> ${REPOFILE}
|
|
||||||
echo "repo_gpgcheck=1" >> ${REPOFILE}
|
|
||||||
yum -y update
|
|
||||||
# uncomment this next line if you want to see the available package versions
|
|
||||||
# yum --showduplicates list rippled
|
|
||||||
yum -y install ${rpm_version_release}
|
|
||||||
elif [ "${install_from}" = "local" ] ; then
|
|
||||||
# cached pkg install
|
|
||||||
pkgs=("yum-utils openssl-static zlib-static")
|
|
||||||
if [[ "$ID" =~ rocky|fedora ]]; then
|
|
||||||
if [[ "$ID" =~ "rocky" ]]; then
|
|
||||||
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/Rocky-PowerTools.repo
|
|
||||||
fi
|
|
||||||
pkgs="${pkgs[@]/openssl-static}"
|
|
||||||
fi
|
|
||||||
yum install -y $pkgs
|
|
||||||
rm -f build/rpm/packages/rippled-debug*.rpm
|
|
||||||
rm -f build/rpm/packages/*.src.rpm
|
|
||||||
rpm -i build/rpm/packages/*.rpm
|
|
||||||
else
|
|
||||||
echo "unrecognized pkg source!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# verify installed version
|
|
||||||
INSTALLED=$(/opt/ripple/bin/rippled --version | awk '{print $NF}')
|
|
||||||
if [ "${rippled_version}" != "${INSTALLED}" ] ; then
|
|
||||||
echo "INSTALLED version ${INSTALLED} does not match ${rippled_version}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# run unit tests
|
|
||||||
/opt/ripple/bin/rippled --unittest --unittest-jobs $(nproc)
|
|
||||||
/opt/ripple/bin/validator-keys --unittest
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
docker login -u rippled \
|
|
||||||
-p ${ARTIFACTORY_DEPLOY_KEY_RIPPLED} "${ARTIFACTORY_HUB}"
|
|
||||||
# this gives us rippled_version :
|
|
||||||
source build/rpm/packages/build_vars
|
|
||||||
docker pull "${ARTIFACTORY_HUB}/${RPM_CONTAINER_FULLNAME}"
|
|
||||||
docker pull "${ARTIFACTORY_HUB}/${DPKG_CONTAINER_FULLNAME}"
|
|
||||||
# tag/push two labels...one using the current rippled version and one just using "latest"
|
|
||||||
for label in ${rippled_version} latest ; do
|
|
||||||
docker tag \
|
|
||||||
"${ARTIFACTORY_HUB}/${RPM_CONTAINER_FULLNAME}" \
|
|
||||||
"${ARTIFACTORY_HUB}/${RPM_CONTAINER_NAME}:${label}_${CI_COMMIT_REF_SLUG}"
|
|
||||||
docker push \
|
|
||||||
"${ARTIFACTORY_HUB}/${RPM_CONTAINER_NAME}:${label}_${CI_COMMIT_REF_SLUG}"
|
|
||||||
docker tag \
|
|
||||||
"${ARTIFACTORY_HUB}/${DPKG_CONTAINER_FULLNAME}" \
|
|
||||||
"${ARTIFACTORY_HUB}/${DPKG_CONTAINER_NAME}:${label}_${CI_COMMIT_REF_SLUG}"
|
|
||||||
docker push \
|
|
||||||
"${ARTIFACTORY_HUB}/${DPKG_CONTAINER_NAME}:${label}_${CI_COMMIT_REF_SLUG}"
|
|
||||||
done
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -ex
|
|
||||||
apt -y update
|
|
||||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
|
|
||||||
apt -y install software-properties-common curl git gnupg
|
|
||||||
curl -sk -o rippled-pubkeys.txt "${GIT_SIGN_PUBKEYS_URL}"
|
|
||||||
gpg --import rippled-pubkeys.txt
|
|
||||||
if git verify-commit HEAD; then
|
|
||||||
echo "git commit signature check passed"
|
|
||||||
else
|
|
||||||
echo "git commit signature check failed"
|
|
||||||
git log -n 5 --color \
|
|
||||||
--pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an> [%G?]%Creset' \
|
|
||||||
--abbrev-commit
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
# make sure pkg source files are up to date with repo
|
|
||||||
cd /opt/rippled_bld/pkg
|
|
||||||
cp -fpru rippled/Builds/containers/packaging/dpkg/debian/. debian/
|
|
||||||
cp -fpu rippled/Builds/containers/shared/rippled*.service debian/
|
|
||||||
cp -fpu rippled/Builds/containers/shared/update_sources.sh .
|
|
||||||
source update_sources.sh
|
|
||||||
|
|
||||||
# Build the dpkg
|
|
||||||
|
|
||||||
#dpkg uses - as separator, so we need to change our -bN versions to tilde
|
|
||||||
RIPPLED_DPKG_VERSION=$(echo "${RIPPLED_VERSION}" | sed 's!-!~!g')
|
|
||||||
# TODO - decide how to handle the trailing/release
|
|
||||||
# version here (hardcoded to 1). Does it ever need to change?
|
|
||||||
RIPPLED_DPKG_FULL_VERSION="${RIPPLED_DPKG_VERSION}-1"
|
|
||||||
git config --global --add safe.directory /opt/rippled_bld/pkg/rippled
|
|
||||||
cd /opt/rippled_bld/pkg/rippled
|
|
||||||
if [[ -n $(git status --porcelain) ]]; then
|
|
||||||
git status
|
|
||||||
error "Unstaged changes in this repo - please commit first"
|
|
||||||
fi
|
|
||||||
git archive --format tar.gz --prefix rippled-${RIPPLED_DPKG_VERSION}/ -o ../rippled-${RIPPLED_DPKG_VERSION}.tar.gz HEAD
|
|
||||||
cd ..
|
|
||||||
# dpkg debmake would normally create this link, but we do it manually
|
|
||||||
ln -s ./rippled-${RIPPLED_DPKG_VERSION}.tar.gz rippled_${RIPPLED_DPKG_VERSION}.orig.tar.gz
|
|
||||||
tar xvf rippled-${RIPPLED_DPKG_VERSION}.tar.gz
|
|
||||||
cd rippled-${RIPPLED_DPKG_VERSION}
|
|
||||||
cp -pr ../debian .
|
|
||||||
|
|
||||||
# dpkg requires a changelog. We don't currently maintain
|
|
||||||
# a useable one, so let's just fake it with our current version
|
|
||||||
# TODO : not sure if the "unstable" will need to change for
|
|
||||||
# release packages (?)
|
|
||||||
NOWSTR=$(TZ=UTC date -R)
|
|
||||||
cat << CHANGELOG > ./debian/changelog
|
|
||||||
rippled (${RIPPLED_DPKG_FULL_VERSION}) unstable; urgency=low
|
|
||||||
|
|
||||||
* see RELEASENOTES
|
|
||||||
|
|
||||||
-- Ripple Labs Inc. <support@ripple.com> ${NOWSTR}
|
|
||||||
CHANGELOG
|
|
||||||
|
|
||||||
# PATH must be preserved for our more modern cmake in /opt/local
|
|
||||||
# TODO : consider allowing lintian to run in future ?
|
|
||||||
export DH_BUILD_DDEBS=1
|
|
||||||
debuild --no-lintian --preserve-envvar PATH --preserve-env -us -uc
|
|
||||||
rc=$?; if [[ $rc != 0 ]]; then
|
|
||||||
error "error building dpkg"
|
|
||||||
fi
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# copy artifacts
|
|
||||||
cp rippled-reporting_${RIPPLED_DPKG_FULL_VERSION}_amd64.deb ${PKG_OUTDIR}
|
|
||||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.deb ${PKG_OUTDIR}
|
|
||||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}.dsc ${PKG_OUTDIR}
|
|
||||||
# dbgsym suffix is ddeb under newer debuild, but just deb under earlier
|
|
||||||
cp rippled-dbgsym_${RIPPLED_DPKG_FULL_VERSION}_amd64.* ${PKG_OUTDIR}
|
|
||||||
cp rippled-reporting-dbgsym_${RIPPLED_DPKG_FULL_VERSION}_amd64.* ${PKG_OUTDIR}
|
|
||||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.changes ${PKG_OUTDIR}
|
|
||||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.build ${PKG_OUTDIR}
|
|
||||||
cp rippled_${RIPPLED_DPKG_VERSION}.orig.tar.gz ${PKG_OUTDIR}
|
|
||||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}.debian.tar.xz ${PKG_OUTDIR}
|
|
||||||
# buildinfo is only generated by later version of debuild
|
|
||||||
if [ -e rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.buildinfo ] ; then
|
|
||||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.buildinfo ${PKG_OUTDIR}
|
|
||||||
fi
|
|
||||||
|
|
||||||
pushd ${PKG_OUTDIR}
|
|
||||||
for f in *.ddeb; do mv -- "$f" "${f%.ddeb}.deb"; done
|
|
||||||
popd
|
|
||||||
|
|
||||||
cat rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.changes
|
|
||||||
# extract the text in the .changes file that appears between
|
|
||||||
# Checksums-Sha256: ...
|
|
||||||
# and
|
|
||||||
# Files: ...
|
|
||||||
awk '/Checksums-Sha256:/{hit=1;next}/Files:/{hit=0}hit' \
|
|
||||||
rippled_${RIPPLED_DPKG_VERSION}-1_amd64.changes | \
|
|
||||||
sed -E 's!^[[:space:]]+!!' > shasums
|
|
||||||
DEB_SHA256=$(cat shasums | \
|
|
||||||
grep "rippled_${RIPPLED_DPKG_VERSION}-1_amd64.deb" | cut -d " " -f 1)
|
|
||||||
DBG_SHA256=$(cat shasums | \
|
|
||||||
grep "rippled-dbgsym_${RIPPLED_DPKG_VERSION}-1_amd64.*" | cut -d " " -f 1)
|
|
||||||
REPORTING_DBG_SHA256=$(cat shasums | \
|
|
||||||
grep "rippled-reporting-dbgsym_${RIPPLED_DPKG_VERSION}-1_amd64.*" | cut -d " " -f 1)
|
|
||||||
REPORTING_SHA256=$(cat shasums | \
|
|
||||||
grep "rippled-reporting_${RIPPLED_DPKG_VERSION}-1_amd64.deb" | cut -d " " -f 1)
|
|
||||||
SRC_SHA256=$(cat shasums | \
|
|
||||||
grep "rippled_${RIPPLED_DPKG_VERSION}.orig.tar.gz" | cut -d " " -f 1)
|
|
||||||
echo "deb_sha256=${DEB_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
|
||||||
echo "dbg_sha256=${DBG_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
|
||||||
echo "reporting_sha256=${REPORTING_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
|
||||||
echo "reporting_dbg_sha256=${REPORTING_DBG_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
|
||||||
echo "src_sha256=${SRC_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
|
||||||
echo "rippled_version=${RIPPLED_VERSION}" >> ${PKG_OUTDIR}/build_vars
|
|
||||||
echo "dpkg_version=${RIPPLED_DPKG_VERSION}" >> ${PKG_OUTDIR}/build_vars
|
|
||||||
echo "dpkg_full_version=${RIPPLED_DPKG_FULL_VERSION}" >> ${PKG_OUTDIR}/build_vars
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
rippled daemon
|
|
||||||
|
|
||||||
-- Mike Ellery <mellery451@gmail.com> Tue, 04 Dec 2018 18:19:03 +0000
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
10
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
Source: rippled
|
|
||||||
Section: misc
|
|
||||||
Priority: extra
|
|
||||||
Maintainer: Ripple Labs Inc. <support@ripple.com>
|
|
||||||
Build-Depends: cmake, debhelper (>=9), zlib1g-dev, dh-systemd, ninja-build
|
|
||||||
Standards-Version: 3.9.7
|
|
||||||
Homepage: http://ripple.com/
|
|
||||||
|
|
||||||
Package: rippled
|
|
||||||
Architecture: any
|
|
||||||
Multi-Arch: foreign
|
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Description: rippled daemon
|
|
||||||
|
|
||||||
Package: rippled-reporting
|
|
||||||
Architecture: any
|
|
||||||
Multi-Arch: foreign
|
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Description: rippled reporting daemon
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: rippled
|
|
||||||
Source: https://github.com/ripple/rippled
|
|
||||||
|
|
||||||
Files: *
|
|
||||||
Copyright: 2012-2019 Ripple Labs Inc.
|
|
||||||
|
|
||||||
License: __UNKNOWN__
|
|
||||||
|
|
||||||
The accompanying files under various copyrights.
|
|
||||||
|
|
||||||
Copyright (c) 2012, 2013, 2014 Ripple Labs Inc.
|
|
||||||
|
|
||||||
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 accompanying files incorporate work covered by the following copyright
|
|
||||||
and previous license notice:
|
|
||||||
|
|
||||||
Copyright (c) 2011 Arthur Britto, David Schwartz, Jed McCaleb,
|
|
||||||
Vinnie Falco, Bob Way, Eric Lombrozo, Nikolaos D. Bougalis, Howard Hinnant
|
|
||||||
|
|
||||||
Some code from Raw Material Software, Ltd., provided under the terms of the
|
|
||||||
ISC License. See the corresponding source files for more details.
|
|
||||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
|
||||||
Please visit http://www.juce.com
|
|
||||||
|
|
||||||
Some code from ASIO examples:
|
|
||||||
// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
|
|
||||||
//
|
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
||||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
|
|
||||||
Some code from Bitcoin:
|
|
||||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
||||||
// Copyright (c) 2011 The Bitcoin developers
|
|
||||||
// Distributed under the MIT/X11 software license, see the accompanying
|
|
||||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
|
||||||
|
|
||||||
Some code from Tom Wu:
|
|
||||||
This software is covered under the following copyright:
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2003-2005 Tom Wu
|
|
||||||
* All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
* a copy of this software and associated documentation files (the
|
|
||||||
* "Software"), to deal in the Software without restriction, including
|
|
||||||
* without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
* the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be
|
|
||||||
* included in all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
*
|
|
||||||
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
|
|
||||||
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
|
|
||||||
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
|
|
||||||
* THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
|
|
||||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*
|
|
||||||
* In addition, the following condition applies:
|
|
||||||
*
|
|
||||||
* All redistributions must retain an intact copy of this copyright notice
|
|
||||||
* and disclaimer.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Address all questions regarding this license to:
|
|
||||||
|
|
||||||
Tom Wu
|
|
||||||
tjw@cs.Stanford.EDU
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/var/log/rippled/
|
|
||||||
/var/lib/rippled/
|
|
||||||
/etc/systemd/system/rippled.service.d/
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
README.md
|
|
||||||
LICENSE.md
|
|
||||||
RELEASENOTES.md
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
opt/ripple/include
|
|
||||||
opt/ripple/lib/*.a
|
|
||||||
opt/ripple/lib/cmake/ripple
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/var/log/rippled-reporting/
|
|
||||||
/var/lib/rippled-reporting/
|
|
||||||
/etc/systemd/system/rippled-reporting.service.d/
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
build.rippled-reporting/rippled-reporting opt/rippled-reporting/bin
|
|
||||||
cfg/rippled-reporting.cfg opt/rippled-reporting/etc
|
|
||||||
debian/tmp/opt/rippled-reporting/etc/validators.txt opt/rippled-reporting/etc
|
|
||||||
|
|
||||||
opt/rippled-reporting/bin/update-rippled-reporting.sh
|
|
||||||
opt/rippled-reporting/bin/getRippledReportingInfo
|
|
||||||
opt/rippled-reporting/etc/update-rippled-reporting-cron
|
|
||||||
etc/logrotate.d/rippled-reporting
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
opt/rippled-reporting/etc/rippled-reporting.cfg etc/opt/rippled-reporting/rippled-reporting.cfg
|
|
||||||
opt/rippled-reporting/etc/validators.txt etc/opt/rippled-reporting/validators.txt
|
|
||||||
opt/rippled-reporting/bin/rippled-reporting usr/local/bin/rippled-reporting
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
USER_NAME=rippled-reporting
|
|
||||||
GROUP_NAME=rippled-reporting
|
|
||||||
case "$1" in
|
|
||||||
configure)
|
|
||||||
id -u $USER_NAME >/dev/null 2>&1 || \
|
|
||||||
adduser --system --quiet \
|
|
||||||
--home /nonexistent --no-create-home \
|
|
||||||
--disabled-password \
|
|
||||||
--group "$GROUP_NAME"
|
|
||||||
chown -R $USER_NAME:$GROUP_NAME /var/log/rippled-reporting/
|
|
||||||
chown -R $USER_NAME:$GROUP_NAME /var/lib/rippled-reporting/
|
|
||||||
chmod 755 /var/log/rippled-reporting/
|
|
||||||
chmod 755 /var/lib/rippled-reporting/
|
|
||||||
chown -R $USER_NAME:$GROUP_NAME /opt/rippled-reporting
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "postinst called with unknown argument \`$1'" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/opt/ripple/etc/rippled.cfg
|
|
||||||
/opt/ripple/etc/validators.txt
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
opt/ripple/bin/rippled
|
|
||||||
opt/ripple/bin/validator-keys
|
|
||||||
opt/ripple/bin/update-rippled.sh
|
|
||||||
opt/ripple/bin/getRippledInfo
|
|
||||||
opt/ripple/etc/rippled.cfg
|
|
||||||
opt/ripple/etc/validators.txt
|
|
||||||
opt/ripple/etc/update-rippled-cron
|
|
||||||
etc/logrotate.d/rippled
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user