mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 10:45:50 +00:00 
			
		
		
		
	Compare commits
	
		
			860 Commits
		
	
	
		
			nodestore
			...
			9ed20a4f1c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					9ed20a4f1c | ||
| 
						 | 
					89ffc1969b | ||
| 
						 | 
					79fdafe638 | ||
| 
						 | 
					2a10013dfc | ||
| 
						 | 
					6f148a8ac7 | ||
| 
						 | 
					96222baf5e | ||
| 
						 | 
					74477d2c13 | ||
| 
						 | 
					9378f1a0ad | ||
| 
						 | 
					6fa6a96e3a | ||
| 
						 | 
					b0fcd36bcd | ||
| 
						 | 
					1ec31e79c9 | ||
| 
						 | 
					9c8b005406 | ||
| 
						 | 
					687ccf4203 | ||
| 
						 | 
					83f09fd8ab | ||
| 
						 | 
					15c7ad6f78 | ||
| 
						 | 
					1f12b9ec5a | ||
| 
						 | 
					ad0531ad6c | ||
| 
						 | 
					e580f7cfc0 | ||
| 
						 | 
					094f011006 | ||
| 
						 | 
					39d1c43901 | ||
| 
						 | 
					b3e6a902cb | ||
| 
						 | 
					fa1b93bfd8 | ||
| 
						 | 
					92e3a927fc | ||
| 
						 | 
					8f7ebf0377 | ||
| 
						 | 
					46cf6785ab | ||
| 
						 | 
					3c4c9c87c5 | ||
| 
						 | 
					7a790246fb | ||
| 
						 | 
					1a3d2db8ef | ||
| 
						 | 
					2fc912d54d | ||
| 
						 | 
					849d447a20 | ||
| 
						 | 
					ee27049687 | ||
| 
						 | 
					60dec74baf | ||
| 
						 | 
					9abea13649 | ||
| 
						 | 
					810e15319c | ||
| 
						 | 
					d593f3bef5 | ||
| 
						 | 
					1233694b6c | ||
| 
						 | 
					a1d42b7380 | ||
| 
						 | 
					f6d2bf819d | ||
| 
						 | 
					a5ea86fdfc | ||
| 
						 | 
					615f56570a | ||
| 
						 | 
					5e005cd6ee | ||
| 
						 | 
					80a7197590 | ||
| 
						 | 
					7b581443d1 | ||
| 
						 | 
					5400f43359 | ||
| 
						 | 
					8cf7d485ab | ||
| 
						 | 
					372f25d09b | ||
| 
						 | 
					401395a204 | ||
| 
						 | 
					4221dcf568 | ||
| 
						 | 
					989532702d | ||
| 
						 | 
					f9cd2e0d21 | ||
| 
						 | 
					59e334c099 | ||
| 
						 | 
					9018596532 | ||
| 
						 | 
					b827f0170d | ||
| 
						 | 
					e4b7e8f0f2 | ||
| 
						 | 
					1485078d91 | ||
| 
						 | 
					6625d2be92 | ||
| 
						 | 
					2fb5c92140 | ||
| 
						 | 
					c4b5ae3787 | ||
| 
						 | 
					d546d761ce | ||
| 
						 | 
					e84a36867b | ||
| 
						 | 
					0b675465b4 | ||
| 
						 | 
					d088ad61a9 | ||
| 
						 | 
					ef77b02d7f | ||
| 
						 | 
					7385828983 | ||
| 
						 | 
					88b01514c1 | ||
| 
						 | 
					aeece15096 | ||
| 
						 | 
					89cacb1258 | ||
| 
						 | 
					8ccff44e8c | ||
| 
						 | 
					420240a2ab | ||
| 
						 | 
					230873f196 | ||
| 
						 | 
					1fb1a99ea2 | ||
| 
						 | 
					e0b63ac70e | ||
| 
						 | 
					da8df63be3 | ||
| 
						 | 
					317bd4bc6e | ||
| 
						 | 
					2fd465bb3f | ||
| 
						 | 
					fa71bda29c | ||
| 
						 | 
					412593d7bc | ||
| 
						 | 
					12d8342c34 | ||
| 
						 | 
					d17f7151ab | ||
| 
						 | 
					4466175231 | ||
| 
						 | 
					621ca9c865 | ||
| 
						 | 
					85a752235a | ||
| 
						 | 
					d878fd4a6e | ||
| 
						 | 
					532a471a35 | ||
| 
						 | 
					e9468d8b4a | ||
| 
						 | 
					9d54da3880 | ||
| 
						 | 
					542172f0a1 | ||
| 
						 | 
					e086724772 | ||
| 
						 | 
					21863b05f3 | ||
| 
						 | 
					61ac04aacc | ||
| 
						 | 
					57a1329bff | ||
| 
						 | 
					daf22b3b85 | ||
| 
						 | 
					2b225977e2 | ||
| 
						 | 
					58b22901cb | ||
| 
						 | 
					8ba37a3138 | ||
| 
						 | 
					8cffd3054d | ||
| 
						 | 
					6b26045cbc | ||
| 
						 | 
					08f13b7cfe | ||
| 
						 | 
					766f5d7ee1 | ||
| 
						 | 
					287c01ad04 | ||
| 
						 | 
					4239124750 | ||
| 
						 | 
					1e45d4120c | ||
| 
						 | 
					9e446bcc85 | ||
| 
						 | 
					376727d20c | ||
| 
						 | 
					d921c87c88 | ||
| 
						 | 
					7b94d3d99d | ||
| 
						 | 
					79d83bd424 | ||
| 
						 | 
					1a4d54f9d9 | ||
| 
						 | 
					26cd629d28 | ||
| 
						 | 
					2fb93f874b | ||
| 
						 | 
					833df20fce | ||
| 
						 | 
					5737c2b6e8 | ||
| 
						 | 
					a15d0b2ecc | ||
| 
						 | 
					18d76d3082 | ||
| 
						 | 
					849a4435e0 | ||
| 
						 | 
					247e9d98bf | ||
| 
						 | 
					acd455f5df | ||
| 
						 | 
					6636e3b6fd | ||
| 
						 | 
					3c5f118b59 | ||
| 
						 | 
					88308126cc | ||
| 
						 | 
					497e52fcc6 | ||
| 
						 | 
					a3852763e7 | ||
| 
						 | 
					7cd8f0a03a | ||
| 
						 | 
					d24c134612 | ||
| 
						 | 
					cdac69a111 | ||
| 
						 | 
					1500522427 | ||
| 
						 | 
					75aba531d6 | ||
| 
						 | 
					caa8b382d8 | ||
| 
						 | 
					82e04073be | ||
| 
						 | 
					e1b78f9682 | ||
| 
						 | 
					901d1d4e8d | ||
| 
						 | 
					aca5241515 | ||
| 
						 | 
					780378c221 | ||
| 
						 | 
					2dc5e670ac | ||
| 
						 | 
					4dff5a5c8e | ||
| 
						 | 
					f64e626a3f | ||
| 
						 | 
					f21d3e1e97 | ||
| 
						 | 
					858055c811 | ||
| 
						 | 
					5d66f17574 | ||
| 
						 | 
					00328cb782 | ||
| 
						 | 
					fdf7ea4174 | ||
| 
						 | 
					7877ed9704 | ||
| 
						 | 
					17ccec9ac5 | ||
| 
						 | 
					de522ac4ae | ||
| 
						 | 
					74c83a9271 | ||
| 
						 | 
					66ee96d456 | ||
| 
						 | 
					b476aea55b | ||
| 
						 | 
					4ad697069f | ||
| 
						 | 
					97acfe9f97 | ||
| 
						 | 
					475b6f7347 | ||
| 
						 | 
					64a07e5539 | ||
| 
						 | 
					c49b7a2301 | ||
| 
						 | 
					ac694c7c90 | ||
| 
						 | 
					3be6baded9 | ||
| 
						 | 
					49798b1792 | ||
| 
						 | 
					27f43ba9ee | ||
| 
						 | 
					7881b7f69f | ||
| 
						 | 
					d2c45bf560 | ||
| 
						 | 
					c917977eb0 | ||
| 
						 | 
					4cb93f943b | ||
| 
						 | 
					5447c4010d | ||
| 
						 | 
					b77b0e70e3 | ||
| 
						 | 
					98833e4934 | ||
| 
						 | 
					b74697ff9a | ||
| 
						 | 
					ac1883bbf7 | ||
| 
						 | 
					4ada3f85bb | ||
| 
						 | 
					559b504c7d | ||
| 
						 | 
					43cb255337 | ||
| 
						 | 
					63bb1906ed | ||
| 
						 | 
					ac6c102876 | ||
| 
						 | 
					195904574c | ||
| 
						 | 
					2a18ec563d | ||
| 
						 | 
					91f9e424a3 | ||
| 
						 | 
					c2e8bd2be1 | ||
| 
						 | 
					4d2ec0004b | ||
| 
						 | 
					b564fe3c92 | ||
| 
						 | 
					04ceb5af9a | ||
| 
						 | 
					7dee512991 | ||
| 
						 | 
					70bd7c2ce7 | ||
| 
						 | 
					1b9373e220 | ||
| 
						 | 
					c3a0e1df44 | ||
| 
						 | 
					c65ee9d7f9 | ||
| 
						 | 
					090b64728e | ||
| 
						 | 
					283ec19976 | ||
| 
						 | 
					ee450926a7 | ||
| 
						 | 
					9ae0a907f5 | ||
| 
						 | 
					81b0bf8041 | ||
| 
						 | 
					c54377eb7a | ||
| 
						 | 
					1516900c4f | ||
| 
						 | 
					ac5ff4ca32 | ||
| 
						 | 
					e48e4db9e6 | ||
| 
						 | 
					97cac67bba | ||
| 
						 | 
					5c6a855ae3 | ||
| 
						 | 
					5fcebdabc5 | ||
| 
						 | 
					69d7d653be | ||
| 
						 | 
					d5d29e319c | ||
| 
						 | 
					1f052020cb | ||
| 
						 | 
					263c6342cf | ||
| 
						 | 
					fcd935cecf | ||
| 
						 | 
					96cf8f089d | ||
| 
						 | 
					adf30fb819 | ||
| 
						 | 
					a2c41016b0 | ||
| 
						 | 
					251a79e897 | ||
| 
						 | 
					d734fe600b | ||
| 
						 | 
					a6c86b5a9e | ||
| 
						 | 
					dae172ba22 | ||
| 
						 | 
					d716787378 | ||
| 
						 | 
					7bfc60c6ad | ||
| 
						 | 
					f341558735 | ||
| 
						 | 
					9317562d8b | ||
| 
						 | 
					3bf3010f50 | ||
| 
						 | 
					b4022c35b3 | ||
| 
						 | 
					428009c8ca | ||
| 
						 | 
					58dec112f5 | ||
| 
						 | 
					23250a7985 | ||
| 
						 | 
					256de4229c | ||
| 
						 | 
					d9d7e49d7c | ||
| 
						 | 
					74cdfc4228 | ||
| 
						 | 
					fcae641049 | ||
| 
						 | 
					bff711b0ab | ||
| 
						 | 
					21b5002419 | ||
| 
						 | 
					985c8d7dce | ||
| 
						 | 
					ea25183858 | ||
| 
						 | 
					9841c8da72 | ||
| 
						 | 
					d9f2401713 | ||
| 
						 | 
					28b8be7d8e | ||
| 
						 | 
					a08f21d900 | ||
| 
						 | 
					2337156d67 | ||
| 
						 | 
					cb86237c10 | ||
| 
						 | 
					607b581406 | ||
| 
						 | 
					6dc86a9611 | ||
| 
						 | 
					797681f33b | ||
| 
						 | 
					d08fe26f84 | ||
| 
						 | 
					150749291f | ||
| 
						 | 
					6102b4ba2e | ||
| 
						 | 
					5fac2771da | ||
| 
						 | 
					0f04ada876 | ||
| 
						 | 
					32b7cbe910 | ||
| 
						 | 
					522cfe9d6a | ||
| 
						 | 
					785ba90712 | ||
| 
						 | 
					1c00600cfa | ||
| 
						 | 
					48d12395ca | ||
| 
						 | 
					98e1fb83de | ||
| 
						 | 
					834442132b | ||
| 
						 | 
					40631c1a7c | ||
| 
						 | 
					3062a7d17e | ||
| 
						 | 
					e44eeec631 | ||
| 
						 | 
					87c6c2d3c0 | ||
| 
						 | 
					75525c2d38 | ||
| 
						 | 
					b7055927b2 | ||
| 
						 | 
					3502e016e9 | ||
| 
						 | 
					f9a43f262c | ||
| 
						 | 
					dd6e21c38b | ||
| 
						 | 
					d7e4ba8254 | ||
| 
						 | 
					18a90ec432 | ||
| 
						 | 
					25b5b7134d | ||
| 
						 | 
					92e5e08025 | ||
| 
						 | 
					517c7a494b | ||
| 
						 | 
					2aae0b667c | ||
| 
						 | 
					401a666f4d | ||
| 
						 | 
					a6b84caea2 | ||
| 
						 | 
					d568761fdf | ||
| 
						 | 
					3c35024bf9 | ||
| 
						 | 
					f4e738ac64 | ||
| 
						 | 
					838898e758 | ||
| 
						 | 
					88ded30810 | ||
| 
						 | 
					6b8cc6dd9b | ||
| 
						 | 
					37d3d7dae7 | ||
| 
						 | 
					d6a0746f99 | ||
| 
						 | 
					aa6d05c8b9 | ||
| 
						 | 
					b6b6e0fe5c | ||
| 
						 | 
					28650cb14b | ||
| 
						 | 
					0a291371c9 | ||
| 
						 | 
					ab6d3d505f | ||
| 
						 | 
					debf178546 | ||
| 
						 | 
					89df87dec8 | ||
| 
						 | 
					cfa46934ed | ||
| 
						 | 
					e7cd845d93 | ||
| 
						 | 
					9b089bee94 | ||
| 
						 | 
					e15f9244de | ||
| 
						 | 
					ab67ddeeb6 | ||
| 
						 | 
					e55820e7c6 | ||
| 
						 | 
					4d87210e01 | ||
| 
						 | 
					457c64088b | ||
| 
						 | 
					fb44359988 | ||
| 
						 | 
					9bcf186aa2 | ||
| 
						 | 
					a70461f4d5 | ||
| 
						 | 
					269909d5f9 | ||
| 
						 | 
					db8fc670c5 | ||
| 
						 | 
					f2e7fde64f | ||
| 
						 | 
					5e96402770 | ||
| 
						 | 
					f050bbfcea | ||
| 
						 | 
					4d06d898ee | ||
| 
						 | 
					571ad5c60d | ||
| 
						 | 
					c2f8b1354a | ||
| 
						 | 
					ed6c25d093 | ||
| 
						 | 
					e2a6891d11 | ||
| 
						 | 
					88dd6a6f85 | ||
| 
						 | 
					7ebfa0b324 | ||
| 
						 | 
					3965ecc6c1 | ||
| 
						 | 
					c7e03cc419 | ||
| 
						 | 
					a01c601242 | ||
| 
						 | 
					ede561cea3 | ||
| 
						 | 
					250f4dc13b | ||
| 
						 | 
					86b765cb0f | ||
| 
						 | 
					c65a0332bc | ||
| 
						 | 
					d4a6854835 | ||
| 
						 | 
					e5a3cd68b7 | ||
| 
						 | 
					0f83256ffa | ||
| 
						 | 
					01a4df0584 | ||
| 
						 | 
					032e61a784 | ||
| 
						 | 
					129c25a90a | ||
| 
						 | 
					7a860910a6 | ||
| 
						 | 
					8aded497e7 | ||
| 
						 | 
					e5bf299e39 | ||
| 
						 | 
					b19feb4dd4 | ||
| 
						 | 
					8e28f74b5d | ||
| 
						 | 
					ac009c63b1 | ||
| 
						 | 
					8262785c90 | ||
| 
						 | 
					e7dab07e91 | ||
| 
						 | 
					a547f87c46 | ||
| 
						 | 
					f6258deb96 | ||
| 
						 | 
					b980edd479 | ||
| 
						 | 
					af5e9d9437 | ||
| 
						 | 
					786b559b05 | ||
| 
						 | 
					1cb0e428b7 | ||
| 
						 | 
					b2ec73cdc5 | ||
| 
						 | 
					11b9a69f72 | ||
| 
						 | 
					ba2b168847 | ||
| 
						 | 
					52e58ceade | ||
| 
						 | 
					0be22fd91c | ||
| 
						 | 
					164eb58c4f | ||
| 
						 | 
					5038a42701 | ||
| 
						 | 
					b9f40f4dc5 | ||
| 
						 | 
					d823050fb1 | ||
| 
						 | 
					2c61c4a79d | ||
| 
						 | 
					0c4441ac36 | ||
| 
						 | 
					7aa342b003 | ||
| 
						 | 
					0454beaf76 | ||
| 
						 | 
					6c65c6199a | ||
| 
						 | 
					febdb1c9c2 | ||
| 
						 | 
					264f25c2a6 | ||
| 
						 | 
					35a0e18973 | ||
| 
						 | 
					55b28f9bf1 | ||
| 
						 | 
					a919e440ae | ||
| 
						 | 
					441bcdf001 | ||
| 
						 | 
					3ec852cf1c | ||
| 
						 | 
					9285ab522d | ||
| 
						 | 
					f89bd966ec | ||
| 
						 | 
					00a3b5adc2 | ||
| 
						 | 
					1cb9b67a0f | ||
| 
						 | 
					2b359408a8 | ||
| 
						 | 
					ba8b5a8cbe | ||
| 
						 | 
					c36683a825 | ||
| 
						 | 
					5aec64c84d | ||
| 
						 | 
					c96d1386a1 | ||
| 
						 | 
					a9290dbdcd | ||
| 
						 | 
					53a7408f18 | ||
| 
						 | 
					d0295da992 | ||
| 
						 | 
					17df89c075 | ||
| 
						 | 
					e9fc4ced98 | ||
| 
						 | 
					a3e2f4257b | ||
| 
						 | 
					7b8d5fc5b8 | ||
| 
						 | 
					adf8120483 | ||
| 
						 | 
					623778d1a9 | ||
| 
						 | 
					4ae13f2bea | ||
| 
						 | 
					152780b218 | ||
| 
						 | 
					076b8e3e11 | ||
| 
						 | 
					96af8735ba | ||
| 
						 | 
					728d2b4683 | ||
| 
						 | 
					4f7fed3708 | ||
| 
						 | 
					08e7059b8c | ||
| 
						 | 
					4f86551fb3 | ||
| 
						 | 
					f06124e8c7 | ||
| 
						 | 
					234d811ce3 | ||
| 
						 | 
					a3e940844d | ||
| 
						 | 
					fc6f8dde94 | ||
| 
						 | 
					d6ce1add8b | ||
| 
						 | 
					338b646a3d | ||
| 
						 | 
					6b4f45f0eb | ||
| 
						 | 
					ecf78bd818 | ||
| 
						 | 
					111f7d20ba | ||
| 
						 | 
					11391d91b2 | ||
| 
						 | 
					b38c2c14dc | ||
| 
						 | 
					b64650af71 | ||
| 
						 | 
					2211d6f851 | ||
| 
						 | 
					1bf5088b16 | ||
| 
						 | 
					8c1e483416 | ||
| 
						 | 
					0bf51e257b | ||
| 
						 | 
					48dc6b29bf | ||
| 
						 | 
					29e733cab3 | ||
| 
						 | 
					b1584d6b8c | ||
| 
						 | 
					afde76bd11 | ||
| 
						 | 
					e07a99153a | ||
| 
						 | 
					d70ec5d2e4 | ||
| 
						 | 
					b13e515698 | ||
| 
						 | 
					ea02919a0c | ||
| 
						 | 
					de03278927 | ||
| 
						 | 
					9d40dce759 | ||
| 
						 | 
					0bec0515b6 | ||
| 
						 | 
					6baa95b190 | ||
| 
						 | 
					df4891c4a7 | ||
| 
						 | 
					51e8a1b222 | ||
| 
						 | 
					f42d9124df | ||
| 
						 | 
					41461bdddc | ||
| 
						 | 
					e397107ce9 | ||
| 
						 | 
					034318b158 | ||
| 
						 | 
					95bef7ced3 | ||
| 
						 | 
					c33e64fa3d | ||
| 
						 | 
					d31ee509a9 | ||
| 
						 | 
					8926a95af3 | ||
| 
						 | 
					68b3db602b | ||
| 
						 | 
					1ae08afb02 | ||
| 
						 | 
					01e298befe | ||
| 
						 | 
					58d71b8c96 | ||
| 
						 | 
					4c6fd4785d | ||
| 
						 | 
					c26f181528 | ||
| 
						 | 
					d919d2ad06 | ||
| 
						 | 
					98df71a919 | ||
| 
						 | 
					892ba747be | ||
| 
						 | 
					48c1c21542 | ||
| 
						 | 
					724cb4494f | ||
| 
						 | 
					131bd9f4b3 | ||
| 
						 | 
					8b87cc291c | ||
| 
						 | 
					025772a92b | ||
| 
						 | 
					dc29234ff5 | ||
| 
						 | 
					b3d714260f | ||
| 
						 | 
					1e21d9f01d | ||
| 
						 | 
					551e86f22b | ||
| 
						 | 
					49b7cd3138 | ||
| 
						 | 
					7a1011c193 | ||
| 
						 | 
					33f01147e3 | ||
| 
						 | 
					8a10716a5c | ||
| 
						 | 
					9853ff3828 | ||
| 
						 | 
					fa31522d5c | ||
| 
						 | 
					3b580c0d07 | ||
| 
						 | 
					cb259e83b0 | ||
| 
						 | 
					5e814a6da4 | ||
| 
						 | 
					056262d922 | ||
| 
						 | 
					8d70bc4210 | ||
| 
						 | 
					4e13e13c3a | ||
| 
						 | 
					9915e5fafc | ||
| 
						 | 
					0b32a1429e | ||
| 
						 | 
					669a0bc040 | ||
| 
						 | 
					f0d0909eb2 | ||
| 
						 | 
					f9af9ac6c8 | ||
| 
						 | 
					dfc95ec291 | ||
| 
						 | 
					81d795dcfc | ||
| 
						 | 
					e71137fe4a | ||
| 
						 | 
					b7ccfaa7b1 | ||
| 
						 | 
					a56034b47c | ||
| 
						 | 
					311d0b8bf1 | ||
| 
						 | 
					a5ca117ff6 | ||
| 
						 | 
					0371795d78 | ||
| 
						 | 
					f191c911d4 | ||
| 
						 | 
					435c956ef7 | ||
| 
						 | 
					e6f49040f5 | ||
| 
						 | 
					2f3f6dcb03 | ||
| 
						 | 
					5ebcaf0a6c | ||
| 
						 | 
					8bfdbcbab5 | ||
| 
						 | 
					135b63dbe0 | ||
| 
						 | 
					46167d1c46 | ||
| 
						 | 
					79e621d96c | ||
| 
						 | 
					66627b26cf | ||
| 
						 | 
					2ddf7541a6 | ||
| 
						 | 
					7aad6e5127 | ||
| 
						 | 
					dffcdea12b | ||
| 
						 | 
					24384be242 | ||
| 
						 | 
					d7725837f5 | ||
| 
						 | 
					7745c72b2c | ||
| 
						 | 
					acb373280b | ||
| 
						 | 
					4f506599f6 | ||
| 
						 | 
					383f1b6ab3 | ||
| 
						 | 
					da18c86cbf | ||
| 
						 | 
					9fcb28acad | ||
| 
						 | 
					305c9a8d61 | ||
| 
						 | 
					9b2d563dec | ||
| 
						 | 
					d4b54c20ed | ||
| 
						 | 
					150d4a47e4 | ||
| 
						 | 
					1c9df69b33 | ||
| 
						 | 
					10555faa92 | ||
| 
						 | 
					0f1ffff068 | ||
| 
						 | 
					9309b57364 | ||
| 
						 | 
					cb08f2b6ec | ||
| 
						 | 
					84cde3ce0b | ||
| 
						 | 
					f7b3ddd87b | ||
| 
						 | 
					1e7710eee2 | ||
| 
						 | 
					07f047b1e2 | ||
| 
						 | 
					190c18a7c2 | ||
| 
						 | 
					4228946747 | ||
| 
						 | 
					7c364377fe | ||
| 
						 | 
					94d3d5a6bb | ||
| 
						 | 
					8f02b24cc4 | ||
| 
						 | 
					f732d724a2 | ||
| 
						 | 
					cd8faf611c | ||
| 
						 | 
					b35c23bf90 | ||
| 
						 | 
					696ed4729b | ||
| 
						 | 
					8abfbc1ae9 | ||
| 
						 | 
					6c6cd26a9a | ||
| 
						 | 
					8a02a58e4b | ||
| 
						 | 
					9e1b969e4c | ||
| 
						 | 
					1d75b27a1b | ||
| 
						 | 
					466c7dba9f | ||
| 
						 | 
					c19af115c8 | ||
| 
						 | 
					bf41273d2f | ||
| 
						 | 
					39f81d0af5 | ||
| 
						 | 
					b5f6205f4d | ||
| 
						 | 
					7abfc033c0 | ||
| 
						 | 
					0940843766 | ||
| 
						 | 
					663c1bda0e | ||
| 
						 | 
					c0efc5ea5f | ||
| 
						 | 
					2b1727fb05 | ||
| 
						 | 
					8687b5c3c9 | ||
| 
						 | 
					ecd49e1535 | ||
| 
						 | 
					c77a8d5ec6 | ||
| 
						 | 
					e13676f709 | ||
| 
						 | 
					74594d5348 | ||
| 
						 | 
					ae350c4390 | ||
| 
						 | 
					8a62a613ec | ||
| 
						 | 
					caf4827c0b | ||
| 
						 | 
					e5840f67e5 | ||
| 
						 | 
					ef3272b3ad | ||
| 
						 | 
					bcdaca0f23 | ||
| 
						 | 
					9998e33495 | ||
| 
						 | 
					5fa071c833 | ||
| 
						 | 
					649a9392f5 | ||
| 
						 | 
					cfb6dfedf9 | ||
| 
						 | 
					9b47b188fc | ||
| 
						 | 
					e8da019386 | ||
| 
						 | 
					c2b03fecca | ||
| 
						 | 
					60c276d90b | ||
| 
						 | 
					2929748898 | ||
| 
						 | 
					5ec8783d35 | ||
| 
						 | 
					243eb4d921 | ||
| 
						 | 
					272d533fcc | ||
| 
						 | 
					197bde6ebd | ||
| 
						 | 
					03a5d25143 | ||
| 
						 | 
					01dffa9348 | ||
| 
						 | 
					a26412055e | ||
| 
						 | 
					b75b9f2a71 | ||
| 
						 | 
					46e4df0f85 | ||
| 
						 | 
					1dea9bcfd6 | ||
| 
						 | 
					96aab1288f | ||
| 
						 | 
					510c69d487 | ||
| 
						 | 
					0cdea9d7f7 | ||
| 
						 | 
					aa9b03e57b | ||
| 
						 | 
					38c466c47d | ||
| 
						 | 
					5f5a947d6c | ||
| 
						 | 
					7a008c21ee | ||
| 
						 | 
					4f44747342 | ||
| 
						 | 
					aebf2ac990 | ||
| 
						 | 
					ee073c179d | ||
| 
						 | 
					661b6b6dd4 | ||
| 
						 | 
					8f8177b139 | ||
| 
						 | 
					31ab52d149 | ||
| 
						 | 
					9ccb9d366d | ||
| 
						 | 
					06d3270e3e | ||
| 
						 | 
					0feaec0d7e | ||
| 
						 | 
					d6c699f734 | ||
| 
						 | 
					ac78b7a9a7 | ||
| 
						 | 
					b72a87c7d3 | ||
| 
						 | 
					39c32561bd | ||
| 
						 | 
					89aa8b21ec | ||
| 
						 | 
					a828e24cf0 | ||
| 
						 | 
					f7a8d2de84 | ||
| 
						 | 
					0aa3b2ed74 | ||
| 
						 | 
					c9b4977d93 | ||
| 
						 | 
					daacb45613 | ||
| 
						 | 
					32559463ef | ||
| 
						 | 
					2216c62fbc | ||
| 
						 | 
					750dbfc364 | ||
| 
						 | 
					68bf9f264f | ||
| 
						 | 
					c625309733 | ||
| 
						 | 
					ae0335a308 | ||
| 
						 | 
					7a5d4d1977 | ||
| 
						 | 
					c33f5b46a8 | ||
| 
						 | 
					12d9d399a9 | ||
| 
						 | 
					a11905c43a | ||
| 
						 | 
					348bfe5ede | ||
| 
						 | 
					7fee0eb171 | ||
| 
						 | 
					69327445e9 | ||
| 
						 | 
					8f514937a4 | ||
| 
						 | 
					36b34a7bd5 | ||
| 
						 | 
					5edaec2bd0 | ||
| 
						 | 
					2f1f453052 | ||
| 
						 | 
					6eaaa7bcfa | ||
| 
						 | 
					e354497f63 | ||
| 
						 | 
					6fcd654bee | ||
| 
						 | 
					d275a2ab72 | ||
| 
						 | 
					3f33471220 | ||
| 
						 | 
					a82ad5ba76 | ||
| 
						 | 
					48e804c40c | ||
| 
						 | 
					c9c54c9799 | ||
| 
						 | 
					24fe5f9fd0 | ||
| 
						 | 
					476ee8a479 | ||
| 
						 | 
					0ee63b7c7b | ||
| 
						 | 
					2916b7e692 | ||
| 
						 | 
					d72a597aa4 | ||
| 
						 | 
					5da990661a | ||
| 
						 | 
					d3cc1a8798 | ||
| 
						 | 
					aa61e1be38 | ||
| 
						 | 
					307f9702ea | ||
| 
						 | 
					192308fb3e | ||
| 
						 | 
					0e2e674c51 | ||
| 
						 | 
					0f10f3b5c0 | ||
| 
						 | 
					86614de00e | ||
| 
						 | 
					b9903a822f | ||
| 
						 | 
					584db523b4 | ||
| 
						 | 
					14dee2d976 | ||
| 
						 | 
					cfb8e02f16 | ||
| 
						 | 
					43b6e89303 | ||
| 
						 | 
					0aa2c26680 | ||
| 
						 | 
					c848fe91d6 | ||
| 
						 | 
					56d062f907 | ||
| 
						 | 
					7d4b00cfcb | ||
| 
						 | 
					66105b6c68 | ||
| 
						 | 
					641b8c546d | ||
| 
						 | 
					8186dd960e | ||
| 
						 | 
					11bfcbf915 | ||
| 
						 | 
					8df65be522 | ||
| 
						 | 
					9effcc3924 | ||
| 
						 | 
					163c2b4631 | ||
| 
						 | 
					be7ca74e46 | ||
| 
						 | 
					448258f861 | ||
| 
						 | 
					f8591d0fd6 | ||
| 
						 | 
					31da4bf8d4 | ||
| 
						 | 
					4e6e81f5de | ||
| 
						 | 
					b5e9325bd9 | ||
| 
						 | 
					c7aec60cec | ||
| 
						 | 
					5d6726ce07 | ||
| 
						 | 
					ac72ef80a4 | ||
| 
						 | 
					c681de1d39 | ||
| 
						 | 
					b3168c7ea5 | ||
| 
						 | 
					272a6c0999 | ||
| 
						 | 
					0133a4136e | ||
| 
						 | 
					31e7e5a56e | ||
| 
						 | 
					4438ebb5b7 | ||
| 
						 | 
					c2f99e80af | ||
| 
						 | 
					e4b17d1cf2 | ||
| 
						 | 
					ba86191406 | ||
| 
						 | 
					fc8695f044 | ||
| 
						 | 
					25e65f739f | ||
| 
						 | 
					30ce0e3937 | ||
| 
						 | 
					c6e4d79a7b | ||
| 
						 | 
					bebf34311b | ||
| 
						 | 
					1e8bbcc60c | ||
| 
						 | 
					ef6613421d | ||
| 
						 | 
					c4b3e69cec | ||
| 
						 | 
					b0343d0509 | ||
| 
						 | 
					476bd329b3 | ||
| 
						 | 
					516c4e9fed | ||
| 
						 | 
					61750dcb0d | ||
| 
						 | 
					15b449b119 | ||
| 
						 | 
					70c694ea4a | ||
| 
						 | 
					8aa07383ec | ||
| 
						 | 
					ecea635db5 | ||
| 
						 | 
					5c80fb3669 | ||
| 
						 | 
					2f42ddb285 | ||
| 
						 | 
					99b00a6c1b | ||
| 
						 | 
					d9fba022a6 | ||
| 
						 | 
					72fb172649 | ||
| 
						 | 
					c164acd3d6 | ||
| 
						 | 
					676480cc44 | ||
| 
						 | 
					8ca7a2e2b3 | ||
| 
						 | 
					bb1a6d2c35 | ||
| 
						 | 
					2c583ffb43 | ||
| 
						 | 
					0795d79d9a | ||
| 
						 | 
					f4f51d0643 | ||
| 
						 | 
					9790332232 | ||
| 
						 | 
					fbafb72262 | ||
| 
						 | 
					49207d007d | ||
| 
						 | 
					f6dadf36da | ||
| 
						 | 
					8eb4589e09 | ||
| 
						 | 
					8b6efee476 | ||
| 
						 | 
					a0ce24d4e3 | ||
| 
						 | 
					10c94831e9 | ||
| 
						 | 
					250ed22922 | ||
| 
						 | 
					8a8c980be7 | ||
| 
						 | 
					139d57921a | ||
| 
						 | 
					a145dd7379 | ||
| 
						 | 
					3b5e4b7e33 | ||
| 
						 | 
					5f091922c6 | ||
| 
						 | 
					d42d965908 | ||
| 
						 | 
					776d1fb797 | ||
| 
						 | 
					b19287c6d0 | ||
| 
						 | 
					c50eb7773f | ||
| 
						 | 
					5f12c22fbe | ||
| 
						 | 
					c49406d8c9 | ||
| 
						 | 
					15a07d14f8 | ||
| 
						 | 
					0aaf98c46e | ||
| 
						 | 
					039ce53c00 | ||
| 
						 | 
					f79b6c7193 | ||
| 
						 | 
					3dd7fd4754 | ||
| 
						 | 
					76779d379c | ||
| 
						 | 
					8a344a39e1 | ||
| 
						 | 
					6569421524 | ||
| 
						 | 
					beb0710d46 | ||
| 
						 | 
					cbad4e53d2 | ||
| 
						 | 
					63fa10412e | ||
| 
						 | 
					cd748dec95 | ||
| 
						 | 
					3cf5a3d3d1 | ||
| 
						 | 
					14c68f88ea | ||
| 
						 | 
					8740108f99 | ||
| 
						 | 
					d492ffd04e | ||
| 
						 | 
					f49dce56b0 | ||
| 
						 | 
					ccb3f36245 | ||
| 
						 | 
					f6c64e1c80 | ||
| 
						 | 
					da7a99c231 | ||
| 
						 | 
					f8342a7069 | ||
| 
						 | 
					6f43313393 | ||
| 
						 | 
					c008c1e951 | ||
| 
						 | 
					fb58424598 | ||
| 
						 | 
					e12009d12c | ||
| 
						 | 
					720930a8f6 | ||
| 
						 | 
					2c2b70f05e | ||
| 
						 | 
					0c43377d6f | ||
| 
						 | 
					a9c15ddbfc | ||
| 
						 | 
					0c1aedfe15 | ||
| 
						 | 
					312c10e053 | ||
| 
						 | 
					456d1ebb0d | ||
| 
						 | 
					ad8e66f50d | ||
| 
						 | 
					64329a0f20 | ||
| 
						 | 
					b51723269d | ||
| 
						 | 
					17193d12c7 | ||
| 
						 | 
					4177d5b00f | ||
| 
						 | 
					fc55a7cd04 | ||
| 
						 | 
					d500fce743 | ||
| 
						 | 
					4db22471d8 | ||
| 
						 | 
					c7dfc60571 | ||
| 
						 | 
					4c633995f5 | ||
| 
						 | 
					b99e445c56 | ||
| 
						 | 
					4e9d1fd575 | ||
| 
						 | 
					1da0cd9753 | ||
| 
						 | 
					231647d156 | ||
| 
						 | 
					79601159a5 | ||
| 
						 | 
					713fbb3d72 | ||
| 
						 | 
					74c0f9fa0f | ||
| 
						 | 
					45d4949b90 | ||
| 
						 | 
					1d91f9c9e4 | ||
| 
						 | 
					91c6c64b72 | ||
| 
						 | 
					2b335ab1ca | ||
| 
						 | 
					dafba0fb10 | ||
| 
						 | 
					ca5436fc73 | ||
| 
						 | 
					1c3c9cd91f | ||
| 
						 | 
					5f913b5897 | ||
| 
						 | 
					0209c98c75 | ||
| 
						 | 
					989d386912 | ||
| 
						 | 
					3f922eb8c5 | ||
| 
						 | 
					5e159356cc | ||
| 
						 | 
					7c1cc2e1d1 | ||
| 
						 | 
					b3559f1f88 | ||
| 
						 | 
					99e830606d | ||
| 
						 | 
					78f14c07e7 | ||
| 
						 | 
					e555b3e49d | ||
| 
						 | 
					c193fd58af | ||
| 
						 | 
					8422947375 | ||
| 
						 | 
					9791075bb8 | ||
| 
						 | 
					b12b39d3a6 | ||
| 
						 | 
					ba1a9ed9ee | ||
| 
						 | 
					296ecb3dc9 | ||
| 
						 | 
					e75e280b25 | ||
| 
						 | 
					9adf190b75 | ||
| 
						 | 
					98d8efdb6a | ||
| 
						 | 
					e299f099d8 | ||
| 
						 | 
					61e0a3766c | ||
| 
						 | 
					f73d26b9fe | ||
| 
						 | 
					c9077e8c84 | ||
| 
						 | 
					480ff62f13 | ||
| 
						 | 
					75007dc8a3 | ||
| 
						 | 
					0fe8d9a72f | ||
| 
						 | 
					bbe0791966 | ||
| 
						 | 
					b6ca19ba4e | ||
| 
						 | 
					5917dc76f9 | ||
| 
						 | 
					f70ddf9e65 | ||
| 
						 | 
					75f3b93c78 | ||
| 
						 | 
					e0533cae8d | ||
| 
						 | 
					3075a01caa | ||
| 
						 | 
					708a567f10 | ||
| 
						 | 
					8ede26b000 | ||
| 
						 | 
					8a10898f23 | ||
| 
						 | 
					6be3f2d873 | ||
| 
						 | 
					c44e18728d | ||
| 
						 | 
					7d375c93fc | ||
| 
						 | 
					10118aa61b | ||
| 
						 | 
					8629a29ec7 | ||
| 
						 | 
					3fb1d27aa9 | ||
| 
						 | 
					77c76c044e | ||
| 
						 | 
					f1c5cf99be | ||
| 
						 | 
					34347384c0 | ||
| 
						 | 
					2c77a4d3dc | ||
| 
						 | 
					b5cdeb5812 | ||
| 
						 | 
					3c045736bc | ||
| 
						 | 
					0ce15e0e35 | ||
| 
						 | 
					87fe411483 | ||
| 
						 | 
					0999033ec0 | ||
| 
						 | 
					77cecaf187 | ||
| 
						 | 
					5bff2ad2b9 | ||
| 
						 | 
					b0e0f319a1 | ||
| 
						 | 
					2233f585f8 | ||
| 
						 | 
					61d8c7a85b | ||
| 
						 | 
					6f8750316c | ||
| 
						 | 
					4f94f07b2b | ||
| 
						 | 
					3c0aaab21b | ||
| 
						 | 
					2bad9bde04 | ||
| 
						 | 
					cbee151d2d | ||
| 
						 | 
					e899147a4e | ||
| 
						 | 
					24c51a51a6 | ||
| 
						 | 
					c463bd8ccc | ||
| 
						 | 
					c11472ed0b | ||
| 
						 | 
					eb6d770981 | ||
| 
						 | 
					72ec634a25 | ||
| 
						 | 
					6b9c2826fc | ||
| 
						 | 
					0913a3c596 | ||
| 
						 | 
					3284ab1804 | ||
| 
						 | 
					167a7b3a5b | ||
| 
						 | 
					3c1f84f09e | ||
| 
						 | 
					74f1228d4a | ||
| 
						 | 
					d46664df0f | ||
| 
						 | 
					c912b939d6 | ||
| 
						 | 
					9fc1a786dc | ||
| 
						 | 
					63f80ea033 | ||
| 
						 | 
					8682d40eca | ||
| 
						 | 
					68f0e4baf5 | ||
| 
						 | 
					e8e4bf7bf3 | ||
| 
						 | 
					7aa49cdf19 | ||
| 
						 | 
					fda9e9a7ee | ||
| 
						 | 
					4b2b6a871a | ||
| 
						 | 
					d8a84e9530 | ||
| 
						 | 
					c3a9f3dbf3 | ||
| 
						 | 
					df1300fb37 | ||
| 
						 | 
					648d6c3e2f | ||
| 
						 | 
					47ffc392d7 | ||
| 
						 | 
					0362e935af | ||
| 
						 | 
					a79fa2026b | ||
| 
						 | 
					c1e7fe2d93 | ||
| 
						 | 
					4a5ad4cfac | ||
| 
						 | 
					ffd453f7dd | ||
| 
						 | 
					518fb6d208 | ||
| 
						 | 
					093055c039 | ||
| 
						 | 
					b7ac73c8e4 | ||
| 
						 | 
					004ec2d201 | ||
| 
						 | 
					ebbf4b64a5 | ||
| 
						 | 
					649ab872ff | ||
| 
						 | 
					7e9e9104ea | ||
| 
						 | 
					3726f8bf31 | ||
| 
						 | 
					e37dc710cf | ||
| 
						 | 
					5d38e4cfbf | ||
| 
						 | 
					28f4cc7817 | ||
| 
						 | 
					95fabd5762 | ||
| 
						 | 
					23ce431876 | ||
| 
						 | 
					04ef885108 | ||
| 
						 | 
					d33df35378 | ||
| 
						 | 
					ba3c0e5145 | ||
| 
						 | 
					be1ce5eca9 | ||
| 
						 | 
					df66e4151e | ||
| 
						 | 
					9a31f321cd | ||
| 
						 | 
					e40e38e8d3 | ||
| 
						 | 
					f5af42a640 | ||
| 
						 | 
					6dfbf39c99 | ||
| 
						 | 
					691f674743 | 
@@ -1,5 +0,0 @@
 | 
			
		||||
 | 
			
		||||
codecov:
 | 
			
		||||
  ci:
 | 
			
		||||
    - !appveyor
 | 
			
		||||
    - travis
 | 
			
		||||
							
								
								
									
										7
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
# Ignore everything
 | 
			
		||||
*
 | 
			
		||||
 | 
			
		||||
# Allow files and directories
 | 
			
		||||
!/build-core.sh
 | 
			
		||||
!/build-full.sh
 | 
			
		||||
!/release-builder.sh
 | 
			
		||||
							
								
								
									
										12
									
								
								.githooks/pre-commit
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								.githooks/pre-commit
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# Pre-commit hook that runs the suspicious patterns check on staged files
 | 
			
		||||
 | 
			
		||||
# Get the repository's root directory
 | 
			
		||||
repo_root=$(git rev-parse --show-toplevel)
 | 
			
		||||
 | 
			
		||||
# Run the suspicious patterns script in pre-commit mode
 | 
			
		||||
"$repo_root/suspicious_patterns.sh" --pre-commit
 | 
			
		||||
 | 
			
		||||
# Exit with the same code as the script
 | 
			
		||||
exit $?
 | 
			
		||||
							
								
								
									
										4
									
								
								.githooks/setup.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.githooks/setup.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
echo "Configuring git to use .githooks directory..."
 | 
			
		||||
git config core.hooksPath .githooks
 | 
			
		||||
							
								
								
									
										63
									
								
								.github/actions/xahau-configure-ccache/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								.github/actions/xahau-configure-ccache/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,63 @@
 | 
			
		||||
name: 'Configure ccache'
 | 
			
		||||
description: 'Sets up ccache with consistent configuration'
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
  max_size:
 | 
			
		||||
    description: 'Maximum cache size'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: '2G'
 | 
			
		||||
  hash_dir:
 | 
			
		||||
    description: 'Whether to include directory paths in hash'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: 'true'
 | 
			
		||||
  compiler_check:
 | 
			
		||||
    description: 'How to check compiler for changes'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: 'content'
 | 
			
		||||
  is_main_branch:
 | 
			
		||||
    description: 'Whether the current branch is the main branch'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: 'false'
 | 
			
		||||
  main_cache_dir:
 | 
			
		||||
    description: 'Path to the main branch cache directory'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: '~/.ccache-main'
 | 
			
		||||
  current_cache_dir:
 | 
			
		||||
    description: 'Path to the current branch cache directory'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: '~/.ccache-current'
 | 
			
		||||
 | 
			
		||||
runs:
 | 
			
		||||
  using: 'composite'
 | 
			
		||||
  steps:
 | 
			
		||||
    - name: Configure ccache
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: |
 | 
			
		||||
        # Create cache directories
 | 
			
		||||
        mkdir -p ${{ inputs.main_cache_dir }} ${{ inputs.current_cache_dir }}
 | 
			
		||||
        
 | 
			
		||||
        # Set compiler check globally
 | 
			
		||||
        ccache -o compiler_check=${{ inputs.compiler_check }}
 | 
			
		||||
        
 | 
			
		||||
        # Use a single config file location
 | 
			
		||||
        mkdir -p ~/.ccache
 | 
			
		||||
        export CONF_PATH="$HOME/.ccache/ccache.conf"
 | 
			
		||||
        
 | 
			
		||||
        # Apply common settings
 | 
			
		||||
        echo "max_size = ${{ inputs.max_size }}" > "$CONF_PATH"
 | 
			
		||||
        echo "hash_dir = ${{ inputs.hash_dir }}" >> "$CONF_PATH"
 | 
			
		||||
        echo "compiler_check = ${{ inputs.compiler_check }}" >> "$CONF_PATH"
 | 
			
		||||
        
 | 
			
		||||
        if [ "${{ inputs.is_main_branch }}" == "true" ]; then
 | 
			
		||||
          # Main branch: use main branch cache
 | 
			
		||||
          ccache --set-config=cache_dir="${{ inputs.main_cache_dir }}"
 | 
			
		||||
          echo "CCACHE_DIR=${{ inputs.main_cache_dir }}" >> $GITHUB_ENV
 | 
			
		||||
        else
 | 
			
		||||
          # Feature branch: use current branch cache with main as secondary
 | 
			
		||||
          ccache --set-config=cache_dir="${{ inputs.current_cache_dir }}"
 | 
			
		||||
          ccache --set-config=secondary_storage="file:${{ inputs.main_cache_dir }}"
 | 
			
		||||
          echo "CCACHE_DIR=${{ inputs.current_cache_dir }}" >> $GITHUB_ENV
 | 
			
		||||
        fi
 | 
			
		||||
        
 | 
			
		||||
        ccache -p # Print config for verification
 | 
			
		||||
        ccache -z # Zero statistics before the build
 | 
			
		||||
							
								
								
									
										174
									
								
								.github/actions/xahau-ga-build/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										174
									
								
								.github/actions/xahau-ga-build/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,174 @@
 | 
			
		||||
name: build
 | 
			
		||||
description: 'Builds the project with ccache integration'
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
  generator:
 | 
			
		||||
    description: 'CMake generator to use'
 | 
			
		||||
    required: true
 | 
			
		||||
  configuration:
 | 
			
		||||
    description: 'Build configuration (Debug, Release, etc.)'
 | 
			
		||||
    required: true
 | 
			
		||||
  build_dir:
 | 
			
		||||
    description: 'Directory to build in'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: '.build'
 | 
			
		||||
  cc:
 | 
			
		||||
    description: 'C compiler to use'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: ''
 | 
			
		||||
  cxx:
 | 
			
		||||
    description: 'C++ compiler to use'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: ''
 | 
			
		||||
  compiler-id:
 | 
			
		||||
    description: 'Unique identifier: compiler-version-stdlib[-gccversion] (e.g. clang-14-libstdcxx-gcc11, gcc-13-libstdcxx)'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: ''
 | 
			
		||||
  cache_version:
 | 
			
		||||
    description: 'Cache version for invalidation'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: '1'
 | 
			
		||||
  ccache_enabled:
 | 
			
		||||
    description: 'Whether to use ccache'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: 'true'
 | 
			
		||||
  main_branch:
 | 
			
		||||
    description: 'Main branch name for restore keys'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: 'dev'
 | 
			
		||||
  stdlib:
 | 
			
		||||
    description: 'C++ standard library to use'
 | 
			
		||||
    required: true
 | 
			
		||||
    type: choice
 | 
			
		||||
    options:
 | 
			
		||||
      - libstdcxx
 | 
			
		||||
      - libcxx
 | 
			
		||||
  clang_gcc_toolchain:
 | 
			
		||||
    description: 'GCC version to use for Clang toolchain (e.g. 11, 13)'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: ''
 | 
			
		||||
 | 
			
		||||
runs:
 | 
			
		||||
  using: 'composite'
 | 
			
		||||
  steps:
 | 
			
		||||
    - name: Generate safe branch name
 | 
			
		||||
      if: inputs.ccache_enabled == 'true'
 | 
			
		||||
      id: safe-branch
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: |
 | 
			
		||||
        SAFE_BRANCH=$(echo "${{ github.ref_name }}" | tr -c 'a-zA-Z0-9_.-' '-')
 | 
			
		||||
        echo "name=${SAFE_BRANCH}" >> $GITHUB_OUTPUT
 | 
			
		||||
 | 
			
		||||
    - name: Restore ccache directory for default branch
 | 
			
		||||
      if: inputs.ccache_enabled == 'true'
 | 
			
		||||
      id: ccache-restore
 | 
			
		||||
      uses: actions/cache/restore@v4
 | 
			
		||||
      with:
 | 
			
		||||
        path: ~/.ccache-main
 | 
			
		||||
        key: ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ inputs.configuration }}-${{ inputs.main_branch }}
 | 
			
		||||
        restore-keys: |
 | 
			
		||||
          ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ inputs.configuration }}-
 | 
			
		||||
          ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-
 | 
			
		||||
 | 
			
		||||
    - name: Restore ccache directory for current branch
 | 
			
		||||
      if: inputs.ccache_enabled == 'true' && steps.safe-branch.outputs.name != inputs.main_branch
 | 
			
		||||
      id: ccache-restore-current-branch
 | 
			
		||||
      uses: actions/cache/restore@v4
 | 
			
		||||
      with:
 | 
			
		||||
        path: ~/.ccache-current
 | 
			
		||||
        key: ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ inputs.configuration }}-${{ steps.safe-branch.outputs.name }}
 | 
			
		||||
        restore-keys: |
 | 
			
		||||
          ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ inputs.configuration }}-${{ inputs.main_branch }}
 | 
			
		||||
          ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ inputs.configuration }}-
 | 
			
		||||
          ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-
 | 
			
		||||
 | 
			
		||||
    - name: Configure project
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: |
 | 
			
		||||
        mkdir -p ${{ inputs.build_dir }}
 | 
			
		||||
        cd ${{ inputs.build_dir }}
 | 
			
		||||
        
 | 
			
		||||
        # Set compiler environment variables if provided
 | 
			
		||||
        if [ -n "${{ inputs.cc }}" ]; then
 | 
			
		||||
          export CC="${{ inputs.cc }}"
 | 
			
		||||
        fi
 | 
			
		||||
        
 | 
			
		||||
        if [ -n "${{ inputs.cxx }}" ]; then
 | 
			
		||||
          export CXX="${{ inputs.cxx }}"
 | 
			
		||||
        fi
 | 
			
		||||
        
 | 
			
		||||
        
 | 
			
		||||
        # Configure ccache launcher args
 | 
			
		||||
        CCACHE_ARGS=""
 | 
			
		||||
        if [ "${{ inputs.ccache_enabled }}" = "true" ]; then
 | 
			
		||||
          CCACHE_ARGS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
 | 
			
		||||
        fi
 | 
			
		||||
        
 | 
			
		||||
        # Configure C++ standard library if specified
 | 
			
		||||
        # libstdcxx used for clang-14/16 to work around missing lexicographical_compare_three_way in libc++
 | 
			
		||||
        # libcxx can be used with clang-17+ which has full C++20 support
 | 
			
		||||
        # Note: -stdlib flag is Clang-specific, GCC always uses libstdc++
 | 
			
		||||
        CMAKE_CXX_FLAGS=""
 | 
			
		||||
        if [[ "${{ inputs.cxx }}" == clang* ]]; then
 | 
			
		||||
          # Only Clang needs the -stdlib flag
 | 
			
		||||
          if [ "${{ inputs.stdlib }}" = "libstdcxx" ]; then
 | 
			
		||||
            CMAKE_CXX_FLAGS="-stdlib=libstdc++"
 | 
			
		||||
          elif [ "${{ inputs.stdlib }}" = "libcxx" ]; then
 | 
			
		||||
            CMAKE_CXX_FLAGS="-stdlib=libc++"
 | 
			
		||||
          fi
 | 
			
		||||
        fi
 | 
			
		||||
        # GCC always uses libstdc++ and doesn't need/support the -stdlib flag
 | 
			
		||||
        
 | 
			
		||||
        # Configure GCC toolchain for Clang if specified
 | 
			
		||||
        if [ -n "${{ inputs.clang_gcc_toolchain }}" ] && [[ "${{ inputs.cxx }}" == clang* ]]; then
 | 
			
		||||
          # Extract Clang version from compiler executable name (e.g., clang++-14 -> 14)
 | 
			
		||||
          clang_version=$(echo "${{ inputs.cxx }}" | grep -oE '[0-9]+$')
 | 
			
		||||
          
 | 
			
		||||
          # Clang 16+ supports --gcc-install-dir (precise path specification)
 | 
			
		||||
          # Clang <16 only has --gcc-toolchain (uses discovery heuristics)
 | 
			
		||||
          if [ -n "$clang_version" ] && [ "$clang_version" -ge "16" ]; then
 | 
			
		||||
            # Clang 16+ uses --gcc-install-dir (canonical, precise)
 | 
			
		||||
            CMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS --gcc-install-dir=/usr/lib/gcc/x86_64-linux-gnu/${{ inputs.clang_gcc_toolchain }}"
 | 
			
		||||
          else
 | 
			
		||||
            # Clang 14-15 uses --gcc-toolchain (deprecated but necessary)
 | 
			
		||||
            # Note: This still uses discovery, so we hide newer GCC versions in the workflow
 | 
			
		||||
            CMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS --gcc-toolchain=/usr"
 | 
			
		||||
          fi
 | 
			
		||||
        fi
 | 
			
		||||
        
 | 
			
		||||
        # Run CMake configure
 | 
			
		||||
        # Note: conanfile.py hardcodes 'build/generators' as the output path.
 | 
			
		||||
        # If we're in a 'build' folder, Conan detects this and uses just 'generators/'
 | 
			
		||||
        # If we're in '.build' (non-standard), Conan adds the full 'build/generators/'
 | 
			
		||||
        # So we get: .build/build/generators/ with our non-standard folder name
 | 
			
		||||
        cmake .. \
 | 
			
		||||
          -G "${{ inputs.generator }}" \
 | 
			
		||||
          $CCACHE_ARGS \
 | 
			
		||||
          ${CMAKE_CXX_FLAGS:+-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS"} \
 | 
			
		||||
          -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
 | 
			
		||||
          -DCMAKE_BUILD_TYPE=${{ inputs.configuration }}
 | 
			
		||||
 | 
			
		||||
    - name: Build project
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: |
 | 
			
		||||
        cd ${{ inputs.build_dir }}
 | 
			
		||||
        cmake --build . --config ${{ inputs.configuration }} --parallel $(nproc)
 | 
			
		||||
 | 
			
		||||
    - name: Show ccache statistics
 | 
			
		||||
      if: inputs.ccache_enabled == 'true'
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: ccache -s
 | 
			
		||||
 | 
			
		||||
    - name: Save ccache directory for default branch
 | 
			
		||||
      if: always() && inputs.ccache_enabled == 'true' && steps.safe-branch.outputs.name == inputs.main_branch
 | 
			
		||||
      uses: actions/cache/save@v4
 | 
			
		||||
      with:
 | 
			
		||||
        path: ~/.ccache-main
 | 
			
		||||
        key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
 | 
			
		||||
 | 
			
		||||
    - name: Save ccache directory for current branch
 | 
			
		||||
      if: always() && inputs.ccache_enabled == 'true' && steps.safe-branch.outputs.name != inputs.main_branch
 | 
			
		||||
      uses: actions/cache/save@v4
 | 
			
		||||
      with:
 | 
			
		||||
        path: ~/.ccache-current
 | 
			
		||||
        key: ${{ steps.ccache-restore-current-branch.outputs.cache-primary-key }}
 | 
			
		||||
							
								
								
									
										116
									
								
								.github/actions/xahau-ga-dependencies/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										116
									
								
								.github/actions/xahau-ga-dependencies/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,116 @@
 | 
			
		||||
name: dependencies
 | 
			
		||||
description: 'Installs build dependencies with caching'
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
  configuration:
 | 
			
		||||
    description: 'Build configuration (Debug, Release, etc.)'
 | 
			
		||||
    required: true
 | 
			
		||||
  build_dir:
 | 
			
		||||
    description: 'Directory to build dependencies in'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: '.build'
 | 
			
		||||
  compiler-id:
 | 
			
		||||
    description: 'Unique identifier: compiler-version-stdlib[-gccversion] (e.g. clang-14-libstdcxx-gcc11, gcc-13-libstdcxx)'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: ''
 | 
			
		||||
  cache_version:
 | 
			
		||||
    description: 'Cache version for invalidation'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: '1'
 | 
			
		||||
  cache_enabled:
 | 
			
		||||
    description: 'Whether to use caching'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: 'true'
 | 
			
		||||
  main_branch:
 | 
			
		||||
    description: 'Main branch name for restore keys'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: 'dev'
 | 
			
		||||
  stdlib:
 | 
			
		||||
    description: 'C++ standard library for Conan configuration (note: also in compiler-id)'
 | 
			
		||||
    required: true
 | 
			
		||||
    type: choice
 | 
			
		||||
    options:
 | 
			
		||||
      - libstdcxx
 | 
			
		||||
      - libcxx
 | 
			
		||||
 | 
			
		||||
outputs:
 | 
			
		||||
  cache-hit:
 | 
			
		||||
    description: 'Whether there was a cache hit'
 | 
			
		||||
    value: ${{ steps.cache-restore-conan.outputs.cache-hit }}
 | 
			
		||||
 | 
			
		||||
runs:
 | 
			
		||||
  using: 'composite'
 | 
			
		||||
  steps:
 | 
			
		||||
    - name: Generate safe branch name
 | 
			
		||||
      if: inputs.cache_enabled == 'true'
 | 
			
		||||
      id: safe-branch
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: |
 | 
			
		||||
        SAFE_BRANCH=$(echo "${{ github.ref_name }}" | tr -c 'a-zA-Z0-9_.-' '-')
 | 
			
		||||
        echo "name=${SAFE_BRANCH}" >> $GITHUB_OUTPUT
 | 
			
		||||
 | 
			
		||||
    - name: Check conanfile changes
 | 
			
		||||
      if: inputs.cache_enabled == 'true'
 | 
			
		||||
      id: check-conanfile-changes
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: |
 | 
			
		||||
        # Check if we're on the main branch
 | 
			
		||||
        if [ "${{ github.ref_name }}" == "${{ inputs.main_branch }}" ]; then
 | 
			
		||||
          echo "should-save-conan-cache=true" >> $GITHUB_OUTPUT
 | 
			
		||||
        else
 | 
			
		||||
          # Fetch main branch for comparison
 | 
			
		||||
          git fetch origin ${{ inputs.main_branch }}
 | 
			
		||||
          
 | 
			
		||||
          # Check if conanfile.txt or conanfile.py has changed compared to main branch
 | 
			
		||||
          if git diff --quiet origin/${{ inputs.main_branch }}..HEAD -- '**/conanfile.txt' '**/conanfile.py'; then
 | 
			
		||||
            echo "should-save-conan-cache=false" >> $GITHUB_OUTPUT
 | 
			
		||||
          else
 | 
			
		||||
            echo "should-save-conan-cache=true" >> $GITHUB_OUTPUT
 | 
			
		||||
          fi
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
    - name: Restore Conan cache
 | 
			
		||||
      if: inputs.cache_enabled == 'true'
 | 
			
		||||
      id: cache-restore-conan
 | 
			
		||||
      uses: actions/cache/restore@v4
 | 
			
		||||
      with:
 | 
			
		||||
        path: |
 | 
			
		||||
          ~/.conan
 | 
			
		||||
          ~/.conan2
 | 
			
		||||
        # Note: compiler-id format is compiler-version-stdlib[-gccversion]
 | 
			
		||||
        key: ${{ runner.os }}-conan-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}-${{ inputs.configuration }}
 | 
			
		||||
        restore-keys: |
 | 
			
		||||
          ${{ runner.os }}-conan-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}-
 | 
			
		||||
          ${{ runner.os }}-conan-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-
 | 
			
		||||
 | 
			
		||||
    - name: Export custom recipes
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: |
 | 
			
		||||
        conan export external/snappy --version 1.1.10 --user xahaud --channel stable
 | 
			
		||||
        conan export external/soci --version 4.0.3 --user xahaud --channel stable
 | 
			
		||||
        conan export external/wasmedge --version 0.11.2 --user xahaud --channel stable
 | 
			
		||||
 | 
			
		||||
    - name: Install dependencies
 | 
			
		||||
      shell: bash
 | 
			
		||||
      env:
 | 
			
		||||
        CONAN_REQUEST_TIMEOUT: 180  # Increase timeout to 3 minutes for slow mirrors
 | 
			
		||||
      run: |
 | 
			
		||||
        # Create build directory
 | 
			
		||||
        mkdir -p ${{ inputs.build_dir }}
 | 
			
		||||
        cd ${{ inputs.build_dir }}
 | 
			
		||||
        
 | 
			
		||||
        # Install dependencies using conan
 | 
			
		||||
        conan install \
 | 
			
		||||
          --output-folder . \
 | 
			
		||||
          --build missing \
 | 
			
		||||
          --settings build_type=${{ inputs.configuration }} \
 | 
			
		||||
          ..
 | 
			
		||||
 | 
			
		||||
    - name: Save Conan cache
 | 
			
		||||
      if: always() && inputs.cache_enabled == 'true' && steps.cache-restore-conan.outputs.cache-hit != 'true' && steps.check-conanfile-changes.outputs.should-save-conan-cache == 'true'
 | 
			
		||||
      uses: actions/cache/save@v4
 | 
			
		||||
      with:
 | 
			
		||||
        path: |
 | 
			
		||||
          ~/.conan
 | 
			
		||||
          ~/.conan2
 | 
			
		||||
        key: ${{ steps.cache-restore-conan.outputs.cache-primary-key }}
 | 
			
		||||
							
								
								
									
										23
									
								
								.github/pull_request_template.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.github/pull_request_template.md
									
									
									
									
										vendored
									
									
								
							@@ -33,10 +33,27 @@ Please check [x] relevant options, delete irrelevant ones.
 | 
			
		||||
- [ ] New feature (non-breaking change which adds functionality)
 | 
			
		||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
 | 
			
		||||
- [ ] 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)
 | 
			
		||||
- [ ] 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
 | 
			
		||||
 | 
			
		||||
### 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
 | 
			
		||||
If relevant, use this section for an English description of the change at a technical level.
 | 
			
		||||
@@ -52,4 +69,4 @@ This section may not be needed if your change includes thoroughly commented unit
 | 
			
		||||
<!--
 | 
			
		||||
## Future Tasks
 | 
			
		||||
For future tasks related to PR.
 | 
			
		||||
-->
 | 
			
		||||
-->
 | 
			
		||||
							
								
								
									
										95
									
								
								.github/workflows/build-in-docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										95
									
								
								.github/workflows/build-in-docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,95 @@
 | 
			
		||||
name: Build using Docker
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: ["dev", "candidate", "release", "jshooks"]
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches: ["dev", "candidate", "release", "jshooks"]
 | 
			
		||||
 | 
			
		||||
concurrency:
 | 
			
		||||
  group: ${{ github.workflow }}-${{ github.ref }}
 | 
			
		||||
  cancel-in-progress: true
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  DEBUG_BUILD_CONTAINERS_AFTER_CLEANUP: 1
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  checkout:
 | 
			
		||||
    runs-on: [self-hosted, vanity]
 | 
			
		||||
    outputs:
 | 
			
		||||
      checkout_path: ${{ steps.vars.outputs.checkout_path }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Prepare checkout path
 | 
			
		||||
        id: vars
 | 
			
		||||
        run: |
 | 
			
		||||
          SAFE_BRANCH=$(echo "${{ github.ref_name }}" | sed -e 's/[^a-zA-Z0-9._-]/-/g')
 | 
			
		||||
          CHECKOUT_PATH="${SAFE_BRANCH}-${{ github.sha }}"
 | 
			
		||||
          echo "checkout_path=${CHECKOUT_PATH}" >> "$GITHUB_OUTPUT"
 | 
			
		||||
 | 
			
		||||
      - uses: actions/checkout@v4
 | 
			
		||||
        with:
 | 
			
		||||
          path: ${{ steps.vars.outputs.checkout_path }}
 | 
			
		||||
          clean: true
 | 
			
		||||
          fetch-depth: 2 # Only get the last 2 commits, to avoid fetching all history
 | 
			
		||||
 | 
			
		||||
  build:
 | 
			
		||||
    runs-on: [self-hosted, vanity]
 | 
			
		||||
    needs: [checkout]
 | 
			
		||||
    defaults:
 | 
			
		||||
      run:
 | 
			
		||||
        working-directory: ${{ needs.checkout.outputs.checkout_path }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Set Cleanup Script Path
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "JOB_CLEANUP_SCRIPT=$(mktemp)" >> $GITHUB_ENV
 | 
			
		||||
 | 
			
		||||
      - name: Build using Docker
 | 
			
		||||
        run: /bin/bash release-builder.sh
 | 
			
		||||
 | 
			
		||||
      - name: Stop Container (Cleanup)
 | 
			
		||||
        if: always()
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "Running cleanup script: $JOB_CLEANUP_SCRIPT"
 | 
			
		||||
          /bin/bash -e -x "$JOB_CLEANUP_SCRIPT"
 | 
			
		||||
          CLEANUP_EXIT_CODE=$?
 | 
			
		||||
 | 
			
		||||
          if [[ "$CLEANUP_EXIT_CODE" -eq 0 ]]; then
 | 
			
		||||
            echo "Cleanup script succeeded."
 | 
			
		||||
            rm -f "$JOB_CLEANUP_SCRIPT"
 | 
			
		||||
            echo "Cleanup script removed."
 | 
			
		||||
          else
 | 
			
		||||
            echo "⚠️ Cleanup script failed! Keeping for debugging: $JOB_CLEANUP_SCRIPT"
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
          if [[ "${DEBUG_BUILD_CONTAINERS_AFTER_CLEANUP}" == "1" ]]; then
 | 
			
		||||
            echo "🔍 Checking for leftover containers..."
 | 
			
		||||
            BUILD_CONTAINERS=$(docker ps --format '{{.Names}}' | grep '^xahaud_cached_builder' || echo "")
 | 
			
		||||
 | 
			
		||||
            if [[ -n "$BUILD_CONTAINERS" ]]; then
 | 
			
		||||
              echo "⚠️ WARNING: Some build containers are still running"
 | 
			
		||||
              echo "$BUILD_CONTAINERS"
 | 
			
		||||
            else
 | 
			
		||||
              echo "✅ No build containers found"
 | 
			
		||||
            fi
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
  tests:
 | 
			
		||||
    runs-on: [self-hosted, vanity]
 | 
			
		||||
    needs: [build, checkout]
 | 
			
		||||
    defaults:
 | 
			
		||||
      run:
 | 
			
		||||
        working-directory: ${{ needs.checkout.outputs.checkout_path }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Unit tests
 | 
			
		||||
        run: /bin/bash docker-unit-tests.sh
 | 
			
		||||
 | 
			
		||||
  cleanup:
 | 
			
		||||
    runs-on: [self-hosted, vanity]
 | 
			
		||||
    needs: [tests, checkout]
 | 
			
		||||
    if: always()
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Cleanup workspace
 | 
			
		||||
        run: |
 | 
			
		||||
          CHECKOUT_PATH="${{ needs.checkout.outputs.checkout_path }}"
 | 
			
		||||
          echo "Cleaning workspace for ${CHECKOUT_PATH}"
 | 
			
		||||
          rm -rf "${{ github.workspace }}/${CHECKOUT_PATH}"
 | 
			
		||||
							
								
								
									
										36
									
								
								.github/workflows/clang-format.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										36
									
								
								.github/workflows/clang-format.yml
									
									
									
									
										vendored
									
									
								
							@@ -4,20 +4,32 @@ on: [push, pull_request]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  check:
 | 
			
		||||
    runs-on: ubuntu-18.04
 | 
			
		||||
    runs-on: ubuntu-22.04
 | 
			
		||||
    env:
 | 
			
		||||
      CLANG_VERSION: 10
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v2
 | 
			
		||||
    - name: Install clang-format
 | 
			
		||||
    - 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 -y
 | 
			
		||||
    #     sudo apt-get install -y clang-format-${CLANG_VERSION}
 | 
			
		||||
 | 
			
		||||
    # Temporary fix until this commit is merged
 | 
			
		||||
    # https://github.com/XRPLF/rippled/commit/552377c76f55b403a1c876df873a23d780fcc81c
 | 
			
		||||
    - name: Download and install clang-format
 | 
			
		||||
      run: |
 | 
			
		||||
        sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null <<EOF
 | 
			
		||||
        deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${CLANG_VERSION} main
 | 
			
		||||
        deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${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}
 | 
			
		||||
        sudo apt-get update -y
 | 
			
		||||
        sudo apt-get install -y libtinfo5
 | 
			
		||||
        curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz
 | 
			
		||||
        tar -xf clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz
 | 
			
		||||
        sudo mv clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04 /opt/clang-10
 | 
			
		||||
        sudo ln -s /opt/clang-10/bin/clang-format /usr/local/bin/clang-format-10
 | 
			
		||||
    - 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
 | 
			
		||||
@@ -29,7 +41,7 @@ jobs:
 | 
			
		||||
        git diff --exit-code | tee "clang-format.patch"
 | 
			
		||||
    - name: Upload patch
 | 
			
		||||
      if: failure() && steps.assert.outcome == 'failure'
 | 
			
		||||
      uses: actions/upload-artifact@v2
 | 
			
		||||
      uses: actions/upload-artifact@v4
 | 
			
		||||
      continue-on-error: true
 | 
			
		||||
      with:
 | 
			
		||||
        name: clang-format.patch
 | 
			
		||||
@@ -51,7 +63,7 @@ jobs:
 | 
			
		||||
          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'
 | 
			
		||||
          2. Run 'git-clang-format --extensions c,cpp,h,cxx,ipp dev'
 | 
			
		||||
             in your repo, commit, and push.
 | 
			
		||||
      run: |
 | 
			
		||||
        echo "${PREAMBLE}"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										25
									
								
								.github/workflows/doxygen.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/doxygen.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,25 +0,0 @@
 | 
			
		||||
name: Build and publish Doxygen documentation
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - develop
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  job:
 | 
			
		||||
    runs-on: ubuntu-18.04
 | 
			
		||||
    container:
 | 
			
		||||
      image: docker://rippleci/rippled-ci-builder:2944b78d22db
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: checkout
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
      - name: build
 | 
			
		||||
        run: |
 | 
			
		||||
          mkdir build
 | 
			
		||||
          cd build
 | 
			
		||||
          cmake -DBoost_NO_BOOST_CMAKE=ON ..
 | 
			
		||||
          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
 | 
			
		||||
							
								
								
									
										6
									
								
								.github/workflows/levelization.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/levelization.yml
									
									
									
									
										vendored
									
									
								
							@@ -4,11 +4,11 @@ on: [push, pull_request]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  check:
 | 
			
		||||
    runs-on: ubuntu-18.04
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    env:
 | 
			
		||||
      CLANG_VERSION: 10
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v2
 | 
			
		||||
    - uses: actions/checkout@v3
 | 
			
		||||
    - name: Check levelization
 | 
			
		||||
      run: Builds/levelization/levelization.sh
 | 
			
		||||
    - name: Check for differences
 | 
			
		||||
@@ -18,7 +18,7 @@ jobs:
 | 
			
		||||
        git diff --exit-code | tee "levelization.patch"
 | 
			
		||||
    - name: Upload patch
 | 
			
		||||
      if: failure() && steps.assert.outcome == 'failure'
 | 
			
		||||
      uses: actions/upload-artifact@v2
 | 
			
		||||
      uses: actions/upload-artifact@v4
 | 
			
		||||
      continue-on-error: true
 | 
			
		||||
      with:
 | 
			
		||||
        name: levelization.patch
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										36
									
								
								.github/workflows/verify-generated-headers.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								.github/workflows/verify-generated-headers.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
name: Verify Generated Hook Headers
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
  pull_request:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  verify-generated-headers:
 | 
			
		||||
    strategy:
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
      matrix:
 | 
			
		||||
        include:
 | 
			
		||||
          - target: hook/error.h
 | 
			
		||||
            generator: ./hook/generate_error.sh
 | 
			
		||||
          - target: hook/extern.h
 | 
			
		||||
            generator: ./hook/generate_extern.sh
 | 
			
		||||
          - target: hook/sfcodes.h
 | 
			
		||||
            generator: bash ./hook/generate_sfcodes.sh
 | 
			
		||||
          - target: hook/tts.h
 | 
			
		||||
            generator: ./hook/generate_tts.sh
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    name: ${{ matrix.target }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout repository
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
      - name: Verify ${{ matrix.target }}
 | 
			
		||||
        run: |
 | 
			
		||||
          set -euo pipefail
 | 
			
		||||
          chmod +x hook/generate_*.sh || true
 | 
			
		||||
 | 
			
		||||
          tmp=$(mktemp)
 | 
			
		||||
          trap 'rm -f "$tmp"' EXIT
 | 
			
		||||
 | 
			
		||||
          ${{ matrix.generator }} > "$tmp"
 | 
			
		||||
          diff -u ${{ matrix.target }} "$tmp"
 | 
			
		||||
							
								
								
									
										149
									
								
								.github/workflows/xahau-ga-macos.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										149
									
								
								.github/workflows/xahau-ga-macos.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,149 @@
 | 
			
		||||
name: MacOS - GA Runner
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: ["dev", "candidate", "release"]
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches: ["dev", "candidate", "release"]
 | 
			
		||||
  schedule:
 | 
			
		||||
    - cron: '0 0 * * *'
 | 
			
		||||
 | 
			
		||||
concurrency:
 | 
			
		||||
  group: ${{ github.workflow }}-${{ github.ref }}
 | 
			
		||||
  cancel-in-progress: true
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  test:
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        generator:
 | 
			
		||||
          - Ninja
 | 
			
		||||
        configuration:
 | 
			
		||||
          - Debug
 | 
			
		||||
    runs-on: macos-15
 | 
			
		||||
    env:
 | 
			
		||||
      build_dir: .build
 | 
			
		||||
      # Bump this number to invalidate all caches globally.
 | 
			
		||||
      CACHE_VERSION: 1
 | 
			
		||||
      MAIN_BRANCH_NAME: dev
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
      - name: Install Conan
 | 
			
		||||
        run: |
 | 
			
		||||
          brew install conan
 | 
			
		||||
          # Verify Conan 2 is installed
 | 
			
		||||
          conan --version
 | 
			
		||||
 | 
			
		||||
      - name: Install Coreutils
 | 
			
		||||
        run: |
 | 
			
		||||
          brew install coreutils
 | 
			
		||||
          echo "Num proc: $(nproc)"
 | 
			
		||||
 | 
			
		||||
      - name: Install Ninja
 | 
			
		||||
        if: matrix.generator == 'Ninja'
 | 
			
		||||
        run: brew install ninja
 | 
			
		||||
 | 
			
		||||
      - name: Install Python
 | 
			
		||||
        run: |
 | 
			
		||||
          if which python3 > /dev/null 2>&1; then
 | 
			
		||||
              echo "Python 3 executable exists"
 | 
			
		||||
              python3 --version
 | 
			
		||||
          else
 | 
			
		||||
              brew install python@3.12
 | 
			
		||||
          fi
 | 
			
		||||
          # Create 'python' symlink if it doesn't exist (for tools expecting 'python')
 | 
			
		||||
          if ! which python > /dev/null 2>&1; then
 | 
			
		||||
              sudo ln -sf $(which python3) /usr/local/bin/python
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
      - name: Install CMake
 | 
			
		||||
        run: |
 | 
			
		||||
          # Install CMake 3.x to match local dev environments
 | 
			
		||||
          # With Conan 2 and the policy args passed to CMake, newer versions
 | 
			
		||||
          # can have issues with dependencies that require cmake_minimum_required < 3.5
 | 
			
		||||
          brew uninstall cmake --ignore-dependencies 2>/dev/null || true
 | 
			
		||||
 | 
			
		||||
          # Download and install CMake 3.31.7 directly
 | 
			
		||||
          curl -L https://github.com/Kitware/CMake/releases/download/v3.31.7/cmake-3.31.7-macos-universal.tar.gz -o cmake.tar.gz
 | 
			
		||||
          tar -xzf cmake.tar.gz
 | 
			
		||||
 | 
			
		||||
          # Move the entire CMake.app to /Applications
 | 
			
		||||
          sudo mv cmake-3.31.7-macos-universal/CMake.app /Applications/
 | 
			
		||||
 | 
			
		||||
          echo "/Applications/CMake.app/Contents/bin" >> $GITHUB_PATH
 | 
			
		||||
          /Applications/CMake.app/Contents/bin/cmake --version
 | 
			
		||||
 | 
			
		||||
      - name: Install ccache
 | 
			
		||||
        run: brew install ccache
 | 
			
		||||
 | 
			
		||||
      - name: Configure ccache
 | 
			
		||||
        uses: ./.github/actions/xahau-configure-ccache
 | 
			
		||||
        with:
 | 
			
		||||
          max_size: 2G
 | 
			
		||||
          hash_dir: true
 | 
			
		||||
          compiler_check: content
 | 
			
		||||
          is_main_branch: ${{ github.ref_name == env.MAIN_BRANCH_NAME }}
 | 
			
		||||
 | 
			
		||||
      - name: Check environment
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "PATH:"
 | 
			
		||||
          echo "${PATH}" | tr ':' '\n'
 | 
			
		||||
          which python && python --version || echo "Python not found"
 | 
			
		||||
          which conan && conan --version || echo "Conan not found"
 | 
			
		||||
          which cmake && cmake --version || echo "CMake not found"
 | 
			
		||||
          clang --version
 | 
			
		||||
          ccache --version
 | 
			
		||||
          echo "---- Full Environment ----"
 | 
			
		||||
          env
 | 
			
		||||
 | 
			
		||||
      - name: Configure Conan
 | 
			
		||||
        run: |
 | 
			
		||||
          # Create the default profile directory if it doesn't exist
 | 
			
		||||
          mkdir -p ~/.conan2/profiles
 | 
			
		||||
 | 
			
		||||
          # Detect compiler version
 | 
			
		||||
          COMPILER_VERSION=$(clang --version | grep -oE 'version [0-9]+' | grep -oE '[0-9]+')
 | 
			
		||||
 | 
			
		||||
          # Create profile with our specific settings
 | 
			
		||||
          cat > ~/.conan2/profiles/default <<EOF
 | 
			
		||||
          [settings]
 | 
			
		||||
          arch=armv8
 | 
			
		||||
          build_type=Release
 | 
			
		||||
          compiler=apple-clang
 | 
			
		||||
          compiler.cppstd=20
 | 
			
		||||
          compiler.libcxx=libc++
 | 
			
		||||
          compiler.version=${COMPILER_VERSION}
 | 
			
		||||
          os=Macos
 | 
			
		||||
 | 
			
		||||
          [conf]
 | 
			
		||||
          # Workaround for gRPC with newer Apple Clang
 | 
			
		||||
          tools.build:cxxflags=["-Wno-missing-template-arg-list-after-template-kw"]
 | 
			
		||||
          EOF
 | 
			
		||||
 | 
			
		||||
          # Display profile for verification
 | 
			
		||||
          conan profile show
 | 
			
		||||
 | 
			
		||||
      - name: Install dependencies
 | 
			
		||||
        uses: ./.github/actions/xahau-ga-dependencies
 | 
			
		||||
        with:
 | 
			
		||||
          configuration: ${{ matrix.configuration }}
 | 
			
		||||
          build_dir: ${{ env.build_dir }}
 | 
			
		||||
          compiler-id: clang
 | 
			
		||||
          cache_version: ${{ env.CACHE_VERSION }}
 | 
			
		||||
          main_branch: ${{ env.MAIN_BRANCH_NAME }}
 | 
			
		||||
 | 
			
		||||
      - name: Build
 | 
			
		||||
        uses: ./.github/actions/xahau-ga-build
 | 
			
		||||
        with:
 | 
			
		||||
          generator: ${{ matrix.generator }}
 | 
			
		||||
          configuration: ${{ matrix.configuration }}
 | 
			
		||||
          build_dir: ${{ env.build_dir }}
 | 
			
		||||
          compiler-id: clang
 | 
			
		||||
          cache_version: ${{ env.CACHE_VERSION }}
 | 
			
		||||
          main_branch: ${{ env.MAIN_BRANCH_NAME }}
 | 
			
		||||
 | 
			
		||||
      - name: Test
 | 
			
		||||
        run: |
 | 
			
		||||
          ${{ env.build_dir }}/rippled --unittest --unittest-jobs $(nproc)
 | 
			
		||||
							
								
								
									
										332
									
								
								.github/workflows/xahau-ga-nix.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										332
									
								
								.github/workflows/xahau-ga-nix.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,332 @@
 | 
			
		||||
name: Nix - GA Runner
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: ["dev", "candidate", "release"]
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches: ["dev", "candidate", "release"]
 | 
			
		||||
  schedule:
 | 
			
		||||
    - cron: '0 0 * * *'
 | 
			
		||||
 | 
			
		||||
concurrency:
 | 
			
		||||
  group: ${{ github.workflow }}-${{ github.ref }}
 | 
			
		||||
  cancel-in-progress: true
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  matrix-setup:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    container: python:3-slim
 | 
			
		||||
    outputs:
 | 
			
		||||
      matrix: ${{ steps.set-matrix.outputs.matrix }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Generate build matrix
 | 
			
		||||
        id: set-matrix
 | 
			
		||||
        shell: python
 | 
			
		||||
        run: |
 | 
			
		||||
          import json
 | 
			
		||||
          import os
 | 
			
		||||
          
 | 
			
		||||
          # Full matrix with all 6 compiler configurations
 | 
			
		||||
          # Each configuration includes all parameters needed by the build job
 | 
			
		||||
          full_matrix = [
 | 
			
		||||
              {
 | 
			
		||||
                  "compiler_id": "gcc-11-libstdcxx",
 | 
			
		||||
                  "compiler": "gcc",
 | 
			
		||||
                  "cc": "gcc-11",
 | 
			
		||||
                  "cxx": "g++-11",
 | 
			
		||||
                  "compiler_version": 11,
 | 
			
		||||
                  "stdlib": "libstdcxx",
 | 
			
		||||
                  "configuration": "Debug"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                  "compiler_id": "gcc-13-libstdcxx",
 | 
			
		||||
                  "compiler": "gcc",
 | 
			
		||||
                  "cc": "gcc-13",
 | 
			
		||||
                  "cxx": "g++-13",
 | 
			
		||||
                  "compiler_version": 13,
 | 
			
		||||
                  "stdlib": "libstdcxx",
 | 
			
		||||
                  "configuration": "Debug"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                  "compiler_id": "clang-14-libstdcxx-gcc11",
 | 
			
		||||
                  "compiler": "clang",
 | 
			
		||||
                  "cc": "clang-14",
 | 
			
		||||
                  "cxx": "clang++-14",
 | 
			
		||||
                  "compiler_version": 14,
 | 
			
		||||
                  "stdlib": "libstdcxx",
 | 
			
		||||
                  "clang_gcc_toolchain": 11,
 | 
			
		||||
                  "configuration": "Debug"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                  "compiler_id": "clang-16-libstdcxx-gcc13",
 | 
			
		||||
                  "compiler": "clang",
 | 
			
		||||
                  "cc": "clang-16",
 | 
			
		||||
                  "cxx": "clang++-16",
 | 
			
		||||
                  "compiler_version": 16,
 | 
			
		||||
                  "stdlib": "libstdcxx",
 | 
			
		||||
                  "clang_gcc_toolchain": 13,
 | 
			
		||||
                  "configuration": "Debug"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                  "compiler_id": "clang-17-libcxx",
 | 
			
		||||
                  "compiler": "clang",
 | 
			
		||||
                  "cc": "clang-17",
 | 
			
		||||
                  "cxx": "clang++-17",
 | 
			
		||||
                  "compiler_version": 17,
 | 
			
		||||
                  "stdlib": "libcxx",
 | 
			
		||||
                  "configuration": "Debug"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                  # Clang 18 - testing if it's faster than Clang 17 with libc++
 | 
			
		||||
                  # Requires patching Conan v1 settings.yml to add version 18
 | 
			
		||||
                  "compiler_id": "clang-18-libcxx",
 | 
			
		||||
                  "compiler": "clang",
 | 
			
		||||
                  "cc": "clang-18",
 | 
			
		||||
                  "cxx": "clang++-18",
 | 
			
		||||
                  "compiler_version": 18,
 | 
			
		||||
                  "stdlib": "libcxx",
 | 
			
		||||
                  "configuration": "Debug"
 | 
			
		||||
              }
 | 
			
		||||
          ]
 | 
			
		||||
          
 | 
			
		||||
          # Minimal matrix for PRs and feature branches
 | 
			
		||||
          minimal_matrix = [
 | 
			
		||||
              full_matrix[1],  # gcc-13 (middle-ground gcc)
 | 
			
		||||
              full_matrix[2]   # clang-14 (mature, stable clang)
 | 
			
		||||
          ]
 | 
			
		||||
          
 | 
			
		||||
          # Determine which matrix to use based on the target branch
 | 
			
		||||
          ref = "${{ github.ref }}"
 | 
			
		||||
          base_ref = "${{ github.base_ref }}"  # For PRs, this is the target branch
 | 
			
		||||
          event_name = "${{ github.event_name }}"
 | 
			
		||||
          commit_message = """${{ github.event.head_commit.message }}"""
 | 
			
		||||
          pr_title = """${{ github.event.pull_request.title }}"""
 | 
			
		||||
          
 | 
			
		||||
          # Debug logging
 | 
			
		||||
          print(f"Event: {event_name}")
 | 
			
		||||
          print(f"Ref: {ref}")
 | 
			
		||||
          print(f"Base ref: {base_ref}")
 | 
			
		||||
          print(f"PR title: {pr_title}")
 | 
			
		||||
          print(f"Commit message: {commit_message}")
 | 
			
		||||
          
 | 
			
		||||
          # Check for override tags in commit message or PR title
 | 
			
		||||
          force_full = "[ci-nix-full-matrix]" in commit_message or "[ci-nix-full-matrix]" in pr_title
 | 
			
		||||
          print(f"Force full matrix: {force_full}")
 | 
			
		||||
          
 | 
			
		||||
          # Check if this is targeting a main branch
 | 
			
		||||
          # For PRs: check base_ref (target branch)
 | 
			
		||||
          # For pushes: check ref (current branch)
 | 
			
		||||
          main_branches = ["refs/heads/dev", "refs/heads/release", "refs/heads/candidate"]
 | 
			
		||||
          
 | 
			
		||||
          if force_full:
 | 
			
		||||
              # Override: always use full matrix if tag is present
 | 
			
		||||
              use_full = True
 | 
			
		||||
          elif event_name == "pull_request":
 | 
			
		||||
              # For PRs, base_ref is just the branch name (e.g., "dev", not "refs/heads/dev")
 | 
			
		||||
              # Check if the PR targets release or candidate (more critical branches)
 | 
			
		||||
              use_full = base_ref in ["release", "candidate"]
 | 
			
		||||
          else:
 | 
			
		||||
              # For pushes, ref is the full reference (e.g., "refs/heads/dev")
 | 
			
		||||
              use_full = ref in main_branches
 | 
			
		||||
          
 | 
			
		||||
          # Select the appropriate matrix
 | 
			
		||||
          if use_full:
 | 
			
		||||
              if force_full:
 | 
			
		||||
                  print(f"Using FULL matrix (6 configs) - forced by [ci-nix-full-matrix] tag")
 | 
			
		||||
              else:
 | 
			
		||||
                  print(f"Using FULL matrix (6 configs) - targeting main branch")
 | 
			
		||||
              matrix = full_matrix
 | 
			
		||||
          else:
 | 
			
		||||
              print(f"Using MINIMAL matrix (2 configs) - feature branch/PR")
 | 
			
		||||
              matrix = minimal_matrix
 | 
			
		||||
          
 | 
			
		||||
          # Output the matrix as JSON
 | 
			
		||||
          output = json.dumps({"include": matrix})
 | 
			
		||||
          with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
 | 
			
		||||
              f.write(f"matrix={output}\n")
 | 
			
		||||
 | 
			
		||||
  build:
 | 
			
		||||
    needs: matrix-setup
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    outputs:
 | 
			
		||||
      artifact_name: ${{ steps.set-artifact-name.outputs.artifact_name }}
 | 
			
		||||
    strategy:
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
      matrix: ${{ fromJSON(needs.matrix-setup.outputs.matrix) }}
 | 
			
		||||
    env:
 | 
			
		||||
      build_dir: .build
 | 
			
		||||
      # Bump this number to invalidate all caches globally.
 | 
			
		||||
      CACHE_VERSION: 2
 | 
			
		||||
      MAIN_BRANCH_NAME: dev
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
      - name: Install build dependencies
 | 
			
		||||
        run: |
 | 
			
		||||
          sudo apt-get update
 | 
			
		||||
          sudo apt-get install -y ninja-build ${{ matrix.cc }} ${{ matrix.cxx }} ccache
 | 
			
		||||
 | 
			
		||||
          # Install the specific GCC version needed for Clang
 | 
			
		||||
          if [ -n "${{ matrix.clang_gcc_toolchain }}" ]; then
 | 
			
		||||
            echo "=== Installing GCC ${{ matrix.clang_gcc_toolchain }} for Clang ==="
 | 
			
		||||
            sudo apt-get install -y gcc-${{ matrix.clang_gcc_toolchain }} g++-${{ matrix.clang_gcc_toolchain }} libstdc++-${{ matrix.clang_gcc_toolchain }}-dev
 | 
			
		||||
 | 
			
		||||
            echo "=== GCC versions available after installation ==="
 | 
			
		||||
            ls -la /usr/lib/gcc/x86_64-linux-gnu/ | grep -E "^d"
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
          # For Clang < 16 with --gcc-toolchain, hide newer GCC versions
 | 
			
		||||
          # This is needed because --gcc-toolchain still picks the highest version
 | 
			
		||||
          #
 | 
			
		||||
          # THE GREAT GCC HIDING TRICK (for Clang < 16):
 | 
			
		||||
          # Clang versions before 16 don't have --gcc-install-dir, only --gcc-toolchain
 | 
			
		||||
          # which is deprecated and still uses discovery heuristics that ALWAYS pick
 | 
			
		||||
          # the highest version number. So we play a sneaky game...
 | 
			
		||||
          #
 | 
			
		||||
          # We rename newer GCC versions to very low integers (1, 2, 3...) which makes
 | 
			
		||||
          # Clang think they're ancient GCC versions. Since 11 > 3 > 2 > 1, Clang will
 | 
			
		||||
          # pick GCC 11 over our renamed versions. It's dumb but it works!
 | 
			
		||||
          #
 | 
			
		||||
          # Example: GCC 12→1, GCC 13→2, GCC 14→3, so Clang picks 11 (highest number)
 | 
			
		||||
          if [ -n "${{ matrix.clang_gcc_toolchain }}" ] && [ "${{ matrix.compiler_version }}" -lt "16" ]; then
 | 
			
		||||
            echo "=== Hiding GCC versions newer than ${{ matrix.clang_gcc_toolchain }} for Clang < 16 ==="
 | 
			
		||||
            target_version=${{ matrix.clang_gcc_toolchain }}
 | 
			
		||||
            counter=1  # Start with 1 - these will be seen as "GCC version 1, 2, 3" etc
 | 
			
		||||
            for dir in /usr/lib/gcc/x86_64-linux-gnu/*/; do
 | 
			
		||||
              if [ -d "$dir" ]; then
 | 
			
		||||
                version=$(basename "$dir")
 | 
			
		||||
                # Check if version is numeric and greater than target
 | 
			
		||||
                if [[ "$version" =~ ^[0-9]+$ ]] && [ "$version" -gt "$target_version" ]; then
 | 
			
		||||
                  echo "Hiding GCC $version -> renaming to $counter (will be seen as GCC version $counter)"
 | 
			
		||||
                  # Safety check: ensure target doesn't already exist
 | 
			
		||||
                  if [ ! -e "/usr/lib/gcc/x86_64-linux-gnu/$counter" ]; then
 | 
			
		||||
                    sudo mv "$dir" "/usr/lib/gcc/x86_64-linux-gnu/$counter"
 | 
			
		||||
                  else
 | 
			
		||||
                    echo "ERROR: Cannot rename GCC $version - /usr/lib/gcc/x86_64-linux-gnu/$counter already exists"
 | 
			
		||||
                    exit 1
 | 
			
		||||
                  fi
 | 
			
		||||
                  counter=$((counter + 1))
 | 
			
		||||
                fi
 | 
			
		||||
              fi
 | 
			
		||||
            done
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
          # Verify what Clang will use
 | 
			
		||||
          if [ -n "${{ matrix.clang_gcc_toolchain }}" ]; then
 | 
			
		||||
            echo "=== Verifying GCC toolchain selection ==="
 | 
			
		||||
            echo "Available GCC versions:"
 | 
			
		||||
            ls -la /usr/lib/gcc/x86_64-linux-gnu/ | grep -E "^d.*[0-9]+$" || true
 | 
			
		||||
 | 
			
		||||
            echo ""
 | 
			
		||||
            echo "Clang's detected GCC installation:"
 | 
			
		||||
            ${{ matrix.cxx }} -v -E -x c++ /dev/null -o /dev/null 2>&1 | grep "Found candidate GCC installation" || true
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
          # Install libc++ dev packages if using libc++ (not needed for libstdc++)
 | 
			
		||||
          if [ "${{ matrix.stdlib }}" = "libcxx" ]; then
 | 
			
		||||
            sudo apt-get install -y libc++-${{ matrix.compiler_version }}-dev libc++abi-${{ matrix.compiler_version }}-dev
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
          # Install Conan 2
 | 
			
		||||
          pip install --upgrade "conan>=2.0,<3"
 | 
			
		||||
 | 
			
		||||
      - name: Configure ccache
 | 
			
		||||
        uses: ./.github/actions/xahau-configure-ccache
 | 
			
		||||
        with:
 | 
			
		||||
          max_size: 2G
 | 
			
		||||
          hash_dir: true
 | 
			
		||||
          compiler_check: content
 | 
			
		||||
          is_main_branch: ${{ github.ref_name == env.MAIN_BRANCH_NAME }}
 | 
			
		||||
 | 
			
		||||
      - name: Configure Conan
 | 
			
		||||
        run: |
 | 
			
		||||
          # Create the default profile directory if it doesn't exist
 | 
			
		||||
          mkdir -p ~/.conan2/profiles
 | 
			
		||||
 | 
			
		||||
          # Determine the correct libcxx based on stdlib parameter
 | 
			
		||||
          if [ "${{ matrix.stdlib }}" = "libcxx" ]; then
 | 
			
		||||
            LIBCXX="libc++"
 | 
			
		||||
          else
 | 
			
		||||
            LIBCXX="libstdc++11"
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
          # Create profile with our specific settings
 | 
			
		||||
          cat > ~/.conan2/profiles/default <<EOF
 | 
			
		||||
          [settings]
 | 
			
		||||
          arch=x86_64
 | 
			
		||||
          build_type=${{ matrix.configuration }}
 | 
			
		||||
          compiler=${{ matrix.compiler }}
 | 
			
		||||
          compiler.cppstd=20
 | 
			
		||||
          compiler.libcxx=${LIBCXX}
 | 
			
		||||
          compiler.version=${{ matrix.compiler_version }}
 | 
			
		||||
          os=Linux
 | 
			
		||||
 | 
			
		||||
          [buildenv]
 | 
			
		||||
          CC=/usr/bin/${{ matrix.cc }}
 | 
			
		||||
          CXX=/usr/bin/${{ matrix.cxx }}
 | 
			
		||||
 | 
			
		||||
          [conf]
 | 
			
		||||
          tools.build:compiler_executables={"c": "/usr/bin/${{ matrix.cc }}", "cpp": "/usr/bin/${{ matrix.cxx }}"}
 | 
			
		||||
          EOF
 | 
			
		||||
 | 
			
		||||
          # Display profile for verification
 | 
			
		||||
          conan profile show
 | 
			
		||||
 | 
			
		||||
      - name: Check environment
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "PATH:"
 | 
			
		||||
          echo "${PATH}" | tr ':' '\n'
 | 
			
		||||
          which conan && conan --version || echo "Conan not found"
 | 
			
		||||
          which cmake && cmake --version || echo "CMake not found"
 | 
			
		||||
          which ${{ matrix.cc }} && ${{ matrix.cc }} --version || echo "${{ matrix.cc }} not found"
 | 
			
		||||
          which ${{ matrix.cxx }} && ${{ matrix.cxx }} --version || echo "${{ matrix.cxx }} not found"
 | 
			
		||||
          which ccache && ccache --version || echo "ccache not found"
 | 
			
		||||
          echo "---- Full Environment ----"
 | 
			
		||||
          env
 | 
			
		||||
 | 
			
		||||
      - name: Install dependencies
 | 
			
		||||
        uses: ./.github/actions/xahau-ga-dependencies
 | 
			
		||||
        with:
 | 
			
		||||
          configuration: ${{ matrix.configuration }}
 | 
			
		||||
          build_dir: ${{ env.build_dir }}
 | 
			
		||||
          compiler-id: ${{ matrix.compiler_id }}
 | 
			
		||||
          cache_version: ${{ env.CACHE_VERSION }}
 | 
			
		||||
          main_branch: ${{ env.MAIN_BRANCH_NAME }}
 | 
			
		||||
          stdlib: ${{ matrix.stdlib }}
 | 
			
		||||
 | 
			
		||||
      - name: Build
 | 
			
		||||
        uses: ./.github/actions/xahau-ga-build
 | 
			
		||||
        with:
 | 
			
		||||
          generator: Ninja
 | 
			
		||||
          configuration: ${{ matrix.configuration }}
 | 
			
		||||
          build_dir: ${{ env.build_dir }}
 | 
			
		||||
          cc: ${{ matrix.cc }}
 | 
			
		||||
          cxx: ${{ matrix.cxx }}
 | 
			
		||||
          compiler-id: ${{ matrix.compiler_id }}
 | 
			
		||||
          cache_version: ${{ env.CACHE_VERSION }}
 | 
			
		||||
          main_branch: ${{ env.MAIN_BRANCH_NAME }}
 | 
			
		||||
          stdlib: ${{ matrix.stdlib }}
 | 
			
		||||
          clang_gcc_toolchain: ${{ matrix.clang_gcc_toolchain || '' }}
 | 
			
		||||
 | 
			
		||||
      - name: Set artifact name
 | 
			
		||||
        id: set-artifact-name
 | 
			
		||||
        run: |
 | 
			
		||||
          ARTIFACT_NAME="build-output-nix-${{ github.run_id }}-${{ matrix.compiler }}-${{ matrix.configuration }}"
 | 
			
		||||
          echo "artifact_name=${ARTIFACT_NAME}" >> "$GITHUB_OUTPUT"
 | 
			
		||||
          echo "Using artifact name: ${ARTIFACT_NAME}"
 | 
			
		||||
 | 
			
		||||
      - name: Debug build directory
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "Checking build directory contents: ${{ env.build_dir }}"
 | 
			
		||||
          ls -la ${{ env.build_dir }} || echo "Build directory not found or empty"
 | 
			
		||||
 | 
			
		||||
      - name: Run tests
 | 
			
		||||
        run: |
 | 
			
		||||
          # Ensure the binary exists before trying to run
 | 
			
		||||
          if [ -f "${{ env.build_dir }}/rippled" ]; then
 | 
			
		||||
            ${{ env.build_dir }}/rippled --unittest --unittest-jobs $(nproc)
 | 
			
		||||
          else
 | 
			
		||||
             echo "Error: rippled executable not found in ${{ env.build_dir }}"
 | 
			
		||||
             exit 1
 | 
			
		||||
          fi
 | 
			
		||||
							
								
								
									
										10
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -24,6 +24,11 @@ bin/project-cache.jam
 | 
			
		||||
 | 
			
		||||
build/docker
 | 
			
		||||
 | 
			
		||||
# Ignore release builder files
 | 
			
		||||
.env
 | 
			
		||||
release-build
 | 
			
		||||
cmake-*.tar.gz
 | 
			
		||||
 | 
			
		||||
# Ignore object files.
 | 
			
		||||
*.o
 | 
			
		||||
build
 | 
			
		||||
@@ -111,3 +116,8 @@ compile_commands.json
 | 
			
		||||
.clangd
 | 
			
		||||
packages
 | 
			
		||||
pkg_out
 | 
			
		||||
pkg
 | 
			
		||||
CMakeUserPresets.json
 | 
			
		||||
bld.rippled/
 | 
			
		||||
 | 
			
		||||
generated
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										169
									
								
								.gitlab-ci.yml
									
									
									
									
									
								
							
							
						
						
									
										169
									
								
								.gitlab-ci.yml
									
									
									
									
									
								
							@@ -1,169 +0,0 @@
 | 
			
		||||
# I don't know what the minimum size is, but we cannot build on t3.micro.
 | 
			
		||||
 | 
			
		||||
# TODO: Factor common builds between different tests.
 | 
			
		||||
 | 
			
		||||
# The parameters for our job matrix:
 | 
			
		||||
#
 | 
			
		||||
# 1. Generator (Make, Ninja, MSBuild)
 | 
			
		||||
# 2. Compiler (GCC, Clang, MSVC)
 | 
			
		||||
# 3. Build type (Debug, Release)
 | 
			
		||||
# 4. Definitions (-Dunity=OFF, -Dassert=ON, ...)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.job_linux_build_test:
 | 
			
		||||
  only:
 | 
			
		||||
    variables:
 | 
			
		||||
      - $CI_PROJECT_URL =~ /^https?:\/\/gitlab.com\//
 | 
			
		||||
  stage: build
 | 
			
		||||
  tags:
 | 
			
		||||
    - linux
 | 
			
		||||
    - c5.2xlarge
 | 
			
		||||
  image: thejohnfreeman/rippled-build-ubuntu:4b73694e07f0
 | 
			
		||||
  script:
 | 
			
		||||
    - bin/ci/build.sh
 | 
			
		||||
    - bin/ci/test.sh
 | 
			
		||||
  cache:
 | 
			
		||||
    # Use a different key for each unique combination of (generator, compiler,
 | 
			
		||||
    # build type). Caches are stored as `.zip` files; they are not merged.
 | 
			
		||||
    # Generate a new key whenever you want to bust the cache, e.g. when the
 | 
			
		||||
    # dependency versions have been bumped.
 | 
			
		||||
    # By default, jobs pull the cache. Only a few specially chosen jobs update
 | 
			
		||||
    # the cache (with policy `pull-push`); one for each unique combination of
 | 
			
		||||
    # (generator, compiler, build type).
 | 
			
		||||
    policy: pull
 | 
			
		||||
    paths:
 | 
			
		||||
      - .nih_c/
 | 
			
		||||
 | 
			
		||||
'build+test Make GCC Debug':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Unix Makefiles
 | 
			
		||||
    COMPILER: gcc
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 62ada41c-fc9e-4949-9533-736d4d6512b6
 | 
			
		||||
    policy: pull-push
 | 
			
		||||
 | 
			
		||||
'build+test Ninja GCC Debug':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: gcc
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 1665d3eb-6233-4eef-9f57-172636899faa
 | 
			
		||||
    policy: pull-push
 | 
			
		||||
 | 
			
		||||
'build+test Ninja GCC Debug -Dstatic=OFF':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: gcc
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
    CMAKE_ARGS: '-Dstatic=OFF'
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 1665d3eb-6233-4eef-9f57-172636899faa
 | 
			
		||||
 | 
			
		||||
'build+test Ninja GCC Debug -Dstatic=OFF -DBUILD_SHARED_LIBS=ON':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: gcc
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
    CMAKE_ARGS: '-Dstatic=OFF -DBUILD_SHARED_LIBS=ON'
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 1665d3eb-6233-4eef-9f57-172636899faa
 | 
			
		||||
 | 
			
		||||
'build+test Ninja GCC Debug -Dunity=OFF':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: gcc
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
    CMAKE_ARGS: '-Dunity=OFF'
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 1665d3eb-6233-4eef-9f57-172636899faa
 | 
			
		||||
 | 
			
		||||
'build+test Ninja GCC Release -Dassert=ON':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: gcc
 | 
			
		||||
    BUILD_TYPE: Release
 | 
			
		||||
    CMAKE_ARGS: '-Dassert=ON'
 | 
			
		||||
  cache:
 | 
			
		||||
    key: c45ec125-9625-4c19-acf7-4e889d5f90bd
 | 
			
		||||
    policy: pull-push
 | 
			
		||||
 | 
			
		||||
'build+test(manual) Ninja GCC Release -Dassert=ON':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: gcc
 | 
			
		||||
    BUILD_TYPE: Release
 | 
			
		||||
    CMAKE_ARGS: '-Dassert=ON'
 | 
			
		||||
    MANUAL_TEST: 'true'
 | 
			
		||||
  cache:
 | 
			
		||||
    key: c45ec125-9625-4c19-acf7-4e889d5f90bd
 | 
			
		||||
 | 
			
		||||
'build+test Make clang Debug':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Unix Makefiles
 | 
			
		||||
    COMPILER: clang
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
  cache:
 | 
			
		||||
    key: bf578dc2-5277-4580-8de5-6b9523118b19
 | 
			
		||||
    policy: pull-push
 | 
			
		||||
 | 
			
		||||
'build+test Ninja clang Debug':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: clang
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 762514c5-3d4c-4c7c-8da2-2df9d8839cbe
 | 
			
		||||
    policy: pull-push
 | 
			
		||||
 | 
			
		||||
'build+test Ninja clang Debug -Dunity=OFF':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: clang
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
    CMAKE_ARGS: '-Dunity=OFF'
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 762514c5-3d4c-4c7c-8da2-2df9d8839cbe
 | 
			
		||||
 | 
			
		||||
'build+test Ninja clang Debug -Dunity=OFF -Dsan=address':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: clang
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
    CMAKE_ARGS: '-Dunity=OFF -Dsan=address'
 | 
			
		||||
    CONCURRENT_TESTS: 1
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 762514c5-3d4c-4c7c-8da2-2df9d8839cbe
 | 
			
		||||
 | 
			
		||||
'build+test Ninja clang Debug -Dunity=OFF -Dsan=undefined':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: clang
 | 
			
		||||
    BUILD_TYPE: Debug
 | 
			
		||||
    CMAKE_ARGS: '-Dunity=OFF -Dsan=undefined'
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 762514c5-3d4c-4c7c-8da2-2df9d8839cbe
 | 
			
		||||
 | 
			
		||||
'build+test Ninja clang Release -Dassert=ON':
 | 
			
		||||
  extends: .job_linux_build_test
 | 
			
		||||
  variables:
 | 
			
		||||
    GENERATOR: Ninja
 | 
			
		||||
    COMPILER: clang
 | 
			
		||||
    BUILD_TYPE: Release
 | 
			
		||||
    CMAKE_ARGS: '-Dassert=ON'
 | 
			
		||||
  cache:
 | 
			
		||||
    key: 7751be37-2358-4f08-b1d0-7e72e0ad266d
 | 
			
		||||
    policy: pull-push
 | 
			
		||||
							
								
								
									
										6
									
								
								.pre-commit-config.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.pre-commit-config.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
# .pre-commit-config.yaml
 | 
			
		||||
repos:
 | 
			
		||||
- repo: https://github.com/pre-commit/mirrors-clang-format
 | 
			
		||||
  rev: v10.0.1
 | 
			
		||||
  hooks:
 | 
			
		||||
  - id: clang-format
 | 
			
		||||
							
								
								
									
										460
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										460
									
								
								.travis.yml
									
									
									
									
									
								
							@@ -1,460 +0,0 @@
 | 
			
		||||
# There is a known issue where Travis will have trouble fetching the cache,
 | 
			
		||||
# particularly on non-linux builds. Try restarting the individual build
 | 
			
		||||
# (probably will not be necessary in the "windep" stages) if the end of the
 | 
			
		||||
# log looks like:
 | 
			
		||||
#
 | 
			
		||||
#---------------------------------------
 | 
			
		||||
# attempting to download cache archive
 | 
			
		||||
# fetching travisorder/cache--windows-1809-containers-f2bf1c76c7fb4095c897a4999bd7c9b3fb830414dfe91f33d665443b52416d39--compiler-gpp.tgz
 | 
			
		||||
# found cache
 | 
			
		||||
# adding C:/Users/travis/_cache to cache
 | 
			
		||||
# creating directory C:/Users/travis/_cache
 | 
			
		||||
# No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
 | 
			
		||||
# Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
 | 
			
		||||
# The build has been terminated
 | 
			
		||||
#---------------------------------------
 | 
			
		||||
 | 
			
		||||
language: cpp
 | 
			
		||||
dist: bionic
 | 
			
		||||
 | 
			
		||||
services:
 | 
			
		||||
  - docker
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
  - windep-vcpkg
 | 
			
		||||
  - windep-boost
 | 
			
		||||
  - build
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  global:
 | 
			
		||||
    - DOCKER_IMAGE="rippleci/rippled-ci-builder:2020-01-08"
 | 
			
		||||
    - CMAKE_EXTRA_ARGS="-Dwerr=ON -Dwextra=ON"
 | 
			
		||||
    - NINJA_BUILD=true
 | 
			
		||||
    # change this if we get more VM capacity
 | 
			
		||||
    - MAX_TIME_MIN=80
 | 
			
		||||
    - CACHE_DIR=${TRAVIS_HOME}/_cache
 | 
			
		||||
    - NIH_CACHE_ROOT=${CACHE_DIR}/nih_c
 | 
			
		||||
    - PARALLEL_TESTS=true
 | 
			
		||||
    # this is NOT used by linux container based builds (which already have boost installed)
 | 
			
		||||
    - BOOST_URL='https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz'
 | 
			
		||||
    # Alternate dowload location
 | 
			
		||||
    - BOOST_URL2='https://downloads.sourceforge.net/project/boost/boost/1.75.0/boost_1_75_0.tar.bz2?r=&ts=1594393912&use_mirror=newcontinuum'
 | 
			
		||||
    # Travis downloader doesn't seem to have updated certs. Using this option
 | 
			
		||||
    # introduces obvious security risks, but they're Travis's risks.
 | 
			
		||||
    # Note that this option is only used if the "normal" build fails.
 | 
			
		||||
    - BOOST_WGET_OPTIONS='--no-check-certificate'
 | 
			
		||||
    - VCPKG_DIR=${CACHE_DIR}/vcpkg
 | 
			
		||||
    - USE_CCACHE=true
 | 
			
		||||
    - CCACHE_BASEDIR=${TRAVIS_HOME}"
 | 
			
		||||
    - CCACHE_NOHASHDIR=true
 | 
			
		||||
    - CCACHE_DIR=${CACHE_DIR}/ccache
 | 
			
		||||
 | 
			
		||||
before_install:
 | 
			
		||||
  - export NUM_PROCESSORS=$(nproc)
 | 
			
		||||
  - echo "NUM PROC is ${NUM_PROCESSORS}"
 | 
			
		||||
  - if [ "$(uname)" = "Linux" ] ; then docker pull ${DOCKER_IMAGE}; fi
 | 
			
		||||
  - if [ "${MATRIX_EVAL}" != "" ] ; then eval "${MATRIX_EVAL}"; fi
 | 
			
		||||
  - if [ "${CMAKE_ADD}" != "" ] ; then export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} ${CMAKE_ADD}"; fi
 | 
			
		||||
  - bin/ci/ubuntu/travis-cache-start.sh
 | 
			
		||||
 | 
			
		||||
matrix:
 | 
			
		||||
  fast_finish: true
 | 
			
		||||
  allow_failures:
 | 
			
		||||
    # TODO these need more investigation
 | 
			
		||||
    #
 | 
			
		||||
    # there are a number of UBs caught currently that need triage
 | 
			
		||||
    - name: ubsan, clang-8
 | 
			
		||||
    # this one often runs out of memory:
 | 
			
		||||
    - name: manual tests, gcc-8, release
 | 
			
		||||
    # The Windows build may fail if any of the dependencies fail, but
 | 
			
		||||
    # allow the rest of the builds to continue. They may succeed if the
 | 
			
		||||
    # dependency is already cached. These do not need to be retried if
 | 
			
		||||
    # _any_ of the Windows builds succeed.
 | 
			
		||||
    - stage: windep-vcpkg
 | 
			
		||||
    - stage: windep-boost
 | 
			
		||||
 | 
			
		||||
  # https://docs.travis-ci.com/user/build-config-yaml#usage-of-yaml-anchors-and-aliases
 | 
			
		||||
  include:
 | 
			
		||||
    # debug builds
 | 
			
		||||
    - &linux
 | 
			
		||||
      stage: build
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: gcc-8, debug
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
      script:
 | 
			
		||||
        - sudo chmod -R a+rw ${CACHE_DIR}
 | 
			
		||||
        - ccache -s
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} bin/ci/ubuntu/build-in-docker.sh
 | 
			
		||||
        - ccache -s
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      compiler: clang-8
 | 
			
		||||
      name: clang-8, debug
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      compiler: clang-8
 | 
			
		||||
      name: reporting, clang-8, debug
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dreporting=ON"
 | 
			
		||||
    # coverage builds
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_cov/
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: coverage, gcc-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dcoverage=ON"
 | 
			
		||||
        - TARGET=coverage_report
 | 
			
		||||
        - SKIP_TESTS=true
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_cov/
 | 
			
		||||
      compiler: clang-8
 | 
			
		||||
      name: coverage, clang-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dcoverage=ON"
 | 
			
		||||
        - TARGET=coverage_report
 | 
			
		||||
        - SKIP_TESTS=true
 | 
			
		||||
    # test-free builds
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: no-tests-unity, gcc-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dtests=OFF"
 | 
			
		||||
        - SKIP_TESTS=true
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/
 | 
			
		||||
      compiler: clang-8
 | 
			
		||||
      name: no-tests-non-unity, clang-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dtests=OFF -Dunity=OFF"
 | 
			
		||||
        - SKIP_TESTS=true
 | 
			
		||||
    # nounity
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_nounity/
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: non-unity, gcc-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dunity=OFF"
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_nounity/
 | 
			
		||||
      compiler: clang-8
 | 
			
		||||
      name: non-unity, clang-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dunity=OFF"
 | 
			
		||||
    # manual tests
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_man/
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: manual tests, gcc-8, debug
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - MANUAL_TESTS=true
 | 
			
		||||
    # manual tests
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_man/
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: manual tests, gcc-8, release
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Release
 | 
			
		||||
        - CMAKE_ADD="-Dassert=ON -Dunity=OFF"
 | 
			
		||||
        - MANUAL_TESTS=true
 | 
			
		||||
    # release builds
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_release/
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: gcc-8, release
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Release
 | 
			
		||||
        - CMAKE_ADD="-Dassert=ON -Dunity=OFF"
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_release/
 | 
			
		||||
      compiler: clang-8
 | 
			
		||||
      name: clang-8, release
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
 | 
			
		||||
        - BUILD_TYPE=Release
 | 
			
		||||
        - CMAKE_ADD="-Dassert=ON"
 | 
			
		||||
    # asan
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_san/
 | 
			
		||||
      compiler: clang-8
 | 
			
		||||
      name: asan, clang-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
 | 
			
		||||
        - BUILD_TYPE=Release
 | 
			
		||||
        - CMAKE_ADD="-Dsan=address"
 | 
			
		||||
        - ASAN_OPTIONS="print_stats=true:atexit=true"
 | 
			
		||||
        #- LSAN_OPTIONS="verbosity=1:log_threads=1"
 | 
			
		||||
        - PARALLEL_TESTS=false
 | 
			
		||||
    # ubsan
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_san/
 | 
			
		||||
      compiler: clang-8
 | 
			
		||||
      name: ubsan, clang-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
 | 
			
		||||
        - BUILD_TYPE=Release
 | 
			
		||||
        - CMAKE_ADD="-Dsan=undefined"
 | 
			
		||||
        # once we can run clean under ubsan, add halt_on_error=1 to options below
 | 
			
		||||
        - UBSAN_OPTIONS="print_stacktrace=1:report_error_type=1"
 | 
			
		||||
        - PARALLEL_TESTS=false
 | 
			
		||||
    # tsan
 | 
			
		||||
    # current tsan failure *might* be related to:
 | 
			
		||||
    # https://github.com/google/sanitizers/issues/1104
 | 
			
		||||
    #  but we can't get it to run, so leave it disabled for now
 | 
			
		||||
    #    - <<: *linux
 | 
			
		||||
    #      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_san/
 | 
			
		||||
    #      compiler: clang-8
 | 
			
		||||
    #      name: tsan, clang-8
 | 
			
		||||
    #      env:
 | 
			
		||||
    #        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
 | 
			
		||||
    #        - BUILD_TYPE=Release
 | 
			
		||||
    #        - CMAKE_ADD="-Dsan=thread"
 | 
			
		||||
    #        - TSAN_OPTIONS="history_size=3 external_symbolizer_path=/usr/bin/llvm-symbolizer verbosity=1"
 | 
			
		||||
    #        - PARALLEL_TESTS=false
 | 
			
		||||
    # dynamic lib builds
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: non-static, gcc-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dstatic=OFF"
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: non-static + BUILD_SHARED_LIBS, gcc-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dstatic=OFF -DBUILD_SHARED_LIBS=ON"
 | 
			
		||||
    # makefile
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: makefile generator, gcc-8
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - NINJA_BUILD=false
 | 
			
		||||
    # misc alternative compilers
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      compiler: gcc-9
 | 
			
		||||
      name: gcc-9
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      compiler: clang-9
 | 
			
		||||
      name: clang-9, debug
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-9 && CXX=clang++-9"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      compiler: clang-9
 | 
			
		||||
      name: clang-9, release
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=clang-9 && CXX=clang++-9"
 | 
			
		||||
        - BUILD_TYPE=Release
 | 
			
		||||
    # verify build with min version of cmake
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: min cmake version
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_EXE=/opt/local/cmake/bin/cmake
 | 
			
		||||
        - SKIP_TESTS=true
 | 
			
		||||
    # validator keys project as subproj of rippled
 | 
			
		||||
    - <<: *linux
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_vkeys/
 | 
			
		||||
      compiler: gcc-8
 | 
			
		||||
      name: validator-keys
 | 
			
		||||
      env:
 | 
			
		||||
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
 | 
			
		||||
        - BUILD_TYPE=Debug
 | 
			
		||||
        - CMAKE_ADD="-Dvalidator_keys=ON"
 | 
			
		||||
        - TARGET=validator-keys
 | 
			
		||||
    # macos
 | 
			
		||||
    - &macos
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_mac/
 | 
			
		||||
      stage: build
 | 
			
		||||
      os: osx
 | 
			
		||||
      osx_image: xcode13.1
 | 
			
		||||
      name: xcode13.1, debug
 | 
			
		||||
      env:
 | 
			
		||||
        # put NIH in non-cache location since it seems to
 | 
			
		||||
        # cause failures when homebrew updates
 | 
			
		||||
        - NIH_CACHE_ROOT=${TRAVIS_BUILD_DIR}/nih_c
 | 
			
		||||
        - BLD_CONFIG=Debug
 | 
			
		||||
        - TEST_EXTRA_ARGS=""
 | 
			
		||||
        - BOOST_ROOT=${CACHE_DIR}/boost_1_75_0
 | 
			
		||||
        - >-
 | 
			
		||||
          CMAKE_ADD="
 | 
			
		||||
          -DBOOST_ROOT=${BOOST_ROOT}/_INSTALLED_
 | 
			
		||||
          -DBoost_ARCHITECTURE=-x64
 | 
			
		||||
          -DBoost_NO_SYSTEM_PATHS=ON
 | 
			
		||||
          -DCMAKE_VERBOSE_MAKEFILE=ON"
 | 
			
		||||
      addons:
 | 
			
		||||
        homebrew:
 | 
			
		||||
          packages:
 | 
			
		||||
            - protobuf
 | 
			
		||||
            - grpc
 | 
			
		||||
            - pkg-config
 | 
			
		||||
            - bash
 | 
			
		||||
            - ninja
 | 
			
		||||
            - cmake
 | 
			
		||||
            - wget
 | 
			
		||||
            - zstd
 | 
			
		||||
            - libarchive
 | 
			
		||||
            - openssl@1.1
 | 
			
		||||
          update: true
 | 
			
		||||
      install:
 | 
			
		||||
        - export OPENSSL_ROOT=$(brew --prefix openssl@1.1)
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} Builds/containers/shared/install_boost.sh
 | 
			
		||||
        - brew uninstall --ignore-dependencies boost
 | 
			
		||||
      script:
 | 
			
		||||
        - mkdir -p build.macos && cd build.macos
 | 
			
		||||
        - cmake -G Ninja ${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=${BLD_CONFIG} ..
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} cmake --build . --parallel --verbose
 | 
			
		||||
        - ./rippled --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS} ${TEST_EXTRA_ARGS}
 | 
			
		||||
    - <<: *macos
 | 
			
		||||
      name: xcode13.1, release
 | 
			
		||||
      before_script:
 | 
			
		||||
        - export BLD_CONFIG=Release
 | 
			
		||||
        - export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -Dassert=ON"
 | 
			
		||||
    - <<: *macos
 | 
			
		||||
      name: ipv6 (macos)
 | 
			
		||||
      before_script:
 | 
			
		||||
        - export TEST_EXTRA_ARGS="--unittest-ipv6"
 | 
			
		||||
    - <<: *macos
 | 
			
		||||
      osx_image: xcode13.1
 | 
			
		||||
      name: xcode13.1, debug
 | 
			
		||||
    # windows
 | 
			
		||||
    - &windows
 | 
			
		||||
      if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_win/
 | 
			
		||||
      os: windows
 | 
			
		||||
      env:
 | 
			
		||||
        # put NIH in a non-cached location until
 | 
			
		||||
        # we come up with a way to stabilize that
 | 
			
		||||
        # cache on windows (minimize incremental changes)
 | 
			
		||||
        - CACHE_NAME=win_01
 | 
			
		||||
        - NIH_CACHE_ROOT=${TRAVIS_BUILD_DIR}/nih_c
 | 
			
		||||
        - VCPKG_DEFAULT_TRIPLET="x64-windows-static"
 | 
			
		||||
        - MATRIX_EVAL="CC=cl.exe && CXX=cl.exe"
 | 
			
		||||
        - BOOST_ROOT=${CACHE_DIR}/boost_1_75
 | 
			
		||||
        - >-
 | 
			
		||||
          CMAKE_ADD="
 | 
			
		||||
          -DCMAKE_PREFIX_PATH=${BOOST_ROOT}/_INSTALLED_
 | 
			
		||||
          -DBOOST_ROOT=${BOOST_ROOT}/_INSTALLED_
 | 
			
		||||
          -DBoost_ROOT=${BOOST_ROOT}/_INSTALLED_
 | 
			
		||||
          -DBoost_DIR=${BOOST_ROOT}/_INSTALLED_/lib/cmake/Boost-1.75.0
 | 
			
		||||
          -DBoost_COMPILER=vc141
 | 
			
		||||
          -DCMAKE_VERBOSE_MAKEFILE=ON
 | 
			
		||||
          -DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake
 | 
			
		||||
          -DVCPKG_TARGET_TRIPLET=x64-windows-static"
 | 
			
		||||
      stage: windep-vcpkg
 | 
			
		||||
      name: prereq-vcpkg
 | 
			
		||||
      install:
 | 
			
		||||
        - choco upgrade cmake.install
 | 
			
		||||
        - choco install ninja visualstudio2017-workload-vctools -y
 | 
			
		||||
      script:
 | 
			
		||||
        - df -h
 | 
			
		||||
        - env
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh openssl
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh grpc
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh libarchive[lz4]
 | 
			
		||||
        # TBD consider rocksdb via vcpkg if/when we can build with the
 | 
			
		||||
        # vcpkg version
 | 
			
		||||
        # - travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh rocksdb[snappy,lz4,zlib]
 | 
			
		||||
    - <<: *windows
 | 
			
		||||
      stage: windep-boost
 | 
			
		||||
      name: prereq-keep-boost
 | 
			
		||||
      install:
 | 
			
		||||
        - choco upgrade cmake.install
 | 
			
		||||
        - choco install ninja visualstudio2017-workload-vctools -y
 | 
			
		||||
        - choco install visualstudio2019buildtools visualstudio2019community visualstudio2019-workload-vctools -y
 | 
			
		||||
      script:
 | 
			
		||||
        - export BOOST_TOOLSET=msvc-14.1
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} Builds/containers/shared/install_boost.sh
 | 
			
		||||
    - &windows-bld
 | 
			
		||||
      <<: *windows
 | 
			
		||||
      stage: build
 | 
			
		||||
      name: windows, debug
 | 
			
		||||
      before_script:
 | 
			
		||||
        - export BLD_CONFIG=Debug
 | 
			
		||||
      script:
 | 
			
		||||
        - df -h
 | 
			
		||||
        - . ./bin/sh/setup-msvc.sh
 | 
			
		||||
        - mkdir -p build.ms && cd build.ms
 | 
			
		||||
        - cmake -G Ninja ${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=${BLD_CONFIG} ..
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} cmake --build . --parallel --verbose
 | 
			
		||||
        # override num procs to force fewer unit test jobs
 | 
			
		||||
        - export NUM_PROCESSORS=2
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} ./rippled.exe --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS}
 | 
			
		||||
    - <<: *windows-bld
 | 
			
		||||
      name: windows, release
 | 
			
		||||
      before_script:
 | 
			
		||||
        - export BLD_CONFIG=Release
 | 
			
		||||
    - <<: *windows-bld
 | 
			
		||||
      name: windows, visual studio, debug
 | 
			
		||||
      script:
 | 
			
		||||
        - mkdir -p build.ms && cd build.ms
 | 
			
		||||
        - export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_GENERATOR_TOOLSET=host=x64"
 | 
			
		||||
        - cmake -G "Visual Studio 15 2017 Win64" ${CMAKE_EXTRA_ARGS} ..
 | 
			
		||||
        - export DESTDIR=${PWD}/_installed_
 | 
			
		||||
        - travis_wait ${MAX_TIME_MIN} cmake --build . --parallel --verbose --config ${BLD_CONFIG} --target install
 | 
			
		||||
        # override num procs to force fewer unit test jobs
 | 
			
		||||
        - export NUM_PROCESSORS=2
 | 
			
		||||
        - >-
 | 
			
		||||
          travis_wait ${MAX_TIME_MIN} "./_installed_/Program Files/rippled/bin/rippled.exe" --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS}
 | 
			
		||||
    - <<: *windows-bld
 | 
			
		||||
      name: windows, vc2019
 | 
			
		||||
      install:
 | 
			
		||||
        - choco upgrade cmake.install
 | 
			
		||||
        - choco install ninja -y
 | 
			
		||||
        - choco install visualstudio2019buildtools visualstudio2019community visualstudio2019-workload-vctools -y
 | 
			
		||||
      before_script:
 | 
			
		||||
        - export BLD_CONFIG=Release
 | 
			
		||||
        # we want to use the boost build from cache, which was built using the
 | 
			
		||||
        # vs2017 compiler so we need to specify the Boost_COMPILER. BUT, we
 | 
			
		||||
        # can't use the cmake config files generated by boost b/c they are
 | 
			
		||||
        # broken for Boost_COMPILER override, so we need to specify both
 | 
			
		||||
        # Boost_NO_BOOST_CMAKE and a slightly different Boost_COMPILER string
 | 
			
		||||
        # to make the legacy find module work for us. If the cmake configs are
 | 
			
		||||
        # fixed in the future, it should be possible to remove these
 | 
			
		||||
        # workarounds.
 | 
			
		||||
        - export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DBoost_NO_BOOST_CMAKE=ON -DBoost_COMPILER=-vc141"
 | 
			
		||||
 | 
			
		||||
before_cache:
 | 
			
		||||
  - if [ $(uname) = "Linux" ] ; then SUDO="sudo"; else SUDO=""; fi
 | 
			
		||||
  - cd ${TRAVIS_HOME}
 | 
			
		||||
  - if [ -f cache_ignore.tar ] ; then $SUDO tar xvf cache_ignore.tar; fi
 | 
			
		||||
  - cd ${TRAVIS_BUILD_DIR}
 | 
			
		||||
 | 
			
		||||
cache:
 | 
			
		||||
  timeout: 900
 | 
			
		||||
  directories:
 | 
			
		||||
    - $CACHE_DIR
 | 
			
		||||
 | 
			
		||||
notifications:
 | 
			
		||||
  email: false
 | 
			
		||||
							
								
								
									
										13
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
{
 | 
			
		||||
  "C_Cpp.formatting": "clangFormat",
 | 
			
		||||
  "C_Cpp.clang_format_path": ".clang-format",
 | 
			
		||||
  "C_Cpp.clang_format_fallbackStyle": "{ ColumnLimit: 0 }",
 | 
			
		||||
  "[cpp]":{
 | 
			
		||||
    "editor.wordBasedSuggestions": "off",
 | 
			
		||||
    "editor.suggest.insertMode": "replace",
 | 
			
		||||
    "editor.semanticHighlighting.enabled": true,
 | 
			
		||||
    "editor.tabSize": 4,
 | 
			
		||||
    "editor.defaultFormatter": "xaver.clang-format",
 | 
			
		||||
    "editor.formatOnSave": true
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										468
									
								
								BUILD.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										468
									
								
								BUILD.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,468 @@
 | 
			
		||||
> 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 [our guide](./docs/build/environment.md).
 | 
			
		||||
>
 | 
			
		||||
> These instructions also assume a basic familiarity with Conan and CMake.
 | 
			
		||||
> If you are unfamiliar with Conan,
 | 
			
		||||
> you can read our [crash course](./docs/build/conan.md)
 | 
			
		||||
> or the official [Getting Started][3] walkthrough.
 | 
			
		||||
 | 
			
		||||
## Branches
 | 
			
		||||
 | 
			
		||||
For a stable release, choose the `master` branch or one of the [tagged
 | 
			
		||||
releases](https://github.com/ripple/rippled/releases).
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git checkout master
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
For the latest release candidate, choose the `release` branch.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git checkout release
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
For the latest set of untested features, or to contribute, choose the `develop`
 | 
			
		||||
branch.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git checkout develop
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Minimum Requirements
 | 
			
		||||
 | 
			
		||||
- [Python 3.7](https://www.python.org/downloads/)
 | 
			
		||||
- [Conan 2.x](https://conan.io/downloads)
 | 
			
		||||
- [CMake 3.16](https://cmake.org/download/)
 | 
			
		||||
 | 
			
		||||
`rippled` is written in the C++20 dialect and includes the `<concepts>` header.
 | 
			
		||||
The [minimum compiler versions][2] required are:
 | 
			
		||||
 | 
			
		||||
| Compiler    | Version |
 | 
			
		||||
|-------------|---------|
 | 
			
		||||
| GCC         | 10      |
 | 
			
		||||
| Clang       | 13      |
 | 
			
		||||
| Apple Clang | 13.1.6  |
 | 
			
		||||
| MSVC        | 19.23   |
 | 
			
		||||
 | 
			
		||||
We don't recommend Windows for `rippled` production at this time. As of
 | 
			
		||||
January 2023, Ubuntu has the highest level of quality assurance, testing,
 | 
			
		||||
and support.
 | 
			
		||||
 | 
			
		||||
Windows developers should use Visual Studio 2019. `rippled` isn't
 | 
			
		||||
compatible with [Boost](https://www.boost.org/) 1.78 or 1.79, and Conan
 | 
			
		||||
can't build earlier Boost versions.
 | 
			
		||||
 | 
			
		||||
**Note:** 32-bit Windows development isn't supported.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Steps
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Set Up Conan
 | 
			
		||||
 | 
			
		||||
1. (Optional) If you've never used Conan, use autodetect to set up a default profile.
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   conan profile detect --force
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
2. Update the compiler settings.
 | 
			
		||||
 | 
			
		||||
   For Conan 2, you can edit the profile directly at `~/.conan2/profiles/default`,
 | 
			
		||||
   or use the Conan CLI. Ensure C++20 is set:
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   conan profile show
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   Look for `compiler.cppstd=20` in the output. If it's not set, edit the profile:
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   # Edit ~/.conan2/profiles/default and ensure these settings exist:
 | 
			
		||||
   [settings]
 | 
			
		||||
   compiler.cppstd=20
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   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.
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   # In ~/.conan2/profiles/default, ensure:
 | 
			
		||||
   [settings]
 | 
			
		||||
   compiler.libcxx=libstdc++11
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   On Windows, you should 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
 | 
			
		||||
   architecture.
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   # In ~/.conan2/profiles/default, ensure:
 | 
			
		||||
   [settings]
 | 
			
		||||
   arch=x86_64
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
3. (Optional) If you have multiple compilers installed on your platform,
 | 
			
		||||
   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.
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   # In ~/.conan2/profiles/default, add under [conf] section:
 | 
			
		||||
   [conf]
 | 
			
		||||
   tools.build:compiler_executables={"c": "<path>", "cpp": "<path>"}
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   For setting environment variables for dependencies:
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   # In ~/.conan2/profiles/default, add under [buildenv] section:
 | 
			
		||||
   [buildenv]
 | 
			
		||||
   CC=<path>
 | 
			
		||||
   CXX=<path>
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
4. Export our [Conan recipe for Snappy](./external/snappy).
 | 
			
		||||
   It doesn't explicitly link the C++ standard library,
 | 
			
		||||
   which allows you to statically link it with GCC, if you want.
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   conan export external/snappy --version 1.1.10 --user xahaud --channel stable
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
5. Export our [Conan recipe for SOCI](./external/soci).
 | 
			
		||||
   It patches their CMake to correctly import its dependencies.
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   conan export external/soci --version 4.0.3 --user xahaud --channel stable
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
6. Export our [Conan recipe for WasmEdge](./external/wasmedge).
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   conan export external/wasmedge --version 0.11.2 --user xahaud --channel stable
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
### Build and Test
 | 
			
		||||
 | 
			
		||||
1. Create a build directory and move into it.
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   mkdir .build
 | 
			
		||||
   cd .build
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   You can use any directory name. Conan treats your working directory as an
 | 
			
		||||
   install folder and generates files with implementation details.
 | 
			
		||||
   You don't need to worry about these files, but make sure to change
 | 
			
		||||
   your working directory to your build directory before calling Conan.
 | 
			
		||||
 | 
			
		||||
   **Note:** You can specify a directory for the installation files by adding
 | 
			
		||||
   the `install-folder` or `-if` option to every `conan install` command
 | 
			
		||||
   in the next step.
 | 
			
		||||
 | 
			
		||||
2. 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=Debug
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
    For a single-configuration generator, e.g. `Unix Makefiles` or `Ninja`,
 | 
			
		||||
    you only need to run this command once.
 | 
			
		||||
    For a multi-configuration generator, e.g. `Visual Studio`, you may want to
 | 
			
		||||
    run it more than once.
 | 
			
		||||
 | 
			
		||||
    Each of these commands should also have a different `build_type` setting.
 | 
			
		||||
    A second command with the same `build_type` setting will overwrite the files
 | 
			
		||||
    generated by the first. You can pass the build type on the command line with
 | 
			
		||||
    `--settings build_type=$BUILD_TYPE` or in the profile itself,
 | 
			
		||||
    under the section `[settings]` with the key `build_type`.
 | 
			
		||||
    
 | 
			
		||||
    If you are using a Microsoft Visual C++ compiler,
 | 
			
		||||
    then you will need to ensure consistency between the `build_type` setting
 | 
			
		||||
    and the `compiler.runtime` setting.
 | 
			
		||||
    
 | 
			
		||||
    When `build_type` is `Release`, `compiler.runtime` should be `MT`.
 | 
			
		||||
    
 | 
			
		||||
    When `build_type` is `Debug`, `compiler.runtime` should be `MTd`.
 | 
			
		||||
 | 
			
		||||
    ```
 | 
			
		||||
    conan install .. --output-folder . --build missing --settings build_type=Release --settings compiler.runtime=MT
 | 
			
		||||
    conan install .. --output-folder . --build missing --settings build_type=Debug --settings compiler.runtime=MTd
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
3. Configure CMake and pass the toolchain file generated by Conan, located at
 | 
			
		||||
   `$OUTPUT_FOLDER/build/generators/conan_toolchain.cmake`.
 | 
			
		||||
 | 
			
		||||
    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]
 | 
			
		||||
    and make sure it matches the `build_type` setting you chose in the previous
 | 
			
		||||
    step.
 | 
			
		||||
 | 
			
		||||
    Multi-config gnerators:
 | 
			
		||||
 | 
			
		||||
    ```
 | 
			
		||||
    cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake ..
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
    **Note:** You can pass build options for `rippled` in this step.
 | 
			
		||||
 | 
			
		||||
4. Build `rippled`.
 | 
			
		||||
 | 
			
		||||
   For a single-configuration generator, it will build whatever configuration
 | 
			
		||||
   you passed for `CMAKE_BUILD_TYPE`. For a multi-configuration generator,
 | 
			
		||||
   you must pass the option `--config` to select the build configuration. 
 | 
			
		||||
 | 
			
		||||
   Single-config generators:
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   cmake --build .
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   Multi-config generators:
 | 
			
		||||
    
 | 
			
		||||
   ```
 | 
			
		||||
   cmake --build . --config Release
 | 
			
		||||
   cmake --build . --config Debug
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
5. Test rippled.
 | 
			
		||||
 | 
			
		||||
   Single-config generators:
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   ./rippled --unittest
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   Multi-config generators:
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   ./Release/rippled --unittest
 | 
			
		||||
   ./Debug/rippled --unittest
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   The location of `rippled` in your build directory depends on your CMake
 | 
			
		||||
   generator. Pass `--help` to see the rest of the command line options.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Options
 | 
			
		||||
 | 
			
		||||
| Option | Default Value | Description |
 | 
			
		||||
| --- | ---| ---|
 | 
			
		||||
| `assert` | OFF | Enable assertions.
 | 
			
		||||
| `reporting` | OFF | Build the reporting mode feature. |
 | 
			
		||||
| `tests` | ON | Build tests. |
 | 
			
		||||
| `unity` | ON | Configure a unity build. |
 | 
			
		||||
| `san` | N/A | Enable a sanitizer with Clang. Choices are `thread` and `address`. |
 | 
			
		||||
 | 
			
		||||
[Unity builds][5] may be faster for the first build
 | 
			
		||||
(at the cost of much more memory) since they concatenate sources into fewer
 | 
			
		||||
translation units. Non-unity builds may be faster for incremental builds,
 | 
			
		||||
and can be helpful for detecting `#include` omissions.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Troubleshooting
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Conan
 | 
			
		||||
 | 
			
		||||
If you have trouble building dependencies after changing Conan settings,
 | 
			
		||||
try removing the Conan cache.
 | 
			
		||||
 | 
			
		||||
For Conan 2:
 | 
			
		||||
```
 | 
			
		||||
rm -rf ~/.conan2/p
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Or clear the entire Conan 2 cache:
 | 
			
		||||
```
 | 
			
		||||
conan cache clean "*"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### macOS compilation with Apple Clang 17+
 | 
			
		||||
 | 
			
		||||
If you're on macOS with Apple Clang 17 or newer, you need to add a compiler flag to work around a compilation error in gRPC dependencies.
 | 
			
		||||
 | 
			
		||||
Edit `~/.conan2/profiles/default` and add under the `[conf]` section:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
[conf]
 | 
			
		||||
tools.build:cxxflags=["-Wno-missing-template-arg-list-after-template-kw"]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### recompile with -fPIC
 | 
			
		||||
 | 
			
		||||
If you get a linker error suggesting that you recompile Boost with
 | 
			
		||||
position-independent code, such as:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
/usr/bin/ld.gold: error: /home/username/.conan/data/boost/1.77.0/_/_/package/.../lib/libboost_container.a(alloc_lib.o):
 | 
			
		||||
  requires unsupported dynamic reloc 11; recompile with -fPIC
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Conan most likely downloaded a bad binary distribution of the dependency.
 | 
			
		||||
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`.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
/usr/bin/ld.gold: error: /home/username/.conan/data/boost/1.77.0/_/_/package/dc8aedd23a0f0a773a5fcdcfe1ae3e89c4205978/lib/libboost_container.a(alloc_lib.o): requires unsupported dynamic reloc 11; recompile with -fPIC
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Add a Dependency
 | 
			
		||||
 | 
			
		||||
If you want to experiment with a new package, follow these steps:
 | 
			
		||||
 | 
			
		||||
1. Search for the package on [Conan Center](https://conan.io/center/).
 | 
			
		||||
2. Modify [`conanfile.py`](./conanfile.py):
 | 
			
		||||
    - Add a version of the package to the `requires` property.
 | 
			
		||||
    - Change any default options for the package by adding them to the
 | 
			
		||||
    `default_options` property (with syntax `'$package:$option': $value`).
 | 
			
		||||
3. Modify [`CMakeLists.txt`](./CMakeLists.txt):
 | 
			
		||||
    - Add a call to `find_package($package REQUIRED)`.
 | 
			
		||||
    - Link a library from the package to the target `ripple_libs`
 | 
			
		||||
    (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.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## A crash course in CMake and Conan
 | 
			
		||||
 | 
			
		||||
To better understand how to use Conan,
 | 
			
		||||
we should first understand _why_ we use Conan,
 | 
			
		||||
and to understand that,
 | 
			
		||||
we need to understand how we use CMake.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### CMake
 | 
			
		||||
 | 
			
		||||
Technically, you don't need CMake to build this project.
 | 
			
		||||
You could manually compile every translation unit into an object file,
 | 
			
		||||
using the right compiler options,
 | 
			
		||||
and then manually link all those objects together,
 | 
			
		||||
using the right linker options.
 | 
			
		||||
However, that is very tedious and error-prone,
 | 
			
		||||
which is why we lean on tools like CMake.
 | 
			
		||||
 | 
			
		||||
We have written CMake configuration files
 | 
			
		||||
([`CMakeLists.txt`](./CMakeLists.txt) and friends)
 | 
			
		||||
for this project so that CMake can be used to correctly compile and link
 | 
			
		||||
all of the translation units in it.
 | 
			
		||||
Or rather, CMake will generate files for a separate build system
 | 
			
		||||
(e.g. Make, Ninja, Visual Studio, Xcode, etc.)
 | 
			
		||||
that compile and link all of the translation units.
 | 
			
		||||
Even then, CMake has parameters, some of which are platform-specific.
 | 
			
		||||
In CMake's parlance, parameters are specially-named **variables** like
 | 
			
		||||
[`CMAKE_BUILD_TYPE`][build_type] or
 | 
			
		||||
[`CMAKE_MSVC_RUNTIME_LIBRARY`][runtime].
 | 
			
		||||
Parameters include:
 | 
			
		||||
 | 
			
		||||
- what build system to generate files for
 | 
			
		||||
- where to find the compiler and linker
 | 
			
		||||
- where to find dependencies, e.g. libraries and headers
 | 
			
		||||
- how to link dependencies, e.g. any special compiler or linker flags that
 | 
			
		||||
    need to be used with them, including preprocessor definitions
 | 
			
		||||
- how to compile translation units, e.g. with optimizations, debug symbols,
 | 
			
		||||
    position-independent code, etc.
 | 
			
		||||
- on Windows, which runtime library to link with
 | 
			
		||||
 | 
			
		||||
For some of these parameters, like the build system and compiler,
 | 
			
		||||
CMake goes through a complicated search process to choose default values.
 | 
			
		||||
For others, like the dependencies,
 | 
			
		||||
_we_ had written in the CMake configuration files of this project
 | 
			
		||||
our own complicated process to choose defaults.
 | 
			
		||||
For most developers, things "just worked"... until they didn't, and then
 | 
			
		||||
you were left trying to debug one of these complicated processes, instead of
 | 
			
		||||
choosing and manually passing the parameter values yourself.
 | 
			
		||||
 | 
			
		||||
You can pass every parameter to CMake on the command line,
 | 
			
		||||
but writing out these parameters every time we want to configure CMake is
 | 
			
		||||
a pain.
 | 
			
		||||
Most humans prefer to put them into a configuration file, once, that
 | 
			
		||||
CMake can read every time it is configured.
 | 
			
		||||
For CMake, that file is a [toolchain file][toolchain].
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Conan
 | 
			
		||||
 | 
			
		||||
These next few paragraphs on Conan are going to read much like the ones above
 | 
			
		||||
for CMake.
 | 
			
		||||
 | 
			
		||||
Technically, you don't need Conan to build this project.
 | 
			
		||||
You could manually download, configure, build, and install all of the
 | 
			
		||||
dependencies yourself, and then pass all of the parameters necessary for
 | 
			
		||||
CMake to link to those dependencies.
 | 
			
		||||
To guarantee ABI compatibility, you must be sure to use the same set of
 | 
			
		||||
compiler and linker options for all dependencies _and_ this project.
 | 
			
		||||
However, that is very tedious and error-prone, which is why we lean on tools
 | 
			
		||||
like Conan.
 | 
			
		||||
 | 
			
		||||
We have written a Conan configuration file ([`conanfile.py`](./conanfile.py))
 | 
			
		||||
so that Conan can be used to correctly download, configure, build, and install
 | 
			
		||||
all of the dependencies for this project,
 | 
			
		||||
using a single set of compiler and linker options for all of them.
 | 
			
		||||
It generates files that contain almost all of the parameters that CMake
 | 
			
		||||
expects.
 | 
			
		||||
Those files include:
 | 
			
		||||
 | 
			
		||||
- A single toolchain file.
 | 
			
		||||
- For every dependency, a CMake [package configuration file][pcf],
 | 
			
		||||
    [package version file][pvf], and for every build type, a package
 | 
			
		||||
    targets file.
 | 
			
		||||
    Together, these files implement version checking and define `IMPORTED`
 | 
			
		||||
    targets for the dependencies.
 | 
			
		||||
 | 
			
		||||
The toolchain file itself amends the search path
 | 
			
		||||
([`CMAKE_PREFIX_PATH`][prefix_path]) so that [`find_package()`][find_package]
 | 
			
		||||
will [discover][search] the generated package configuration files.
 | 
			
		||||
 | 
			
		||||
**Nearly all we must do to properly configure CMake is pass the toolchain
 | 
			
		||||
file.**
 | 
			
		||||
What CMake parameters are left out?
 | 
			
		||||
You'll still need to pick a build system generator,
 | 
			
		||||
and if you choose a single-configuration generator,
 | 
			
		||||
you'll need to pass the `CMAKE_BUILD_TYPE`,
 | 
			
		||||
which should match the `build_type` setting you gave to Conan.
 | 
			
		||||
 | 
			
		||||
Even then, Conan has parameters, some of which are platform-specific.
 | 
			
		||||
In Conan's parlance, parameters are either settings or options.
 | 
			
		||||
**Settings** are shared by all packages, e.g. the build type.
 | 
			
		||||
**Options** are specific to a given package, e.g. whether to build and link
 | 
			
		||||
OpenSSL as a shared library.
 | 
			
		||||
 | 
			
		||||
For settings, Conan goes through a complicated search process to choose
 | 
			
		||||
defaults.
 | 
			
		||||
For options, each package recipe defines its own defaults.
 | 
			
		||||
 | 
			
		||||
You can pass every parameter to Conan on the command line,
 | 
			
		||||
but it is more convenient to put them in a [profile][profile].
 | 
			
		||||
**All we must do to properly configure Conan is edit and pass the profile.**
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[1]: https://github.com/conan-io/conan-center-index/issues/13168
 | 
			
		||||
[5]: https://en.wikipedia.org/wiki/Unity_build
 | 
			
		||||
[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
 | 
			
		||||
 | 
			
		||||
@@ -124,7 +124,10 @@ else ()
 | 
			
		||||
      #   * 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++>)
 | 
			
		||||
      $<$<AND:$<BOOL:${static}>,$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:
 | 
			
		||||
      -static-libstdc++
 | 
			
		||||
      -static-libgcc
 | 
			
		||||
      >)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
if (use_gold AND is_gcc)
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,20 @@ if (unity)
 | 
			
		||||
  set_target_properties(xrpl_core PROPERTIES UNITY_BUILD ON)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
# Try to find the ACL library
 | 
			
		||||
find_library(ACL_LIBRARY NAMES acl)
 | 
			
		||||
 | 
			
		||||
# Check if ACL was found
 | 
			
		||||
if(ACL_LIBRARY)
 | 
			
		||||
  message(STATUS "Found ACL: ${ACL_LIBRARY}")
 | 
			
		||||
else()
 | 
			
		||||
  message(STATUS "ACL not found, continuing without ACL support")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
add_library(libxrpl INTERFACE)
 | 
			
		||||
target_link_libraries(libxrpl INTERFACE xrpl_core)
 | 
			
		||||
add_library(xrpl::libxrpl ALIAS libxrpl)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#[===============================[
 | 
			
		||||
    beast/legacy FILES:
 | 
			
		||||
@@ -36,6 +50,12 @@ target_sources (xrpl_core PRIVATE
 | 
			
		||||
  src/ripple/beast/utility/src/beast_Journal.cpp
 | 
			
		||||
  src/ripple/beast/utility/src/beast_PropertyStream.cpp)
 | 
			
		||||
 | 
			
		||||
# Conditionally add enhanced logging source when BEAST_ENHANCED_LOGGING is enabled
 | 
			
		||||
if(DEFINED BEAST_ENHANCED_LOGGING AND BEAST_ENHANCED_LOGGING)
 | 
			
		||||
  target_sources(xrpl_core PRIVATE
 | 
			
		||||
    src/ripple/beast/utility/src/beast_EnhancedLogging.cpp)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
#[===============================[
 | 
			
		||||
    core sources
 | 
			
		||||
#]===============================]
 | 
			
		||||
@@ -50,6 +70,7 @@ target_sources (xrpl_core PRIVATE
 | 
			
		||||
  src/ripple/basics/impl/FileUtilities.cpp
 | 
			
		||||
  src/ripple/basics/impl/IOUAmount.cpp
 | 
			
		||||
  src/ripple/basics/impl/Log.cpp
 | 
			
		||||
  src/ripple/basics/impl/Number.cpp
 | 
			
		||||
  src/ripple/basics/impl/StringUtilities.cpp
 | 
			
		||||
  #[===============================[
 | 
			
		||||
    main sources:
 | 
			
		||||
@@ -134,12 +155,19 @@ target_link_libraries (xrpl_core
 | 
			
		||||
  PUBLIC
 | 
			
		||||
    OpenSSL::Crypto
 | 
			
		||||
    Ripple::boost
 | 
			
		||||
    NIH::WasmEdge
 | 
			
		||||
    wasmedge::wasmedge
 | 
			
		||||
    Ripple::syslibs
 | 
			
		||||
    NIH::secp256k1
 | 
			
		||||
    NIH::ed25519-donna
 | 
			
		||||
    secp256k1::secp256k1
 | 
			
		||||
    ed25519::ed25519
 | 
			
		||||
    date::date
 | 
			
		||||
    Ripple::opts)
 | 
			
		||||
 | 
			
		||||
# Link date-tz library when enhanced logging is enabled
 | 
			
		||||
if(DEFINED BEAST_ENHANCED_LOGGING AND BEAST_ENHANCED_LOGGING)
 | 
			
		||||
  if(TARGET date::date-tz)
 | 
			
		||||
    target_link_libraries(xrpl_core PUBLIC date::date-tz)
 | 
			
		||||
  endif()
 | 
			
		||||
endif()
 | 
			
		||||
#[=================================[
 | 
			
		||||
   main/core headers installation
 | 
			
		||||
#]=================================]
 | 
			
		||||
@@ -154,6 +182,7 @@ install (
 | 
			
		||||
    src/ripple/basics/LocalValue.h
 | 
			
		||||
    src/ripple/basics/Log.h
 | 
			
		||||
    src/ripple/basics/MathUtilities.h
 | 
			
		||||
    src/ripple/basics/Number.h
 | 
			
		||||
    src/ripple/basics/safe_cast.h
 | 
			
		||||
    src/ripple/basics/Slice.h
 | 
			
		||||
    src/ripple/basics/spinlock.h
 | 
			
		||||
@@ -381,6 +410,7 @@ target_sources (rippled PRIVATE
 | 
			
		||||
  src/ripple/app/misc/NegativeUNLVote.cpp
 | 
			
		||||
  src/ripple/app/misc/NetworkOPs.cpp
 | 
			
		||||
  src/ripple/app/misc/SHAMapStoreImp.cpp
 | 
			
		||||
  src/ripple/app/misc/StateAccounting.cpp
 | 
			
		||||
  src/ripple/app/misc/detail/impl/WorkSSL.cpp
 | 
			
		||||
  src/ripple/app/misc/impl/AccountTxPaging.cpp
 | 
			
		||||
  src/ripple/app/misc/impl/AmendmentTable.cpp
 | 
			
		||||
@@ -422,13 +452,20 @@ target_sources (rippled PRIVATE
 | 
			
		||||
  src/ripple/app/tx/impl/CancelOffer.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/CashCheck.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Change.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/ClaimReward.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Clawback.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/CreateCheck.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/CreateOffer.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/CreateTicket.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Cron.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/CronSet.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/DeleteAccount.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/DepositPreauth.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Escrow.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/GenesisMint.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Import.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/InvariantCheck.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Invoke.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/NFTokenAcceptOffer.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/NFTokenBurn.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/NFTokenCancelOffer.cpp
 | 
			
		||||
@@ -437,16 +474,17 @@ target_sources (rippled PRIVATE
 | 
			
		||||
  src/ripple/app/tx/impl/OfferStream.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/PayChan.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Payment.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Remit.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/SetAccount.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/SetRegularKey.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/SetHook.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/ClaimReward.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Invoke.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/SetRemarks.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/SetRegularKey.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/SetSignerList.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/SetTrust.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/SignerEntries.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Taker.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/Transactor.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/URIToken.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/apply.cpp
 | 
			
		||||
  src/ripple/app/tx/impl/applySteps.cpp
 | 
			
		||||
  src/ripple/app/hook/impl/applyHook.cpp
 | 
			
		||||
@@ -523,6 +561,7 @@ target_sources (rippled PRIVATE
 | 
			
		||||
       subdir: nodestore
 | 
			
		||||
  #]===============================]
 | 
			
		||||
  src/ripple/nodestore/backend/CassandraFactory.cpp
 | 
			
		||||
  src/ripple/nodestore/backend/RWDBFactory.cpp
 | 
			
		||||
  src/ripple/nodestore/backend/MemoryFactory.cpp
 | 
			
		||||
  src/ripple/nodestore/backend/NuDBFactory.cpp
 | 
			
		||||
  src/ripple/nodestore/backend/NullFactory.cpp
 | 
			
		||||
@@ -535,7 +574,6 @@ target_sources (rippled PRIVATE
 | 
			
		||||
  src/ripple/nodestore/impl/DeterministicShard.cpp
 | 
			
		||||
  src/ripple/nodestore/impl/DecodedBlob.cpp
 | 
			
		||||
  src/ripple/nodestore/impl/DummyScheduler.cpp
 | 
			
		||||
  src/ripple/nodestore/impl/EncodedBlob.cpp
 | 
			
		||||
  src/ripple/nodestore/impl/ManagerImp.cpp
 | 
			
		||||
  src/ripple/nodestore/impl/NodeObject.cpp
 | 
			
		||||
  src/ripple/nodestore/impl/Shard.cpp
 | 
			
		||||
@@ -589,6 +627,7 @@ target_sources (rippled PRIVATE
 | 
			
		||||
  src/ripple/rpc/handlers/BlackList.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/BookOffers.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/CanDelete.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/Catalogue.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/Connect.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/ConsensusInfo.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/CrawlShards.cpp
 | 
			
		||||
@@ -624,6 +663,7 @@ target_sources (rippled PRIVATE
 | 
			
		||||
  src/ripple/rpc/handlers/Random.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/Reservations.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/RipplePathFind.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/ServerDefinitions.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/ServerInfo.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/ServerState.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/SignFor.cpp
 | 
			
		||||
@@ -643,9 +683,9 @@ target_sources (rippled PRIVATE
 | 
			
		||||
  src/ripple/rpc/handlers/ValidatorListSites.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/Validators.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/WalletPropose.cpp
 | 
			
		||||
  src/ripple/rpc/handlers/Catalogue.cpp
 | 
			
		||||
  src/ripple/rpc/impl/DeliveredAmount.cpp
 | 
			
		||||
  src/ripple/rpc/impl/Handler.cpp
 | 
			
		||||
  src/ripple/rpc/impl/GRPCHelpers.cpp
 | 
			
		||||
  src/ripple/rpc/impl/LegacyPathFind.cpp
 | 
			
		||||
  src/ripple/rpc/impl/RPCHandler.cpp
 | 
			
		||||
  src/ripple/rpc/impl/RPCHelpers.cpp
 | 
			
		||||
@@ -655,6 +695,9 @@ target_sources (rippled PRIVATE
 | 
			
		||||
  src/ripple/rpc/impl/ShardVerificationScheduler.cpp
 | 
			
		||||
  src/ripple/rpc/impl/Status.cpp
 | 
			
		||||
  src/ripple/rpc/impl/TransactionSign.cpp
 | 
			
		||||
  src/ripple/rpc/impl/NFTokenID.cpp
 | 
			
		||||
  src/ripple/rpc/impl/NFTokenOfferID.cpp
 | 
			
		||||
  src/ripple/rpc/impl/NFTSyntheticSerializer.cpp
 | 
			
		||||
  #[===============================[
 | 
			
		||||
     main sources:
 | 
			
		||||
       subdir: perflog
 | 
			
		||||
@@ -690,7 +733,11 @@ if (tests)
 | 
			
		||||
    src/test/app/AccountDelete_test.cpp
 | 
			
		||||
    src/test/app/AccountTxPaging_test.cpp
 | 
			
		||||
    src/test/app/AmendmentTable_test.cpp
 | 
			
		||||
    src/test/app/BaseFee_test.cpp
 | 
			
		||||
    src/test/app/Check_test.cpp
 | 
			
		||||
    src/test/app/ClaimReward_test.cpp
 | 
			
		||||
    src/test/app/Cron_test.cpp
 | 
			
		||||
    src/test/app/Clawback_test.cpp
 | 
			
		||||
    src/test/app/CrossingLimits_test.cpp
 | 
			
		||||
    src/test/app/DeliverMin_test.cpp
 | 
			
		||||
    src/test/app/DepositAuth_test.cpp
 | 
			
		||||
@@ -700,9 +747,13 @@ if (tests)
 | 
			
		||||
    src/test/app/FeeVote_test.cpp
 | 
			
		||||
    src/test/app/Flow_test.cpp
 | 
			
		||||
    src/test/app/Freeze_test.cpp
 | 
			
		||||
    src/test/app/GenesisMint_test.cpp
 | 
			
		||||
    src/test/app/HashRouter_test.cpp
 | 
			
		||||
    src/test/app/Import_test.cpp
 | 
			
		||||
    src/test/app/Invoke_test.cpp
 | 
			
		||||
    src/test/app/LedgerHistory_test.cpp
 | 
			
		||||
    src/test/app/LedgerLoad_test.cpp
 | 
			
		||||
    src/test/app/LedgerMaster_test.cpp
 | 
			
		||||
    src/test/app/LedgerReplay_test.cpp
 | 
			
		||||
    src/test/app/LoadFeeTrack_test.cpp
 | 
			
		||||
    src/test/app/Manifest_test.cpp
 | 
			
		||||
@@ -717,24 +768,32 @@ if (tests)
 | 
			
		||||
    src/test/app/Path_test.cpp
 | 
			
		||||
    src/test/app/PayChan_test.cpp
 | 
			
		||||
    src/test/app/PayStrand_test.cpp
 | 
			
		||||
    src/test/app/PreviousTxn_test.cpp
 | 
			
		||||
    src/test/app/PseudoTx_test.cpp
 | 
			
		||||
    src/test/app/RCLCensorshipDetector_test.cpp
 | 
			
		||||
    src/test/app/RCLValidations_test.cpp
 | 
			
		||||
    src/test/app/Regression_test.cpp
 | 
			
		||||
    src/test/app/Remit_test.cpp
 | 
			
		||||
    src/test/app/SHAMapStore_test.cpp
 | 
			
		||||
    src/test/app/SetAuth_test.cpp
 | 
			
		||||
    src/test/app/SetHook_test.cpp
 | 
			
		||||
    src/test/app/SetHookTSH_test.cpp
 | 
			
		||||
    src/test/app/SetRegularKey_test.cpp
 | 
			
		||||
    src/test/app/SetRemarks_test.cpp
 | 
			
		||||
    src/test/app/SetTrust_test.cpp
 | 
			
		||||
    src/test/app/Taker_test.cpp
 | 
			
		||||
    src/test/app/TheoreticalQuality_test.cpp
 | 
			
		||||
    src/test/app/Ticket_test.cpp
 | 
			
		||||
    src/test/app/Touch_test.cpp
 | 
			
		||||
    src/test/app/Transaction_ordering_test.cpp
 | 
			
		||||
    src/test/app/TrustAndBalance_test.cpp
 | 
			
		||||
    src/test/app/TxQ_test.cpp
 | 
			
		||||
    src/test/app/URIToken_test.cpp
 | 
			
		||||
    src/test/app/ValidatorKeys_test.cpp
 | 
			
		||||
    src/test/app/ValidatorList_test.cpp
 | 
			
		||||
    src/test/app/ValidatorSite_test.cpp
 | 
			
		||||
    src/test/app/SetHook_test.cpp
 | 
			
		||||
    src/test/app/Wildcard_test.cpp
 | 
			
		||||
    src/test/app/XahauGenesis_test.cpp
 | 
			
		||||
    src/test/app/tx/apply_test.cpp
 | 
			
		||||
    #[===============================[
 | 
			
		||||
       test sources:
 | 
			
		||||
@@ -746,6 +805,7 @@ if (tests)
 | 
			
		||||
    src/test/basics/FileUtilities_test.cpp
 | 
			
		||||
    src/test/basics/IOUAmount_test.cpp
 | 
			
		||||
    src/test/basics/KeyCache_test.cpp
 | 
			
		||||
    src/test/basics/Number_test.cpp
 | 
			
		||||
    src/test/basics/PerfLog_test.cpp
 | 
			
		||||
    src/test/basics/RangeSet_test.cpp
 | 
			
		||||
    src/test/basics/scope_test.cpp
 | 
			
		||||
@@ -793,6 +853,7 @@ if (tests)
 | 
			
		||||
    src/test/consensus/LedgerTrie_test.cpp
 | 
			
		||||
    src/test/consensus/NegativeUNL_test.cpp
 | 
			
		||||
    src/test/consensus/ScaleFreeSim_test.cpp
 | 
			
		||||
    src/test/consensus/UNLReport_test.cpp
 | 
			
		||||
    src/test/consensus/Validations_test.cpp
 | 
			
		||||
    #[===============================[
 | 
			
		||||
       test sources:
 | 
			
		||||
@@ -840,31 +901,44 @@ if (tests)
 | 
			
		||||
    src/test/jtx/impl/amount.cpp
 | 
			
		||||
    src/test/jtx/impl/balance.cpp
 | 
			
		||||
    src/test/jtx/impl/check.cpp
 | 
			
		||||
    src/test/jtx/impl/cron.cpp
 | 
			
		||||
    src/test/jtx/impl/delivermin.cpp
 | 
			
		||||
    src/test/jtx/impl/deposit.cpp
 | 
			
		||||
    src/test/jtx/impl/envconfig.cpp
 | 
			
		||||
    src/test/jtx/impl/escrow.cpp
 | 
			
		||||
    src/test/jtx/impl/fee.cpp
 | 
			
		||||
    src/test/jtx/impl/flags.cpp
 | 
			
		||||
    src/test/jtx/impl/genesis.cpp
 | 
			
		||||
    src/test/jtx/impl/import.cpp
 | 
			
		||||
    src/test/jtx/impl/invoice_id.cpp
 | 
			
		||||
    src/test/jtx/impl/invoke.cpp
 | 
			
		||||
    src/test/jtx/impl/jtx_json.cpp
 | 
			
		||||
    src/test/jtx/impl/last_ledger_sequence.cpp
 | 
			
		||||
    src/test/jtx/impl/memo.cpp
 | 
			
		||||
    src/test/jtx/impl/multisign.cpp
 | 
			
		||||
    src/test/jtx/impl/network.cpp
 | 
			
		||||
    src/test/jtx/impl/offer.cpp
 | 
			
		||||
    src/test/jtx/impl/owners.cpp
 | 
			
		||||
    src/test/jtx/impl/paths.cpp
 | 
			
		||||
    src/test/jtx/impl/pay.cpp
 | 
			
		||||
    src/test/jtx/impl/paychan.cpp
 | 
			
		||||
    src/test/jtx/impl/quality2.cpp
 | 
			
		||||
    src/test/jtx/impl/rate.cpp
 | 
			
		||||
    src/test/jtx/impl/regkey.cpp
 | 
			
		||||
    src/test/jtx/impl/reward.cpp
 | 
			
		||||
    src/test/jtx/impl/remarks.cpp
 | 
			
		||||
    src/test/jtx/impl/remit.cpp
 | 
			
		||||
    src/test/jtx/impl/sendmax.cpp
 | 
			
		||||
    src/test/jtx/impl/seq.cpp
 | 
			
		||||
    src/test/jtx/impl/sig.cpp
 | 
			
		||||
    src/test/jtx/impl/tag.cpp
 | 
			
		||||
    src/test/jtx/impl/TestHelpers.cpp
 | 
			
		||||
    src/test/jtx/impl/ticket.cpp
 | 
			
		||||
    src/test/jtx/impl/token.cpp
 | 
			
		||||
    src/test/jtx/impl/trust.cpp
 | 
			
		||||
    src/test/jtx/impl/txflags.cpp
 | 
			
		||||
    src/test/jtx/impl/unl.cpp
 | 
			
		||||
    src/test/jtx/impl/uritoken.cpp
 | 
			
		||||
    src/test/jtx/impl/utility.cpp
 | 
			
		||||
 | 
			
		||||
    #[===============================[
 | 
			
		||||
@@ -891,6 +965,7 @@ if (tests)
 | 
			
		||||
    src/test/nodestore/Basics_test.cpp
 | 
			
		||||
    src/test/nodestore/DatabaseShard_test.cpp
 | 
			
		||||
    src/test/nodestore/Database_test.cpp
 | 
			
		||||
    src/test/nodestore/NuDBFactory_test.cpp
 | 
			
		||||
    src/test/nodestore/Timing_test.cpp
 | 
			
		||||
    src/test/nodestore/import_test.cpp
 | 
			
		||||
    src/test/nodestore/varint_test.cpp
 | 
			
		||||
@@ -918,8 +993,8 @@ if (tests)
 | 
			
		||||
    src/test/protocol/BuildInfo_test.cpp
 | 
			
		||||
    src/test/protocol/InnerObjectFormats_test.cpp
 | 
			
		||||
    src/test/protocol/Issue_test.cpp
 | 
			
		||||
    src/test/protocol/KnownFormatToGRPC_test.cpp
 | 
			
		||||
    src/test/protocol/Hooks_test.cpp
 | 
			
		||||
    src/test/protocol/Memo_test.cpp
 | 
			
		||||
    src/test/protocol/PublicKey_test.cpp
 | 
			
		||||
    src/test/protocol/Quality_test.cpp
 | 
			
		||||
    src/test/protocol/STAccount_test.cpp
 | 
			
		||||
@@ -937,6 +1012,11 @@ if (tests)
 | 
			
		||||
         subdir: resource
 | 
			
		||||
    #]===============================]
 | 
			
		||||
    src/test/resource/Logic_test.cpp
 | 
			
		||||
    #[===============================[
 | 
			
		||||
       test sources:
 | 
			
		||||
         subdir: rdb
 | 
			
		||||
    #]===============================]
 | 
			
		||||
    src/test/rdb/RelationalDatabase_test.cpp
 | 
			
		||||
    #[===============================[
 | 
			
		||||
       test sources:
 | 
			
		||||
         subdir: rpc
 | 
			
		||||
@@ -946,14 +1026,15 @@ if (tests)
 | 
			
		||||
    src/test/rpc/AccountLinesRPC_test.cpp
 | 
			
		||||
    src/test/rpc/AccountObjects_test.cpp
 | 
			
		||||
    src/test/rpc/AccountOffers_test.cpp
 | 
			
		||||
    src/test/rpc/AccountNamespace_test.cpp
 | 
			
		||||
    src/test/rpc/AccountSet_test.cpp
 | 
			
		||||
    src/test/rpc/AccountTx_test.cpp
 | 
			
		||||
    src/test/rpc/AmendmentBlocked_test.cpp
 | 
			
		||||
    src/test/rpc/Book_test.cpp
 | 
			
		||||
    src/test/rpc/Catalogue_test.cpp
 | 
			
		||||
    src/test/rpc/DepositAuthorized_test.cpp
 | 
			
		||||
    src/test/rpc/DeliveredAmount_test.cpp
 | 
			
		||||
    src/test/rpc/Feature_test.cpp
 | 
			
		||||
    src/test/rpc/Fee_test.cpp
 | 
			
		||||
    src/test/rpc/GatewayBalances_test.cpp
 | 
			
		||||
    src/test/rpc/GetCounts_test.cpp
 | 
			
		||||
    src/test/rpc/JSONRPC_test.cpp
 | 
			
		||||
@@ -973,15 +1054,14 @@ if (tests)
 | 
			
		||||
    src/test/rpc/RPCCall_test.cpp
 | 
			
		||||
    src/test/rpc/RPCOverload_test.cpp
 | 
			
		||||
    src/test/rpc/RobustTransaction_test.cpp
 | 
			
		||||
    src/test/rpc/ServerDefinitions_test.cpp
 | 
			
		||||
    src/test/rpc/ServerInfo_test.cpp
 | 
			
		||||
    src/test/rpc/ShardArchiveHandler_test.cpp
 | 
			
		||||
    src/test/rpc/Status_test.cpp
 | 
			
		||||
    src/test/rpc/Submit_test.cpp
 | 
			
		||||
    src/test/rpc/Subscribe_test.cpp
 | 
			
		||||
    src/test/rpc/Transaction_test.cpp
 | 
			
		||||
    src/test/rpc/TransactionEntry_test.cpp
 | 
			
		||||
    src/test/rpc/TransactionHistory_test.cpp
 | 
			
		||||
    src/test/rpc/Tx_test.cpp
 | 
			
		||||
    src/test/rpc/ValidatorInfo_test.cpp
 | 
			
		||||
    src/test/rpc/ValidatorRPC_test.cpp
 | 
			
		||||
    src/test/rpc/Version_test.cpp
 | 
			
		||||
@@ -1010,6 +1090,11 @@ target_link_libraries (rippled
 | 
			
		||||
  Ripple::opts
 | 
			
		||||
  Ripple::libs
 | 
			
		||||
  Ripple::xrpl_core
 | 
			
		||||
  # Workaround for a Conan 1.x bug that prevents static linking of libstdc++
 | 
			
		||||
  # when a dependency (snappy) modifies system_libs. See the comment in
 | 
			
		||||
  # external/snappy/conanfile.py for a full explanation.
 | 
			
		||||
  # This is likely not strictly necessary, but listed explicitly as a good practice.
 | 
			
		||||
  m
 | 
			
		||||
  )
 | 
			
		||||
exclude_if_included (rippled)
 | 
			
		||||
# define a macro for tests that might need to
 | 
			
		||||
@@ -1033,3 +1118,7 @@ if (tests)
 | 
			
		||||
    src/test/rpc/ShardArchiveHandler_test.cpp
 | 
			
		||||
    PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
 | 
			
		||||
endif () #tests
 | 
			
		||||
 | 
			
		||||
if(ACL_LIBRARY)
 | 
			
		||||
  target_link_libraries(rippled ${ACL_LIBRARY})
 | 
			
		||||
endif()
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,13 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   docs target (optional)
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
# Early return if the `docs` directory is missing,
 | 
			
		||||
# e.g. when we are building a Conan package.
 | 
			
		||||
if(NOT EXISTS docs)
 | 
			
		||||
  return()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if (tests)
 | 
			
		||||
  find_package (Doxygen)
 | 
			
		||||
  if (NOT TARGET Doxygen::doxygen)
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,6 @@
 | 
			
		||||
 | 
			
		||||
install (
 | 
			
		||||
  TARGETS
 | 
			
		||||
    ed25519-donna
 | 
			
		||||
    common
 | 
			
		||||
    opts
 | 
			
		||||
    ripple_syslibs
 | 
			
		||||
@@ -16,17 +15,6 @@ install (
 | 
			
		||||
  RUNTIME DESTINATION bin
 | 
			
		||||
  INCLUDES DESTINATION include)
 | 
			
		||||
 | 
			
		||||
if(${INSTALL_SECP256K1})
 | 
			
		||||
install (
 | 
			
		||||
  TARGETS
 | 
			
		||||
    secp256k1
 | 
			
		||||
  EXPORT RippleExports
 | 
			
		||||
  LIBRARY DESTINATION lib
 | 
			
		||||
  ARCHIVE DESTINATION lib
 | 
			
		||||
  RUNTIME DESTINATION bin
 | 
			
		||||
  INCLUDES DESTINATION include)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
install (EXPORT RippleExports
 | 
			
		||||
  FILE RippleTargets.cmake
 | 
			
		||||
  NAMESPACE Ripple::
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ if (is_multiconfig)
 | 
			
		||||
  file(GLOB md_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS
 | 
			
		||||
    *.md)
 | 
			
		||||
  LIST(APPEND all_sources ${md_files})
 | 
			
		||||
  foreach (_target secp256k1 ed25519-donna pbufs xrpl_core rippled)
 | 
			
		||||
  foreach (_target secp256k1::secp256k1 ed25519::ed25519 pbufs xrpl_core rippled)
 | 
			
		||||
    get_target_property (_type ${_target} TYPE)
 | 
			
		||||
    if(_type STREQUAL "INTERFACE_LIBRARY")
 | 
			
		||||
      continue()
 | 
			
		||||
 
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH prefix path..this is where we will download
 | 
			
		||||
   and build any ExternalProjects, and they will hopefully
 | 
			
		||||
   survive across build directory deletion (manual cleans)
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
string (REGEX REPLACE "[ \\/%]+" "_" gen_for_path ${CMAKE_GENERATOR})
 | 
			
		||||
string (TOLOWER ${gen_for_path} gen_for_path)
 | 
			
		||||
# HACK: trying to shorten paths for windows CI (which hits 260 MAXPATH easily)
 | 
			
		||||
# @see:  https://issues.jenkins-ci.org/browse/JENKINS-38706?focusedCommentId=339847
 | 
			
		||||
string (REPLACE "visual_studio" "vs" gen_for_path ${gen_for_path})
 | 
			
		||||
if (NOT DEFINED NIH_CACHE_ROOT)
 | 
			
		||||
  if (DEFINED ENV{NIH_CACHE_ROOT})
 | 
			
		||||
    set (NIH_CACHE_ROOT $ENV{NIH_CACHE_ROOT})
 | 
			
		||||
  else ()
 | 
			
		||||
    set (NIH_CACHE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/.nih_c")
 | 
			
		||||
  endif ()
 | 
			
		||||
endif ()
 | 
			
		||||
set (nih_cache_path
 | 
			
		||||
  "${NIH_CACHE_ROOT}/${gen_for_path}/${CMAKE_CXX_COMPILER_ID}_${CMAKE_CXX_COMPILER_VERSION}")
 | 
			
		||||
if (NOT is_multiconfig)
 | 
			
		||||
  set (nih_cache_path "${nih_cache_path}/${CMAKE_BUILD_TYPE}")
 | 
			
		||||
endif ()
 | 
			
		||||
file(TO_CMAKE_PATH "${nih_cache_path}" nih_cache_path)
 | 
			
		||||
message (STATUS "NIH-EP cache path: ${nih_cache_path}")
 | 
			
		||||
## two convenience variables:
 | 
			
		||||
set (ep_lib_prefix ${CMAKE_STATIC_LIBRARY_PREFIX})
 | 
			
		||||
set (ep_lib_suffix ${CMAKE_STATIC_LIBRARY_SUFFIX})
 | 
			
		||||
 | 
			
		||||
# this is a setting for FetchContent and needs to be
 | 
			
		||||
# a cache variable
 | 
			
		||||
# https://cmake.org/cmake/help/latest/module/FetchContent.html#populating-the-content
 | 
			
		||||
set (FETCHCONTENT_BASE_DIR ${nih_cache_path} CACHE STRING "" FORCE)
 | 
			
		||||
@@ -1,204 +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)
 | 
			
		||||
    file (MAKE_DIRECTORY ${NIH_CACHE_ROOT}/pkgbuild)
 | 
			
		||||
    if (is_linux)
 | 
			
		||||
      execute_process (COMMAND id -u
 | 
			
		||||
        OUTPUT_VARIABLE DOCKER_USER_ID
 | 
			
		||||
        OUTPUT_STRIP_TRAILING_WHITESPACE)
 | 
			
		||||
      message (STATUS "docker local user id: ${DOCKER_USER_ID}")
 | 
			
		||||
      execute_process (COMMAND id -g
 | 
			
		||||
        OUTPUT_VARIABLE DOCKER_GROUP_ID
 | 
			
		||||
        OUTPUT_STRIP_TRAILING_WHITESPACE)
 | 
			
		||||
      message (STATUS "docker local group id: ${DOCKER_GROUP_ID}")
 | 
			
		||||
    endif ()
 | 
			
		||||
    if (DOCKER_USER_ID AND DOCKER_GROUP_ID)
 | 
			
		||||
      set(map_user TRUE)
 | 
			
		||||
    endif ()
 | 
			
		||||
    #[===================================================================[
 | 
			
		||||
        rpm
 | 
			
		||||
    #]===================================================================]
 | 
			
		||||
    add_custom_target (rpm_container
 | 
			
		||||
      docker build
 | 
			
		||||
        --pull
 | 
			
		||||
        --build-arg GIT_COMMIT=${commit_hash}
 | 
			
		||||
        -t 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/centos-builder/extras.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/build_deps.sh
 | 
			
		||||
        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
 | 
			
		||||
        -e NIH_CACHE_ROOT=/opt/rippled_bld/pkg/.nih_c
 | 
			
		||||
        -v ${NIH_CACHE_ROOT}/pkgbuild:/opt/rippled_bld/pkg/.nih_c
 | 
			
		||||
        -v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
 | 
			
		||||
        -v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
 | 
			
		||||
        "$<$<BOOL:${map_user}>:--volume=/etc/passwd:/etc/passwd;--volume=/etc/group:/etc/group;--user=${DOCKER_USER_ID}:${DOCKER_GROUP_ID}>"
 | 
			
		||||
        -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 16.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/install_boost.sh
 | 
			
		||||
        Builds/containers/shared/update-rippled.sh
 | 
			
		||||
        Builds/containers/shared/update_sources.sh
 | 
			
		||||
        Builds/containers/shared/build_deps.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
 | 
			
		||||
        -e NIH_CACHE_ROOT=/opt/rippled_bld/pkg/.nih_c
 | 
			
		||||
        -v ${NIH_CACHE_ROOT}/pkgbuild:/opt/rippled_bld/pkg/.nih_c
 | 
			
		||||
        -v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
 | 
			
		||||
        -v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
 | 
			
		||||
        "$<$<BOOL:${map_user}>:--volume=/etc/passwd:/etc/passwd;--volume=/etc/group:/etc/group;--user=${DOCKER_USER_ID}:${DOCKER_GROUP_ID}>"
 | 
			
		||||
        -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
 | 
			
		||||
        Builds/containers/shared/build_deps.sh
 | 
			
		||||
    )
 | 
			
		||||
    exclude_from_default (ci_container)
 | 
			
		||||
  else ()
 | 
			
		||||
    message (STATUS "docker NOT found -- won't be able to build containers for packaging")
 | 
			
		||||
  endif ()
 | 
			
		||||
endif ()
 | 
			
		||||
							
								
								
									
										106
									
								
								Builds/CMake/SociConfig.cmake.patched
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								Builds/CMake/SociConfig.cmake.patched
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,106 @@
 | 
			
		||||
################################################################################
 | 
			
		||||
# 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,50 +1,4 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: boost
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
if((NOT DEFINED BOOST_ROOT) AND(DEFINED ENV{BOOST_ROOT}))
 | 
			
		||||
  set(BOOST_ROOT $ENV{BOOST_ROOT})
 | 
			
		||||
endif()
 | 
			
		||||
file(TO_CMAKE_PATH "${BOOST_ROOT}" BOOST_ROOT)
 | 
			
		||||
if(WIN32 OR CYGWIN)
 | 
			
		||||
  # Workaround for MSVC having two boost versions - x86 and x64 on same PC in stage folders
 | 
			
		||||
  if(DEFINED BOOST_ROOT)
 | 
			
		||||
    if(IS_DIRECTORY ${BOOST_ROOT}/stage64/lib)
 | 
			
		||||
      set(BOOST_LIBRARYDIR ${BOOST_ROOT}/stage64/lib)
 | 
			
		||||
    elseif(IS_DIRECTORY ${BOOST_ROOT}/stage/lib)
 | 
			
		||||
      set(BOOST_LIBRARYDIR ${BOOST_ROOT}/stage/lib)
 | 
			
		||||
    elseif(IS_DIRECTORY ${BOOST_ROOT}/lib)
 | 
			
		||||
      set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib)
 | 
			
		||||
    else()
 | 
			
		||||
      message(WARNING "Did not find expected boost library dir. "
 | 
			
		||||
        "Defaulting to ${BOOST_ROOT}")
 | 
			
		||||
      set(BOOST_LIBRARYDIR ${BOOST_ROOT})
 | 
			
		||||
    endif()
 | 
			
		||||
  endif()
 | 
			
		||||
endif()
 | 
			
		||||
message(STATUS "BOOST_ROOT: ${BOOST_ROOT}")
 | 
			
		||||
message(STATUS "BOOST_LIBRARYDIR: ${BOOST_LIBRARYDIR}")
 | 
			
		||||
 | 
			
		||||
# uncomment the following as needed to debug FindBoost issues:
 | 
			
		||||
#set(Boost_DEBUG ON)
 | 
			
		||||
 | 
			
		||||
#[=========================================================[
 | 
			
		||||
   boost dynamic libraries don't trivially support @rpath
 | 
			
		||||
   linking right now (cmake's default), so just force
 | 
			
		||||
   static linking for macos, or if requested on linux by flag
 | 
			
		||||
#]=========================================================]
 | 
			
		||||
if(static)
 | 
			
		||||
  set(Boost_USE_STATIC_LIBS ON)
 | 
			
		||||
endif()
 | 
			
		||||
set(Boost_USE_MULTITHREADED ON)
 | 
			
		||||
if(static AND NOT APPLE)
 | 
			
		||||
  set(Boost_USE_STATIC_RUNTIME ON)
 | 
			
		||||
else()
 | 
			
		||||
  set(Boost_USE_STATIC_RUNTIME OFF)
 | 
			
		||||
endif()
 | 
			
		||||
# TBD:
 | 
			
		||||
# Boost_USE_DEBUG_RUNTIME:  When ON, uses Boost libraries linked against the
 | 
			
		||||
find_package(Boost 1.70 REQUIRED
 | 
			
		||||
find_package(Boost 1.86 REQUIRED
 | 
			
		||||
  COMPONENTS
 | 
			
		||||
    chrono
 | 
			
		||||
    container
 | 
			
		||||
@@ -55,11 +9,12 @@ find_package(Boost 1.70 REQUIRED
 | 
			
		||||
    program_options
 | 
			
		||||
    regex
 | 
			
		||||
    system
 | 
			
		||||
    thread)
 | 
			
		||||
    thread
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
add_library(ripple_boost INTERFACE)
 | 
			
		||||
add_library(Ripple::boost ALIAS ripple_boost)
 | 
			
		||||
if(is_xcode)
 | 
			
		||||
if(XCODE)
 | 
			
		||||
  target_include_directories(ripple_boost BEFORE INTERFACE ${Boost_INCLUDE_DIRS})
 | 
			
		||||
  target_compile_options(ripple_boost INTERFACE --system-header-prefix="boost/")
 | 
			
		||||
else()
 | 
			
		||||
@@ -77,6 +32,7 @@ target_link_libraries(ripple_boost
 | 
			
		||||
    Boost::program_options
 | 
			
		||||
    Boost::regex
 | 
			
		||||
    Boost::system
 | 
			
		||||
    Boost::iostreams
 | 
			
		||||
    Boost::thread)
 | 
			
		||||
if(Boost_COMPILER)
 | 
			
		||||
  target_link_libraries(ripple_boost INTERFACE Boost::disable_autolinking)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: ed25519-donna
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
add_library (ed25519-donna STATIC
 | 
			
		||||
  src/ed25519-donna/ed25519.c)
 | 
			
		||||
target_include_directories (ed25519-donna
 | 
			
		||||
  PUBLIC
 | 
			
		||||
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
 | 
			
		||||
    $<INSTALL_INTERFACE:include>
 | 
			
		||||
  PRIVATE
 | 
			
		||||
    ${CMAKE_CURRENT_SOURCE_DIR}/src/ed25519-donna)
 | 
			
		||||
#[=========================================================[
 | 
			
		||||
   NOTE for macos:
 | 
			
		||||
   https://github.com/floodyberry/ed25519-donna/issues/29
 | 
			
		||||
   our source for ed25519-donna-portable.h has been
 | 
			
		||||
   patched to workaround this.
 | 
			
		||||
#]=========================================================]
 | 
			
		||||
target_link_libraries (ed25519-donna PUBLIC OpenSSL::SSL)
 | 
			
		||||
add_library (NIH::ed25519-donna ALIAS ed25519-donna)
 | 
			
		||||
target_link_libraries (ripple_libs INTERFACE NIH::ed25519-donna)
 | 
			
		||||
#[===========================[
 | 
			
		||||
   headers installation
 | 
			
		||||
#]===========================]
 | 
			
		||||
install (
 | 
			
		||||
  FILES
 | 
			
		||||
    src/ed25519-donna/ed25519.h
 | 
			
		||||
  DESTINATION include/ed25519-donna)
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,47 +0,0 @@
 | 
			
		||||
# - Try to find jemalloc
 | 
			
		||||
# Once done this will define
 | 
			
		||||
#  JEMALLOC_FOUND - System has jemalloc
 | 
			
		||||
#  JEMALLOC_INCLUDE_DIRS - The jemalloc include directories
 | 
			
		||||
#  JEMALLOC_LIBRARIES - The libraries needed to use jemalloc
 | 
			
		||||
 | 
			
		||||
if(NOT USE_BUNDLED_JEMALLOC)
 | 
			
		||||
  find_package(PkgConfig)
 | 
			
		||||
  if (PKG_CONFIG_FOUND)
 | 
			
		||||
    pkg_check_modules(PC_JEMALLOC QUIET jemalloc)
 | 
			
		||||
  endif()
 | 
			
		||||
else()
 | 
			
		||||
  set(PC_JEMALLOC_INCLUDEDIR)
 | 
			
		||||
  set(PC_JEMALLOC_INCLUDE_DIRS)
 | 
			
		||||
  set(PC_JEMALLOC_LIBDIR)
 | 
			
		||||
  set(PC_JEMALLOC_LIBRARY_DIRS)
 | 
			
		||||
  set(LIMIT_SEARCH NO_DEFAULT_PATH)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
set(JEMALLOC_DEFINITIONS ${PC_JEMALLOC_CFLAGS_OTHER})
 | 
			
		||||
 | 
			
		||||
find_path(JEMALLOC_INCLUDE_DIR jemalloc/jemalloc.h
 | 
			
		||||
          PATHS ${PC_JEMALLOC_INCLUDEDIR} ${PC_JEMALLOC_INCLUDE_DIRS}
 | 
			
		||||
          ${LIMIT_SEARCH})
 | 
			
		||||
 | 
			
		||||
# If we're asked to use static linkage, add libjemalloc.a as a preferred library name.
 | 
			
		||||
if(JEMALLOC_USE_STATIC)
 | 
			
		||||
  list(APPEND JEMALLOC_NAMES
 | 
			
		||||
    "${CMAKE_STATIC_LIBRARY_PREFIX}jemalloc${CMAKE_STATIC_LIBRARY_SUFFIX}")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
list(APPEND JEMALLOC_NAMES jemalloc)
 | 
			
		||||
 | 
			
		||||
find_library(JEMALLOC_LIBRARY NAMES ${JEMALLOC_NAMES}
 | 
			
		||||
  HINTS ${PC_JEMALLOC_LIBDIR} ${PC_JEMALLOC_LIBRARY_DIRS}
 | 
			
		||||
  ${LIMIT_SEARCH})
 | 
			
		||||
 | 
			
		||||
set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
 | 
			
		||||
set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
 | 
			
		||||
 | 
			
		||||
include(FindPackageHandleStandardArgs)
 | 
			
		||||
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE
 | 
			
		||||
# if all listed variables are TRUE
 | 
			
		||||
find_package_handle_standard_args(JeMalloc DEFAULT_MSG
 | 
			
		||||
  JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
 | 
			
		||||
 | 
			
		||||
mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_LIBRARY)
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
find_package (PkgConfig REQUIRED)
 | 
			
		||||
pkg_search_module (libarchive_PC QUIET libarchive>=3.4.3)
 | 
			
		||||
 | 
			
		||||
if(static)
 | 
			
		||||
  set(LIBARCHIVE_LIB libarchive.a)
 | 
			
		||||
else()
 | 
			
		||||
  set(LIBARCHIVE_LIB archive)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_library (archive
 | 
			
		||||
  NAMES ${LIBARCHIVE_LIB}
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${libarchive_PC_LIBDIR}
 | 
			
		||||
    ${libarchive_PC_LIBRARY_DIRS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
 | 
			
		||||
find_path (LIBARCHIVE_INCLUDE_DIR
 | 
			
		||||
  NAMES archive.h
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${libarchive_PC_INCLUDEDIR}
 | 
			
		||||
    ${libarchive_PC_INCLUDEDIRS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
find_package (PkgConfig)
 | 
			
		||||
if (PKG_CONFIG_FOUND)
 | 
			
		||||
  pkg_search_module (lz4_PC QUIET liblz4>=1.9)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
if(static)
 | 
			
		||||
  set(LZ4_LIB liblz4.a)
 | 
			
		||||
else()
 | 
			
		||||
  set(LZ4_LIB lz4.so)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_library (lz4
 | 
			
		||||
  NAMES ${LZ4_LIB}
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${lz4_PC_LIBDIR}
 | 
			
		||||
    ${lz4_PC_LIBRARY_DIRS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
 | 
			
		||||
find_path (LZ4_INCLUDE_DIR
 | 
			
		||||
  NAMES lz4.h
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${lz4_PC_INCLUDEDIR}
 | 
			
		||||
    ${lz4_PC_INCLUDEDIRS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
find_package (PkgConfig)
 | 
			
		||||
if (PKG_CONFIG_FOUND)
 | 
			
		||||
  pkg_search_module (secp256k1_PC QUIET libsecp256k1)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
if(static)
 | 
			
		||||
  set(SECP256K1_LIB libsecp256k1.a)
 | 
			
		||||
else()
 | 
			
		||||
  set(SECP256K1_LIB secp256k1)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_library(secp256k1
 | 
			
		||||
  NAMES ${SECP256K1_LIB}
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${secp256k1_PC_LIBDIR}
 | 
			
		||||
    ${secp256k1_PC_LIBRARY_PATHS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
 | 
			
		||||
find_path (SECP256K1_INCLUDE_DIR
 | 
			
		||||
  NAMES secp256k1.h
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${secp256k1_PC_INCLUDEDIR}
 | 
			
		||||
    ${secp256k1_PC_INCLUDEDIRS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
find_package (PkgConfig)
 | 
			
		||||
if (PKG_CONFIG_FOUND)
 | 
			
		||||
  pkg_search_module (snappy_PC QUIET snappy>=1.1.7)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
if(static)
 | 
			
		||||
  set(SNAPPY_LIB libsnappy.a)
 | 
			
		||||
else()
 | 
			
		||||
  set(SNAPPY_LIB libsnappy.so)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_library (snappy
 | 
			
		||||
  NAMES ${SNAPPY_LIB}
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${snappy_PC_LIBDIR}
 | 
			
		||||
    ${snappy_PC_LIBRARY_DIRS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
 | 
			
		||||
find_path (SNAPPY_INCLUDE_DIR
 | 
			
		||||
  NAMES snappy.h
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${snappy_PC_INCLUDEDIR}
 | 
			
		||||
    ${snappy_PC_INCLUDEDIRS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
@@ -1,17 +0,0 @@
 | 
			
		||||
find_package (PkgConfig)
 | 
			
		||||
if (PKG_CONFIG_FOUND)
 | 
			
		||||
  # TBD - currently no soci pkgconfig
 | 
			
		||||
  #pkg_search_module (soci_PC QUIET libsoci_core>=3.2)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
if(static)
 | 
			
		||||
  set(SOCI_LIB libsoci.a)
 | 
			
		||||
else()
 | 
			
		||||
  set(SOCI_LIB libsoci_core.so)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_library (soci
 | 
			
		||||
  NAMES ${SOCI_LIB})
 | 
			
		||||
 | 
			
		||||
find_path (SOCI_INCLUDE_DIR
 | 
			
		||||
  NAMES soci/soci.h)
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
find_package (PkgConfig)
 | 
			
		||||
if (PKG_CONFIG_FOUND)
 | 
			
		||||
  pkg_search_module (sqlite_PC QUIET sqlite3>=3.26.0)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
if(static)
 | 
			
		||||
  set(SQLITE_LIB libsqlite3.a)
 | 
			
		||||
else()
 | 
			
		||||
  set(SQLITE_LIB sqlite3.so)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_library (sqlite3
 | 
			
		||||
  NAMES ${SQLITE_LIB}
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${sqlite_PC_LIBDIR}
 | 
			
		||||
    ${sqlite_PC_LIBRARY_DIRS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
 | 
			
		||||
find_path (SQLITE_INCLUDE_DIR
 | 
			
		||||
  NAMES sqlite3.h
 | 
			
		||||
  HINTS
 | 
			
		||||
    ${sqlite_PC_INCLUDEDIR}
 | 
			
		||||
    ${sqlite_PC_INCLUDEDIRS}
 | 
			
		||||
  NO_DEFAULT_PATH)
 | 
			
		||||
@@ -1,163 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: libarchive
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
option (local_libarchive "use local build of libarchive." OFF)
 | 
			
		||||
add_library (archive_lib UNKNOWN IMPORTED GLOBAL)
 | 
			
		||||
 | 
			
		||||
if (NOT local_libarchive)
 | 
			
		||||
  if (NOT WIN32)
 | 
			
		||||
    find_package(libarchive_pc REQUIRED)
 | 
			
		||||
  endif ()
 | 
			
		||||
  if (archive)
 | 
			
		||||
    message (STATUS "Found libarchive using pkg-config. Using ${archive}.")
 | 
			
		||||
    set_target_properties (archive_lib PROPERTIES
 | 
			
		||||
      IMPORTED_LOCATION_DEBUG
 | 
			
		||||
        ${archive}
 | 
			
		||||
      IMPORTED_LOCATION_RELEASE
 | 
			
		||||
        ${archive}
 | 
			
		||||
      INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
        ${LIBARCHIVE_INCLUDE_DIR})
 | 
			
		||||
      # pkg-config can return extra info for static lib linking
 | 
			
		||||
      # this is probably needed/useful generally, but apply
 | 
			
		||||
      # to APPLE for now (mostly for homebrew)
 | 
			
		||||
      if (APPLE AND static AND libarchive_PC_STATIC_LIBRARIES)
 | 
			
		||||
        message(STATUS "NOTE: libarchive static libs: ${libarchive_PC_STATIC_LIBRARIES}")
 | 
			
		||||
        # also, APPLE seems to need iconv...maybe linux does too (TBD)
 | 
			
		||||
        target_link_libraries (archive_lib
 | 
			
		||||
          INTERFACE iconv ${libarchive_PC_STATIC_LIBRARIES})
 | 
			
		||||
      endif ()
 | 
			
		||||
  else ()
 | 
			
		||||
    ## now try searching using the minimal find module that cmake provides
 | 
			
		||||
    find_package(LibArchive 3.4.3 QUIET)
 | 
			
		||||
    if (LibArchive_FOUND)
 | 
			
		||||
      if (static)
 | 
			
		||||
        # find module doesn't find static libs currently, so we re-search
 | 
			
		||||
        get_filename_component(_loc ${LibArchive_LIBRARY} DIRECTORY)
 | 
			
		||||
        find_library(_la_static
 | 
			
		||||
          NAMES libarchive.a archive_static.lib archive.lib
 | 
			
		||||
          PATHS ${_loc})
 | 
			
		||||
        if (_la_static)
 | 
			
		||||
          set (_la_lib ${_la_static})
 | 
			
		||||
        else ()
 | 
			
		||||
          message (WARNING "unable to find libarchive static lib - switching to local build")
 | 
			
		||||
          set (local_libarchive ON CACHE BOOL "" FORCE)
 | 
			
		||||
        endif ()
 | 
			
		||||
      else ()
 | 
			
		||||
        set (_la_lib ${LibArchive_LIBRARY})
 | 
			
		||||
      endif ()
 | 
			
		||||
      if (NOT local_libarchive)
 | 
			
		||||
        message (STATUS "Found libarchive using module/config. Using ${_la_lib}.")
 | 
			
		||||
        set_target_properties (archive_lib PROPERTIES
 | 
			
		||||
          IMPORTED_LOCATION_DEBUG
 | 
			
		||||
            ${_la_lib}
 | 
			
		||||
          IMPORTED_LOCATION_RELEASE
 | 
			
		||||
            ${_la_lib}
 | 
			
		||||
          INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
            ${LibArchive_INCLUDE_DIRS})
 | 
			
		||||
      endif ()
 | 
			
		||||
    else ()
 | 
			
		||||
      set (local_libarchive ON CACHE BOOL "" FORCE)
 | 
			
		||||
    endif ()
 | 
			
		||||
  endif ()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if (local_libarchive)
 | 
			
		||||
  set (lib_post "")
 | 
			
		||||
  if (MSVC)
 | 
			
		||||
    set (lib_post "_static")
 | 
			
		||||
  endif ()
 | 
			
		||||
  ExternalProject_Add (libarchive
 | 
			
		||||
    PREFIX ${nih_cache_path}
 | 
			
		||||
    GIT_REPOSITORY https://github.com/libarchive/libarchive.git
 | 
			
		||||
    GIT_TAG v3.4.3
 | 
			
		||||
    CMAKE_ARGS
 | 
			
		||||
      # passing the compiler seems to be needed for windows CI, sadly
 | 
			
		||||
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
 | 
			
		||||
      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
      $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
      -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
      $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
      -DENABLE_LZ4=ON
 | 
			
		||||
      -ULZ4_*
 | 
			
		||||
      -DLZ4_INCLUDE_DIR=$<JOIN:$<TARGET_PROPERTY:lz4_lib,INTERFACE_INCLUDE_DIRECTORIES>,::>
 | 
			
		||||
      # because we are building a static lib, this lz4 library doesn't
 | 
			
		||||
      # actually matter since you can't generally link static libs to other static
 | 
			
		||||
      # libs. The include files are needed, but the library itself is not (until
 | 
			
		||||
      # we link our application, at which point we use the lz4 we built above).
 | 
			
		||||
      # nonetheless, we need to provide a library to libarchive else it will
 | 
			
		||||
      # NOT include lz4 support when configuring
 | 
			
		||||
      -DLZ4_LIBRARY=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:lz4_lib,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:lz4_lib,IMPORTED_LOCATION_RELEASE>>
 | 
			
		||||
      -DENABLE_WERROR=OFF
 | 
			
		||||
      -DENABLE_TAR=OFF
 | 
			
		||||
      -DENABLE_TAR_SHARED=OFF
 | 
			
		||||
      -DENABLE_INSTALL=ON
 | 
			
		||||
      -DENABLE_NETTLE=OFF
 | 
			
		||||
      -DENABLE_OPENSSL=OFF
 | 
			
		||||
      -DENABLE_LZO=OFF
 | 
			
		||||
      -DENABLE_LZMA=OFF
 | 
			
		||||
      -DENABLE_ZLIB=OFF
 | 
			
		||||
      -DENABLE_BZip2=OFF
 | 
			
		||||
      -DENABLE_LIBXML2=OFF
 | 
			
		||||
      -DENABLE_EXPAT=OFF
 | 
			
		||||
      -DENABLE_PCREPOSIX=OFF
 | 
			
		||||
      -DENABLE_LibGCC=OFF
 | 
			
		||||
      -DENABLE_CNG=OFF
 | 
			
		||||
      -DENABLE_CPIO=OFF
 | 
			
		||||
      -DENABLE_CPIO_SHARED=OFF
 | 
			
		||||
      -DENABLE_CAT=OFF
 | 
			
		||||
      -DENABLE_CAT_SHARED=OFF
 | 
			
		||||
      -DENABLE_XATTR=OFF
 | 
			
		||||
      -DENABLE_ACL=OFF
 | 
			
		||||
      -DENABLE_ICONV=OFF
 | 
			
		||||
      -DENABLE_TEST=OFF
 | 
			
		||||
      -DENABLE_COVERAGE=OFF
 | 
			
		||||
      $<$<BOOL:${MSVC}>:
 | 
			
		||||
        "-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
 | 
			
		||||
        "-DCMAKE_C_FLAGS_DEBUG=-MTd"
 | 
			
		||||
        "-DCMAKE_C_FLAGS_RELEASE=-MT"
 | 
			
		||||
      >
 | 
			
		||||
    LIST_SEPARATOR ::
 | 
			
		||||
    LOG_BUILD ON
 | 
			
		||||
    LOG_CONFIGURE ON
 | 
			
		||||
    BUILD_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      --target archive_static
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
            <BINARY_DIR>/libarchive/$<CONFIG>/${ep_lib_prefix}archive${lib_post}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
            <BINARY_DIR>/libarchive
 | 
			
		||||
        >
 | 
			
		||||
    TEST_COMMAND ""
 | 
			
		||||
    INSTALL_COMMAND ""
 | 
			
		||||
    DEPENDS lz4_lib
 | 
			
		||||
    BUILD_BYPRODUCTS
 | 
			
		||||
      <BINARY_DIR>/libarchive/${ep_lib_prefix}archive${lib_post}${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/libarchive/${ep_lib_prefix}archive${lib_post}_d${ep_lib_suffix}
 | 
			
		||||
  )
 | 
			
		||||
  ExternalProject_Get_Property (libarchive BINARY_DIR)
 | 
			
		||||
  ExternalProject_Get_Property (libarchive SOURCE_DIR)
 | 
			
		||||
  if (CMAKE_VERBOSE_MAKEFILE)
 | 
			
		||||
    print_ep_logs (libarchive)
 | 
			
		||||
  endif ()
 | 
			
		||||
  file (MAKE_DIRECTORY ${SOURCE_DIR}/libarchive)
 | 
			
		||||
  set_target_properties (archive_lib PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${BINARY_DIR}/libarchive/${ep_lib_prefix}archive${lib_post}_d${ep_lib_suffix}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${BINARY_DIR}/libarchive/${ep_lib_prefix}archive${lib_post}${ep_lib_suffix}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
      ${SOURCE_DIR}/libarchive
 | 
			
		||||
    INTERFACE_COMPILE_DEFINITIONS
 | 
			
		||||
      LIBARCHIVE_STATIC)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
add_dependencies (archive_lib libarchive)
 | 
			
		||||
target_link_libraries (archive_lib INTERFACE lz4_lib)
 | 
			
		||||
target_link_libraries (ripple_libs INTERFACE archive_lib)
 | 
			
		||||
exclude_if_included (libarchive)
 | 
			
		||||
exclude_if_included (archive_lib)
 | 
			
		||||
@@ -1,79 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: lz4
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
add_library (lz4_lib STATIC IMPORTED GLOBAL)
 | 
			
		||||
 | 
			
		||||
if (NOT WIN32)
 | 
			
		||||
  find_package(lz4)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(lz4)
 | 
			
		||||
  set_target_properties (lz4_lib PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${lz4}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${lz4}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
      ${LZ4_INCLUDE_DIR})
 | 
			
		||||
 | 
			
		||||
else()
 | 
			
		||||
  ExternalProject_Add (lz4
 | 
			
		||||
    PREFIX ${nih_cache_path}
 | 
			
		||||
    GIT_REPOSITORY https://github.com/lz4/lz4.git
 | 
			
		||||
    GIT_TAG v1.9.2
 | 
			
		||||
    SOURCE_SUBDIR contrib/cmake_unofficial
 | 
			
		||||
    CMAKE_ARGS
 | 
			
		||||
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
 | 
			
		||||
      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
      $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
      -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
      $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
      -DBUILD_STATIC_LIBS=ON
 | 
			
		||||
      -DBUILD_SHARED_LIBS=OFF
 | 
			
		||||
      $<$<BOOL:${MSVC}>:
 | 
			
		||||
        "-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
 | 
			
		||||
        "-DCMAKE_C_FLAGS_DEBUG=-MTd"
 | 
			
		||||
        "-DCMAKE_C_FLAGS_RELEASE=-MT"
 | 
			
		||||
      >
 | 
			
		||||
    LOG_BUILD ON
 | 
			
		||||
    LOG_CONFIGURE ON
 | 
			
		||||
    BUILD_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      --target lz4_static
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
          <BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}lz4$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
          <BINARY_DIR>
 | 
			
		||||
        >
 | 
			
		||||
    TEST_COMMAND ""
 | 
			
		||||
    INSTALL_COMMAND ""
 | 
			
		||||
    BUILD_BYPRODUCTS
 | 
			
		||||
      <BINARY_DIR>/${ep_lib_prefix}lz4${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/${ep_lib_prefix}lz4_d${ep_lib_suffix}
 | 
			
		||||
  )
 | 
			
		||||
  ExternalProject_Get_Property (lz4 BINARY_DIR)
 | 
			
		||||
  ExternalProject_Get_Property (lz4 SOURCE_DIR)
 | 
			
		||||
 | 
			
		||||
  file (MAKE_DIRECTORY ${SOURCE_DIR}/lz4)
 | 
			
		||||
  set_target_properties (lz4_lib PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${BINARY_DIR}/${ep_lib_prefix}lz4_d${ep_lib_suffix}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${BINARY_DIR}/${ep_lib_prefix}lz4${ep_lib_suffix}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
      ${SOURCE_DIR}/lib)
 | 
			
		||||
 | 
			
		||||
  if (CMAKE_VERBOSE_MAKEFILE)
 | 
			
		||||
    print_ep_logs (lz4)
 | 
			
		||||
  endif ()
 | 
			
		||||
  add_dependencies (lz4_lib lz4)
 | 
			
		||||
  target_link_libraries (ripple_libs INTERFACE lz4_lib)
 | 
			
		||||
  exclude_if_included (lz4)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
exclude_if_included (lz4_lib)
 | 
			
		||||
@@ -1,31 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: nudb
 | 
			
		||||
 | 
			
		||||
   NuDB is header-only, thus is an INTERFACE lib in CMake.
 | 
			
		||||
   TODO: move the library definition into NuDB repo and add
 | 
			
		||||
   proper targets and export/install
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
if (is_root_project) # NuDB not needed in the case of xrpl_core inclusion build
 | 
			
		||||
  add_library (nudb INTERFACE)
 | 
			
		||||
  FetchContent_Declare(
 | 
			
		||||
    nudb_src
 | 
			
		||||
    GIT_REPOSITORY https://github.com/CPPAlliance/NuDB.git
 | 
			
		||||
    GIT_TAG        2.0.5
 | 
			
		||||
  )
 | 
			
		||||
  FetchContent_GetProperties(nudb_src)
 | 
			
		||||
  if(NOT nudb_src_POPULATED)
 | 
			
		||||
    message (STATUS "Pausing to download NuDB...")
 | 
			
		||||
    FetchContent_Populate(nudb_src)
 | 
			
		||||
  endif()
 | 
			
		||||
 | 
			
		||||
  file(TO_CMAKE_PATH "${nudb_src_SOURCE_DIR}" nudb_src_SOURCE_DIR)
 | 
			
		||||
  # specify as system includes so as to avoid warnings
 | 
			
		||||
  target_include_directories (nudb SYSTEM INTERFACE ${nudb_src_SOURCE_DIR}/include)
 | 
			
		||||
  target_link_libraries (nudb
 | 
			
		||||
    INTERFACE
 | 
			
		||||
      Boost::thread
 | 
			
		||||
      Boost::system)
 | 
			
		||||
  add_library (NIH::nudb ALIAS nudb)
 | 
			
		||||
  target_link_libraries (ripple_libs INTERFACE NIH::nudb)
 | 
			
		||||
endif ()
 | 
			
		||||
@@ -1,48 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: openssl
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
#[===============================================[
 | 
			
		||||
  OPENSSL_ROOT_DIR is the only variable that
 | 
			
		||||
  FindOpenSSL honors for locating, so convert any
 | 
			
		||||
  OPENSSL_ROOT vars to this
 | 
			
		||||
#]===============================================]
 | 
			
		||||
if (NOT DEFINED OPENSSL_ROOT_DIR)
 | 
			
		||||
  if (DEFINED ENV{OPENSSL_ROOT})
 | 
			
		||||
    set (OPENSSL_ROOT_DIR $ENV{OPENSSL_ROOT})
 | 
			
		||||
  elseif (HOMEBREW)
 | 
			
		||||
    execute_process (COMMAND ${HOMEBREW} --prefix openssl
 | 
			
		||||
      OUTPUT_VARIABLE OPENSSL_ROOT_DIR
 | 
			
		||||
      OUTPUT_STRIP_TRAILING_WHITESPACE)
 | 
			
		||||
  endif ()
 | 
			
		||||
  file (TO_CMAKE_PATH "${OPENSSL_ROOT_DIR}" OPENSSL_ROOT_DIR)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
if (static)
 | 
			
		||||
  set (OPENSSL_USE_STATIC_LIBS ON)
 | 
			
		||||
endif ()
 | 
			
		||||
set (OPENSSL_MSVC_STATIC_RT ON)
 | 
			
		||||
find_package (OpenSSL 1.1.1 REQUIRED)
 | 
			
		||||
target_link_libraries (ripple_libs
 | 
			
		||||
  INTERFACE
 | 
			
		||||
    OpenSSL::SSL
 | 
			
		||||
    OpenSSL::Crypto)
 | 
			
		||||
# disable SSLv2...this can also be done when building/configuring OpenSSL
 | 
			
		||||
set_target_properties(OpenSSL::SSL PROPERTIES
 | 
			
		||||
    INTERFACE_COMPILE_DEFINITIONS OPENSSL_NO_SSL2)
 | 
			
		||||
#[=========================================================[
 | 
			
		||||
   https://gitlab.kitware.com/cmake/cmake/issues/16885
 | 
			
		||||
   depending on how openssl is built, it might depend
 | 
			
		||||
   on zlib. In fact, the openssl find package should
 | 
			
		||||
   figure this out for us, but it does not currently...
 | 
			
		||||
   so let's add zlib ourselves to the lib list
 | 
			
		||||
   TODO: investigate linking to static zlib for static
 | 
			
		||||
   build option
 | 
			
		||||
#]=========================================================]
 | 
			
		||||
find_package (ZLIB)
 | 
			
		||||
set (has_zlib FALSE)
 | 
			
		||||
if (TARGET ZLIB::ZLIB)
 | 
			
		||||
  set_target_properties(OpenSSL::Crypto PROPERTIES
 | 
			
		||||
    INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
 | 
			
		||||
  set (has_zlib TRUE)
 | 
			
		||||
endif ()
 | 
			
		||||
@@ -1,70 +0,0 @@
 | 
			
		||||
if(reporting)
 | 
			
		||||
    find_package(PostgreSQL)
 | 
			
		||||
    if(NOT PostgreSQL_FOUND)
 | 
			
		||||
        message("find_package did not find postgres")
 | 
			
		||||
        find_library(postgres NAMES pq libpq libpq-dev pq-dev postgresql-devel)
 | 
			
		||||
        find_path(libpq-fe NAMES libpq-fe.h PATH_SUFFIXES postgresql pgsql include)
 | 
			
		||||
 | 
			
		||||
        if(NOT libpq-fe_FOUND OR NOT postgres_FOUND)
 | 
			
		||||
            message("No system installed Postgres found. Will build")
 | 
			
		||||
            add_library(postgres SHARED IMPORTED GLOBAL)
 | 
			
		||||
            add_library(pgport SHARED IMPORTED GLOBAL)
 | 
			
		||||
            add_library(pgcommon SHARED IMPORTED GLOBAL)
 | 
			
		||||
            ExternalProject_Add(postgres_src
 | 
			
		||||
                PREFIX ${nih_cache_path}
 | 
			
		||||
                GIT_REPOSITORY https://github.com/postgres/postgres.git
 | 
			
		||||
                GIT_TAG master
 | 
			
		||||
                CONFIGURE_COMMAND ./configure --without-readline > /dev/null
 | 
			
		||||
                BUILD_COMMAND ${CMAKE_COMMAND} -E env --unset=MAKELEVEL make
 | 
			
		||||
                UPDATE_COMMAND ""
 | 
			
		||||
                BUILD_IN_SOURCE 1
 | 
			
		||||
                INSTALL_COMMAND ""
 | 
			
		||||
                BUILD_BYPRODUCTS
 | 
			
		||||
                    <BINARY_DIR>/src/interfaces/libpq/${ep_lib_prefix}pq.a
 | 
			
		||||
                    <BINARY_DIR>/src/common/${ep_lib_prefix}pgcommon.a
 | 
			
		||||
                    <BINARY_DIR>/src/port/${ep_lib_prefix}pgport.a
 | 
			
		||||
                LOG_BUILD TRUE
 | 
			
		||||
                )
 | 
			
		||||
            ExternalProject_Get_Property (postgres_src SOURCE_DIR)
 | 
			
		||||
            ExternalProject_Get_Property (postgres_src BINARY_DIR)
 | 
			
		||||
 | 
			
		||||
            set (postgres_src_SOURCE_DIR "${SOURCE_DIR}")
 | 
			
		||||
            file (MAKE_DIRECTORY ${postgres_src_SOURCE_DIR})
 | 
			
		||||
            list(APPEND INCLUDE_DIRS
 | 
			
		||||
                ${SOURCE_DIR}/src/include
 | 
			
		||||
                ${SOURCE_DIR}/src/interfaces/libpq
 | 
			
		||||
                )
 | 
			
		||||
            set_target_properties(postgres PROPERTIES
 | 
			
		||||
                IMPORTED_LOCATION
 | 
			
		||||
                    ${BINARY_DIR}/src/interfaces/libpq/${ep_lib_prefix}pq.a
 | 
			
		||||
                INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
                    "${INCLUDE_DIRS}"
 | 
			
		||||
                )
 | 
			
		||||
            set_target_properties(pgcommon PROPERTIES
 | 
			
		||||
                IMPORTED_LOCATION
 | 
			
		||||
                    ${BINARY_DIR}/src/common/${ep_lib_prefix}pgcommon.a
 | 
			
		||||
                INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
                    "${INCLUDE_DIRS}"
 | 
			
		||||
                )
 | 
			
		||||
            set_target_properties(pgport PROPERTIES
 | 
			
		||||
                IMPORTED_LOCATION
 | 
			
		||||
                    ${BINARY_DIR}/src/port/${ep_lib_prefix}pgport.a
 | 
			
		||||
                INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
                    "${INCLUDE_DIRS}"
 | 
			
		||||
                )
 | 
			
		||||
            add_dependencies(postgres postgres_src)
 | 
			
		||||
            add_dependencies(pgcommon postgres_src)
 | 
			
		||||
            add_dependencies(pgport postgres_src)
 | 
			
		||||
            file(TO_CMAKE_PATH "${postgres_src_SOURCE_DIR}" postgres_src_SOURCE_DIR)
 | 
			
		||||
            target_link_libraries(ripple_libs INTERFACE postgres pgcommon pgport)
 | 
			
		||||
        else()
 | 
			
		||||
            message("Found system installed Postgres via find_libary")
 | 
			
		||||
            target_include_directories(ripple_libs INTERFACE ${libpq-fe})
 | 
			
		||||
            target_link_libraries(ripple_libs INTERFACE ${postgres})
 | 
			
		||||
        endif()
 | 
			
		||||
    else()
 | 
			
		||||
        message("Found system installed Postgres via find_package")
 | 
			
		||||
        target_include_directories(ripple_libs INTERFACE ${PostgreSQL_INCLUDE_DIRS})
 | 
			
		||||
        target_link_libraries(ripple_libs INTERFACE ${PostgreSQL_LIBRARIES})
 | 
			
		||||
    endif()
 | 
			
		||||
endif()
 | 
			
		||||
@@ -1,155 +1,22 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   import protobuf (lib and compiler) and create a lib
 | 
			
		||||
   from our proto message definitions. If the system protobuf
 | 
			
		||||
   is not found, fallback on EP to download and build a version
 | 
			
		||||
   from official source.
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
find_package(Protobuf 3.8)
 | 
			
		||||
 | 
			
		||||
if (static)
 | 
			
		||||
  set (Protobuf_USE_STATIC_LIBS ON)
 | 
			
		||||
endif ()
 | 
			
		||||
find_package (Protobuf 3.8)
 | 
			
		||||
if (is_multiconfig)
 | 
			
		||||
    set(protobuf_protoc_lib ${Protobuf_PROTOC_LIBRARIES})
 | 
			
		||||
else ()
 | 
			
		||||
    string(TOUPPER ${CMAKE_BUILD_TYPE} upper_cmake_build_type)
 | 
			
		||||
    set(protobuf_protoc_lib ${Protobuf_PROTOC_LIBRARY_${upper_cmake_build_type}})
 | 
			
		||||
endif ()
 | 
			
		||||
if (local_protobuf OR NOT (Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE AND protobuf_protoc_lib))
 | 
			
		||||
  include (GNUInstallDirs)
 | 
			
		||||
  message (STATUS "using local protobuf build.")
 | 
			
		||||
  set(protobuf_reqs Protobuf_PROTOC_EXECUTABLE protobuf_protoc_lib)
 | 
			
		||||
  foreach(lib ${protobuf_reqs})
 | 
			
		||||
    if(NOT ${lib})
 | 
			
		||||
      message(STATUS "Couldn't find ${lib}")
 | 
			
		||||
    endif()
 | 
			
		||||
  endforeach()
 | 
			
		||||
  if (WIN32)
 | 
			
		||||
    # protobuf prepends lib even on windows
 | 
			
		||||
    set (pbuf_lib_pre "lib")
 | 
			
		||||
  else ()
 | 
			
		||||
    set (pbuf_lib_pre ${ep_lib_prefix})
 | 
			
		||||
  endif ()
 | 
			
		||||
  # for the external project build of protobuf, we currently ignore the
 | 
			
		||||
  # static option and always build static libs here. This is consistent
 | 
			
		||||
  # with our other EP builds. Dynamic libs in an EP would add complexity
 | 
			
		||||
  # because we'd need to get them into the runtime path, and probably
 | 
			
		||||
  # install them.
 | 
			
		||||
  ExternalProject_Add (protobuf_src
 | 
			
		||||
    PREFIX ${nih_cache_path}
 | 
			
		||||
    GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
 | 
			
		||||
    GIT_TAG v3.8.0
 | 
			
		||||
    SOURCE_SUBDIR cmake
 | 
			
		||||
    CMAKE_ARGS
 | 
			
		||||
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
 | 
			
		||||
      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
      -DCMAKE_INSTALL_PREFIX=<BINARY_DIR>/_installed_
 | 
			
		||||
      -Dprotobuf_BUILD_TESTS=OFF
 | 
			
		||||
      -Dprotobuf_BUILD_EXAMPLES=OFF
 | 
			
		||||
      -Dprotobuf_BUILD_PROTOC_BINARIES=ON
 | 
			
		||||
      -Dprotobuf_MSVC_STATIC_RUNTIME=ON
 | 
			
		||||
      -DBUILD_SHARED_LIBS=OFF
 | 
			
		||||
      -Dprotobuf_BUILD_SHARED_LIBS=OFF
 | 
			
		||||
      -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
      -Dprotobuf_DEBUG_POSTFIX=_d
 | 
			
		||||
      -Dprotobuf_WITH_ZLIB=$<IF:$<BOOL:${has_zlib}>,ON,OFF>
 | 
			
		||||
      $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
      $<$<BOOL:${unity}>:-DCMAKE_UNITY_BUILD=ON}>
 | 
			
		||||
      $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
      $<$<BOOL:${MSVC}>:
 | 
			
		||||
	"-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -EHa -MP"
 | 
			
		||||
      >
 | 
			
		||||
    LOG_BUILD ON
 | 
			
		||||
    LOG_CONFIGURE ON
 | 
			
		||||
    BUILD_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
    TEST_COMMAND ""
 | 
			
		||||
    INSTALL_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --config $<CONFIG> --target install
 | 
			
		||||
    BUILD_BYPRODUCTS
 | 
			
		||||
      <BINARY_DIR>/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protobuf${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protobuf_d${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protoc${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protoc_d${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/_installed_/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}
 | 
			
		||||
  )
 | 
			
		||||
  ExternalProject_Get_Property (protobuf_src BINARY_DIR)
 | 
			
		||||
  ExternalProject_Get_Property (protobuf_src SOURCE_DIR)
 | 
			
		||||
  if (CMAKE_VERBOSE_MAKEFILE)
 | 
			
		||||
    print_ep_logs (protobuf_src)
 | 
			
		||||
  endif ()
 | 
			
		||||
  exclude_if_included (protobuf_src)
 | 
			
		||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/proto_gen)
 | 
			
		||||
set(ccbd ${CMAKE_CURRENT_BINARY_DIR})
 | 
			
		||||
set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_BINARY_DIR}/proto_gen)
 | 
			
		||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS src/ripple/proto/ripple.proto)
 | 
			
		||||
set(CMAKE_CURRENT_BINARY_DIR ${ccbd})
 | 
			
		||||
 | 
			
		||||
  if (NOT TARGET protobuf::libprotobuf)
 | 
			
		||||
    add_library (protobuf::libprotobuf STATIC IMPORTED GLOBAL)
 | 
			
		||||
  endif ()
 | 
			
		||||
  file (MAKE_DIRECTORY ${BINARY_DIR}/_installed_/include)
 | 
			
		||||
  set_target_properties (protobuf::libprotobuf PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${BINARY_DIR}/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protobuf_d${ep_lib_suffix}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${BINARY_DIR}/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protobuf${ep_lib_suffix}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
      ${BINARY_DIR}/_installed_/include)
 | 
			
		||||
  add_dependencies (protobuf::libprotobuf protobuf_src)
 | 
			
		||||
  exclude_if_included (protobuf::libprotobuf)
 | 
			
		||||
 | 
			
		||||
  if (NOT TARGET protobuf::libprotoc)
 | 
			
		||||
    add_library (protobuf::libprotoc STATIC IMPORTED GLOBAL)
 | 
			
		||||
  endif ()
 | 
			
		||||
  set_target_properties (protobuf::libprotoc PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${BINARY_DIR}/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protoc_d${ep_lib_suffix}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${BINARY_DIR}/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protoc${ep_lib_suffix}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
      ${BINARY_DIR}/_installed_/include)
 | 
			
		||||
  add_dependencies (protobuf::libprotoc protobuf_src)
 | 
			
		||||
  exclude_if_included (protobuf::libprotoc)
 | 
			
		||||
 | 
			
		||||
  if (NOT TARGET protobuf::protoc)
 | 
			
		||||
    add_executable (protobuf::protoc IMPORTED)
 | 
			
		||||
    exclude_if_included (protobuf::protoc)
 | 
			
		||||
  endif ()
 | 
			
		||||
  set_target_properties (protobuf::protoc PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION "${BINARY_DIR}/_installed_/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}")
 | 
			
		||||
  add_dependencies (protobuf::protoc protobuf_src)
 | 
			
		||||
else ()
 | 
			
		||||
  if (NOT TARGET protobuf::protoc)
 | 
			
		||||
    if (EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
 | 
			
		||||
      add_executable (protobuf::protoc IMPORTED)
 | 
			
		||||
      set_target_properties (protobuf::protoc PROPERTIES
 | 
			
		||||
        IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}")
 | 
			
		||||
    else ()
 | 
			
		||||
      message (FATAL_ERROR "Protobuf import failed")
 | 
			
		||||
    endif ()
 | 
			
		||||
  endif ()
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/proto_gen)
 | 
			
		||||
set (save_CBD ${CMAKE_CURRENT_BINARY_DIR})
 | 
			
		||||
set (CMAKE_CURRENT_BINARY_DIR ${CMAKE_BINARY_DIR}/proto_gen)
 | 
			
		||||
protobuf_generate_cpp (
 | 
			
		||||
  PROTO_SRCS
 | 
			
		||||
  PROTO_HDRS
 | 
			
		||||
  src/ripple/proto/ripple.proto)
 | 
			
		||||
set (CMAKE_CURRENT_BINARY_DIR ${save_CBD})
 | 
			
		||||
 | 
			
		||||
add_library (pbufs STATIC ${PROTO_SRCS} ${PROTO_HDRS})
 | 
			
		||||
 | 
			
		||||
target_include_directories (pbufs PRIVATE src)
 | 
			
		||||
target_include_directories (pbufs
 | 
			
		||||
  SYSTEM PUBLIC ${CMAKE_BINARY_DIR}/proto_gen)
 | 
			
		||||
target_link_libraries (pbufs protobuf::libprotobuf)
 | 
			
		||||
target_compile_options (pbufs
 | 
			
		||||
add_library(pbufs STATIC ${PROTO_SRCS} ${PROTO_HDRS})
 | 
			
		||||
target_include_directories(pbufs SYSTEM PUBLIC
 | 
			
		||||
  ${CMAKE_BINARY_DIR}/proto_gen
 | 
			
		||||
  ${CMAKE_BINARY_DIR}/proto_gen/src/ripple/proto
 | 
			
		||||
)
 | 
			
		||||
target_link_libraries(pbufs protobuf::libprotobuf)
 | 
			
		||||
target_compile_options(pbufs
 | 
			
		||||
  PUBLIC
 | 
			
		||||
    $<$<BOOL:${is_xcode}>:
 | 
			
		||||
    $<$<BOOL:${XCODE}>:
 | 
			
		||||
      --system-header-prefix="google/protobuf"
 | 
			
		||||
      -Wno-deprecated-dynamic-exception-spec
 | 
			
		||||
    >)
 | 
			
		||||
add_library (Ripple::pbufs ALIAS pbufs)
 | 
			
		||||
target_link_libraries (ripple_libs INTERFACE Ripple::pbufs)
 | 
			
		||||
exclude_if_included (pbufs)
 | 
			
		||||
    >
 | 
			
		||||
)
 | 
			
		||||
add_library(Ripple::pbufs ALIAS pbufs)
 | 
			
		||||
@@ -1,177 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: rocksdb
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
add_library (rocksdb_lib UNKNOWN IMPORTED GLOBAL)
 | 
			
		||||
set_target_properties (rocksdb_lib
 | 
			
		||||
  PROPERTIES INTERFACE_COMPILE_DEFINITIONS RIPPLE_ROCKSDB_AVAILABLE=1)
 | 
			
		||||
 | 
			
		||||
option (local_rocksdb "use local build of rocksdb." OFF)
 | 
			
		||||
if (NOT local_rocksdb)
 | 
			
		||||
  find_package (RocksDB 6.27 QUIET CONFIG)
 | 
			
		||||
  if (TARGET RocksDB::rocksdb)
 | 
			
		||||
    message (STATUS "Found RocksDB using config.")
 | 
			
		||||
    get_target_property (_rockslib_l RocksDB::rocksdb IMPORTED_LOCATION_DEBUG)
 | 
			
		||||
    if (_rockslib_l)
 | 
			
		||||
      set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION_DEBUG ${_rockslib_l})
 | 
			
		||||
    endif ()
 | 
			
		||||
    get_target_property (_rockslib_l RocksDB::rocksdb IMPORTED_LOCATION_RELEASE)
 | 
			
		||||
    if (_rockslib_l)
 | 
			
		||||
      set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION_RELEASE ${_rockslib_l})
 | 
			
		||||
    endif ()
 | 
			
		||||
    get_target_property (_rockslib_l RocksDB::rocksdb IMPORTED_LOCATION)
 | 
			
		||||
    if (_rockslib_l)
 | 
			
		||||
      set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION ${_rockslib_l})
 | 
			
		||||
    endif ()
 | 
			
		||||
    get_target_property (_rockslib_i RocksDB::rocksdb INTERFACE_INCLUDE_DIRECTORIES)
 | 
			
		||||
    if (_rockslib_i)
 | 
			
		||||
      set_target_properties (rocksdb_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${_rockslib_i})
 | 
			
		||||
    endif ()
 | 
			
		||||
    target_link_libraries (ripple_libs INTERFACE RocksDB::rocksdb)
 | 
			
		||||
  else ()
 | 
			
		||||
    # using a find module with rocksdb is difficult because
 | 
			
		||||
    # you have no idea how it was configured (transitive dependencies).
 | 
			
		||||
    # the code below will generally find rocksdb using the module, but
 | 
			
		||||
    # will then result in linker errors for static linkage since the
 | 
			
		||||
    # transitive dependencies are unknown. force local build here for now, but leave the code as
 | 
			
		||||
    # a placeholder for future investigation.
 | 
			
		||||
    if (static)
 | 
			
		||||
      set (local_rocksdb ON CACHE BOOL "" FORCE)
 | 
			
		||||
      # TBD if there is some way to extract transitive deps..then:
 | 
			
		||||
      #set (RocksDB_USE_STATIC ON)
 | 
			
		||||
    else ()
 | 
			
		||||
      find_package (RocksDB 6.27 MODULE)
 | 
			
		||||
      if (ROCKSDB_FOUND)
 | 
			
		||||
        if (RocksDB_LIBRARY_DEBUG)
 | 
			
		||||
          set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION_DEBUG ${RocksDB_LIBRARY_DEBUG})
 | 
			
		||||
        endif ()
 | 
			
		||||
        set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION_RELEASE ${RocksDB_LIBRARIES})
 | 
			
		||||
        set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION ${RocksDB_LIBRARIES})
 | 
			
		||||
        set_target_properties (rocksdb_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${RocksDB_INCLUDE_DIRS})
 | 
			
		||||
      else ()
 | 
			
		||||
        set (local_rocksdb ON CACHE BOOL "" FORCE)
 | 
			
		||||
      endif ()
 | 
			
		||||
    endif ()
 | 
			
		||||
  endif ()
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
if (local_rocksdb)
 | 
			
		||||
  message (STATUS "Using local build of RocksDB.")
 | 
			
		||||
  ExternalProject_Add (rocksdb
 | 
			
		||||
    PREFIX ${nih_cache_path}
 | 
			
		||||
    GIT_REPOSITORY https://github.com/facebook/rocksdb.git
 | 
			
		||||
    GIT_TAG v6.27.3
 | 
			
		||||
    PATCH_COMMAND
 | 
			
		||||
      # only used by windows build
 | 
			
		||||
      ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
      ${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/rocks_thirdparty.inc
 | 
			
		||||
      <SOURCE_DIR>/thirdparty.inc
 | 
			
		||||
    COMMAND
 | 
			
		||||
      # fixup their build version file to keep the values
 | 
			
		||||
      # from changing always
 | 
			
		||||
      ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
      ${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/rocksdb_build_version.cc.in
 | 
			
		||||
      <SOURCE_DIR>/util/build_version.cc.in
 | 
			
		||||
    CMAKE_ARGS
 | 
			
		||||
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
 | 
			
		||||
      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
      $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
      $<$<BOOL:${unity}>:-DCMAKE_UNITY_BUILD=ON}>
 | 
			
		||||
      -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
      $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
      -DBUILD_SHARED_LIBS=OFF
 | 
			
		||||
      -DCMAKE_POSITION_INDEPENDENT_CODE=ON
 | 
			
		||||
      -DWITH_JEMALLOC=$<IF:$<BOOL:${jemalloc}>,ON,OFF>
 | 
			
		||||
      -DWITH_SNAPPY=ON
 | 
			
		||||
      -DWITH_LZ4=ON
 | 
			
		||||
      -DWITH_ZLIB=OFF
 | 
			
		||||
      -DUSE_RTTI=ON
 | 
			
		||||
      -DWITH_ZSTD=OFF
 | 
			
		||||
      -DWITH_GFLAGS=OFF
 | 
			
		||||
      -DWITH_BZ2=OFF
 | 
			
		||||
      -ULZ4_*
 | 
			
		||||
      -Ulz4_*
 | 
			
		||||
      -Dlz4_INCLUDE_DIRS=$<JOIN:$<TARGET_PROPERTY:lz4_lib,INTERFACE_INCLUDE_DIRECTORIES>,::>
 | 
			
		||||
      -Dlz4_LIBRARIES=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:lz4_lib,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:lz4_lib,IMPORTED_LOCATION_RELEASE>>
 | 
			
		||||
      -Dlz4_FOUND=ON
 | 
			
		||||
      -USNAPPY_*
 | 
			
		||||
      -Usnappy_*
 | 
			
		||||
      -USnappy_*
 | 
			
		||||
      -Dsnappy_INCLUDE_DIRS=$<JOIN:$<TARGET_PROPERTY:snappy_lib,INTERFACE_INCLUDE_DIRECTORIES>,::>
 | 
			
		||||
      -Dsnappy_LIBRARIES=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:snappy_lib,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:snappy_lib,IMPORTED_LOCATION_RELEASE>>
 | 
			
		||||
      -Dsnappy_FOUND=ON
 | 
			
		||||
      -DSnappy_INCLUDE_DIRS=$<JOIN:$<TARGET_PROPERTY:snappy_lib,INTERFACE_INCLUDE_DIRECTORIES>,::>
 | 
			
		||||
      -DSnappy_LIBRARIES=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:snappy_lib,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:snappy_lib,IMPORTED_LOCATION_RELEASE>>
 | 
			
		||||
      -DSnappy_FOUND=ON
 | 
			
		||||
      -DWITH_MD_LIBRARY=OFF
 | 
			
		||||
      -DWITH_RUNTIME_DEBUG=$<IF:$<CONFIG:Debug>,ON,OFF>
 | 
			
		||||
      -DFAIL_ON_WARNINGS=OFF
 | 
			
		||||
      -DWITH_ASAN=OFF
 | 
			
		||||
      -DWITH_TSAN=OFF
 | 
			
		||||
      -DWITH_UBSAN=OFF
 | 
			
		||||
      -DWITH_NUMA=OFF
 | 
			
		||||
      -DWITH_TBB=OFF
 | 
			
		||||
      -DWITH_WINDOWS_UTF8_FILENAMES=OFF
 | 
			
		||||
      -DWITH_XPRESS=OFF
 | 
			
		||||
      -DPORTABLE=ON
 | 
			
		||||
      -DFORCE_SSE42=OFF
 | 
			
		||||
      -DDISABLE_STALL_NOTIF=OFF
 | 
			
		||||
      -DOPTDBG=ON
 | 
			
		||||
      -DROCKSDB_LITE=OFF
 | 
			
		||||
      -DWITH_FALLOCATE=ON
 | 
			
		||||
      -DWITH_LIBRADOS=OFF
 | 
			
		||||
      -DWITH_JNI=OFF
 | 
			
		||||
      -DROCKSDB_INSTALL_ON_WINDOWS=OFF
 | 
			
		||||
      -DWITH_TESTS=OFF
 | 
			
		||||
      -DWITH_TOOLS=OFF
 | 
			
		||||
      $<$<BOOL:${MSVC}>:
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -MP /DNDEBUG"
 | 
			
		||||
      >
 | 
			
		||||
      $<$<NOT:$<BOOL:${MSVC}>>:
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS=-DNDEBUG"
 | 
			
		||||
      >
 | 
			
		||||
    LOG_BUILD ON
 | 
			
		||||
    LOG_CONFIGURE ON
 | 
			
		||||
    BUILD_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
          <BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}rocksdb$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
          <BINARY_DIR>
 | 
			
		||||
        >
 | 
			
		||||
    LIST_SEPARATOR ::
 | 
			
		||||
    TEST_COMMAND ""
 | 
			
		||||
    INSTALL_COMMAND ""
 | 
			
		||||
    DEPENDS snappy_lib lz4_lib
 | 
			
		||||
    BUILD_BYPRODUCTS
 | 
			
		||||
      <BINARY_DIR>/${ep_lib_prefix}rocksdb${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/${ep_lib_prefix}rocksdb_d${ep_lib_suffix}
 | 
			
		||||
  )
 | 
			
		||||
  ExternalProject_Get_Property (rocksdb BINARY_DIR)
 | 
			
		||||
  ExternalProject_Get_Property (rocksdb SOURCE_DIR)
 | 
			
		||||
  if (CMAKE_VERBOSE_MAKEFILE)
 | 
			
		||||
    print_ep_logs (rocksdb)
 | 
			
		||||
  endif ()
 | 
			
		||||
  file (MAKE_DIRECTORY ${SOURCE_DIR}/include)
 | 
			
		||||
  set_target_properties (rocksdb_lib PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${BINARY_DIR}/${ep_lib_prefix}rocksdb_d${ep_lib_suffix}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${BINARY_DIR}/${ep_lib_prefix}rocksdb${ep_lib_suffix}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
      ${SOURCE_DIR}/include)
 | 
			
		||||
  add_dependencies (rocksdb_lib rocksdb)
 | 
			
		||||
  exclude_if_included (rocksdb)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
target_link_libraries (rocksdb_lib
 | 
			
		||||
  INTERFACE
 | 
			
		||||
    snappy_lib
 | 
			
		||||
    lz4_lib
 | 
			
		||||
    $<$<BOOL:${MSVC}>:rpcrt4>)
 | 
			
		||||
exclude_if_included (rocksdb_lib)
 | 
			
		||||
target_link_libraries (ripple_libs INTERFACE rocksdb_lib)
 | 
			
		||||
@@ -1,58 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: secp256k1
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
add_library (secp256k1_lib STATIC IMPORTED GLOBAL)
 | 
			
		||||
 | 
			
		||||
if (NOT WIN32)
 | 
			
		||||
  find_package(secp256k1)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(secp256k1)
 | 
			
		||||
  set_target_properties (secp256k1_lib PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${secp256k1}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${secp256k1}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
      ${SECP256K1_INCLUDE_DIR})
 | 
			
		||||
 | 
			
		||||
  add_library (secp256k1 ALIAS secp256k1_lib)
 | 
			
		||||
  add_library (NIH::secp256k1 ALIAS secp256k1_lib)
 | 
			
		||||
 | 
			
		||||
else()
 | 
			
		||||
  set(INSTALL_SECP256K1 true)
 | 
			
		||||
 | 
			
		||||
  add_library (secp256k1 STATIC
 | 
			
		||||
    src/secp256k1/src/secp256k1.c)
 | 
			
		||||
  target_compile_definitions (secp256k1
 | 
			
		||||
    PRIVATE
 | 
			
		||||
      USE_NUM_NONE
 | 
			
		||||
      USE_FIELD_10X26
 | 
			
		||||
      USE_FIELD_INV_BUILTIN
 | 
			
		||||
      USE_SCALAR_8X32
 | 
			
		||||
      USE_SCALAR_INV_BUILTIN)
 | 
			
		||||
  target_include_directories (secp256k1
 | 
			
		||||
    PUBLIC
 | 
			
		||||
      $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
 | 
			
		||||
      $<INSTALL_INTERFACE:include>
 | 
			
		||||
    PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/secp256k1)
 | 
			
		||||
  target_compile_options (secp256k1
 | 
			
		||||
    PRIVATE
 | 
			
		||||
      $<$<BOOL:${MSVC}>:-wd4319>
 | 
			
		||||
      $<$<NOT:$<BOOL:${MSVC}>>:
 | 
			
		||||
        -Wno-deprecated-declarations
 | 
			
		||||
        -Wno-unused-function
 | 
			
		||||
      >
 | 
			
		||||
      $<$<BOOL:${is_gcc}>:-Wno-nonnull-compare>)
 | 
			
		||||
  target_link_libraries (ripple_libs INTERFACE NIH::secp256k1)
 | 
			
		||||
#[===========================[
 | 
			
		||||
     headers installation
 | 
			
		||||
#]===========================]
 | 
			
		||||
  install (
 | 
			
		||||
    FILES
 | 
			
		||||
      src/secp256k1/include/secp256k1.h
 | 
			
		||||
  DESTINATION include/secp256k1/include)
 | 
			
		||||
 | 
			
		||||
  add_library (NIH::secp256k1 ALIAS secp256k1)
 | 
			
		||||
endif()
 | 
			
		||||
@@ -1,77 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: snappy
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
add_library (snappy_lib STATIC IMPORTED GLOBAL)
 | 
			
		||||
 | 
			
		||||
if (NOT WIN32)
 | 
			
		||||
  find_package(snappy)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(snappy)
 | 
			
		||||
  set_target_properties (snappy_lib PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${snappy}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${snappy}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
    ${SNAPPY_INCLUDE_DIR})
 | 
			
		||||
 | 
			
		||||
else()
 | 
			
		||||
  ExternalProject_Add (snappy
 | 
			
		||||
    PREFIX ${nih_cache_path}
 | 
			
		||||
    GIT_REPOSITORY https://github.com/google/snappy.git
 | 
			
		||||
    GIT_TAG 1.1.7
 | 
			
		||||
    CMAKE_ARGS
 | 
			
		||||
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
 | 
			
		||||
      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
      $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
      -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
      $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
      -DBUILD_SHARED_LIBS=OFF
 | 
			
		||||
      -DCMAKE_POSITION_INDEPENDENT_CODE=ON
 | 
			
		||||
      -DSNAPPY_BUILD_TESTS=OFF
 | 
			
		||||
      $<$<BOOL:${MSVC}>:
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -EHa -MP"
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS_DEBUG=-MTd"
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS_RELEASE=-MT"
 | 
			
		||||
      >
 | 
			
		||||
    LOG_BUILD ON
 | 
			
		||||
    LOG_CONFIGURE ON
 | 
			
		||||
    BUILD_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
          <BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}snappy$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
          <BINARY_DIR>
 | 
			
		||||
        >
 | 
			
		||||
    TEST_COMMAND ""
 | 
			
		||||
    INSTALL_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND} -E copy_if_different <BINARY_DIR>/config.h <BINARY_DIR>/snappy-stubs-public.h <SOURCE_DIR>
 | 
			
		||||
    BUILD_BYPRODUCTS
 | 
			
		||||
      <BINARY_DIR>/${ep_lib_prefix}snappy${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/${ep_lib_prefix}snappy_d${ep_lib_suffix}
 | 
			
		||||
  )
 | 
			
		||||
  ExternalProject_Get_Property (snappy BINARY_DIR)
 | 
			
		||||
  ExternalProject_Get_Property (snappy SOURCE_DIR)
 | 
			
		||||
  if (CMAKE_VERBOSE_MAKEFILE)
 | 
			
		||||
    print_ep_logs (snappy)
 | 
			
		||||
  endif ()
 | 
			
		||||
  file (MAKE_DIRECTORY ${SOURCE_DIR}/snappy)
 | 
			
		||||
  set_target_properties (snappy_lib PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${BINARY_DIR}/${ep_lib_prefix}snappy_d${ep_lib_suffix}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${BINARY_DIR}/${ep_lib_prefix}snappy${ep_lib_suffix}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
      ${SOURCE_DIR})
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
add_dependencies (snappy_lib snappy)
 | 
			
		||||
target_link_libraries (ripple_libs INTERFACE snappy_lib)
 | 
			
		||||
exclude_if_included (snappy)
 | 
			
		||||
exclude_if_included (snappy_lib)
 | 
			
		||||
@@ -1,164 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: soci
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
foreach (_comp core empty sqlite3)
 | 
			
		||||
  add_library ("soci_${_comp}" STATIC IMPORTED GLOBAL)
 | 
			
		||||
endforeach ()
 | 
			
		||||
 | 
			
		||||
if (NOT WIN32)
 | 
			
		||||
  find_package(soci)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if (soci)
 | 
			
		||||
  foreach (_comp core empty sqlite3)
 | 
			
		||||
    set_target_properties ("soci_${_comp}" PROPERTIES
 | 
			
		||||
      IMPORTED_LOCATION_DEBUG
 | 
			
		||||
        ${soci}
 | 
			
		||||
      IMPORTED_LOCATION_RELEASE
 | 
			
		||||
        ${soci}
 | 
			
		||||
      INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
        ${SOCI_INCLUDE_DIR})
 | 
			
		||||
  endforeach ()
 | 
			
		||||
 | 
			
		||||
else()
 | 
			
		||||
  set (soci_lib_pre ${ep_lib_prefix})
 | 
			
		||||
  set (soci_lib_post "")
 | 
			
		||||
  if (WIN32)
 | 
			
		||||
    # for some reason soci on windows still prepends lib (non-standard)
 | 
			
		||||
    set (soci_lib_pre lib)
 | 
			
		||||
    # this version in the name might change if/when we change versions of soci
 | 
			
		||||
    set (soci_lib_post "_4_0")
 | 
			
		||||
  endif ()
 | 
			
		||||
  get_target_property (_boost_incs Boost::date_time INTERFACE_INCLUDE_DIRECTORIES)
 | 
			
		||||
  get_target_property (_boost_dt Boost::date_time IMPORTED_LOCATION)
 | 
			
		||||
  if (NOT _boost_dt)
 | 
			
		||||
    get_target_property (_boost_dt Boost::date_time IMPORTED_LOCATION_RELEASE)
 | 
			
		||||
  endif ()
 | 
			
		||||
  if (NOT _boost_dt)
 | 
			
		||||
    get_target_property (_boost_dt Boost::date_time IMPORTED_LOCATION_DEBUG)
 | 
			
		||||
  endif ()
 | 
			
		||||
 | 
			
		||||
  ExternalProject_Add (soci
 | 
			
		||||
    PREFIX ${nih_cache_path}
 | 
			
		||||
    GIT_REPOSITORY https://github.com/SOCI/soci.git
 | 
			
		||||
    GIT_TAG 04e1870294918d20761736743bb6136314c42dd5
 | 
			
		||||
    # We had an issue with soci integer range checking for boost::optional
 | 
			
		||||
    # and needed to remove the exception that SOCI throws in this case.
 | 
			
		||||
    # This is *probably* a bug in SOCI, but has never been investigated more
 | 
			
		||||
    # nor reported to the maintainers.
 | 
			
		||||
    # This cmake script comments out the lines in question.
 | 
			
		||||
    # This patch process is likely fragile and should be reviewed carefully
 | 
			
		||||
    # whenever we update the GIT_TAG above.
 | 
			
		||||
    PATCH_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/soci_patch.cmake
 | 
			
		||||
    CMAKE_ARGS
 | 
			
		||||
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
 | 
			
		||||
      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
      $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
      $<$<BOOL:${CMAKE_TOOLCHAIN_FILE}>:-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}>
 | 
			
		||||
      $<$<BOOL:${VCPKG_TARGET_TRIPLET}>:-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}>
 | 
			
		||||
      $<$<BOOL:${unity}>:-DCMAKE_UNITY_BUILD=ON}>
 | 
			
		||||
      -DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/sqlite3
 | 
			
		||||
      -DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake
 | 
			
		||||
      -DCMAKE_INCLUDE_PATH=$<JOIN:$<TARGET_PROPERTY:sqlite,INTERFACE_INCLUDE_DIRECTORIES>,::>
 | 
			
		||||
      -DCMAKE_LIBRARY_PATH=${sqlite_BINARY_DIR}
 | 
			
		||||
      -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
      $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
      -DSOCI_CXX_C11=ON
 | 
			
		||||
      -DSOCI_STATIC=ON
 | 
			
		||||
      -DSOCI_LIBDIR=lib
 | 
			
		||||
      -DSOCI_SHARED=OFF
 | 
			
		||||
      -DSOCI_TESTS=OFF
 | 
			
		||||
      # hacks to workaround the fact that soci doesn't currently use
 | 
			
		||||
      # boost imported targets in its cmake. If they switch to
 | 
			
		||||
      # proper imported targets, this next line can be removed
 | 
			
		||||
      # (as well as the get_property above that sets _boost_incs)
 | 
			
		||||
      -DBoost_INCLUDE_DIRS=$<JOIN:${_boost_incs},::>
 | 
			
		||||
      -DBoost_INCLUDE_DIR=$<JOIN:${_boost_incs},::>
 | 
			
		||||
      -DBOOST_ROOT=${BOOST_ROOT}
 | 
			
		||||
      -DWITH_BOOST=ON
 | 
			
		||||
      -DBoost_FOUND=ON
 | 
			
		||||
      -DBoost_NO_BOOST_CMAKE=ON
 | 
			
		||||
      -DBoost_DATE_TIME_FOUND=ON
 | 
			
		||||
      -DSOCI_HAVE_BOOST=ON
 | 
			
		||||
      -DSOCI_HAVE_BOOST_DATE_TIME=ON
 | 
			
		||||
      -DBoost_DATE_TIME_LIBRARY=${_boost_dt}
 | 
			
		||||
      -DSOCI_DB2=OFF
 | 
			
		||||
      -DSOCI_FIREBIRD=OFF
 | 
			
		||||
      -DSOCI_MYSQL=OFF
 | 
			
		||||
      -DSOCI_ODBC=OFF
 | 
			
		||||
      -DSOCI_ORACLE=OFF
 | 
			
		||||
      -DSOCI_POSTGRESQL=OFF
 | 
			
		||||
      -DSOCI_SQLITE3=ON
 | 
			
		||||
      -DSQLITE3_INCLUDE_DIR=$<JOIN:$<TARGET_PROPERTY:sqlite,INTERFACE_INCLUDE_DIRECTORIES>,::>
 | 
			
		||||
      -DSQLITE3_LIBRARY=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:sqlite,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:sqlite,IMPORTED_LOCATION_RELEASE>>
 | 
			
		||||
      $<$<BOOL:${APPLE}>:-DCMAKE_FIND_FRAMEWORK=LAST>
 | 
			
		||||
      $<$<BOOL:${MSVC}>:
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -EHa -MP"
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS_DEBUG=-MTd"
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS_RELEASE=-MT"
 | 
			
		||||
      >
 | 
			
		||||
      $<$<NOT:$<BOOL:${MSVC}>>:
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations"
 | 
			
		||||
      >
 | 
			
		||||
      # SEE: https://github.com/SOCI/soci/issues/640
 | 
			
		||||
      $<$<AND:$<BOOL:${is_gcc}>,$<VERSION_GREATER_EQUAL:${CMAKE_CXX_COMPILER_VERSION},8>>:
 | 
			
		||||
        "-DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -Wno-error=format-overflow -Wno-format-overflow -Wno-error=format-truncation"
 | 
			
		||||
      >
 | 
			
		||||
    LIST_SEPARATOR ::
 | 
			
		||||
    LOG_BUILD ON
 | 
			
		||||
    LOG_CONFIGURE ON
 | 
			
		||||
    BUILD_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
          <BINARY_DIR>/lib/$<CONFIG>/${soci_lib_pre}soci_core${soci_lib_post}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
          <BINARY_DIR>/lib/$<CONFIG>/${soci_lib_pre}soci_empty${soci_lib_post}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
          <BINARY_DIR>/lib/$<CONFIG>/${soci_lib_pre}soci_sqlite3${soci_lib_post}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
          <BINARY_DIR>/lib
 | 
			
		||||
        >
 | 
			
		||||
    TEST_COMMAND ""
 | 
			
		||||
    INSTALL_COMMAND ""
 | 
			
		||||
    DEPENDS sqlite
 | 
			
		||||
    BUILD_BYPRODUCTS
 | 
			
		||||
      <BINARY_DIR>/lib/${soci_lib_pre}soci_core${soci_lib_post}${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/lib/${soci_lib_pre}soci_core${soci_lib_post}_d${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/lib/${soci_lib_pre}soci_empty${soci_lib_post}${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/lib/${soci_lib_pre}soci_empty${soci_lib_post}_d${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/lib/${soci_lib_pre}soci_sqlite3${soci_lib_post}${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/lib/${soci_lib_pre}soci_sqlite3${soci_lib_post}_d${ep_lib_suffix}
 | 
			
		||||
  )
 | 
			
		||||
  ExternalProject_Get_Property (soci BINARY_DIR)
 | 
			
		||||
  ExternalProject_Get_Property (soci SOURCE_DIR)
 | 
			
		||||
  if (CMAKE_VERBOSE_MAKEFILE)
 | 
			
		||||
    print_ep_logs (soci)
 | 
			
		||||
  endif ()
 | 
			
		||||
  file (MAKE_DIRECTORY ${SOURCE_DIR}/include)
 | 
			
		||||
  file (MAKE_DIRECTORY ${BINARY_DIR}/include)
 | 
			
		||||
  foreach (_comp core empty sqlite3)
 | 
			
		||||
    set_target_properties ("soci_${_comp}" PROPERTIES
 | 
			
		||||
      IMPORTED_LOCATION_DEBUG
 | 
			
		||||
        ${BINARY_DIR}/lib/${soci_lib_pre}soci_${_comp}${soci_lib_post}_d${ep_lib_suffix}
 | 
			
		||||
      IMPORTED_LOCATION_RELEASE
 | 
			
		||||
        ${BINARY_DIR}/lib/${soci_lib_pre}soci_${_comp}${soci_lib_post}${ep_lib_suffix}
 | 
			
		||||
      INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
        "${SOURCE_DIR}/include;${BINARY_DIR}/include")
 | 
			
		||||
    add_dependencies ("soci_${_comp}" soci) # something has to depend on the ExternalProject to trigger it
 | 
			
		||||
    target_link_libraries (ripple_libs INTERFACE "soci_${_comp}")
 | 
			
		||||
    if (NOT _comp STREQUAL "core")
 | 
			
		||||
      target_link_libraries ("soci_${_comp}" INTERFACE soci_core)
 | 
			
		||||
    endif ()
 | 
			
		||||
  endforeach ()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
foreach (_comp core empty sqlite3)
 | 
			
		||||
  exclude_if_included ("soci_${_comp}")
 | 
			
		||||
endforeach ()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
exclude_if_included (soci)
 | 
			
		||||
@@ -1,93 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: sqlite
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
add_library (sqlite STATIC IMPORTED GLOBAL)
 | 
			
		||||
 | 
			
		||||
if (NOT WIN32)
 | 
			
		||||
  find_package(sqlite)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if(sqlite3)
 | 
			
		||||
  set_target_properties (sqlite PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${sqlite3}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${sqlite3}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
    ${SQLITE_INCLUDE_DIR})
 | 
			
		||||
 | 
			
		||||
else()
 | 
			
		||||
  ExternalProject_Add (sqlite3
 | 
			
		||||
    PREFIX ${nih_cache_path}
 | 
			
		||||
    # sqlite doesn't use git, but it provides versioned tarballs
 | 
			
		||||
    URL https://www.sqlite.org/2018/sqlite-amalgamation-3260000.zip
 | 
			
		||||
      http://www.sqlite.org/2018/sqlite-amalgamation-3260000.zip
 | 
			
		||||
      https://www2.sqlite.org/2018/sqlite-amalgamation-3260000.zip
 | 
			
		||||
      http://www2.sqlite.org/2018/sqlite-amalgamation-3260000.zip
 | 
			
		||||
    # ^^^ version is apparent in the URL:  3260000 => 3.26.0
 | 
			
		||||
    URL_HASH SHA256=de5dcab133aa339a4cf9e97c40aa6062570086d6085d8f9ad7bc6ddf8a52096e
 | 
			
		||||
    # Don't need to worry about MITM attacks too much because the download
 | 
			
		||||
    # is checked against a strong hash
 | 
			
		||||
    TLS_VERIFY false
 | 
			
		||||
    # we wrote a very simple CMake file to build sqlite
 | 
			
		||||
    # so that's what we copy here so that we can build with
 | 
			
		||||
    # CMake. sqlite doesn't generally provided a build system
 | 
			
		||||
    # for the single amalgamation source file.
 | 
			
		||||
    PATCH_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
      ${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/CMake_sqlite3.txt
 | 
			
		||||
      <SOURCE_DIR>/CMakeLists.txt
 | 
			
		||||
    CMAKE_ARGS
 | 
			
		||||
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
 | 
			
		||||
      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
      $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
      -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
      $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
      $<$<BOOL:${MSVC}>:
 | 
			
		||||
        "-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
 | 
			
		||||
        "-DCMAKE_C_FLAGS_DEBUG=-MTd"
 | 
			
		||||
        "-DCMAKE_C_FLAGS_RELEASE=-MT"
 | 
			
		||||
      >
 | 
			
		||||
    LOG_BUILD ON
 | 
			
		||||
    LOG_CONFIGURE ON
 | 
			
		||||
    BUILD_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
            <BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}sqlite3$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
            <BINARY_DIR>
 | 
			
		||||
        >
 | 
			
		||||
    TEST_COMMAND ""
 | 
			
		||||
    INSTALL_COMMAND ""
 | 
			
		||||
    BUILD_BYPRODUCTS
 | 
			
		||||
      <BINARY_DIR>/${ep_lib_prefix}sqlite3${ep_lib_suffix}
 | 
			
		||||
      <BINARY_DIR>/${ep_lib_prefix}sqlite3_d${ep_lib_suffix}
 | 
			
		||||
  )
 | 
			
		||||
  ExternalProject_Get_Property (sqlite3 BINARY_DIR)
 | 
			
		||||
  ExternalProject_Get_Property (sqlite3 SOURCE_DIR)
 | 
			
		||||
  if (CMAKE_VERBOSE_MAKEFILE)
 | 
			
		||||
    print_ep_logs (sqlite3)
 | 
			
		||||
  endif ()
 | 
			
		||||
 | 
			
		||||
  set_target_properties (sqlite PROPERTIES
 | 
			
		||||
    IMPORTED_LOCATION_DEBUG
 | 
			
		||||
      ${BINARY_DIR}/${ep_lib_prefix}sqlite3_d${ep_lib_suffix}
 | 
			
		||||
    IMPORTED_LOCATION_RELEASE
 | 
			
		||||
      ${BINARY_DIR}/${ep_lib_prefix}sqlite3${ep_lib_suffix}
 | 
			
		||||
    INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
      ${SOURCE_DIR})
 | 
			
		||||
 | 
			
		||||
  add_dependencies (sqlite sqlite3)
 | 
			
		||||
  exclude_if_included (sqlite3)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
target_link_libraries (sqlite INTERFACE $<$<NOT:$<BOOL:${MSVC}>>:dl>)
 | 
			
		||||
target_link_libraries (ripple_libs INTERFACE sqlite)
 | 
			
		||||
exclude_if_included (sqlite)
 | 
			
		||||
set(sqlite_BINARY_DIR ${BINARY_DIR})
 | 
			
		||||
@@ -1,66 +1 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
 NIH dep: wasmedge: web assembly runtime for hooks.
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
find_package(LLVM REQUIRED CONFIG)
 | 
			
		||||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
 | 
			
		||||
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
 | 
			
		||||
ExternalProject_Add (wasmedge_src
 | 
			
		||||
  PREFIX ${nih_cache_path}
 | 
			
		||||
  GIT_REPOSITORY https://github.com/WasmEdge/WasmEdge.git
 | 
			
		||||
  GIT_TAG 0.11.2
 | 
			
		||||
  CMAKE_ARGS
 | 
			
		||||
    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
 | 
			
		||||
    -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
    $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
    -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
    -DWASMEDGE_BUILD_SHARED_LIB=OFF
 | 
			
		||||
    -DWASMEDGE_BUILD_STATIC_LIB=ON
 | 
			
		||||
    -DWASMEDGE_BUILD_AOT_RUNTIME=ON
 | 
			
		||||
    -DWASMEDGE_FORCE_DISABLE_LTO=ON
 | 
			
		||||
    -DWASMEDGE_LINK_LLVM_STATIC=ON
 | 
			
		||||
    -DWASMEDGE_LINK_TOOLS_STATIC=ON
 | 
			
		||||
    -DWASMEDGE_BUILD_PLUGINS=OFF
 | 
			
		||||
    -DCMAKE_POSITION_INDEPENDENT_CODE=ON
 | 
			
		||||
    -DLLVM_DIR=${LLVM_DIR}
 | 
			
		||||
    -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
 | 
			
		||||
    $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
    $<$<BOOL:${MSVC}>:
 | 
			
		||||
      "-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP -march=native"
 | 
			
		||||
      "-DCMAKE_C_FLAGS_DEBUG=-MTd"
 | 
			
		||||
      "-DCMAKE_C_FLAGS_RELEASE=-MT"
 | 
			
		||||
    >  
 | 
			
		||||
  LOG_CONFIGURE ON
 | 
			
		||||
  LOG_BUILD ON
 | 
			
		||||
  LOG_CONFIGURE ON
 | 
			
		||||
  COMMAND
 | 
			
		||||
    pwd
 | 
			
		||||
  BUILD_COMMAND
 | 
			
		||||
    ${CMAKE_COMMAND}
 | 
			
		||||
    --build .
 | 
			
		||||
    --config $<CONFIG>
 | 
			
		||||
    $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
  TEST_COMMAND ""
 | 
			
		||||
  INSTALL_COMMAND ""
 | 
			
		||||
  BUILD_BYPRODUCTS
 | 
			
		||||
      <BINARY_DIR>/lib/api/libwasmedge.a
 | 
			
		||||
)
 | 
			
		||||
add_library (wasmedge STATIC IMPORTED GLOBAL)
 | 
			
		||||
ExternalProject_Get_Property (wasmedge_src BINARY_DIR)
 | 
			
		||||
ExternalProject_Get_Property (wasmedge_src SOURCE_DIR)
 | 
			
		||||
set (wasmedge_src_BINARY_DIR "${BINARY_DIR}")
 | 
			
		||||
add_dependencies (wasmedge wasmedge_src)
 | 
			
		||||
execute_process(
 | 
			
		||||
    COMMAND
 | 
			
		||||
        mkdir -p "${wasmedge_src_BINARY_DIR}/include/api"
 | 
			
		||||
)
 | 
			
		||||
set_target_properties (wasmedge PROPERTIES
 | 
			
		||||
  IMPORTED_LOCATION_DEBUG
 | 
			
		||||
    "${wasmedge_src_BINARY_DIR}/lib/api/libwasmedge.a"
 | 
			
		||||
  IMPORTED_LOCATION_RELEASE
 | 
			
		||||
    "${wasmedge_src_BINARY_DIR}/lib/api/libwasmedge.a"
 | 
			
		||||
  INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
    "${wasmedge_src_BINARY_DIR}/include/api/"
 | 
			
		||||
)
 | 
			
		||||
target_link_libraries (ripple_libs INTERFACE wasmedge)
 | 
			
		||||
add_library (NIH::WasmEdge ALIAS wasmedge)
 | 
			
		||||
find_package(wasmedge REQUIRED)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,167 +0,0 @@
 | 
			
		||||
if(reporting)
 | 
			
		||||
    find_library(cassandra NAMES cassandra)
 | 
			
		||||
    if(NOT cassandra)
 | 
			
		||||
 | 
			
		||||
        message("System installed Cassandra cpp driver not found. Will build")
 | 
			
		||||
 | 
			
		||||
        find_library(zlib NAMES zlib1g-dev zlib-devel zlib z)
 | 
			
		||||
        if(NOT zlib)
 | 
			
		||||
            message("zlib not found. will build")
 | 
			
		||||
            add_library(zlib STATIC IMPORTED GLOBAL)
 | 
			
		||||
            ExternalProject_Add(zlib_src
 | 
			
		||||
                PREFIX ${nih_cache_path}
 | 
			
		||||
                GIT_REPOSITORY https://github.com/madler/zlib.git
 | 
			
		||||
                GIT_TAG master
 | 
			
		||||
                INSTALL_COMMAND ""
 | 
			
		||||
                BUILD_BYPRODUCTS <BINARY_DIR>/${ep_lib_prefix}z.a
 | 
			
		||||
                LOG_BUILD TRUE
 | 
			
		||||
                LOG_CONFIGURE TRUE
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            ExternalProject_Get_Property (zlib_src SOURCE_DIR)
 | 
			
		||||
            ExternalProject_Get_Property (zlib_src BINARY_DIR)
 | 
			
		||||
            set (zlib_src_SOURCE_DIR "${SOURCE_DIR}")
 | 
			
		||||
            file (MAKE_DIRECTORY ${zlib_src_SOURCE_DIR}/include)
 | 
			
		||||
 | 
			
		||||
            set_target_properties (zlib PROPERTIES
 | 
			
		||||
                IMPORTED_LOCATION
 | 
			
		||||
                ${BINARY_DIR}/${ep_lib_prefix}z.a
 | 
			
		||||
                INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
                ${SOURCE_DIR}/include)
 | 
			
		||||
            add_dependencies(zlib zlib_src)
 | 
			
		||||
 | 
			
		||||
            file(TO_CMAKE_PATH "${zlib_src_SOURCE_DIR}" zlib_src_SOURCE_DIR)
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        find_library(krb5 NAMES krb5-dev libkrb5-dev)
 | 
			
		||||
 | 
			
		||||
        if(NOT krb5)
 | 
			
		||||
            message("krb5 not found. will build")
 | 
			
		||||
            add_library(krb5 STATIC IMPORTED GLOBAL)
 | 
			
		||||
            ExternalProject_Add(krb5_src
 | 
			
		||||
                PREFIX ${nih_cache_path}
 | 
			
		||||
                GIT_REPOSITORY https://github.com/krb5/krb5.git
 | 
			
		||||
                GIT_TAG master
 | 
			
		||||
                UPDATE_COMMAND ""
 | 
			
		||||
                CONFIGURE_COMMAND autoreconf src && CFLAGS=-fcommon ./src/configure --enable-static --disable-shared > /dev/null
 | 
			
		||||
                BUILD_IN_SOURCE 1
 | 
			
		||||
                BUILD_COMMAND make
 | 
			
		||||
                INSTALL_COMMAND ""
 | 
			
		||||
                BUILD_BYPRODUCTS <SOURCE_DIR>/lib/${ep_lib_prefix}krb5.a
 | 
			
		||||
                LOG_BUILD TRUE
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
            ExternalProject_Get_Property (krb5_src SOURCE_DIR)
 | 
			
		||||
            ExternalProject_Get_Property (krb5_src BINARY_DIR)
 | 
			
		||||
            set (krb5_src_SOURCE_DIR "${SOURCE_DIR}")
 | 
			
		||||
            file (MAKE_DIRECTORY ${krb5_src_SOURCE_DIR}/include)
 | 
			
		||||
 | 
			
		||||
            set_target_properties (krb5 PROPERTIES
 | 
			
		||||
                IMPORTED_LOCATION
 | 
			
		||||
                ${BINARY_DIR}/lib/${ep_lib_prefix}krb5.a
 | 
			
		||||
                INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
                ${SOURCE_DIR}/include)
 | 
			
		||||
            add_dependencies(krb5 krb5_src)
 | 
			
		||||
 | 
			
		||||
            file(TO_CMAKE_PATH "${krb5_src_SOURCE_DIR}" krb5_src_SOURCE_DIR)
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        find_library(libuv1 NAMES uv1 libuv1 liubuv1-dev libuv1:amd64)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        if(NOT libuv1)
 | 
			
		||||
            message("libuv1 not found, will build")
 | 
			
		||||
            add_library(libuv1 STATIC IMPORTED GLOBAL)
 | 
			
		||||
            ExternalProject_Add(libuv_src
 | 
			
		||||
                PREFIX ${nih_cache_path}
 | 
			
		||||
                GIT_REPOSITORY https://github.com/libuv/libuv.git
 | 
			
		||||
                GIT_TAG v1.x
 | 
			
		||||
                INSTALL_COMMAND ""
 | 
			
		||||
                BUILD_BYPRODUCTS <BINARY_DIR>/${ep_lib_prefix}uv_a.a
 | 
			
		||||
                LOG_BUILD TRUE
 | 
			
		||||
                LOG_CONFIGURE TRUE
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
            ExternalProject_Get_Property (libuv_src SOURCE_DIR)
 | 
			
		||||
            ExternalProject_Get_Property (libuv_src BINARY_DIR)
 | 
			
		||||
            set (libuv_src_SOURCE_DIR "${SOURCE_DIR}")
 | 
			
		||||
            file (MAKE_DIRECTORY ${libuv_src_SOURCE_DIR}/include)
 | 
			
		||||
 | 
			
		||||
            set_target_properties (libuv1 PROPERTIES
 | 
			
		||||
                IMPORTED_LOCATION
 | 
			
		||||
                ${BINARY_DIR}/${ep_lib_prefix}uv_a.a
 | 
			
		||||
                INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
                ${SOURCE_DIR}/include)
 | 
			
		||||
            add_dependencies(libuv1 libuv_src)
 | 
			
		||||
 | 
			
		||||
            file(TO_CMAKE_PATH "${libuv_src_SOURCE_DIR}" libuv_src_SOURCE_DIR)
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
        add_library (cassandra STATIC IMPORTED GLOBAL)
 | 
			
		||||
        ExternalProject_Add(cassandra_src
 | 
			
		||||
            PREFIX ${nih_cache_path}
 | 
			
		||||
            GIT_REPOSITORY https://github.com/datastax/cpp-driver.git
 | 
			
		||||
            GIT_TAG master
 | 
			
		||||
            CMAKE_ARGS
 | 
			
		||||
            -DLIBUV_ROOT_DIR=${BINARY_DIR}
 | 
			
		||||
            -DLIBUV_LIBARY=${BINARY_DIR}/libuv_a.a
 | 
			
		||||
            -DLIBUV_INCLUDE_DIR=${SOURCE_DIR}/include
 | 
			
		||||
            -DCASS_BUILD_STATIC=ON
 | 
			
		||||
            -DCASS_BUILD_SHARED=OFF
 | 
			
		||||
            -DOPENSSL_ROOT_DIR=/opt/local/openssl
 | 
			
		||||
            INSTALL_COMMAND ""
 | 
			
		||||
            BUILD_BYPRODUCTS <BINARY_DIR>/${ep_lib_prefix}cassandra_static.a
 | 
			
		||||
            LOG_BUILD TRUE
 | 
			
		||||
            LOG_CONFIGURE TRUE
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
        ExternalProject_Get_Property (cassandra_src SOURCE_DIR)
 | 
			
		||||
        ExternalProject_Get_Property (cassandra_src BINARY_DIR)
 | 
			
		||||
        set (cassandra_src_SOURCE_DIR "${SOURCE_DIR}")
 | 
			
		||||
        file (MAKE_DIRECTORY ${cassandra_src_SOURCE_DIR}/include)
 | 
			
		||||
 | 
			
		||||
        set_target_properties (cassandra PROPERTIES
 | 
			
		||||
            IMPORTED_LOCATION
 | 
			
		||||
            ${BINARY_DIR}/${ep_lib_prefix}cassandra_static.a
 | 
			
		||||
            INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
            ${SOURCE_DIR}/include)
 | 
			
		||||
        add_dependencies(cassandra cassandra_src)
 | 
			
		||||
 | 
			
		||||
        if(NOT libuv1)
 | 
			
		||||
            ExternalProject_Add_StepDependencies(cassandra_src build libuv1)
 | 
			
		||||
            target_link_libraries(cassandra INTERFACE libuv1)
 | 
			
		||||
        else()
 | 
			
		||||
            target_link_libraries(cassandra INTERFACE ${libuv1})
 | 
			
		||||
        endif()
 | 
			
		||||
        if(NOT krb5)
 | 
			
		||||
 | 
			
		||||
            ExternalProject_Add_StepDependencies(cassandra_src build krb5)
 | 
			
		||||
            target_link_libraries(cassandra INTERFACE krb5)
 | 
			
		||||
        else()
 | 
			
		||||
            target_link_libraries(cassandra INTERFACE ${krb5})
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
        if(NOT zlib)
 | 
			
		||||
            ExternalProject_Add_StepDependencies(cassandra_src build zlib)
 | 
			
		||||
            target_link_libraries(cassandra INTERFACE zlib)
 | 
			
		||||
        else()
 | 
			
		||||
            target_link_libraries(cassandra INTERFACE ${zlib})
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
        file(TO_CMAKE_PATH "${cassandra_src_SOURCE_DIR}" cassandra_src_SOURCE_DIR)
 | 
			
		||||
        target_link_libraries(ripple_libs INTERFACE cassandra)
 | 
			
		||||
    else()
 | 
			
		||||
        message("Found system installed cassandra cpp driver")
 | 
			
		||||
 | 
			
		||||
        find_path(cassandra_includes NAMES cassandra.h REQUIRED)
 | 
			
		||||
        target_link_libraries (ripple_libs INTERFACE ${cassandra})
 | 
			
		||||
        target_include_directories(ripple_libs INTERFACE ${cassandra_includes})
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    exclude_if_included (cassandra)
 | 
			
		||||
endif()
 | 
			
		||||
@@ -1,18 +0,0 @@
 | 
			
		||||
#[===================================================================[
 | 
			
		||||
   NIH dep: date
 | 
			
		||||
 | 
			
		||||
   the main library is header-only, thus is an INTERFACE lib in CMake.
 | 
			
		||||
 | 
			
		||||
   NOTE: this has been accepted into c++20 so can likely be replaced
 | 
			
		||||
   when we update to that standard
 | 
			
		||||
#]===================================================================]
 | 
			
		||||
 | 
			
		||||
find_package (date QUIET)
 | 
			
		||||
if (NOT TARGET date::date)
 | 
			
		||||
  FetchContent_Declare(
 | 
			
		||||
    hh_date_src
 | 
			
		||||
    GIT_REPOSITORY https://github.com/HowardHinnant/date.git
 | 
			
		||||
    GIT_TAG        fc4cf092f9674f2670fb9177edcdee870399b829
 | 
			
		||||
  )
 | 
			
		||||
  FetchContent_MakeAvailable(hh_date_src)
 | 
			
		||||
endif ()
 | 
			
		||||
@@ -1,319 +1,15 @@
 | 
			
		||||
 | 
			
		||||
# currently linking to unsecure versions...if we switch, we'll
 | 
			
		||||
# need to add ssl as a link dependency to the grpc targets
 | 
			
		||||
option (use_secure_grpc "use TLS version of grpc libs." OFF)
 | 
			
		||||
if (use_secure_grpc)
 | 
			
		||||
  set (grpc_suffix "")
 | 
			
		||||
else ()
 | 
			
		||||
  set (grpc_suffix "_unsecure")
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
find_package (gRPC 1.23 CONFIG QUIET)
 | 
			
		||||
if (TARGET gRPC::gpr AND NOT local_grpc)
 | 
			
		||||
  get_target_property (_grpc_l gRPC::gpr IMPORTED_LOCATION_DEBUG)
 | 
			
		||||
  if (NOT _grpc_l)
 | 
			
		||||
    get_target_property (_grpc_l gRPC::gpr IMPORTED_LOCATION_RELEASE)
 | 
			
		||||
  endif ()
 | 
			
		||||
  if (NOT _grpc_l)
 | 
			
		||||
    get_target_property (_grpc_l gRPC::gpr IMPORTED_LOCATION)
 | 
			
		||||
  endif ()
 | 
			
		||||
  message (STATUS "Found cmake config for gRPC. Using ${_grpc_l}.")
 | 
			
		||||
else ()
 | 
			
		||||
  find_package (PkgConfig QUIET)
 | 
			
		||||
  if (PKG_CONFIG_FOUND)
 | 
			
		||||
    pkg_check_modules (grpc QUIET "grpc${grpc_suffix}>=1.25" "grpc++${grpc_suffix}" gpr)
 | 
			
		||||
  endif ()
 | 
			
		||||
 | 
			
		||||
  if (grpc_FOUND)
 | 
			
		||||
    message (STATUS "Found gRPC using pkg-config. Using ${grpc_gpr_PREFIX}.")
 | 
			
		||||
  endif ()
 | 
			
		||||
 | 
			
		||||
  add_executable (gRPC::grpc_cpp_plugin IMPORTED)
 | 
			
		||||
  exclude_if_included (gRPC::grpc_cpp_plugin)
 | 
			
		||||
 | 
			
		||||
  if (grpc_FOUND AND NOT local_grpc)
 | 
			
		||||
    # use installed grpc (via pkg-config)
 | 
			
		||||
    macro (add_imported_grpc libname_)
 | 
			
		||||
      if (static)
 | 
			
		||||
        set (_search "${CMAKE_STATIC_LIBRARY_PREFIX}${libname_}${CMAKE_STATIC_LIBRARY_SUFFIX}")
 | 
			
		||||
      else ()
 | 
			
		||||
        set (_search "${CMAKE_SHARED_LIBRARY_PREFIX}${libname_}${CMAKE_SHARED_LIBRARY_SUFFIX}")
 | 
			
		||||
      endif()
 | 
			
		||||
      find_library(_found_${libname_}
 | 
			
		||||
        NAMES ${_search}
 | 
			
		||||
        HINTS ${grpc_LIBRARY_DIRS})
 | 
			
		||||
      if (_found_${libname_})
 | 
			
		||||
        message (STATUS "importing ${libname_} as ${_found_${libname_}}")
 | 
			
		||||
      else ()
 | 
			
		||||
        message (FATAL_ERROR "using pkg-config for grpc, can't find ${_search}")
 | 
			
		||||
      endif ()
 | 
			
		||||
      add_library ("gRPC::${libname_}" STATIC IMPORTED GLOBAL)
 | 
			
		||||
      set_target_properties ("gRPC::${libname_}" PROPERTIES IMPORTED_LOCATION ${_found_${libname_}})
 | 
			
		||||
      if (grpc_INCLUDE_DIRS)
 | 
			
		||||
        set_target_properties ("gRPC::${libname_}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${grpc_INCLUDE_DIRS})
 | 
			
		||||
      endif ()
 | 
			
		||||
      target_link_libraries (ripple_libs INTERFACE "gRPC::${libname_}")
 | 
			
		||||
      exclude_if_included ("gRPC::${libname_}")
 | 
			
		||||
    endmacro ()
 | 
			
		||||
 | 
			
		||||
    set_target_properties (gRPC::grpc_cpp_plugin PROPERTIES
 | 
			
		||||
        IMPORTED_LOCATION "${grpc_gpr_PREFIX}/bin/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX}")
 | 
			
		||||
 | 
			
		||||
    pkg_check_modules (cares QUIET libcares)
 | 
			
		||||
    if (cares_FOUND)
 | 
			
		||||
      if (static)
 | 
			
		||||
        set (_search "${CMAKE_STATIC_LIBRARY_PREFIX}cares${CMAKE_STATIC_LIBRARY_SUFFIX}")
 | 
			
		||||
        set (_prefix cares_STATIC)
 | 
			
		||||
        set (_static STATIC)
 | 
			
		||||
      else ()
 | 
			
		||||
        set (_search "${CMAKE_SHARED_LIBRARY_PREFIX}cares${CMAKE_SHARED_LIBRARY_SUFFIX}")
 | 
			
		||||
        set (_prefix cares)
 | 
			
		||||
        set (_static)
 | 
			
		||||
      endif()
 | 
			
		||||
      find_library(_location NAMES ${_search} HINTS ${cares_LIBRARY_DIRS})
 | 
			
		||||
      if (NOT _location)
 | 
			
		||||
        message (FATAL_ERROR "using pkg-config for grpc, can't find c-ares")
 | 
			
		||||
      endif ()
 | 
			
		||||
      add_library (c-ares::cares ${_static} IMPORTED GLOBAL)
 | 
			
		||||
      set_target_properties (c-ares::cares PROPERTIES
 | 
			
		||||
        IMPORTED_LOCATION ${_location}
 | 
			
		||||
        INTERFACE_INCLUDE_DIRECTORIES "${${_prefix}_INCLUDE_DIRS}"
 | 
			
		||||
        INTERFACE_LINK_OPTIONS "${${_prefix}_LDFLAGS}"
 | 
			
		||||
      )
 | 
			
		||||
      exclude_if_included (c-ares::cares)
 | 
			
		||||
    else ()
 | 
			
		||||
      message (FATAL_ERROR "using pkg-config for grpc, can't find c-ares")
 | 
			
		||||
    endif ()
 | 
			
		||||
  else ()
 | 
			
		||||
    #[===========================[
 | 
			
		||||
       c-ares (grpc requires)
 | 
			
		||||
    #]===========================]
 | 
			
		||||
    ExternalProject_Add (c-ares_src
 | 
			
		||||
      PREFIX ${nih_cache_path}
 | 
			
		||||
      GIT_REPOSITORY https://github.com/c-ares/c-ares.git
 | 
			
		||||
      GIT_TAG cares-1_15_0
 | 
			
		||||
      CMAKE_ARGS
 | 
			
		||||
        -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
        $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
        -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
        $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
        -DCMAKE_INSTALL_PREFIX=<BINARY_DIR>/_installed_
 | 
			
		||||
        -DCARES_SHARED=OFF
 | 
			
		||||
        -DCARES_STATIC=ON
 | 
			
		||||
        -DCARES_STATIC_PIC=ON
 | 
			
		||||
        -DCARES_INSTALL=ON
 | 
			
		||||
        -DCARES_MSVC_STATIC_RUNTIME=ON
 | 
			
		||||
        $<$<BOOL:${MSVC}>:
 | 
			
		||||
          "-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
 | 
			
		||||
        >
 | 
			
		||||
      LOG_BUILD ON
 | 
			
		||||
      LOG_CONFIGURE ON
 | 
			
		||||
      BUILD_COMMAND
 | 
			
		||||
        ${CMAKE_COMMAND}
 | 
			
		||||
          --build .
 | 
			
		||||
          --config $<CONFIG>
 | 
			
		||||
          --parallel ${ep_procs}
 | 
			
		||||
      TEST_COMMAND ""
 | 
			
		||||
      INSTALL_COMMAND
 | 
			
		||||
        ${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --config $<CONFIG> --target install
 | 
			
		||||
      BUILD_BYPRODUCTS
 | 
			
		||||
        <BINARY_DIR>/_installed_/lib/${ep_lib_prefix}cares${ep_lib_suffix}
 | 
			
		||||
        <BINARY_DIR>/_installed_/lib/${ep_lib_prefix}cares_d${ep_lib_suffix}
 | 
			
		||||
    )
 | 
			
		||||
    exclude_if_included (c-ares_src)
 | 
			
		||||
    ExternalProject_Get_Property (c-ares_src BINARY_DIR)
 | 
			
		||||
    set (cares_binary_dir "${BINARY_DIR}")
 | 
			
		||||
 | 
			
		||||
    add_library (c-ares::cares STATIC IMPORTED GLOBAL)
 | 
			
		||||
    file (MAKE_DIRECTORY ${BINARY_DIR}/_installed_/include)
 | 
			
		||||
    set_target_properties (c-ares::cares PROPERTIES
 | 
			
		||||
      IMPORTED_LOCATION_DEBUG
 | 
			
		||||
        ${BINARY_DIR}/_installed_/lib/${ep_lib_prefix}cares_d${ep_lib_suffix}
 | 
			
		||||
      IMPORTED_LOCATION_RELEASE
 | 
			
		||||
        ${BINARY_DIR}/_installed_/lib/${ep_lib_prefix}cares${ep_lib_suffix}
 | 
			
		||||
      INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
        ${BINARY_DIR}/_installed_/include)
 | 
			
		||||
    add_dependencies (c-ares::cares c-ares_src)
 | 
			
		||||
    exclude_if_included (c-ares::cares)
 | 
			
		||||
 | 
			
		||||
    if (NOT has_zlib)
 | 
			
		||||
      #[===========================[
 | 
			
		||||
         zlib (grpc requires)
 | 
			
		||||
      #]===========================]
 | 
			
		||||
      if (MSVC)
 | 
			
		||||
        set (zlib_debug_postfix "d") # zlib cmake sets this internally for MSVC, so we really don't have a choice
 | 
			
		||||
        set (zlib_base "zlibstatic")
 | 
			
		||||
      else ()
 | 
			
		||||
        set (zlib_debug_postfix "_d")
 | 
			
		||||
        set (zlib_base "z")
 | 
			
		||||
      endif ()
 | 
			
		||||
      ExternalProject_Add (zlib_src
 | 
			
		||||
        PREFIX ${nih_cache_path}
 | 
			
		||||
        GIT_REPOSITORY https://github.com/madler/zlib.git
 | 
			
		||||
        GIT_TAG v1.2.11
 | 
			
		||||
        CMAKE_ARGS
 | 
			
		||||
          -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
          $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
          -DCMAKE_DEBUG_POSTFIX=${zlib_debug_postfix}
 | 
			
		||||
          $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
          -DCMAKE_INSTALL_PREFIX=<BINARY_DIR>/_installed_
 | 
			
		||||
          -DBUILD_SHARED_LIBS=OFF
 | 
			
		||||
          $<$<BOOL:${MSVC}>:
 | 
			
		||||
            "-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
 | 
			
		||||
            "-DCMAKE_C_FLAGS_DEBUG=-MTd"
 | 
			
		||||
            "-DCMAKE_C_FLAGS_RELEASE=-MT"
 | 
			
		||||
          >
 | 
			
		||||
        LOG_BUILD ON
 | 
			
		||||
        LOG_CONFIGURE ON
 | 
			
		||||
        BUILD_COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND}
 | 
			
		||||
            --build .
 | 
			
		||||
            --config $<CONFIG>
 | 
			
		||||
            --parallel ${ep_procs}
 | 
			
		||||
        TEST_COMMAND ""
 | 
			
		||||
        INSTALL_COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --config $<CONFIG> --target install
 | 
			
		||||
        BUILD_BYPRODUCTS
 | 
			
		||||
          <BINARY_DIR>/_installed_/lib/${ep_lib_prefix}${zlib_base}${ep_lib_suffix}
 | 
			
		||||
          <BINARY_DIR>/_installed_/lib/${ep_lib_prefix}${zlib_base}${zlib_debug_postfix}${ep_lib_suffix}
 | 
			
		||||
      )
 | 
			
		||||
      exclude_if_included (zlib_src)
 | 
			
		||||
      ExternalProject_Get_Property (zlib_src BINARY_DIR)
 | 
			
		||||
      set (zlib_binary_dir "${BINARY_DIR}")
 | 
			
		||||
 | 
			
		||||
      add_library (ZLIB::ZLIB STATIC IMPORTED GLOBAL)
 | 
			
		||||
      file (MAKE_DIRECTORY ${BINARY_DIR}/_installed_/include)
 | 
			
		||||
      set_target_properties (ZLIB::ZLIB PROPERTIES
 | 
			
		||||
        IMPORTED_LOCATION_DEBUG
 | 
			
		||||
          ${BINARY_DIR}/_installed_/lib/${ep_lib_prefix}${zlib_base}${zlib_debug_postfix}${ep_lib_suffix}
 | 
			
		||||
        IMPORTED_LOCATION_RELEASE
 | 
			
		||||
          ${BINARY_DIR}/_installed_/lib/${ep_lib_prefix}${zlib_base}${ep_lib_suffix}
 | 
			
		||||
        INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
          ${BINARY_DIR}/_installed_/include)
 | 
			
		||||
      add_dependencies (ZLIB::ZLIB zlib_src)
 | 
			
		||||
      exclude_if_included (ZLIB::ZLIB)
 | 
			
		||||
    endif ()
 | 
			
		||||
 | 
			
		||||
    #[===========================[
 | 
			
		||||
       grpc
 | 
			
		||||
    #]===========================]
 | 
			
		||||
    ExternalProject_Add (grpc_src
 | 
			
		||||
      PREFIX ${nih_cache_path}
 | 
			
		||||
      GIT_REPOSITORY https://github.com/grpc/grpc.git
 | 
			
		||||
      GIT_TAG v1.25.0
 | 
			
		||||
      CMAKE_ARGS
 | 
			
		||||
        -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
 | 
			
		||||
        -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
 | 
			
		||||
        $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
 | 
			
		||||
        $<$<BOOL:${CMAKE_TOOLCHAIN_FILE}>:-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}>
 | 
			
		||||
        $<$<BOOL:${VCPKG_TARGET_TRIPLET}>:-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}>
 | 
			
		||||
        $<$<BOOL:${unity}>:-DCMAKE_UNITY_BUILD=ON}>
 | 
			
		||||
        -DCMAKE_DEBUG_POSTFIX=_d
 | 
			
		||||
        $<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
 | 
			
		||||
        -DgRPC_BUILD_TESTS=OFF
 | 
			
		||||
        -DgRPC_BENCHMARK_PROVIDER=""
 | 
			
		||||
        -DgRPC_BUILD_CSHARP_EXT=OFF
 | 
			
		||||
        -DgRPC_MSVC_STATIC_RUNTIME=ON
 | 
			
		||||
        -DgRPC_INSTALL=OFF
 | 
			
		||||
        -DgRPC_CARES_PROVIDER=package
 | 
			
		||||
        -Dc-ares_DIR=${cares_binary_dir}/_installed_/lib/cmake/c-ares
 | 
			
		||||
        -DgRPC_SSL_PROVIDER=package
 | 
			
		||||
        -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
 | 
			
		||||
        -DgRPC_PROTOBUF_PROVIDER=package
 | 
			
		||||
        -DProtobuf_USE_STATIC_LIBS=$<IF:$<AND:$<BOOL:${Protobuf_FOUND}>,$<NOT:$<BOOL:${static}>>>,OFF,ON>
 | 
			
		||||
        -DProtobuf_INCLUDE_DIR=$<JOIN:$<TARGET_PROPERTY:protobuf::libprotobuf,INTERFACE_INCLUDE_DIRECTORIES>,:_:>
 | 
			
		||||
        -DProtobuf_LIBRARY=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:protobuf::libprotobuf,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:protobuf::libprotobuf,IMPORTED_LOCATION_RELEASE>>
 | 
			
		||||
        -DProtobuf_PROTOC_LIBRARY=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:protobuf::libprotoc,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:protobuf::libprotoc,IMPORTED_LOCATION_RELEASE>>
 | 
			
		||||
        -DProtobuf_PROTOC_EXECUTABLE=$<TARGET_PROPERTY:protobuf::protoc,IMPORTED_LOCATION>
 | 
			
		||||
        -DgRPC_ZLIB_PROVIDER=package
 | 
			
		||||
        $<$<NOT:$<BOOL:${has_zlib}>>:-DZLIB_ROOT=${zlib_binary_dir}/_installed_>
 | 
			
		||||
        $<$<BOOL:${MSVC}>:
 | 
			
		||||
          "-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -EHa -MP"
 | 
			
		||||
          "-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
 | 
			
		||||
        >
 | 
			
		||||
      LOG_BUILD ON
 | 
			
		||||
      LOG_CONFIGURE ON
 | 
			
		||||
      BUILD_COMMAND
 | 
			
		||||
        ${CMAKE_COMMAND}
 | 
			
		||||
        --build .
 | 
			
		||||
        --config $<CONFIG>
 | 
			
		||||
        --parallel ${ep_procs}
 | 
			
		||||
        $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
          COMMAND
 | 
			
		||||
            ${CMAKE_COMMAND} -E copy
 | 
			
		||||
            <BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}grpc${grpc_suffix}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
            <BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}grpc++${grpc_suffix}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
            <BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}address_sorting$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
            <BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}gpr$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
 | 
			
		||||
            <BINARY_DIR>/$<CONFIG>/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX}
 | 
			
		||||
            <BINARY_DIR>
 | 
			
		||||
          >
 | 
			
		||||
      LIST_SEPARATOR :_:
 | 
			
		||||
      TEST_COMMAND ""
 | 
			
		||||
      INSTALL_COMMAND ""
 | 
			
		||||
      DEPENDS c-ares_src
 | 
			
		||||
      BUILD_BYPRODUCTS
 | 
			
		||||
        <BINARY_DIR>/${ep_lib_prefix}grpc${grpc_suffix}${ep_lib_suffix}
 | 
			
		||||
        <BINARY_DIR>/${ep_lib_prefix}grpc${grpc_suffix}_d${ep_lib_suffix}
 | 
			
		||||
        <BINARY_DIR>/${ep_lib_prefix}grpc++${grpc_suffix}${ep_lib_suffix}
 | 
			
		||||
        <BINARY_DIR>/${ep_lib_prefix}grpc++${grpc_suffix}_d${ep_lib_suffix}
 | 
			
		||||
        <BINARY_DIR>/${ep_lib_prefix}address_sorting${ep_lib_suffix}
 | 
			
		||||
        <BINARY_DIR>/${ep_lib_prefix}address_sorting_d${ep_lib_suffix}
 | 
			
		||||
        <BINARY_DIR>/${ep_lib_prefix}gpr${ep_lib_suffix}
 | 
			
		||||
        <BINARY_DIR>/${ep_lib_prefix}gpr_d${ep_lib_suffix}
 | 
			
		||||
        <BINARY_DIR>/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX}
 | 
			
		||||
    )
 | 
			
		||||
    if (TARGET protobuf_src)
 | 
			
		||||
      ExternalProject_Add_StepDependencies(grpc_src build protobuf_src)
 | 
			
		||||
    endif ()
 | 
			
		||||
    exclude_if_included (grpc_src)
 | 
			
		||||
    ExternalProject_Get_Property (grpc_src BINARY_DIR)
 | 
			
		||||
    ExternalProject_Get_Property (grpc_src SOURCE_DIR)
 | 
			
		||||
    set (grpc_binary_dir "${BINARY_DIR}")
 | 
			
		||||
    set (grpc_source_dir "${SOURCE_DIR}")
 | 
			
		||||
    if (CMAKE_VERBOSE_MAKEFILE)
 | 
			
		||||
      print_ep_logs (grpc_src)
 | 
			
		||||
    endif ()
 | 
			
		||||
    file (MAKE_DIRECTORY ${SOURCE_DIR}/include)
 | 
			
		||||
 | 
			
		||||
    macro (add_imported_grpc libname_)
 | 
			
		||||
      add_library ("gRPC::${libname_}" STATIC IMPORTED GLOBAL)
 | 
			
		||||
      set_target_properties ("gRPC::${libname_}" PROPERTIES
 | 
			
		||||
        IMPORTED_LOCATION_DEBUG
 | 
			
		||||
          ${grpc_binary_dir}/${ep_lib_prefix}${libname_}_d${ep_lib_suffix}
 | 
			
		||||
        IMPORTED_LOCATION_RELEASE
 | 
			
		||||
          ${grpc_binary_dir}/${ep_lib_prefix}${libname_}${ep_lib_suffix}
 | 
			
		||||
        INTERFACE_INCLUDE_DIRECTORIES
 | 
			
		||||
          ${grpc_source_dir}/include)
 | 
			
		||||
      add_dependencies ("gRPC::${libname_}" grpc_src)
 | 
			
		||||
      target_link_libraries (ripple_libs INTERFACE "gRPC::${libname_}")
 | 
			
		||||
      exclude_if_included ("gRPC::${libname_}")
 | 
			
		||||
    endmacro ()
 | 
			
		||||
 | 
			
		||||
    set_target_properties (gRPC::grpc_cpp_plugin PROPERTIES
 | 
			
		||||
        IMPORTED_LOCATION "${grpc_binary_dir}/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX}")
 | 
			
		||||
    add_dependencies (gRPC::grpc_cpp_plugin grpc_src)
 | 
			
		||||
  endif ()
 | 
			
		||||
 | 
			
		||||
  add_imported_grpc (gpr)
 | 
			
		||||
  add_imported_grpc ("grpc${grpc_suffix}")
 | 
			
		||||
  add_imported_grpc ("grpc++${grpc_suffix}")
 | 
			
		||||
  add_imported_grpc (address_sorting)
 | 
			
		||||
 | 
			
		||||
  target_link_libraries ("gRPC::grpc${grpc_suffix}" INTERFACE c-ares::cares gRPC::gpr gRPC::address_sorting ZLIB::ZLIB)
 | 
			
		||||
  target_link_libraries ("gRPC::grpc++${grpc_suffix}" INTERFACE "gRPC::grpc${grpc_suffix}" gRPC::gpr)
 | 
			
		||||
endif ()
 | 
			
		||||
find_package(gRPC 1.23)
 | 
			
		||||
 | 
			
		||||
#[=================================[
 | 
			
		||||
   generate protobuf sources for
 | 
			
		||||
   grpc defs and bundle into a
 | 
			
		||||
   static lib
 | 
			
		||||
#]=================================]
 | 
			
		||||
set (GRPC_GEN_DIR "${CMAKE_BINARY_DIR}/proto_gen_grpc")
 | 
			
		||||
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")
 | 
			
		||||
set(GRPC_GEN_DIR "${CMAKE_BINARY_DIR}/proto_gen_grpc")
 | 
			
		||||
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 LIST_DIRECTORIES false "${GRPC_PROTO_ROOT}/*.proto")
 | 
			
		||||
foreach(file ${GRPC_DEFINITION_FILES})
 | 
			
		||||
  get_filename_component(_abs_file ${file} ABSOLUTE)
 | 
			
		||||
@@ -324,10 +20,10 @@ foreach(file ${GRPC_DEFINITION_FILES})
 | 
			
		||||
  get_filename_component(_rel_root_dir ${_rel_root_file} DIRECTORY)
 | 
			
		||||
  file(RELATIVE_PATH _rel_dir ${CMAKE_CURRENT_SOURCE_DIR} ${_abs_dir})
 | 
			
		||||
 | 
			
		||||
  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")
 | 
			
		||||
  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
 | 
			
		||||
@@ -345,20 +41,22 @@ foreach(file ${GRPC_DEFINITION_FILES})
 | 
			
		||||
    list(APPEND GRPC_PROTO_HDRS ${hdr_1} ${hdr_2})
 | 
			
		||||
endforeach()
 | 
			
		||||
 | 
			
		||||
add_library (grpc_pbufs STATIC ${GRPC_PROTO_SRCS} ${GRPC_PROTO_HDRS})
 | 
			
		||||
#target_include_directories (grpc_pbufs PRIVATE src)
 | 
			
		||||
target_include_directories (grpc_pbufs SYSTEM PUBLIC ${GRPC_GEN_DIR})
 | 
			
		||||
target_link_libraries (grpc_pbufs protobuf::libprotobuf "gRPC::grpc++${grpc_suffix}")
 | 
			
		||||
target_compile_options (grpc_pbufs
 | 
			
		||||
add_library(grpc_pbufs STATIC ${GRPC_PROTO_SRCS} ${GRPC_PROTO_HDRS})
 | 
			
		||||
#target_include_directories(grpc_pbufs PRIVATE src)
 | 
			
		||||
target_include_directories(grpc_pbufs SYSTEM PUBLIC ${GRPC_GEN_DIR})
 | 
			
		||||
target_link_libraries(grpc_pbufs
 | 
			
		||||
  "gRPC::grpc++"
 | 
			
		||||
  # libgrpc is missing references.
 | 
			
		||||
  absl::random_random
 | 
			
		||||
)
 | 
			
		||||
target_compile_options(grpc_pbufs
 | 
			
		||||
  PRIVATE
 | 
			
		||||
    $<$<BOOL:${MSVC}>:-wd4065>
 | 
			
		||||
    $<$<NOT:$<BOOL:${MSVC}>>:-Wno-deprecated-declarations>
 | 
			
		||||
  PUBLIC
 | 
			
		||||
    $<$<BOOL:${MSVC}>:-wd4996>
 | 
			
		||||
    $<$<BOOL:${is_xcode}>:
 | 
			
		||||
    $<$<BOOL:${XCODE}>:
 | 
			
		||||
      --system-header-prefix="google/protobuf"
 | 
			
		||||
      -Wno-deprecated-dynamic-exception-spec
 | 
			
		||||
    >)
 | 
			
		||||
add_library (Ripple::grpc_pbufs ALIAS grpc_pbufs)
 | 
			
		||||
target_link_libraries (ripple_libs INTERFACE Ripple::grpc_pbufs)
 | 
			
		||||
exclude_if_included (grpc_pbufs)
 | 
			
		||||
add_library(Ripple::grpc_pbufs ALIAS grpc_pbufs)
 | 
			
		||||
@@ -2,6 +2,16 @@
 | 
			
		||||
# so as to remove type range check exceptions that cause
 | 
			
		||||
# us trouble when using boost::optional to select int values
 | 
			
		||||
 | 
			
		||||
# Soci's CMake setup leaves flags in place that will cause warnings to
 | 
			
		||||
# be treated as errors, but some compiler versions throw "new" warnings
 | 
			
		||||
# that then cause the build to fail. Simplify that until soci fixes
 | 
			
		||||
# those warnings.
 | 
			
		||||
if (RIPPLED_SOURCE)
 | 
			
		||||
  execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
      ${RIPPLED_SOURCE}/Builds/CMake/SociConfig.cmake.patched
 | 
			
		||||
      cmake/SociConfig.cmake )
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
# Some versions of CMake erroneously patch external projects on every build.
 | 
			
		||||
# If the patch makes no changes, skip it. This workaround can be
 | 
			
		||||
# removed once we stop supporting vulnerable versions of CMake.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								Builds/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								Builds/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
[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,45 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  // See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file.
 | 
			
		||||
  "configurations": [
 | 
			
		||||
    {
 | 
			
		||||
      "name": "x64-Debug",
 | 
			
		||||
      "generator": "Visual Studio 15 2017 Win64",
 | 
			
		||||
      "configurationType": "Debug",
 | 
			
		||||
      "inheritEnvironments": [ "msvc_x64_x64" ],
 | 
			
		||||
      "buildRoot": "${thisFileDir}\\build\\${name}",
 | 
			
		||||
      "cmakeCommandArgs": "",
 | 
			
		||||
      "buildCommandArgs": "-v:minimal",
 | 
			
		||||
      "ctestCommandArgs": "",
 | 
			
		||||
      "variables": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "BOOST_ROOT",
 | 
			
		||||
          "value": "C:\\lib\\boost"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "name": "OPENSSL_ROOT",
 | 
			
		||||
          "value": "C:\\lib\\OpenSSL-Win64"
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "x64-Release",
 | 
			
		||||
      "generator": "Visual Studio 15 2017 Win64",
 | 
			
		||||
      "configurationType": "Release",
 | 
			
		||||
      "inheritEnvironments": [ "msvc_x64_x64" ],
 | 
			
		||||
      "buildRoot": "${thisFileDir}\\build\\${name}",
 | 
			
		||||
      "cmakeCommandArgs": "",
 | 
			
		||||
      "buildCommandArgs": "-v:minimal",
 | 
			
		||||
      "ctestCommandArgs": "",
 | 
			
		||||
      "variables": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "BOOST_ROOT",
 | 
			
		||||
          "value": "C:\\lib\\boost"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "name": "OPENSSL_ROOT",
 | 
			
		||||
          "value": "C:\\lib\\OpenSSL-Win64"
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
@@ -1,263 +0,0 @@
 | 
			
		||||
# Visual Studio 2017 Build Instructions
 | 
			
		||||
 | 
			
		||||
## Important
 | 
			
		||||
 | 
			
		||||
We do not recommend Windows for rippled production use at this time. Currently,
 | 
			
		||||
the Ubuntu platform has received the highest level of quality assurance,
 | 
			
		||||
testing, and support. Additionally, 32-bit Windows versions are not supported.
 | 
			
		||||
 | 
			
		||||
## Prerequisites
 | 
			
		||||
 | 
			
		||||
To clone the source code repository, create branches for inspection or
 | 
			
		||||
modification, build rippled under Visual Studio, and run the unit tests you will
 | 
			
		||||
need these software components
 | 
			
		||||
 | 
			
		||||
| Component | Minimum Recommended Version |
 | 
			
		||||
|-----------|-----------------------|
 | 
			
		||||
| [Visual Studio 2017](README.md#install-visual-studio-2017)| 15.5.4 |
 | 
			
		||||
| [Git for Windows](README.md#install-git-for-windows)| 2.16.1 |
 | 
			
		||||
| [OpenSSL Library](README.md#install-openssl) | 1.1.1L |
 | 
			
		||||
| [Boost library](README.md#build-boost) | 1.70.0 |
 | 
			
		||||
| [CMake for Windows](README.md#optional-install-cmake-for-windows)* | 3.12 |
 | 
			
		||||
 | 
			
		||||
\* Only needed if not using the integrated CMake in VS 2017 and prefer generating dedicated project/solution files.
 | 
			
		||||
 | 
			
		||||
## Install Software
 | 
			
		||||
 | 
			
		||||
### Install Visual Studio 2017
 | 
			
		||||
 | 
			
		||||
If not already installed on your system, download your choice of installer from
 | 
			
		||||
the [Visual Studio 2017
 | 
			
		||||
Download](https://www.visualstudio.com/downloads/download-visual-studio-vs)
 | 
			
		||||
page, run the installer, and follow the directions. **You may need to choose the
 | 
			
		||||
`Desktop development with C++` workload to install all necessary C++ features.**
 | 
			
		||||
 | 
			
		||||
Any version of Visual Studio 2017 may be used to build rippled. The **Visual
 | 
			
		||||
Studio 2017 Community** edition is available free of charge (see [the product
 | 
			
		||||
page](https://www.visualstudio.com/products/visual-studio-community-vs) for
 | 
			
		||||
licensing details), while paid editions may be used for an initial free-trial
 | 
			
		||||
period.
 | 
			
		||||
 | 
			
		||||
### Install Git for Windows
 | 
			
		||||
 | 
			
		||||
Git is a distributed revision control system. The Windows version also provides
 | 
			
		||||
the bash shell and many Windows versions of Unix commands. While there are other
 | 
			
		||||
varieties of Git (such as TortoiseGit, which has a native Windows interface and
 | 
			
		||||
integrates with the Explorer shell), we recommend installing [Git for
 | 
			
		||||
Windows](https://git-scm.com/) since it provides a Unix-like command line
 | 
			
		||||
environment useful for running shell scripts. Use of the bash shell under
 | 
			
		||||
Windows is mandatory for running the unit tests.
 | 
			
		||||
 | 
			
		||||
### Install OpenSSL
 | 
			
		||||
 | 
			
		||||
[Download the latest version of
 | 
			
		||||
OpenSSL.](http://slproweb.com/products/Win32OpenSSL.html) There will
 | 
			
		||||
several `Win64` bit variants available, you want the non-light
 | 
			
		||||
`v1.1` line. As of this writing, you **should** select
 | 
			
		||||
 | 
			
		||||
* Win64 OpenSSL v1.1.1L
 | 
			
		||||
 | 
			
		||||
and should **not** select
 | 
			
		||||
 | 
			
		||||
* Anything with "Win32" in the name
 | 
			
		||||
* Anything with "light" in the name
 | 
			
		||||
* Anything with "EXPERIMENTAL" in the name
 | 
			
		||||
* Anything in the 3.0 line - rippled won't currently build with this version.
 | 
			
		||||
 | 
			
		||||
Run the installer, and choose an appropriate location for your OpenSSL
 | 
			
		||||
installation. In this guide we use `C:\lib\OpenSSL-Win64` as the destination
 | 
			
		||||
location.
 | 
			
		||||
 | 
			
		||||
You may be informed on running the installer that "Visual C++ 2008
 | 
			
		||||
Redistributables" must first be installed first. If so, download it from the
 | 
			
		||||
[same page](http://slproweb.com/products/Win32OpenSSL.html), again making sure
 | 
			
		||||
to get the correct 32-/64-bit variant.
 | 
			
		||||
 | 
			
		||||
* NOTE: Since rippled links statically to OpenSSL, it does not matter where the
 | 
			
		||||
  OpenSSL .DLL files are placed, or what version they are. rippled does not use
 | 
			
		||||
  or require any external .DLL files to run other than the standard operating
 | 
			
		||||
  system ones.
 | 
			
		||||
 | 
			
		||||
### Build Boost
 | 
			
		||||
 | 
			
		||||
Boost 1.70 or later is required.
 | 
			
		||||
 | 
			
		||||
After [downloading boost](http://www.boost.org/users/download/) and unpacking it
 | 
			
		||||
to `c:\lib`. As of this writing, the most recent version of boost is 1.70.0,
 | 
			
		||||
which will unpack into a directory named `boost_1_70_0`. We recommended either
 | 
			
		||||
renaming this directory to `boost`, or creating a junction link `mklink /J boost
 | 
			
		||||
boost_1_70_0`, so that you can more easily switch between versions.
 | 
			
		||||
 | 
			
		||||
Next, open **Developer Command Prompt** and type the following commands
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
cd C:\lib\boost
 | 
			
		||||
bootstrap
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The rippled application is linked statically to the standard runtimes and
 | 
			
		||||
external dependencies on Windows, to ensure that the behavior of the executable
 | 
			
		||||
is not affected by changes in outside files. Therefore, it is necessary to build
 | 
			
		||||
the required boost static libraries using this command:
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
bjam -j<Num Parallel> --toolset=msvc-14.1 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared,static stage
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
where you should replace `<Num Parallel>` with the number of parallel
 | 
			
		||||
invocations to use build, e.g. `bjam -j4 ...` would use up to 4 concurrent build
 | 
			
		||||
shell commands for the build.
 | 
			
		||||
 | 
			
		||||
Building the boost libraries may take considerable time. When the build process
 | 
			
		||||
is completed, take note of both the reported compiler include paths and linker
 | 
			
		||||
library paths as they will be required later.
 | 
			
		||||
 | 
			
		||||
### (Optional) Install CMake for Windows
 | 
			
		||||
 | 
			
		||||
[CMake](http://cmake.org) is a cross platform build system generator. Visual
 | 
			
		||||
Studio 2017 includes an integrated version of CMake that avoids having to
 | 
			
		||||
manually run CMake, but it is undergoing continuous improvement. Users that
 | 
			
		||||
prefer to use standard Visual Studio project and solution files need to install
 | 
			
		||||
a dedicated version of CMake to generate them.  The latest version can be found
 | 
			
		||||
at the [CMake download site](https://cmake.org/download/). It is recommended you
 | 
			
		||||
select the install option to add CMake to your path.
 | 
			
		||||
 | 
			
		||||
## Clone the rippled repository
 | 
			
		||||
 | 
			
		||||
If you are familiar with cloning github repositories, just follow your normal
 | 
			
		||||
process and clone `git@github.com:ripple/rippled.git`. Otherwise follow this
 | 
			
		||||
section for instructions.
 | 
			
		||||
 | 
			
		||||
1. If you don't have a github account, sign up for one at
 | 
			
		||||
   [github.com](https://github.com/).
 | 
			
		||||
2. Make sure you have Github ssh keys. For help see
 | 
			
		||||
   [generating-ssh-keys](https://help.github.com/articles/generating-ssh-keys).
 | 
			
		||||
 | 
			
		||||
Open the "Git Bash" shell that was installed with "Git for Windows" in the step
 | 
			
		||||
above. Navigate to the directory where you want to clone rippled (git bash uses
 | 
			
		||||
`/c` for windows's `C:` and forward slash where windows uses backslash, so
 | 
			
		||||
`C:\Users\joe\projs` would be `/c/Users/joe/projs` in git bash). Now clone the
 | 
			
		||||
repository and optionally switch to the *master* branch. Type the following at
 | 
			
		||||
the bash prompt:
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
git clone git@github.com:ripple/rippled.git
 | 
			
		||||
cd rippled
 | 
			
		||||
```
 | 
			
		||||
If you receive an error about not having the "correct access rights" make sure
 | 
			
		||||
you have Github ssh keys, as described above.
 | 
			
		||||
 | 
			
		||||
For a stable release, choose the `master` branch or one of the tagged releases
 | 
			
		||||
listed on [rippled's GitHub page](https://github.com/ripple/rippled/releases).
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git checkout master
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
To test the latest release candidate, choose the `release` branch.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git checkout release
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If you are doing development work and want the latest set of untested features,
 | 
			
		||||
you can consider using the `develop` branch instead.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git checkout develop
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
# Build using Visual Studio integrated CMake
 | 
			
		||||
 | 
			
		||||
In Visual Studio 2017, Microsoft added [integrated IDE support for
 | 
			
		||||
cmake](https://blogs.msdn.microsoft.com/vcblog/2016/10/05/cmake-support-in-visual-studio/).
 | 
			
		||||
To begin, simply:
 | 
			
		||||
 | 
			
		||||
1. Launch Visual Studio and choose **File | Open | Folder**, navigating to the
 | 
			
		||||
   cloned rippled folder.
 | 
			
		||||
2. Right-click on `CMakeLists.txt` in the **Solution Explorer - Folder View** to
 | 
			
		||||
   generate a `CMakeSettings.json` file. A sample settings file is provided
 | 
			
		||||
   [here](/Builds/VisualStudio2017/CMakeSettings-example.json). Customize the
 | 
			
		||||
   settings for `BOOST_ROOT`, `OPENSSL_ROOT` to match the install paths if they
 | 
			
		||||
   differ from those in the file.
 | 
			
		||||
4. Select either the `x64-Release` or `x64-Debug` configuration from the
 | 
			
		||||
   **Project Setings** drop-down. This should invoke the built-in CMake project
 | 
			
		||||
   generator. If not, you can right-click on the `CMakeLists.txt` file and
 | 
			
		||||
   choose **Cache | Generate Cache**.
 | 
			
		||||
5. Select either the `rippled.exe` (unity) or `rippled_classic.exe` (non-unity)
 | 
			
		||||
   option in the **Select Startup Item** drop-down. This will be the target
 | 
			
		||||
   built when you press F7. Alternatively, you can choose a target to build from
 | 
			
		||||
   the top-level **CMake | Build** menu. Note that at this time, there are other
 | 
			
		||||
   targets listed that come from third party visual studio files embedded in the
 | 
			
		||||
   rippled repo, e.g. `datagen.vcxproj`. Please ignore them.
 | 
			
		||||
 | 
			
		||||
For details on configuring debugging sessions or further customization of CMake,
 | 
			
		||||
please refer to the [CMake tools for VS
 | 
			
		||||
documentation](https://docs.microsoft.com/en-us/cpp/ide/cmake-tools-for-visual-cpp).
 | 
			
		||||
 | 
			
		||||
If using the provided `CMakeSettings.json` file, the executable will be in
 | 
			
		||||
```
 | 
			
		||||
.\build\x64-Release\Release\rippled.exe
 | 
			
		||||
```
 | 
			
		||||
or
 | 
			
		||||
```
 | 
			
		||||
.\build\x64-Debug\Debug\rippled.exe
 | 
			
		||||
```
 | 
			
		||||
These paths are relative to your cloned git repository.
 | 
			
		||||
 | 
			
		||||
# Build using stand-alone CMake
 | 
			
		||||
 | 
			
		||||
This requires having installed [CMake for
 | 
			
		||||
Windows](README.md#optional-install-cmake-for-windows). We do not recommend
 | 
			
		||||
mixing this method with the integrated CMake method for the same repository
 | 
			
		||||
clone. Assuming you included the cmake executable folder in your path,
 | 
			
		||||
execute the following commands within your `rippled` cloned repository:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
mkdir build\cmake
 | 
			
		||||
cd build\cmake
 | 
			
		||||
cmake ..\.. -G"Visual Studio 15 2017 Win64" -DBOOST_ROOT="C:\lib\boost_1_70_0" -DOPENSSL_ROOT="C:\lib\OpenSSL-Win64" -DCMAKE_GENERATOR_TOOLSET=host=x64
 | 
			
		||||
```
 | 
			
		||||
Now launch Visual Studio 2017 and select **File | Open | Project/Solution**.
 | 
			
		||||
Navigate to the `build\cmake` folder created above and select the `rippled.sln`
 | 
			
		||||
file. You can then choose whether to build the `Debug` or `Release` solution
 | 
			
		||||
configuration.
 | 
			
		||||
 | 
			
		||||
The executable will be in
 | 
			
		||||
```
 | 
			
		||||
.\build\cmake\Release\rippled.exe
 | 
			
		||||
```
 | 
			
		||||
or
 | 
			
		||||
```
 | 
			
		||||
.\build\cmake\Debug\rippled.exe
 | 
			
		||||
```
 | 
			
		||||
These paths are relative to your cloned git repository.
 | 
			
		||||
 | 
			
		||||
# Unity/No-Unity Builds
 | 
			
		||||
 | 
			
		||||
The rippled build system defaults to using
 | 
			
		||||
[unity source files](http://onqtam.com/programming/2018-07-07-unity-builds/)
 | 
			
		||||
to improve build times. In some cases it might be desirable to disable the
 | 
			
		||||
unity build and compile individual translation units. Here is how you can
 | 
			
		||||
switch to a "no-unity" build configuration:
 | 
			
		||||
 | 
			
		||||
## Visual Studio Integrated CMake
 | 
			
		||||
 | 
			
		||||
Edit your `CmakeSettings.json` (described above) by adding `-Dunity=OFF`
 | 
			
		||||
to the `cmakeCommandArgs` entry for each build configuration.
 | 
			
		||||
 | 
			
		||||
## Standalone CMake Builds
 | 
			
		||||
 | 
			
		||||
When running cmake to generate the Visual Studio project files, add
 | 
			
		||||
`-Dunity=OFF` to the command line options passed to cmake.
 | 
			
		||||
 | 
			
		||||
**Note:** you will need to re-run the cmake configuration step anytime you
 | 
			
		||||
want to switch between unity/no-unity builds.
 | 
			
		||||
 | 
			
		||||
# Unit Test (Recommended)
 | 
			
		||||
 | 
			
		||||
`rippled` builds a set of unit tests into the server executable. To run these
 | 
			
		||||
unit tests after building, pass the `--unittest` option to the compiled
 | 
			
		||||
`rippled` executable. The executable will exit with summary info after running
 | 
			
		||||
the unit tests.
 | 
			
		||||
 | 
			
		||||
@@ -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,43 +0,0 @@
 | 
			
		||||
FROM centos:7
 | 
			
		||||
ARG GIT_COMMIT=unknown
 | 
			
		||||
ARG CI_USE=false
 | 
			
		||||
 | 
			
		||||
LABEL git-commit=$GIT_COMMIT
 | 
			
		||||
 | 
			
		||||
COPY centos-builder/centos_setup.sh /tmp/
 | 
			
		||||
COPY shared/build_deps.sh /tmp/
 | 
			
		||||
COPY shared/install_cmake.sh /tmp/
 | 
			
		||||
COPY centos-builder/extras.sh /tmp/
 | 
			
		||||
COPY shared/install_boost.sh /tmp/
 | 
			
		||||
RUN chmod +x /tmp/centos_setup.sh && \
 | 
			
		||||
    chmod +x /tmp/build_deps.sh && \
 | 
			
		||||
    chmod +x /tmp/install_boost.sh && \
 | 
			
		||||
    chmod +x /tmp/install_cmake.sh && \
 | 
			
		||||
    chmod +x /tmp/extras.sh
 | 
			
		||||
RUN /tmp/centos_setup.sh
 | 
			
		||||
 | 
			
		||||
RUN /tmp/install_cmake.sh 3.16.1 /opt/local/cmake-3.16
 | 
			
		||||
RUN ln -s /opt/local/cmake-3.16 /opt/local/cmake
 | 
			
		||||
ENV PATH="/opt/local/cmake/bin:$PATH"
 | 
			
		||||
# also install min supported cmake for testing
 | 
			
		||||
RUN if [ "${CI_USE}" = true ] ; then /tmp/install_cmake.sh 3.9.0 /opt/local/cmake-3.9; fi
 | 
			
		||||
 | 
			
		||||
RUN source scl_source enable devtoolset-7 python27 && \
 | 
			
		||||
     /tmp/build_deps.sh
 | 
			
		||||
ENV BOOST_ROOT="/opt/local/boost/_INSTALLED_"
 | 
			
		||||
ENV PLANTUML_JAR="/opt/plantuml/plantuml.jar"
 | 
			
		||||
ENV OPENSSL_ROOT="/opt/local/openssl"
 | 
			
		||||
ENV GDB_ROOT="/opt/local/gdb"
 | 
			
		||||
RUN source scl_source enable devtoolset-7 python27 && \
 | 
			
		||||
     /tmp/extras.sh
 | 
			
		||||
 | 
			
		||||
# prep files for package building
 | 
			
		||||
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,37 +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++ time yum-utils autoconf automake pkgconfig libtool \
 | 
			
		||||
    libstdc++-static rpm-build gnupg which make cmake \
 | 
			
		||||
    devtoolset-7 devtoolset-7-gdb devtoolset-7-libasan-devel devtoolset-7-libtsan-devel devtoolset-7-libubsan-devel \
 | 
			
		||||
    devtoolset-8 devtoolset-8-gdb devtoolset-8-binutils devtoolset-8-libstdc++-devel \
 | 
			
		||||
    devtoolset-8-libasan-devel devtoolset-8-libtsan-devel devtoolset-8-libubsan-devel devtoolset-8-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 \
 | 
			
		||||
    python27-python rh-python35-python \
 | 
			
		||||
    python-devel python27-python-devel rh-python35-python-devel \
 | 
			
		||||
    python27 rh-python35 \
 | 
			
		||||
    ninja-build git svn \
 | 
			
		||||
    swig perl-Digest-MD5 python2-pip
 | 
			
		||||
 | 
			
		||||
if [ "${CI_USE}" = true ] ; then
 | 
			
		||||
    # TODO need permanent link
 | 
			
		||||
    yum -y install ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora-secondary/updates/26/i386/Packages/p/python2-six-1.10.0-9.fc26.noarch.rpm
 | 
			
		||||
 | 
			
		||||
    yum -y install \
 | 
			
		||||
        llvm-toolset-7 llvm-toolset-7-runtime llvm-toolset-7-build llvm-toolset-7-clang \
 | 
			
		||||
        llvm-toolset-7-clang-analyzer llvm-toolset-7-clang-devel llvm-toolset-7-clang-libs \
 | 
			
		||||
        llvm-toolset-7-clang-tools-extra llvm-toolset-7-compiler-rt llvm-toolset-7-lldb \
 | 
			
		||||
        llvm-toolset-7-lldb-devel llvm-toolset-7-python-lldb
 | 
			
		||||
 | 
			
		||||
fi
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
set -ex
 | 
			
		||||
 | 
			
		||||
if [ "${CI_USE}" = true ] ; then
 | 
			
		||||
    cd /tmp
 | 
			
		||||
    wget https://ftp.gnu.org/gnu/gdb/gdb-8.3.1.tar.xz
 | 
			
		||||
    tar xf gdb-8.3.1.tar.xz
 | 
			
		||||
    cd gdb-8.3
 | 
			
		||||
    ./configure CFLAGS="-w -O2" CXXFLAGS="-std=gnu++11 -g -O2 -w" --prefix=/opt/local/gdb-8.3
 | 
			
		||||
    make -j$(nproc)
 | 
			
		||||
    make install
 | 
			
		||||
    ln -s /opt/local/gdb-8.3 /opt/local/gdb
 | 
			
		||||
    cd ..
 | 
			
		||||
    rm -f gdb-8.3.tar.xz
 | 
			
		||||
    rm -rf gdb-8.3
 | 
			
		||||
 | 
			
		||||
    # clang from source
 | 
			
		||||
    cd /tmp
 | 
			
		||||
    git clone https://github.com/llvm/llvm-project.git
 | 
			
		||||
    cd llvm-project
 | 
			
		||||
    git checkout llvmorg-9.0.0
 | 
			
		||||
    INSTALL=/opt/llvm-9/
 | 
			
		||||
    mkdir mybuilddir && cd mybuilddir
 | 
			
		||||
    # TODO figure out necessary options
 | 
			
		||||
    cmake ../llvm -G Ninja \
 | 
			
		||||
      -DCMAKE_BUILD_TYPE=Release \
 | 
			
		||||
      -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;libcxx;libcxxabi;lldb;compiler-rt;lld;polly' \
 | 
			
		||||
      -DCMAKE_INSTALL_PREFIX=${INSTALL} \
 | 
			
		||||
      -DLLVM_LIBDIR_SUFFIX=64
 | 
			
		||||
    cmake --build . --parallel --target install
 | 
			
		||||
    cd /tmp
 | 
			
		||||
    rm -rf llvm-project
 | 
			
		||||
fi
 | 
			
		||||
@@ -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,703 +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: "2020-02-10"
 | 
			
		||||
  RPM_CONTAINER_NAME: "rippled-rpm-builder"
 | 
			
		||||
  RPM_CONTAINER_FULLNAME: "${RPM_CONTAINER_NAME}:${RPM_CONTAINER_TAG}"
 | 
			
		||||
  DPKG_CONTAINER_TAG: "2020-02-10"
 | 
			
		||||
  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:
 | 
			
		||||
  stage: build_packages
 | 
			
		||||
  <<: *dind_param
 | 
			
		||||
  artifacts:
 | 
			
		||||
    paths:
 | 
			
		||||
      - build/rpm/packages/
 | 
			
		||||
  script:
 | 
			
		||||
    - . ./Builds/containers/gitlab-ci/build_package.sh rpm
 | 
			
		||||
 | 
			
		||||
dpkg_build:
 | 
			
		||||
  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
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/centos:7
 | 
			
		||||
  <<: *run_local_smoketest
 | 
			
		||||
 | 
			
		||||
# TODO: Remove "allow_failure" when tests fixed
 | 
			
		||||
rocky_8_smoketest:
 | 
			
		||||
  stage: smoketest
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - rpm_build
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  image:
 | 
			
		||||
    name: rockylinux/rockylinux:8
 | 
			
		||||
  <<: *run_local_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
fedora_34_smoketest:
 | 
			
		||||
  stage: smoketest
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - rpm_build
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/fedora:34
 | 
			
		||||
  <<: *run_local_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
fedora_35_smoketest:
 | 
			
		||||
  stage: smoketest
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - rpm_build
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/fedora:35
 | 
			
		||||
  <<: *run_local_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
ubuntu_18_smoketest:
 | 
			
		||||
  stage: smoketest
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - dpkg_build
 | 
			
		||||
    - dpkg_sign
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/ubuntu:18.04
 | 
			
		||||
  <<: *run_local_smoketest
 | 
			
		||||
 | 
			
		||||
ubuntu_20_smoketest:
 | 
			
		||||
  stage: smoketest
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - dpkg_build
 | 
			
		||||
    - dpkg_sign
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/ubuntu:20.04
 | 
			
		||||
  <<: *run_local_smoketest
 | 
			
		||||
 | 
			
		||||
# TODO: remove "allow_failure" when 22.04 released in 4/2022...
 | 
			
		||||
ubuntu_22_smoketest:
 | 
			
		||||
  stage: smoketest
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - dpkg_build
 | 
			
		||||
    - dpkg_sign
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/ubuntu:22.04
 | 
			
		||||
  <<: *run_local_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
debian_9_smoketest:
 | 
			
		||||
  stage: smoketest
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - dpkg_build
 | 
			
		||||
    - dpkg_sign
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/debian:9
 | 
			
		||||
  <<: *run_local_smoketest
 | 
			
		||||
 | 
			
		||||
debian_10_smoketest:
 | 
			
		||||
  stage: smoketest
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - dpkg_build
 | 
			
		||||
    - dpkg_sign
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/debian:10
 | 
			
		||||
  <<: *run_local_smoketest
 | 
			
		||||
 | 
			
		||||
debian_11_smoketest:
 | 
			
		||||
  stage: smoketest
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - dpkg_build
 | 
			
		||||
    - dpkg_sign
 | 
			
		||||
  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: rockylinux/rockylinux:8
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  <<: *only_primary
 | 
			
		||||
  <<: *run_repo_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
fedora_34_verify_repo_test:
 | 
			
		||||
  stage: verify_from_test
 | 
			
		||||
  variables:
 | 
			
		||||
    RPM_REPO: "rippled-rpm-test-mirror"
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/fedora:34
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  <<: *only_primary
 | 
			
		||||
  <<: *run_repo_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
fedora_35_verify_repo_test:
 | 
			
		||||
  stage: verify_from_test
 | 
			
		||||
  variables:
 | 
			
		||||
    RPM_REPO: "rippled-rpm-test-mirror"
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/fedora:35
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  <<: *only_primary
 | 
			
		||||
  <<: *run_repo_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
# TODO: remove "allow_failure" when 22.04 released in 4/2022...
 | 
			
		||||
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
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
debian_9_verify_repo_test:
 | 
			
		||||
  stage: verify_from_test
 | 
			
		||||
  variables:
 | 
			
		||||
    DISTRO: "stretch"
 | 
			
		||||
    DEB_REPO: "rippled-deb-test-mirror"
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/debian:9
 | 
			
		||||
  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_test:
 | 
			
		||||
  stage: verify_from_test
 | 
			
		||||
  variables:
 | 
			
		||||
    RPM_REPO: "rippled-rpm-test-mirror"
 | 
			
		||||
  image:
 | 
			
		||||
    name: rockylinux/rockylinux:8
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  <<: *only_primary
 | 
			
		||||
  <<: *run_repo_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
fedora_34_verify_repo_prod:
 | 
			
		||||
  stage: verify_from_prod
 | 
			
		||||
  variables:
 | 
			
		||||
    RPM_REPO: "rippled-rpm"
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/fedora:34
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  <<: *only_primary
 | 
			
		||||
  <<: *run_repo_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
fedora_35_verify_repo_prod:
 | 
			
		||||
  stage: verify_from_prod
 | 
			
		||||
  variables:
 | 
			
		||||
    RPM_REPO: "rippled-rpm"
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/fedora:35
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - rpm_sign
 | 
			
		||||
  <<: *only_primary
 | 
			
		||||
  <<: *run_repo_smoketest
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
# TODO: remove "allow_failure" when 22.04 released in 4/2022...
 | 
			
		||||
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
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
debian_9_verify_repo_prod:
 | 
			
		||||
  stage: verify_from_prod
 | 
			
		||||
  variables:
 | 
			
		||||
    DISTRO: "stretch"
 | 
			
		||||
    DEB_REPO: "rippled-deb"
 | 
			
		||||
  image:
 | 
			
		||||
    name: artifactory.ops.ripple.com/debian:9
 | 
			
		||||
  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
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
build_ubuntu_container:
 | 
			
		||||
  stage: build_containers
 | 
			
		||||
  <<: *dind_param
 | 
			
		||||
  script:
 | 
			
		||||
    - . ./Builds/containers/gitlab-ci/build_container.sh dpkg
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
@@ -1,93 +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_DEV_PKG=$(ls rippled-dev_*.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 stretch 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_DEV_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,106 +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" ]; then
 | 
			
		||||
            sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/Rocky-PowerTools.repo
 | 
			
		||||
            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,101 +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"
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
export CC=gcc-8
 | 
			
		||||
export CXX=g++-8
 | 
			
		||||
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-dev_${RIPPLED_DPKG_FULL_VERSION}_amd64.deb ${PKG_OUTDIR}
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
DEV_SHA256=$(cat shasums | \
 | 
			
		||||
    grep "rippled-dev_${RIPPLED_DPKG_VERSION}-1_amd64.deb" | 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 "dev_sha256=${DEV_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,27 +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
 | 
			
		||||
 | 
			
		||||
Package: rippled-dev
 | 
			
		||||
Section: devel
 | 
			
		||||
Recommends: rippled (= ${binary:Version})
 | 
			
		||||
Architecture: any
 | 
			
		||||
Multi-Arch: same
 | 
			
		||||
Depends: ${misc:Depends}, ${shlibs:Depends}, libprotobuf-dev, libprotoc-dev, protobuf-compiler
 | 
			
		||||
Description: development files for applications using xrpl core library (serialize + sign)
 | 
			
		||||
@@ -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 @@
 | 
			
		||||
bld/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
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
opt/ripple/etc/rippled.cfg etc/opt/ripple/rippled.cfg
 | 
			
		||||
opt/ripple/etc/validators.txt etc/opt/ripple/validators.txt
 | 
			
		||||
opt/ripple/bin/rippled usr/local/bin/rippled
 | 
			
		||||
@@ -1,35 +0,0 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
USER_NAME=rippled
 | 
			
		||||
GROUP_NAME=rippled
 | 
			
		||||
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/
 | 
			
		||||
        chown -R $USER_NAME:$GROUP_NAME /var/lib/rippled/
 | 
			
		||||
        chown -R $USER_NAME:$GROUP_NAME /opt/ripple
 | 
			
		||||
        chmod 755 /var/log/rippled/
 | 
			
		||||
        chmod 755 /var/lib/rippled/
 | 
			
		||||
        chmod 644 /opt/ripple/etc/update-rippled-cron
 | 
			
		||||
        chmod 644 /etc/logrotate.d/rippled
 | 
			
		||||
        chown -R root:$GROUP_NAME /opt/ripple/etc/update-rippled-cron
 | 
			
		||||
    ;;
 | 
			
		||||
 | 
			
		||||
    abort-upgrade|abort-remove|abort-deconfigure)
 | 
			
		||||
    ;;
 | 
			
		||||
 | 
			
		||||
    *)
 | 
			
		||||
        echo "postinst called with unknown argument \`$1'" >&2
 | 
			
		||||
        exit 1
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#DEBHELPER#
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
@@ -1,17 +0,0 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
case "$1" in
 | 
			
		||||
    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
 | 
			
		||||
    ;;
 | 
			
		||||
 | 
			
		||||
    *)
 | 
			
		||||
        echo "postrm called with unknown argument \`$1'" >&2
 | 
			
		||||
        exit 1
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#DEBHELPER#
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
case "$1" in
 | 
			
		||||
    install|upgrade)
 | 
			
		||||
    ;;
 | 
			
		||||
 | 
			
		||||
    abort-upgrade)
 | 
			
		||||
    ;;
 | 
			
		||||
 | 
			
		||||
    *)
 | 
			
		||||
        echo "preinst called with unknown argument \`$1'" >&2
 | 
			
		||||
        exit 1
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#DEBHELPER#
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
case "$1" in
 | 
			
		||||
    remove|upgrade|deconfigure)
 | 
			
		||||
    ;;
 | 
			
		||||
 | 
			
		||||
    failed-upgrade)
 | 
			
		||||
    ;;
 | 
			
		||||
 | 
			
		||||
    *)
 | 
			
		||||
        echo "prerm called with unknown argument \`$1'" >&2
 | 
			
		||||
        exit 1
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#DEBHELPER#
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
@@ -1,61 +0,0 @@
 | 
			
		||||
#!/usr/bin/make -f
 | 
			
		||||
export DH_VERBOSE = 1
 | 
			
		||||
export DH_OPTIONS = -v
 | 
			
		||||
# debuild sets some warnings that don't work well
 | 
			
		||||
# for our curent build..so try to remove those flags here:
 | 
			
		||||
export CFLAGS:=$(subst -Wformat,,$(CFLAGS))
 | 
			
		||||
export CFLAGS:=$(subst -Werror=format-security,,$(CFLAGS))
 | 
			
		||||
export CXXFLAGS:=$(subst -Wformat,,$(CXXFLAGS))
 | 
			
		||||
export CXXFLAGS:=$(subst -Werror=format-security,,$(CXXFLAGS))
 | 
			
		||||
 | 
			
		||||
%:
 | 
			
		||||
	dh $@ --with systemd
 | 
			
		||||
 | 
			
		||||
override_dh_systemd_start:
 | 
			
		||||
	dh_systemd_start --no-restart-on-upgrade
 | 
			
		||||
 | 
			
		||||
override_dh_auto_configure:
 | 
			
		||||
	env
 | 
			
		||||
	rm -rf bld && mkdir -p bld/rippled
 | 
			
		||||
	cd bld/rippled && \
 | 
			
		||||
	cmake ../.. -G Ninja \
 | 
			
		||||
		-DCMAKE_INSTALL_PREFIX=/opt/ripple \
 | 
			
		||||
		-DCMAKE_BUILD_TYPE=Release \
 | 
			
		||||
		-Dstatic=ON \
 | 
			
		||||
		-Dunity=OFF \
 | 
			
		||||
		-Dvalidator_keys=ON \
 | 
			
		||||
		-Dunity=OFF \
 | 
			
		||||
		-DCMAKE_VERBOSE_MAKEFILE=OFF
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	cmake -S . \
 | 
			
		||||
		-B bld/rippled-reporting \
 | 
			
		||||
		-G Ninja \
 | 
			
		||||
		-DCMAKE_INSTALL_PREFIX=/opt/rippled-reporting \
 | 
			
		||||
		-DCMAKE_BUILD_TYPE=Release \
 | 
			
		||||
		-Dstatic=ON \
 | 
			
		||||
		-Dunity=OFF \
 | 
			
		||||
		-DCMAKE_VERBOSE_MAKEFILE=OFF \
 | 
			
		||||
		-Dreporting=ON
 | 
			
		||||
 | 
			
		||||
override_dh_auto_build:
 | 
			
		||||
	cmake --build bld/rippled --target rippled --target validator-keys --parallel
 | 
			
		||||
	cmake --build bld/rippled-reporting --target rippled --parallel
 | 
			
		||||
 | 
			
		||||
override_dh_auto_install:
 | 
			
		||||
	cmake --install bld/rippled --prefix debian/tmp/opt/ripple
 | 
			
		||||
	install -D bld/rippled/validator-keys/validator-keys debian/tmp/opt/ripple/bin/validator-keys
 | 
			
		||||
	install -D Builds/containers/shared/update-rippled.sh debian/tmp/opt/ripple/bin/update-rippled.sh
 | 
			
		||||
	install -D bin/getRippledInfo debian/tmp/opt/ripple/bin/getRippledInfo
 | 
			
		||||
	install -D Builds/containers/shared/update-rippled-cron debian/tmp/opt/ripple/etc/update-rippled-cron
 | 
			
		||||
	install -D Builds/containers/shared/rippled-logrotate debian/tmp/etc/logrotate.d/rippled
 | 
			
		||||
	rm -rf debian/tmp/opt/ripple/lib64/cmake/date
 | 
			
		||||
 | 
			
		||||
	mkdir -p debian/tmp/opt/rippled-reporting/etc
 | 
			
		||||
	cp cfg/validators-example.txt debian/tmp/opt/rippled-reporting/etc/validators.txt
 | 
			
		||||
	install -D bld/rippled/validator-keys/validator-keys debian/tmp/opt/rippled-reporting/bin/validator-keys
 | 
			
		||||
 | 
			
		||||
	sed -E 's/rippled?/rippled-reporting/g' Builds/containers/shared/update-rippled.sh > debian/tmp/opt/rippled-reporting/bin/update-rippled-reporting.sh
 | 
			
		||||
	sed -E 's/rippled?/rippled-reporting/g' bin/getRippledInfo > debian/tmp/opt/rippled-reporting/bin/getRippledReportingInfo
 | 
			
		||||
	sed -E 's/rippled?/rippled-reporting/g' Builds/containers/shared/update-rippled-cron > debian/tmp/opt/rippled-reporting/etc/update-rippled-reporting-cron
 | 
			
		||||
	sed -E 's/rippled?/rippled-reporting/g' Builds/containers/shared/rippled-logrotate > debian/tmp/etc/logrotate.d/rippled-reporting
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
3.0 (quilt)
 | 
			
		||||
@@ -1,2 +0,0 @@
 | 
			
		||||
#abort-on-upstream-changes
 | 
			
		||||
#unapply-patches
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
enable rippled-reporting.service
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
enable rippled.service
 | 
			
		||||
@@ -1,79 +0,0 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
set -ex
 | 
			
		||||
 | 
			
		||||
cd /opt/rippled_bld/pkg
 | 
			
		||||
cp -fpu rippled/Builds/containers/packaging/rpm/rippled.spec .
 | 
			
		||||
cp -fpu rippled/Builds/containers/shared/update_sources.sh .
 | 
			
		||||
source update_sources.sh
 | 
			
		||||
 | 
			
		||||
# Build the rpm
 | 
			
		||||
 | 
			
		||||
IFS='-' read -r RIPPLED_RPM_VERSION RELEASE <<< "$RIPPLED_VERSION"
 | 
			
		||||
export RIPPLED_RPM_VERSION
 | 
			
		||||
 | 
			
		||||
RPM_RELEASE=${RPM_RELEASE-1}
 | 
			
		||||
 | 
			
		||||
# post-release version
 | 
			
		||||
if [ "hf" = "$(echo "$RELEASE" | cut -c -2)" ]; then
 | 
			
		||||
    RPM_RELEASE="${RPM_RELEASE}.${RELEASE}"
 | 
			
		||||
# pre-release version (-b or -rc)
 | 
			
		||||
elif [[ $RELEASE ]]; then
 | 
			
		||||
    RPM_RELEASE="0.${RPM_RELEASE}.${RELEASE}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
export RPM_RELEASE
 | 
			
		||||
 | 
			
		||||
if [[ $RPM_PATCH ]]; then
 | 
			
		||||
    RPM_PATCH=".${RPM_PATCH}"
 | 
			
		||||
    export RPM_PATCH
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
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/ -o ../rpmbuild/SOURCES/rippled.tar.gz HEAD
 | 
			
		||||
# TODO include validator-keys sources
 | 
			
		||||
cd ..
 | 
			
		||||
 | 
			
		||||
source /opt/rh/devtoolset-8/enable
 | 
			
		||||
 | 
			
		||||
rpmbuild --define "_topdir ${PWD}/rpmbuild" -ba rippled.spec
 | 
			
		||||
rc=$?; if [[ $rc != 0 ]]; then
 | 
			
		||||
    error "error building rpm"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Make a tar of the rpm and source rpm
 | 
			
		||||
RPM_VERSION_RELEASE=$(rpm -qp --qf='%{NAME}-%{VERSION}-%{RELEASE}' ./rpmbuild/RPMS/x86_64/rippled-[0-9]*.rpm)
 | 
			
		||||
tar_file=$RPM_VERSION_RELEASE.tar.gz
 | 
			
		||||
 | 
			
		||||
cp ./rpmbuild/RPMS/x86_64/* ${PKG_OUTDIR}
 | 
			
		||||
cp ./rpmbuild/SRPMS/* ${PKG_OUTDIR}
 | 
			
		||||
 | 
			
		||||
RPM_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/RPMS/x86_64/rippled-[0-9]*.rpm 2>/dev/null)
 | 
			
		||||
DBG_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/RPMS/x86_64/rippled-debuginfo*.rpm 2>/dev/null)
 | 
			
		||||
DEV_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/RPMS/x86_64/rippled-devel*.rpm 2>/dev/null)
 | 
			
		||||
REP_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/RPMS/x86_64/rippled-reporting*.rpm 2>/dev/null)
 | 
			
		||||
SRC_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/SRPMS/*.rpm 2>/dev/null)
 | 
			
		||||
 | 
			
		||||
RPM_SHA256="$(sha256sum ./rpmbuild/RPMS/x86_64/rippled-[0-9]*.rpm | awk '{ print $1}')"
 | 
			
		||||
DBG_SHA256="$(sha256sum ./rpmbuild/RPMS/x86_64/rippled-debuginfo*.rpm | awk '{ print $1}')"
 | 
			
		||||
REP_SHA256="$(sha256sum ./rpmbuild/RPMS/x86_64/rippled-reporting*.rpm | awk '{ print $1}')"
 | 
			
		||||
DEV_SHA256="$(sha256sum ./rpmbuild/RPMS/x86_64/rippled-devel*.rpm | awk '{ print $1}')"
 | 
			
		||||
SRC_SHA256="$(sha256sum ./rpmbuild/SRPMS/*.rpm | awk '{ print $1}')"
 | 
			
		||||
 | 
			
		||||
echo "rpm_md5sum=$RPM_MD5SUM" >  ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "rep_md5sum=$REP_MD5SUM" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "dbg_md5sum=$DBG_MD5SUM" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "dev_md5sum=$DEV_MD5SUM" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "src_md5sum=$SRC_MD5SUM" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "rpm_sha256=$RPM_SHA256" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "rep_sha256=$REP_SHA256" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "dbg_sha256=$DBG_SHA256" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "dev_sha256=$DEV_SHA256" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "src_sha256=$SRC_SHA256" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "rippled_version=$RIPPLED_VERSION" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "rpm_version=$RIPPLED_RPM_VERSION" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "rpm_file_name=$tar_file" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
echo "rpm_version_release=$RPM_VERSION_RELEASE" >> ${PKG_OUTDIR}/build_vars
 | 
			
		||||
@@ -1,182 +0,0 @@
 | 
			
		||||
%define rippled_version %(echo $RIPPLED_RPM_VERSION)
 | 
			
		||||
%define rpm_release %(echo $RPM_RELEASE)
 | 
			
		||||
%define rpm_patch %(echo $RPM_PATCH)
 | 
			
		||||
%define _prefix /opt/ripple
 | 
			
		||||
 | 
			
		||||
Name:           rippled
 | 
			
		||||
# Dashes in Version extensions must be converted to underscores
 | 
			
		||||
Version:        %{rippled_version}
 | 
			
		||||
Release:        %{rpm_release}%{?dist}%{rpm_patch}
 | 
			
		||||
Summary:        rippled daemon
 | 
			
		||||
 | 
			
		||||
License:        MIT
 | 
			
		||||
URL:            http://ripple.com/
 | 
			
		||||
Source0:        rippled.tar.gz
 | 
			
		||||
 | 
			
		||||
BuildRequires:  cmake zlib-static ninja-build
 | 
			
		||||
 | 
			
		||||
%description
 | 
			
		||||
rippled
 | 
			
		||||
 | 
			
		||||
%package devel
 | 
			
		||||
Summary: Files for development of applications using xrpl core library
 | 
			
		||||
Group: Development/Libraries
 | 
			
		||||
Requires: zlib-static
 | 
			
		||||
 | 
			
		||||
%description devel
 | 
			
		||||
core library for development of standalone applications that sign transactions.
 | 
			
		||||
 | 
			
		||||
%package reporting
 | 
			
		||||
Summary: Reporting Server for rippled
 | 
			
		||||
 | 
			
		||||
%description reporting
 | 
			
		||||
History server for XRP Ledger
 | 
			
		||||
 | 
			
		||||
%prep
 | 
			
		||||
%setup -c -n rippled
 | 
			
		||||
 | 
			
		||||
%build
 | 
			
		||||
cd rippled
 | 
			
		||||
mkdir -p bld.rippled
 | 
			
		||||
pushd bld.rippled
 | 
			
		||||
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=Release -Dunity=OFF -Dstatic=true -DCMAKE_VERBOSE_MAKEFILE=OFF -Dvalidator_keys=ON
 | 
			
		||||
cmake --build . --parallel $(nproc) --target rippled --target validator-keys
 | 
			
		||||
popd
 | 
			
		||||
 | 
			
		||||
mkdir -p bld.rippled-reporting
 | 
			
		||||
cd bld.rippled-reporting
 | 
			
		||||
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=%{_prefix}-reporting -DCMAKE_BUILD_TYPE=Release -Dunity=OFF -Dstatic=true -DCMAKE_VERBOSE_MAKEFILE=OFF -Dreporting=ON
 | 
			
		||||
cmake --build . --parallel $(nproc) --target rippled
 | 
			
		||||
 | 
			
		||||
%pre
 | 
			
		||||
test -e /etc/pki/tls || { mkdir -p /etc/pki; ln -s /usr/lib/ssl /etc/pki/tls; }
 | 
			
		||||
 | 
			
		||||
%install
 | 
			
		||||
rm -rf $RPM_BUILD_ROOT
 | 
			
		||||
DESTDIR=$RPM_BUILD_ROOT cmake --build rippled/bld.rippled --target install -- -v
 | 
			
		||||
rm -rf ${RPM_BUILD_ROOT}/%{_prefix}/lib64/cmake/date
 | 
			
		||||
install -d ${RPM_BUILD_ROOT}/etc/opt/ripple
 | 
			
		||||
install -d ${RPM_BUILD_ROOT}/usr/local/bin
 | 
			
		||||
ln -s %{_prefix}/etc/rippled.cfg ${RPM_BUILD_ROOT}/etc/opt/ripple/rippled.cfg
 | 
			
		||||
ln -s %{_prefix}/etc/validators.txt ${RPM_BUILD_ROOT}/etc/opt/ripple/validators.txt
 | 
			
		||||
ln -s %{_prefix}/bin/rippled ${RPM_BUILD_ROOT}/usr/local/bin/rippled
 | 
			
		||||
install -D rippled/bld.rippled/validator-keys/validator-keys ${RPM_BUILD_ROOT}%{_bindir}/validator-keys
 | 
			
		||||
install -D ./rippled/Builds/containers/shared/rippled.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/rippled.service
 | 
			
		||||
install -D ./rippled/Builds/containers/packaging/rpm/50-rippled.preset ${RPM_BUILD_ROOT}/usr/lib/systemd/system-preset/50-rippled.preset
 | 
			
		||||
install -D ./rippled/Builds/containers/shared/update-rippled.sh ${RPM_BUILD_ROOT}%{_bindir}/update-rippled.sh
 | 
			
		||||
install -D ./rippled/bin/getRippledInfo ${RPM_BUILD_ROOT}%{_bindir}/getRippledInfo
 | 
			
		||||
install -D ./rippled/Builds/containers/shared/update-rippled-cron ${RPM_BUILD_ROOT}%{_prefix}/etc/update-rippled-cron
 | 
			
		||||
install -D ./rippled/Builds/containers/shared/rippled-logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/rippled
 | 
			
		||||
install -d $RPM_BUILD_ROOT/var/log/rippled
 | 
			
		||||
install -d $RPM_BUILD_ROOT/var/lib/rippled
 | 
			
		||||
 | 
			
		||||
# reporting mode
 | 
			
		||||
%define _prefix /opt/rippled-reporting
 | 
			
		||||
mkdir -p ${RPM_BUILD_ROOT}/etc/opt/rippled-reporting/
 | 
			
		||||
install -D rippled/bld.rippled-reporting/rippled-reporting ${RPM_BUILD_ROOT}%{_bindir}/rippled-reporting
 | 
			
		||||
install -D ./rippled/cfg/rippled-reporting.cfg ${RPM_BUILD_ROOT}%{_prefix}/etc/rippled-reporting.cfg
 | 
			
		||||
install -D ./rippled/cfg/validators-example.txt ${RPM_BUILD_ROOT}%{_prefix}/etc/validators.txt
 | 
			
		||||
install -D ./rippled/Builds/containers/packaging/rpm/50-rippled-reporting.preset ${RPM_BUILD_ROOT}/usr/lib/systemd/system-preset/50-rippled-reporting.preset
 | 
			
		||||
ln -s %{_prefix}/bin/rippled-reporting ${RPM_BUILD_ROOT}/usr/local/bin/rippled-reporting
 | 
			
		||||
ln -s %{_prefix}/etc/rippled-reporting.cfg ${RPM_BUILD_ROOT}/etc/opt/rippled-reporting/rippled-reporting.cfg
 | 
			
		||||
ln -s %{_prefix}/etc/validators.txt ${RPM_BUILD_ROOT}/etc/opt/rippled-reporting/validators.txt
 | 
			
		||||
install -d $RPM_BUILD_ROOT/var/log/rippled-reporting
 | 
			
		||||
install -d $RPM_BUILD_ROOT/var/lib/rippled-reporting
 | 
			
		||||
install -D ./rippled/Builds/containers/shared/rippled-reporting.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/rippled-reporting.service
 | 
			
		||||
sed -E 's/rippled?/rippled-reporting/g' ./rippled/Builds/containers/shared/update-rippled.sh > ${RPM_BUILD_ROOT}%{_bindir}/update-rippled-reporting.sh
 | 
			
		||||
sed -E 's/rippled?/rippled-reporting/g' ./rippled/bin/getRippledInfo > ${RPM_BUILD_ROOT}%{_bindir}/getRippledReportingInfo
 | 
			
		||||
sed -E 's/rippled?/rippled-reporting/g' ./rippled/Builds/containers/shared/update-rippled-cron > ${RPM_BUILD_ROOT}%{_prefix}/etc/update-rippled-reporting-cron
 | 
			
		||||
sed -E 's/rippled?/rippled-reporting/g' ./rippled/Builds/containers/shared/rippled-logrotate > ${RPM_BUILD_ROOT}/etc/logrotate.d/rippled-reporting
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
%post
 | 
			
		||||
%define _prefix /opt/ripple
 | 
			
		||||
USER_NAME=rippled
 | 
			
		||||
GROUP_NAME=rippled
 | 
			
		||||
 | 
			
		||||
getent passwd $USER_NAME &>/dev/null || useradd $USER_NAME
 | 
			
		||||
getent group $GROUP_NAME &>/dev/null || groupadd $GROUP_NAME
 | 
			
		||||
 | 
			
		||||
chown -R $USER_NAME:$GROUP_NAME /var/log/rippled/
 | 
			
		||||
chown -R $USER_NAME:$GROUP_NAME /var/lib/rippled/
 | 
			
		||||
chown -R $USER_NAME:$GROUP_NAME %{_prefix}/
 | 
			
		||||
 | 
			
		||||
chmod 755 /var/log/rippled/
 | 
			
		||||
chmod 755 /var/lib/rippled/
 | 
			
		||||
 | 
			
		||||
chmod 644 %{_prefix}/etc/update-rippled-cron
 | 
			
		||||
chmod 644 /etc/logrotate.d/rippled
 | 
			
		||||
chown -R root:$GROUP_NAME %{_prefix}/etc/update-rippled-cron
 | 
			
		||||
 | 
			
		||||
%post reporting
 | 
			
		||||
%define _prefix /opt/rippled-reporting
 | 
			
		||||
USER_NAME=rippled-reporting
 | 
			
		||||
GROUP_NAME=rippled-reporting
 | 
			
		||||
 | 
			
		||||
getent passwd $USER_NAME &>/dev/null || useradd -r $USER_NAME
 | 
			
		||||
getent group $GROUP_NAME &>/dev/null || groupadd $GROUP_NAME
 | 
			
		||||
 | 
			
		||||
chown -R $USER_NAME:$GROUP_NAME /var/log/rippled-reporting/
 | 
			
		||||
chown -R $USER_NAME:$GROUP_NAME /var/lib/rippled-reporting/
 | 
			
		||||
chown -R $USER_NAME:$GROUP_NAME %{_prefix}/
 | 
			
		||||
 | 
			
		||||
chmod 755 /var/log/rippled-reporting/
 | 
			
		||||
chmod 755 /var/lib/rippled-reporting/
 | 
			
		||||
chmod -x /usr/lib/systemd/system/rippled-reporting.service
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
%files
 | 
			
		||||
%define _prefix /opt/ripple
 | 
			
		||||
%doc rippled/README.md rippled/LICENSE.md
 | 
			
		||||
%{_bindir}/rippled
 | 
			
		||||
/usr/local/bin/rippled
 | 
			
		||||
%{_bindir}/update-rippled.sh
 | 
			
		||||
%{_bindir}/getRippledInfo
 | 
			
		||||
%{_prefix}/etc/update-rippled-cron
 | 
			
		||||
%{_bindir}/validator-keys
 | 
			
		||||
%config(noreplace) %{_prefix}/etc/rippled.cfg
 | 
			
		||||
%config(noreplace) /etc/opt/ripple/rippled.cfg
 | 
			
		||||
%config(noreplace) %{_prefix}/etc/validators.txt
 | 
			
		||||
%config(noreplace) /etc/opt/ripple/validators.txt
 | 
			
		||||
%config(noreplace) /etc/logrotate.d/rippled
 | 
			
		||||
%config(noreplace) /usr/lib/systemd/system/rippled.service
 | 
			
		||||
%config(noreplace) /usr/lib/systemd/system-preset/50-rippled.preset
 | 
			
		||||
%dir /var/log/rippled/
 | 
			
		||||
%dir /var/lib/rippled/
 | 
			
		||||
 | 
			
		||||
%files devel
 | 
			
		||||
%{_prefix}/include
 | 
			
		||||
%{_prefix}/lib/*.a
 | 
			
		||||
%{_prefix}/lib/cmake/ripple
 | 
			
		||||
 | 
			
		||||
%files reporting
 | 
			
		||||
%define _prefix /opt/rippled-reporting
 | 
			
		||||
%doc rippled/README.md rippled/LICENSE.md
 | 
			
		||||
 | 
			
		||||
%{_bindir}/rippled-reporting
 | 
			
		||||
/usr/local/bin/rippled-reporting
 | 
			
		||||
%config(noreplace) /etc/opt/rippled-reporting/rippled-reporting.cfg
 | 
			
		||||
%config(noreplace) %{_prefix}/etc/rippled-reporting.cfg
 | 
			
		||||
%config(noreplace) %{_prefix}/etc/validators.txt
 | 
			
		||||
%config(noreplace) /etc/opt/rippled-reporting/validators.txt
 | 
			
		||||
%config(noreplace) /usr/lib/systemd/system/rippled-reporting.service
 | 
			
		||||
%config(noreplace) /usr/lib/systemd/system-preset/50-rippled-reporting.preset
 | 
			
		||||
%dir /var/log/rippled-reporting/
 | 
			
		||||
%dir /var/lib/rippled-reporting/
 | 
			
		||||
%{_bindir}/update-rippled-reporting.sh
 | 
			
		||||
%{_bindir}/getRippledReportingInfo
 | 
			
		||||
%{_prefix}/etc/update-rippled-reporting-cron
 | 
			
		||||
%config(noreplace) /etc/logrotate.d/rippled-reporting
 | 
			
		||||
 | 
			
		||||
%changelog
 | 
			
		||||
* Wed Aug 28 2019 Mike Ellery <mellery451@gmail.com>
 | 
			
		||||
- Switch to subproject build for validator-keys
 | 
			
		||||
 | 
			
		||||
* Wed May 15 2019 Mike Ellery <mellery451@gmail.com>
 | 
			
		||||
- Make validator-keys use local rippled build for core lib
 | 
			
		||||
 | 
			
		||||
* Wed Aug 01 2018 Mike Ellery <mellery451@gmail.com>
 | 
			
		||||
- add devel package for signing library
 | 
			
		||||
 | 
			
		||||
* Thu Jun 02 2016 Brandon Wilson <bwilson@ripple.com>
 | 
			
		||||
- Install validators.txt
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user