Compare commits
678 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 256fc7eff3 | |||
| ccc98966e6 | |||
| b0127687c2 | |||
| 8637434db9 | |||
| 199b4c81d1 | |||
| 34b70663d1 | |||
| 1bcf27e1aa | |||
| 8c8a418c95 | |||
| 7317eb3035 | |||
| 1dea8f3ca9 | |||
| 19c54a8a66 | |||
| e6b82ca9e1 | |||
| 7d6bcbc03a | |||
| 8588a85fa1 | |||
| faa260f0ce | |||
| 42299aefca | |||
| 3f5f828c25 | |||
| 18dd3f83ed | |||
| 2255548c52 | |||
| 48226c3346 | |||
| 552309b38e | |||
| b78dd00d31 | |||
| 872d98d7df | |||
| 8502c09b45 | |||
| 34f8982b81 | |||
| 5921f4cd03 | |||
| c78d633d07 | |||
| a8bf9a5f41 | |||
| e23a81e0c4 | |||
| 010d37deda | |||
| 5391e21d4e | |||
| e94e1d9260 | |||
| 1331b1f4b7 | |||
| ba50b8ce79 | |||
| 878f0b8c9c | |||
| eebef0613b | |||
| 2aee1066ef | |||
| 5929a5de39 | |||
| 315585ca87 | |||
| 54b689fc23 | |||
| 0207f7716a | |||
| 7637a991a9 | |||
| ca9489c740 | |||
| aa6f2943a9 | |||
| deb68996f3 | |||
| 32a69b227f | |||
| d9177606f5 | |||
| 71ba4d58fa | |||
| c4a9c75bcc | |||
| b9bd1ca9db | |||
| a2f3edbbf9 | |||
| 912e9a1429 | |||
| dee64c7c5d | |||
| 3fffb79426 | |||
| 0667e59d01 | |||
| a42141ea13 | |||
| ffec2d3055 | |||
| 865652822a | |||
| 7406f274fb | |||
| 71a2315a5c | |||
| 0fcdecc934 | |||
| edfe5f4958 | |||
| 77269ee53b | |||
| 1f42e804d7 | |||
| 25a3bd1239 | |||
| 666600b589 | |||
| 37b5ac7b1c | |||
| 144fa63a8b | |||
| 94b30af836 | |||
| f34b73e46d | |||
| 1c18001290 | |||
| 2a9d56ea7e | |||
| fc48d88bca | |||
| fe51a4d2de | |||
| a1aa127617 | |||
| 23b77b096f | |||
| a2576785e7 | |||
| 1c684b2c25 | |||
| 0eda35d19f | |||
| 55e942ba94 | |||
| 216a30ac57 | |||
| c2ba10d4e4 | |||
| b05242c27a | |||
| 299e7d3f0c | |||
| f5415a2511 | |||
| 7670663f4a | |||
| e8db8a52b4 | |||
| 48004949de | |||
| 9bd72d7bb3 | |||
| 0ff7f0f5ff | |||
| 2462f72ebf | |||
| f1e86b9304 | |||
| 9faedf7618 | |||
| b68dfbaf6d | |||
| 7e08681df4 | |||
| ef4d3714b3 | |||
| fabaf130ec | |||
| 317def083a | |||
| 59341f7570 | |||
| 365fca1abb | |||
| fa88a6e74e | |||
| 0ce373c072 | |||
| 9afc9bb4d3 | |||
| 7aeb9ebfcf | |||
| 6ea40c3e63 | |||
| 3c6140dc26 | |||
| c0363e14da | |||
| d9561a8574 | |||
| 1c04b7cc96 | |||
| 66d406b06f | |||
| 0c9891be4b | |||
| e960b745f9 | |||
| 3aa55e5e91 | |||
| c75fe83a4e | |||
| b8b02f5f46 | |||
| 9040a14d7b | |||
| 0dff5334d1 | |||
| db1f37a98a | |||
| c4e292bd66 | |||
| 9dd074ff6d | |||
| 8de5d74502 | |||
| 5c23509370 | |||
| 78d954d086 | |||
| 526ee2c9c4 | |||
| 95dfb2ede8 | |||
| cfb02b88be | |||
| a28fb062b9 | |||
| c7a1792309 | |||
| 0141331dbd | |||
| 6c8f9b28a0 | |||
| e18e786f76 | |||
| 5613501758 | |||
| 4505c28cb6 | |||
| e605d73d3f | |||
| aff5cdf016 | |||
| 25f929c572 | |||
| fafff3a08b | |||
| 149b64e8ef | |||
| 48dca901e6 | |||
| 11136b282f | |||
| 5d4587cfb3 | |||
| 3209329eb4 | |||
| 2718d4589b | |||
| b11d4211e4 | |||
| 0e3d2a208f | |||
| 5f2ac5479b | |||
| 12dc5829d7 | |||
| b638dba12c | |||
| 2a26b3d01b | |||
| 9ad1aee683 | |||
| cff1b1921c | |||
| 79655aabf6 | |||
| 67b10dd24e | |||
| 630f7bcd29 | |||
| 537ad0fd7a | |||
| 6d35b82899 | |||
| 4dca99183d | |||
| 4ee2c5d9db | |||
| 245b62b8fa | |||
| 7dca20f979 | |||
| 1e55e402ae | |||
| e557658def | |||
| 695f0cfe32 | |||
| 7b29489d3d | |||
| 485f239d6d | |||
| ab3d0c319c | |||
| 9e4419a19c | |||
| b0c4aeee9e | |||
| 5a16f625b7 | |||
| d9e8fe0d7d | |||
| d1707fdf10 | |||
| aaf2b6ed10 | |||
| 4edb2e328c | |||
| 4f9e833512 | |||
| 82d1210f81 | |||
| 9a4b9c5277 | |||
| 9423cb9250 | |||
| cb49d64bbe | |||
| 8f9c76a95d | |||
| 1b1927bed7 | |||
| b027cfbf2e | |||
| 9ea63ce943 | |||
| b5ee6ef952 | |||
| 2ea219412b | |||
| 92bbe88322 | |||
| a1929d704a | |||
| 992c234e2c | |||
| 8aa75c09d1 | |||
| f7f3119d43 | |||
| f0ef15df98 | |||
| a7f1699e0d | |||
| f7f85143bb | |||
| 366fe0b74e | |||
| b10f001c3a | |||
| 1372cdb506 | |||
| 88fae786a5 | |||
| 865997597a | |||
| dc6d5e1e9f | |||
| d88524b4f7 | |||
| b6ff2a67c6 | |||
| a15134d79b | |||
| 80ec1e00b9 | |||
| f1c740af0e | |||
| ff9b93de0d | |||
| 9c944183d0 | |||
| cd92e568d5 | |||
| 807d523660 | |||
| 08fef7405c | |||
| c1f45b0c96 | |||
| a512314442 | |||
| 2fcc5317fe | |||
| 78a2a9c002 | |||
| 076623ef73 | |||
| bbd366b5a7 | |||
| 1ef5bd3fc3 | |||
| 83646753e0 | |||
| bdcf40a17c | |||
| 24e5b181b5 | |||
| d548f81525 | |||
| 3c1047103c | |||
| 47d557545e | |||
| 487b206edb | |||
| 411b6cf4e9 | |||
| 70f8141a7d | |||
| e4fefd67b0 | |||
| bfe65acf87 | |||
| b84e78ac2c | |||
| 6943363280 | |||
| 9b67ca9c42 | |||
| 0df319e430 | |||
| 7601857582 | |||
| 7d28404ad8 | |||
| 5ea9a672c3 | |||
| 6d68d22258 | |||
| 8362c5af8b | |||
| 51449826a3 | |||
| 10ccab5227 | |||
| 5b00d7f1f2 | |||
| 1027926be9 | |||
| 97aef3b3b1 | |||
| 12e15dc739 | |||
| 9291671fe1 | |||
| df971b1014 | |||
| cd138ae5d7 | |||
| c15e018bb1 | |||
| 00c992ff34 | |||
| 7ab212dced | |||
| 509fef6877 | |||
| 2df29a80f4 | |||
| 9b3329ff9c | |||
| ac9b2da210 | |||
| 53ef8030ca | |||
| 5f8ae401d3 | |||
| 41806782e7 | |||
| af993d1f6b | |||
| 52cf32c910 | |||
| e495f83667 | |||
| ddb42b134e | |||
| fd64529bfe | |||
| 7293718606 | |||
| df18d88d96 | |||
| 3b7bae0323 | |||
| 66a2163104 | |||
| 96fa7efee5 | |||
| 81a28b5402 | |||
| f5fa6f80b3 | |||
| 2958940463 | |||
| 644f0bf48b | |||
| f2bf2a4bcc | |||
| 8e3b8e3172 | |||
| c7f40bc111 | |||
| 9daf71417a | |||
| 94adf177ee | |||
| eff8826ca7 | |||
| 6cd80f52f3 | |||
| e1948f79d4 | |||
| e57599c3f0 | |||
| 4b5e09043d | |||
| 7a48443897 | |||
| a3f8ec0fd4 | |||
| 364ae2ca12 | |||
| 7082b086a5 | |||
| 279e39bd2b | |||
| 4ebf28b6a4 | |||
| 1d11f0b9e7 | |||
| 62ff8820dd | |||
| 4bee4ca3dd | |||
| 17a7ddee2f | |||
| 52903e281c | |||
| 9cfec546cc | |||
| e4a24f0789 | |||
| b67d2d0881 | |||
| 29f2dbdebf | |||
| 6945472e36 | |||
| ee60379138 | |||
| 42832ee6af | |||
| ec2f666344 | |||
| 065029b6a0 | |||
| 6fea3dc5f4 | |||
| 52982c0c67 | |||
| f313de1ce3 | |||
| 82204a7b06 | |||
| a435a81c8a | |||
| edbfbe40f5 | |||
| 231d734b7c | |||
| 216b130761 | |||
| c6a6e9d4b0 | |||
| dc230a8ce0 | |||
| 57a6c5aed7 | |||
| 69e40ba5c7 | |||
| c0db00e5cd | |||
| 69df04e6a6 | |||
| eb352fe34f | |||
| e3aa8ef9b8 | |||
| 6029b79885 | |||
| 1c6e5b9664 | |||
| cd99adc094 | |||
| 734b327ef0 | |||
| 471fce1f50 | |||
| 5e8e6568e9 | |||
| e0f6298d5d | |||
| 9fcb04c0b3 | |||
| 146f5055d7 | |||
| 2d14dcec7d | |||
| fe8f0acbef | |||
| c6e0f838ba | |||
| cd74b7b5ea | |||
| 9854b2a3c8 | |||
| a76027ce91 | |||
| 72316d0f96 | |||
| e9b9c788d2 | |||
| 2cfa89fb56 | |||
| d046d4848b | |||
| d7bcba730c | |||
| 8c1c24656a | |||
| 4432d6dc16 | |||
| 8780c645b7 | |||
| ff3729614e | |||
| be3307d198 | |||
| e2956efcb1 | |||
| 515b9b0ef9 | |||
| c3565499f2 | |||
| 41b5df3883 | |||
| e3bf086e49 | |||
| 25bfdc92c8 | |||
| 6df7231cfb | |||
| 5b68566b5b | |||
| 71734d87ac | |||
| 569c2f9538 | |||
| 969b0dad8d | |||
| 4b9d03772f | |||
| 0101b5dfc7 | |||
| 3ea129fa0b | |||
| c4854b8cba | |||
| e6f97126d3 | |||
| 1f27df4e9c | |||
| 597d417564 | |||
| ab7987a149 | |||
| c9f0b81855 | |||
| 109f481a6d | |||
| ddfdb2ee10 | |||
| d59160b2ce | |||
| 4014ae1dc9 | |||
| bad2d2a37a | |||
| 5f303edf30 | |||
| 4322c16e0f | |||
| 718c2746ae | |||
| 16277b2f8d | |||
| a338d8f544 | |||
| c3e3d2ec99 | |||
| 96e65ac0f6 | |||
| 7a342d11fb | |||
| 4c71f47f9b | |||
| c3ecbcef21 | |||
| 7094af67f5 | |||
| 24bbd0769e | |||
| 48beaa066e | |||
| b4cee0cd18 | |||
| d7a3517296 | |||
| 8dd04d5fb3 | |||
| 79e0e72aca | |||
| acb18c2745 | |||
| 64d8ab5e55 | |||
| 42d0dfa121 | |||
| af4a7800ce | |||
| a50ee5ee6a | |||
| b093191da5 | |||
| 7a58bbf6b4 | |||
| 868a0f174b | |||
| ef667e8409 | |||
| b16bd50f73 | |||
| 227588350d | |||
| 9a377c6e98 | |||
| 4bf0553ea7 | |||
| bcab31e047 | |||
| 2018b7b5ed | |||
| 69ae9b2c46 | |||
| c8b53bdba6 | |||
| 010c3c9f4b | |||
| 3042d8d951 | |||
| c9450422d6 | |||
| 9516391ed3 | |||
| d82c2d6d61 | |||
| ebe2777d68 | |||
| 1d7b05c607 | |||
| 9365e358dd | |||
| 9dba811236 | |||
| 131ce95ee6 | |||
| 3d665fab34 | |||
| a31cde78d9 | |||
| 84c3457a28 | |||
| c4e71656db | |||
| de1b1dca21 | |||
| 3fe73e5ba4 | |||
| 1dbeb9d143 | |||
| 1b50abbafe | |||
| 7c842eea13 | |||
| f5c138884b | |||
| bc5b0bb610 | |||
| dcd048e00a | |||
| 5f3e4ceb4d | |||
| fdca32a577 | |||
| dab0cb1ba9 | |||
| 5cd2862aab | |||
| 6c64197cdb | |||
| 0e1bc2b716 | |||
| c30d087385 | |||
| c02ad52bfd | |||
| 259d21c565 | |||
| bf804beb21 | |||
| e3af254dd6 | |||
| ac8d084924 | |||
| 3ad9565f56 | |||
| 0e1e7dcf03 | |||
| 6e5375002f | |||
| 4d9685ae0d | |||
| 3d97955f7d | |||
| 69823f7abc | |||
| 22a8ffdbe4 | |||
| ad9e6231f9 | |||
| 32c664bdaa | |||
| 664805fa4d | |||
| fd8ef079d0 | |||
| 3d400211da | |||
| 0909816af6 | |||
| 344ff7b946 | |||
| 00610a62c5 | |||
| bd4afe9f6e | |||
| 1119303d36 | |||
| ea0b0bacac | |||
| ab49392da3 | |||
| 8932d52107 | |||
| 7acf6274a4 | |||
| f14917e8d4 | |||
| c587d6b8f9 | |||
| 40239810cc | |||
| 9aba82d5d6 | |||
| cdec2159f1 | |||
| e76ebea729 | |||
| baa57f5ee4 | |||
| c43e19820d | |||
| 3325ae99a9 | |||
| c6f5def7d7 | |||
| 3475cf42d2 | |||
| efb79d1c96 | |||
| 3931953bc7 | |||
| 72441c3a27 | |||
| a953eb20e3 | |||
| 5feb628feb | |||
| 11bc6c6b69 | |||
| 484a262c31 | |||
| 1b33aedb56 | |||
| c70093d22f | |||
| 5410d92eb1 | |||
| dbf849a592 | |||
| 2b5dca48a5 | |||
| 9830160821 | |||
| 5ac53527df | |||
| 70befd69d5 | |||
| 20c552693d | |||
| 0117d6994a | |||
| 49ee02277b | |||
| 41d8ed4c78 | |||
| e00765506c | |||
| 66ec2642a4 | |||
| cec0213799 | |||
| 5b4fac652d | |||
| c4bf46e97a | |||
| b885af57b2 | |||
| 4d54b458a7 | |||
| 13f719f285 | |||
| 1c53cde453 | |||
| d2c9078fd3 | |||
| 5575ad7085 | |||
| 587e0b2bf9 | |||
| 469379de61 | |||
| 3bccd5bd6a | |||
| 668d72dfe2 | |||
| b327870fd4 | |||
| 57a94ff4f3 | |||
| 734ea2e8bc | |||
| d4db6e1432 | |||
| 1d4d524932 | |||
| aca050d47c | |||
| f34c43d56e | |||
| 843b724b6d | |||
| 118cc02c74 | |||
| 6bab0c2787 | |||
| 55e912b060 | |||
| d272722d9d | |||
| 690f06e618 | |||
| ea9d1c4fd2 | |||
| cf9e2e9c9a | |||
| 3d63fc6c2f | |||
| 99097c61f6 | |||
| b0d847ca15 | |||
| 95e93a3ab1 | |||
| e061f81beb | |||
| 94d1a67d88 | |||
| 8fe89409a5 | |||
| 29d4c9f13a | |||
| 98cb3ae80e | |||
| 288b6e6943 | |||
| 49aee8e57c | |||
| 555299ddea | |||
| a49e5c0c01 | |||
| 6eb92e6647 | |||
| b99e34bd86 | |||
| a48fd0f422 | |||
| b164b49b81 | |||
| 162eeeb5de | |||
| 7a1282a6da | |||
| 238c68d8eb | |||
| 7cc34c9072 | |||
| b2b0af95d8 | |||
| 6afb4a0220 | |||
| 50962ae9fe | |||
| 87e2d01ccb | |||
| 6625b675af | |||
| 7c16b82e70 | |||
| 72ae812aa4 | |||
| 4c3ffa617a | |||
| a5c4416bd0 | |||
| 24f67f2d87 | |||
| 580e7879d4 | |||
| 3cf5f0e086 | |||
| 18de22a8a7 | |||
| 28bcea6613 | |||
| 5755e70636 | |||
| f65a9ffec5 | |||
| 6d5c7ea855 | |||
| ae7fe1bc2e | |||
| acbce24dd9 | |||
| d0e0cf112f | |||
| 6310430e38 | |||
| 064abb30ee | |||
| 3c1b54200d | |||
| 25a0847e60 | |||
| 5f7eb6c16f | |||
| 915c05a289 | |||
| a82eb29af1 | |||
| e19f583e77 | |||
| dd31321038 | |||
| 4fd8b40f65 | |||
| 89b118e125 | |||
| b215a96f5d | |||
| eca9a105af | |||
| 814945f728 | |||
| 58d27094fa | |||
| 61cc23bda2 | |||
| d4006c4937 | |||
| fad1c30559 | |||
| 57c23537d0 | |||
| 255bdadf88 | |||
| 0312824742 | |||
| a323e03030 | |||
| c0941f9e22 | |||
| 7d13b17b1e | |||
| b1e611d7e3 | |||
| 4a57077f73 | |||
| d1903eabc7 | |||
| c093a79151 | |||
| 779e1b2bb5 | |||
| a86b0ad3fd | |||
| b55d54a417 | |||
| c5fef051f0 | |||
| 5e32fe2547 | |||
| 192314b070 | |||
| aba9c8d74d | |||
| 29ef93cbf3 | |||
| c6a273b789 | |||
| fa9d92a819 | |||
| 756d1a0a80 | |||
| 14ff4cb869 | |||
| 37b8fd1e40 | |||
| 53b878869e | |||
| d515ba9428 | |||
| 131618941c | |||
| 196312941c | |||
| d8ea9a6bca | |||
| 21af2176a6 | |||
| 358451359c | |||
| d00aae972c | |||
| 4e5e193c76 | |||
| 1c9432539a | |||
| add3a14b6e | |||
| 04ee5f8583 | |||
| 84ae76764e | |||
| 6f6205ff41 | |||
| f655c2545b | |||
| 5b38fc606c | |||
| 92663a8773 | |||
| 701dc43675 | |||
| 1bf69792ad | |||
| 6878ed9ffa | |||
| c478d2e22e | |||
| 769d46729a | |||
| 022fb23068 | |||
| 0a5ceb636c | |||
| 8e7fe5c5f2 | |||
| 15d79e8a7b | |||
| d5ab4bda33 | |||
| e790200395 | |||
| 1720ac8ac1 | |||
| 072d21135a | |||
| 8a19e37bec | |||
| a1c8874705 | |||
| 3a7448afac | |||
| 983fdfc671 | |||
| c2834e873d | |||
| dafc018b68 | |||
| bc815fd244 | |||
| e3ac0e4d09 | |||
| 6eefc8e649 | |||
| 20065e644b | |||
| 589027ebec | |||
| 6e203e7083 | |||
| f7108ddd92 | |||
| af3ea3bab3 | |||
| 4c473a17eb | |||
| 0e9fa777b3 | |||
| 0b9b4d5347 | |||
| 9f14e6e87b | |||
| 8828587084 | |||
| 687f01c84a | |||
| d07ae89f72 | |||
| bb3c7afe95 | |||
| 71c6a4f3d7 | |||
| bcd08a01ba | |||
| 8108b93058 | |||
| e7acb60253 | |||
| 985089a26d | |||
| 2dd4526531 | |||
| 20b996ab12 | |||
| d4feb51402 | |||
| ec61f5e3fb | |||
| 12b06306a3 | |||
| e94e12723f | |||
| d45016ee8a | |||
| b7514bf848 | |||
| 7a297f76bf | |||
| 54eb7b3d9f | |||
| 280548fb50 | |||
| 1a270ca088 | |||
| 455cad24eb | |||
| 7a6a82e2ca | |||
| 5fba69e328 | |||
| 708e07e594 | |||
| 9c95a7aa3a | |||
| 8cdcbe361f | |||
| 61bb5abfa2 | |||
| 422c7370a7 | |||
| 0165db7e79 | |||
| 3b192c533b | |||
| 2b609b64ec | |||
| b05dc2da73 | |||
| aa1ec60f65 | |||
| 60a251354e |
+8
-3
@@ -1,13 +1,14 @@
|
||||
---
|
||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,boost-*,bugprone-*,
|
||||
performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,google-explicit-constructor,
|
||||
concurrency-*,-modernize-use-trailing-return-type, -modernize-use-nodiscard,-readability-identifier-length,
|
||||
-readability-redundant-access-specifiers,-readability-qualified-auto,-readability-implicit-bool-conversion,
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-owning-memory,-cppcoreguidelines-avoid-do-while,
|
||||
concurrency-*,-modernize-use-trailing-return-type, -modernize-use-nodiscard,
|
||||
-readability-redundant-access-specifiers,-readability-qualified-auto,
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-owning-memory,
|
||||
-readability-convert-member-functions-to-static,-bugprone-easily-swappable-parameters,
|
||||
-cppcoreguidelines-pro-type-static-cast-downcast'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: file
|
||||
User: florians
|
||||
CheckOptions:
|
||||
@@ -149,6 +150,8 @@ CheckOptions:
|
||||
value: '0'
|
||||
- key: concurrency-mt-unsafe.FunctionSet
|
||||
value: any
|
||||
- key: readability-identifier-length.IgnoredExceptionVariableNames
|
||||
value: '^[e]$'
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: bugprone-reserved-identifier.AllowedIdentifiers
|
||||
@@ -203,6 +206,8 @@ CheckOptions:
|
||||
value: '4294967295'
|
||||
- key: bugprone-suspicious-missing-comma.RatioThreshold
|
||||
value: '0.200000'
|
||||
- key: readability-implicit-bool-conversion.AllowIntegerConditions
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.IgnoredParameterNames
|
||||
value: '^[n]$'
|
||||
- key: readability-function-size.StatementThreshold
|
||||
|
||||
@@ -102,4 +102,3 @@ c5c2ea3498f402c0c89916c46ddb071e22756622 # Assembly: Final application of pre-co
|
||||
d472927bba7b2d8d151c99fb29cf1d8dd099ea7d # Correct PartDesign Helix feature negative angles (#11399)
|
||||
b93c02e07da4990482b9d927506901e6f5d624e1 # Black updated to 24.3.0
|
||||
cbea6b60942f8327e6105b12e8c1d5db4647984c # FEM: Apply pre-commit to FEM files
|
||||
f9d66096878c7d89c273522b9ca57bdb14fee3bc # Rearranged CommandCreateGeo.cpp
|
||||
@@ -1,6 +1,6 @@
|
||||
name: Report a Problem
|
||||
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
|
||||
labels: ["Status: Needs triage","Status: Needs confirmation"]
|
||||
labels: ["Status: Needs triage"]
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: existing_issue
|
||||
@@ -22,7 +22,7 @@ body:
|
||||
id: full_version
|
||||
attributes:
|
||||
label: Full version info
|
||||
description: Please use the About FreeCAD dialog to copy your full version information and paste it here. Try reproducing the issue by restarting FreeCAD in safe mode too.
|
||||
description: Please use the About FreeCAD dialog to copy your full version information and paste it here.
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
@@ -40,8 +40,6 @@ body:
|
||||
- Expressions
|
||||
- FEM
|
||||
- File formats
|
||||
- Material
|
||||
- Measurement
|
||||
- Mesh
|
||||
- OpenSCAD
|
||||
- Part
|
||||
|
||||
+1
-26
@@ -1,6 +1,4 @@
|
||||
aci
|
||||
addmin
|
||||
afile
|
||||
ake
|
||||
aline
|
||||
alle
|
||||
@@ -8,23 +6,19 @@ alledges
|
||||
alocation
|
||||
anid
|
||||
anormal
|
||||
anull
|
||||
apoints
|
||||
aply
|
||||
appy
|
||||
ascript
|
||||
ba
|
||||
beginn
|
||||
bloaded
|
||||
bottome
|
||||
brushin
|
||||
childrens
|
||||
childs
|
||||
connexion
|
||||
currenty
|
||||
curvelinear
|
||||
detet
|
||||
documentin
|
||||
doubleclick
|
||||
dum
|
||||
eiter
|
||||
@@ -34,28 +28,18 @@ finde
|
||||
findn
|
||||
fle
|
||||
fo
|
||||
fpt
|
||||
freez
|
||||
froms
|
||||
graphin
|
||||
hist
|
||||
incrementin
|
||||
indexin
|
||||
indicies
|
||||
indx
|
||||
inout
|
||||
invertin
|
||||
isnt
|
||||
ist
|
||||
itsel
|
||||
leadin
|
||||
linez
|
||||
localy
|
||||
lod
|
||||
mantatory
|
||||
mata
|
||||
methode
|
||||
mke
|
||||
modell
|
||||
nd
|
||||
nin
|
||||
@@ -65,30 +49,21 @@ numer
|
||||
oce
|
||||
ontop
|
||||
ot
|
||||
pard
|
||||
parm
|
||||
parms
|
||||
pointin
|
||||
programm
|
||||
propt
|
||||
rady
|
||||
recurrance
|
||||
rin
|
||||
rougly
|
||||
sectionin
|
||||
seh
|
||||
ser
|
||||
sergent
|
||||
serie
|
||||
shs
|
||||
siz
|
||||
som
|
||||
strack
|
||||
strin
|
||||
substraction
|
||||
sur
|
||||
te
|
||||
textin
|
||||
thist
|
||||
tread
|
||||
ue
|
||||
@@ -99,4 +74,4 @@ vas
|
||||
vertexes
|
||||
vew
|
||||
wallthickness
|
||||
zuser
|
||||
zuser
|
||||
@@ -1,11 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: pip
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
+1
-9
@@ -80,13 +80,9 @@
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Spreadsheet/**/*']
|
||||
|
||||
"Mod: Start":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Start/**/*']
|
||||
|
||||
"Mod: Surface":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Surface/**/*']
|
||||
- any-glob-to-any-file: ['src/Mod/Surface/**/*/']
|
||||
|
||||
"Mod: TechDraw":
|
||||
- changed-files:
|
||||
@@ -102,10 +98,6 @@
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['cMake/**/*']
|
||||
|
||||
"3rd party component":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/3rdParty/**/*']
|
||||
|
||||
# 'Topic' related labels
|
||||
|
||||
"Topic: Stylesheets":
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "black-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "black-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(would reformat (.*))$",
|
||||
"file": 2,
|
||||
"message": 1
|
||||
}
|
||||
]
|
||||
"regexp": "^(would reformat (.*))$",
|
||||
"file": 2,
|
||||
"message": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "clang",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "clang",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):([0-9]+): (error|warning|note): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+):([0-9]+):([0-9]+): (error|warning|note): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "codespell-matcher",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "codespell-matcher",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):(\\d+):\\s+(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+):(\\d+):\\s+(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpplint",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "cpplint",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+):([0-9]+): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "grepMatcher-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "grepMatcher-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+):([0-9]+):(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
{
|
||||
"__comment":
|
||||
"Taken from vscode's vs/workbench/contrib/tasks/common/problemMatcher.ts msCompile rule",
|
||||
"__comment": "Taken from vscode's vs/workbench/contrib/tasks/common/problemMatcher.ts msCompile rule",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "msvc-problem-matcher",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp":
|
||||
"^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
|
||||
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-error",
|
||||
"severity": "error",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "pylint-error",
|
||||
"severity": "error",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([([E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([([E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "pylint-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([^E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([^E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
<!-- Include a brief summary of the changes. -->
|
||||
|
||||
<!--
|
||||
The FreeCAD community thanks you for your contribution!
|
||||
By creating a Pull Request you agree to the contributing policy. The complete policy can be found in the root of the source tree (CONTRIBUTING.md) or at https://github.com/FreeCAD/FreeCAD/blob/main/CONTRIBUTING.md
|
||||
|
||||
This template provides guidance on creating a PR that can be reviewed and approved as quickly as possible. Comments may be safely deleted.
|
||||
|
||||
Unless you know exactly what you're doing, please leave the checkbox 'Allow edits by maintainers' enabled. This will allow maintainers to help you.
|
||||
-->
|
||||
|
||||
## Issues
|
||||
<!-- link to individual issues this PR closes by referencing the issue number (e.g., fixes #1234, closes #4321). -->
|
||||
|
||||
## Before and After Images
|
||||
<!-- If your proposed changes affect the FreeCAD GUI, add before and after screenshots -->
|
||||
|
||||
|
||||
|
||||
<!-- Notes on the PR Review Process
|
||||
|
||||
The following section describes what the maintainers consider when reviewing your Pull Request. These items may not require you to take any action. This information is provided for context. Understanding what we consider will help you prepare your request for speedy approval.
|
||||
|
||||
You can find additional documentation about these guidelines in the [Developers handbook](https://freecad.github.io/DevelopersHandbook).
|
||||
|
||||
Alignment (Does the PR align with the goals and interests of the project?)
|
||||
- Does the PR have at least one issue linked, which this PR closes?
|
||||
- Has the conversation on the PR and related issue(s) reached consensus?
|
||||
- If the PR affects the GUI, is the Design Working Group (DWG) aware and have they had time to review and comment?
|
||||
- If the PR affects the GUI, did the contributor include before/after images?
|
||||
- If the PR affects standards and workflow, is the CAD Working Group (CWG) aware and have they had time to review/comment?
|
||||
|
||||
Impact (Does the change affect other parts of the project?)
|
||||
- Has the impact on documentation been considered and appropriate action taken?
|
||||
- Has the impact on translation been considered appropriate action taken?
|
||||
- Will the PR affect existing user documents?
|
||||
|
||||
Code Quality (Is code well-written and maintainable?)
|
||||
- Does the PR warrant a review by the Code Quality Working Group (CQWG)?
|
||||
- Does the change include tests?
|
||||
- Is the PR rebased on the current main branch with unnecessary commits squashed?
|
||||
|
||||
Release (Are there considerations related to release timing?)
|
||||
- Has the PR been considered for backporting to the latest release branch?
|
||||
- Have the release notes been considered/updated?
|
||||
-->
|
||||
@@ -57,11 +57,6 @@ jobs:
|
||||
env:
|
||||
logdir: /tmp/log/
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Make needed directories
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
@@ -108,7 +103,7 @@ jobs:
|
||||
done
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}-Logs
|
||||
path: |
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
name: FreeCAD master CI
|
||||
|
||||
on: [workflow_dispatch, push, pull_request, merge_group]
|
||||
on: [workflow_dispatch, push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: FC-CI-${{ github.head_ref || github.run_id }}
|
||||
@@ -45,11 +45,23 @@ jobs:
|
||||
with:
|
||||
artifactBasename: Pixi-${{ github.run_id }}
|
||||
|
||||
Ubuntu:
|
||||
MacOS_13_Conda_Apple:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu.yml
|
||||
uses: ./.github/workflows/sub_buildMacOSCondaApple.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu-${{ github.run_id }}
|
||||
artifactBasename: MacOS_13_Conda_Apple-${{ github.run_id }}
|
||||
|
||||
Ubuntu_20-04:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2004.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_20-04-${{ github.run_id }}
|
||||
|
||||
Ubuntu_24-04_Conda:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2404Conda.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_24-04_Conda-${{ github.run_id }}
|
||||
|
||||
Windows:
|
||||
needs: [Prepare]
|
||||
@@ -63,17 +75,16 @@ jobs:
|
||||
with:
|
||||
artifactBasename: Lint-${{ github.run_id }}
|
||||
changedFiles: ${{ needs.Prepare.outputs.changedFiles }}
|
||||
changedLines: ${{ needs.Prepare.outputs.changedLines }}
|
||||
changedCppFiles: ${{ needs.Prepare.outputs.changedCppFiles }}
|
||||
changedCppLines: ${{ needs.Prepare.outputs.changedCppLines }}
|
||||
changedPythonFiles: ${{ needs.Prepare.outputs.changedPythonFiles }}
|
||||
changedPythonLines: ${{ needs.Prepare.outputs.changedPythonLines }}
|
||||
|
||||
WrapUp:
|
||||
needs: [
|
||||
Prepare,
|
||||
Pixi,
|
||||
Ubuntu,
|
||||
MacOS_13_Conda_Apple,
|
||||
Ubuntu_20-04,
|
||||
Ubuntu_24-04_Conda,
|
||||
Windows,
|
||||
Lint
|
||||
]
|
||||
|
||||
@@ -47,27 +47,13 @@ runs:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Assembly_tests_run --gtest_output=json:${{ inputs.reportdir }}assembly_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}assembly_gtest_test_log.txt
|
||||
testName: Assembly
|
||||
- name: C++ app tests
|
||||
id: app
|
||||
- name: C++ core tests
|
||||
id: core
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/App_tests_run --gtest_output=json:${{ inputs.reportdir }}app_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}app_gtest_test_log.txt
|
||||
testName: App
|
||||
- name: C++ base tests
|
||||
id: base
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Base_tests_run --gtest_output=json:${{ inputs.reportdir }}base_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}base_gtest_test_log.txt
|
||||
testName: Base
|
||||
- name: C++ Gui tests
|
||||
id: gui
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Gui_tests_run --gtest_output=json:${{ inputs.reportdir }}gui_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}gui_gtest_test_log.txt
|
||||
testName: Gui
|
||||
testCommand: ${{ inputs.builddir }}/tests/Tests_run --gtest_output=json:${{ inputs.reportdir }}core_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}core_gtest_test_log.txt
|
||||
testName: Core
|
||||
- name: C++ Material tests
|
||||
id: material
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
@@ -96,13 +82,6 @@ runs:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Mesh_tests_run --gtest_output=json:${{ inputs.reportdir }}meshpart_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}meshpart_gtest_test_log.txt
|
||||
testName: MeshPart
|
||||
- name: C++ Misc tests
|
||||
id: misc
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Misc_tests_run --gtest_output=json:${{ inputs.reportdir }}misc_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}misc_gtest_test_log.txt
|
||||
testName: Misc
|
||||
- name: C++ Part tests
|
||||
id: part
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
@@ -138,13 +117,6 @@ runs:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}spreadsheet_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}spreadsheet_gtest_test_log.txt
|
||||
testName: Spreadsheet
|
||||
- name: C++ Start tests
|
||||
id: start
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Start_tests_run --gtest_output=json:${{ inputs.reportdir }}start_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}start_gtest_test_log.txt
|
||||
testName: Start
|
||||
- name: Compose summary report based on test results
|
||||
if: always()
|
||||
shell: bash -l {0}
|
||||
|
||||
@@ -41,11 +41,11 @@ inputs:
|
||||
libpackdownloadurl:
|
||||
description: "URL where to download libpack"
|
||||
required: false
|
||||
default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/3.1.1.3/LibPack-1.1.0-v3.1.1.3-Release.7z
|
||||
default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/3.0.0RC4/LibPack-1.0.0-v3.0.0RC4-Release.7z
|
||||
libpackname:
|
||||
description: "Libpack name (once downloaded)"
|
||||
required: false
|
||||
default: LibPack-1.1.0-v3.1.1.3-Release
|
||||
default: LibPack-1.0.0-v3.0.0RC4-Release
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
# This workflow warns and then closes issues that have had no activity for a
|
||||
# specified amount of time. You can adjust the behavior by modifying this file.
|
||||
# For more information, see:
|
||||
# https://github.com/marketplace/actions/close-stale-issues
|
||||
# https://github.com/actions/stale/blob/master/action.yml
|
||||
# https://github.com/actions/stale
|
||||
---
|
||||
name: 'Stale Issues'
|
||||
on: # yamllint disable-line rule:truthy
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Run at 00:00 UTC every day
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale pull requests
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: '🧹 Tag & close stale unconfirmed bugs'
|
||||
id: stale_issues
|
||||
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 60
|
||||
days-before-issue-close: 14
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
operations-per-run: 100 # max num of ops per run
|
||||
stale-issue-label: 'Status: Stale'
|
||||
close-issue-label: 'Status: Auto-closing'
|
||||
exempt-issue-labels: 'Status: Confirmed,Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-issue-message: |
|
||||
Hi! This issue hasn’t seen activity in a while. If it’s still relevant, please update to the latest FreeCAD weekly build [download here](https://github.com/FreeCAD/FreeCAD/releases/) to see if the problem is resolved.
|
||||
|
||||
If the issue persists, let us know by adding a comment with any updates or details. Otherwise, we’ll close this issue automatically in 14 days to keep our backlog tidy. Feel free to comment anytime to keep it open. Closed issues can always be reopened.
|
||||
Thanks for helping improve FreeCAD!
|
||||
|
||||
Access additional [FreeCAD](https://freecad.org) resources:
|
||||
- **Forum**: https://forum.freecad.org
|
||||
- **Blog**: https://blog.freecad.org
|
||||
- **Wiki**: https://wiki.freecad.org
|
||||
|
||||
- name: '🧹 Close stale requested feedback issues'
|
||||
id: awaiting_issues
|
||||
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 20
|
||||
days-before-issue-close: 14
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
operations-per-run: 100 # max num of ops per run
|
||||
stale-issue-label: 'Status: Stale'
|
||||
close-issue-label: 'Status: Auto-closing'
|
||||
only-labels: 'Status: Needs feedback,Status: Needs test on dev version,Status: Needs steps to reproduce'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-issue-message: |
|
||||
Hi! This issue hasn’t seen activity in a while despite the need for further feedback.
|
||||
If it’s still relevant, please update to the latest FreeCAD weekly build [download here](https://github.com/FreeCAD/FreeCAD/releases/) to see if the problem is resolved.
|
||||
|
||||
If the issue persists, let us know by adding a comment with any updates or details. Otherwise, we’ll close this issue automatically in 14 days to keep our backlog tidy. Feel free to comment anytime to keep it open. Closed issues can always be reopened.
|
||||
Thanks for helping improve FreeCAD!
|
||||
|
||||
Access additional [FreeCAD](https://freecad.org) resources:
|
||||
- **Forum**: https://forum.freecad.org
|
||||
- **Blog**: https://blog.freecad.org
|
||||
- **Wiki**: https://wiki.freecad.org
|
||||
|
||||
- name: '🧹 Tag & close inactive issues'
|
||||
id: inactive_issues
|
||||
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 190
|
||||
days-before-issue-close: 60
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
operations-per-run: 50 # max num of ops per run
|
||||
stale-issue-label: 'Status: Stale'
|
||||
close-issue-label: 'Status: Auto-closing'
|
||||
exempt-issue-labels: 'Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-issue-message: |
|
||||
Hi! This issue hasn’t seen activity in a while. We automatically check each issue after 190 days without activity to keep the backlog tidy.
|
||||
If it’s still relevant, please update to the latest FreeCAD weekly build [download here](https://github.com/FreeCAD/FreeCAD/releases/) to see if the issue is already resolved.
|
||||
|
||||
If the issue is still relevant, let us know by adding a comment.
|
||||
Otherwise, we’ll close this issue automatically in 60 days.
|
||||
|
||||
Feel free to comment anytime to keep it open. Closed issues can always be reopened.
|
||||
Thanks for helping improve FreeCAD!
|
||||
|
||||
Access additional [FreeCAD](https://freecad.org) resources:
|
||||
- **Forum**: https://forum.freecad.org
|
||||
- **Blog**: https://blog.freecad.org
|
||||
- **Wiki**: https://wiki.freecad.org
|
||||
|
||||
- name: '🧹 Tag & close inactive PRs'
|
||||
id: inactive_pr
|
||||
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: -1
|
||||
days-before-issue-close: -1
|
||||
days-before-pr-stale: 120
|
||||
days-before-pr-close: 60
|
||||
operations-per-run: 30 # max num of ops per run
|
||||
stale-pr-label: 'Status: Stale'
|
||||
close-pr-label: 'Status: Auto-closing'
|
||||
exempt-pr-labels: 'Needs backport,Priority: High,Priority: Critical,no-auto-close'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-pr-message: |
|
||||
Thanks for helping improve FreeCAD!
|
||||
This pull request hasn’t seen activity in a while. We automatically check each PR after 120 days without activity to keep the repository tidy.
|
||||
|
||||
If the PR is still relevant, let us know by adding a comment.
|
||||
Otherwise, we’ll close this PR automatically in 60 days.
|
||||
|
||||
If you would like to keep working on this pull request, we advice to rebase it on current main branch, ask feedback from users or maintainers and engage with the community to get it forward.
|
||||
@@ -1,50 +0,0 @@
|
||||
name: Backport merged pull request
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed, labeled]
|
||||
branches: [main, releases/*]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
name: Create backport pull request
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Run the action if a PR is merged with backport labels
|
||||
# OR
|
||||
# when already merged PR is labeled with backport labels
|
||||
if: >
|
||||
github.event.pull_request.merged
|
||||
&& (
|
||||
github.event.action == 'closed'
|
||||
|| (
|
||||
github.event.action == 'labeled'
|
||||
&& startsWith(github.event.label.name, 'backport ')
|
||||
)
|
||||
)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Create backport pull requests
|
||||
uses: korthout/backport-action@ca4972adce8039ff995e618f5fc02d1b7961f27a # v3.3.0
|
||||
with:
|
||||
# Inputs documented here: https://github.com/korthout/backport-action?tab=readme-ov-file#inputs
|
||||
github_token: ${{ github.token }}
|
||||
github_workspace: ${{ github.workspace }}
|
||||
|
||||
# permit PRs with merge commits to be backported
|
||||
merge_commits: 'skip'
|
||||
|
||||
# copy labels to backport to identify affected systems and priorities
|
||||
copy_labels_pattern: '.*'
|
||||
|
||||
# Regex pattern to match github labels
|
||||
# The capture group catches the target branch
|
||||
# i.e. label "backport releases/FreeCAD-1-0" will create backport
|
||||
# PR for branch releases/FreeCAD-1-0
|
||||
label_pattern: ^backport ([^ ]+)$
|
||||
@@ -1,127 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '28 12 * * 6'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: actions
|
||||
build-mode: none
|
||||
# - language: c-cpp
|
||||
# build-mode: autobuild
|
||||
# - language: javascript-typescript
|
||||
# build-mode: none
|
||||
- language: python
|
||||
build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
submodules: recursive
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended
|
||||
queries: security-and-quality
|
||||
|
||||
# Change the CodeQL Bundle version
|
||||
# tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.20.7/codeql-bundle-linux64.tar.gz
|
||||
|
||||
# Add exclusions
|
||||
config: |
|
||||
paths-ignore:
|
||||
- src/Mod/Import/App/SCL_output/**
|
||||
query-filters:
|
||||
- exclude:
|
||||
id: py/file-not-closed
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -1,163 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced (c-cpp)"
|
||||
|
||||
on:
|
||||
# push:
|
||||
# branches: [ "main" ]
|
||||
# pull_request:
|
||||
# branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '28 12 * * 6'
|
||||
workflow_dispatch: # Allow manual triggers
|
||||
|
||||
env:
|
||||
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# - language: actions
|
||||
# build-mode: none
|
||||
- language: c-cpp
|
||||
build-mode: autobuild
|
||||
# - language: javascript-typescript
|
||||
# build-mode: none
|
||||
# - language: python
|
||||
# build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
# prevent running out of disk space on Ubuntu runners.
|
||||
- name: Maximize build space
|
||||
uses: AdityaGarg8/remove-unwanted-software@90e01b21170618765a73370fcc3abbd1684a7793 # v5
|
||||
with:
|
||||
verbose: 'true'
|
||||
remove-android: 'true' # (frees ~9 GB)
|
||||
remove-cached-tools: 'true' # (frees ~8.3 GB)
|
||||
remove-haskell: 'true' # (frees ~5.2 GB)
|
||||
remove-swapfile: 'true' # (frees ~4 GB)
|
||||
remove-docker-images: 'true' # (frees ~3.2 GB)
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
submodules: recursive
|
||||
|
||||
# Install FreeCAD dependencies (cpp)
|
||||
- name: Setup build environment
|
||||
run: ./package/ubuntu/install-apt-packages.sh
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended
|
||||
queries: security-and-quality
|
||||
|
||||
# Change the CodeQL Bundle version
|
||||
# tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.20.7/codeql-bundle-linux64.tar.gz
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
output: sarif-results
|
||||
upload: failure-only
|
||||
|
||||
- name: filter-sarif
|
||||
uses: advanced-security/filter-sarif@v1
|
||||
with:
|
||||
patterns: |
|
||||
-tests/**/*
|
||||
-src/3rdParty/**/*
|
||||
-**/ui_*.h
|
||||
-**/moc_*.cpp
|
||||
input: sarif-results/cpp.sarif
|
||||
output: sarif-results/cpp.sarif
|
||||
|
||||
- name: Upload SARIF
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: sarif-results/cpp.sarif
|
||||
|
||||
- name: Upload loc as a Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sarif-results
|
||||
path: sarif-results
|
||||
retention-days: 1
|
||||
@@ -1,27 +0,0 @@
|
||||
# Dependency Review Action
|
||||
#
|
||||
# This Action will scan dependency manifest files that change as part of a Pull Request,
|
||||
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
|
||||
# Once installed, if the workflow run is marked as required,
|
||||
# PRs introducing known-vulnerable packages will be blocked from merging.
|
||||
#
|
||||
# Source repository: https://github.com/actions/dependency-review-action
|
||||
name: 'Dependency Review'
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: 'Checkout Repository'
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: 'Dependency Review'
|
||||
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4
|
||||
@@ -16,11 +16,6 @@ jobs:
|
||||
|
||||
steps:
|
||||
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Get dates for last month
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -35,13 +30,13 @@ jobs:
|
||||
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Run issue-metrics tool
|
||||
uses: github/issue-metrics@e8f19041d9996b64cd5eebd653f065adb6d0e195 # v3.23.2
|
||||
uses: github/issue-metrics@v3
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SEARCH_QUERY: 'repo:FreeCAD/FreeCAD is:issue created:${{ env.last_month }}'
|
||||
|
||||
- name: Create issue
|
||||
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1
|
||||
uses: peter-evans/create-issue-from-file@v4
|
||||
with:
|
||||
title: Monthly issue metrics report
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -9,9 +9,6 @@ on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -20,12 +17,7 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
|
||||
- uses: actions/labeler@v5
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: ".github/labels.yml"
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
# This workflow uses actions that are not certified by GitHub. They are provided
|
||||
# by a third-party and are governed by separate terms of service, privacy
|
||||
# policy, and support documentation.
|
||||
|
||||
name: Scorecard supply-chain security
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '20 7 * * 2'
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Needed to publish results and get a badge (see publish_results below).
|
||||
id-token: write
|
||||
contents: read
|
||||
actions: read
|
||||
# To allow GraphQL ListCommits to work
|
||||
issues: read
|
||||
pull-requests: read
|
||||
# To detect SAST tools
|
||||
checks: read
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecards on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
||||
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
|
||||
# Public repositories:
|
||||
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||
# - Allows the repository to include the Scorecard badge.
|
||||
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories:
|
||||
# - `publish_results` will always be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -0,0 +1,172 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on a Conda environment on macOS.
|
||||
|
||||
name: Build macOS 13 (Apple Silicon)
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: macos-14
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CC: arm64-apple-darwin20.0.0-clang
|
||||
CXX: arm64-apple-darwin20.0.0-clang++
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -l {0}
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Miniconda
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
activate-environment: .conda/freecad
|
||||
environment-file: conda/conda-env.yaml
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
run: |
|
||||
./conda/setup-environment.sh
|
||||
- name: Set Environment Variables
|
||||
run: |
|
||||
echo "CC=$CC" >> "$GITHUB_ENV"
|
||||
echo "CXX=$CXX" >> "$GITHUB_ENV"
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/macos/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
run: |
|
||||
mamba run --live-stream -p .conda/freecad cmake --preset conda-macos-release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.conda/freecad/opt/freecad
|
||||
- name: CMake Build
|
||||
run: |
|
||||
mamba run --live-stream -p .conda/freecad cmake --build build/release
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
run: |
|
||||
mamba run --live-stream -p .conda/freecad cmake --install build/release
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -49,18 +49,13 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_NODIRECT: true
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_NOINODECACHE: true
|
||||
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
builddir: ${{ github.workspace }}/build/
|
||||
cacheKey: pixi-${{ matrix.os }}
|
||||
config: release
|
||||
logdir: ${{ github.workspace }}/logs/
|
||||
reportdir: ${{ github.workspace }}/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-${{ matrix.os }}-report.md
|
||||
@@ -74,11 +69,6 @@ jobs:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Set Platform Environment Variables
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
@@ -91,7 +81,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add GCC Problem Matcher
|
||||
if: runner.os == 'Linux'
|
||||
@@ -116,15 +106,13 @@ jobs:
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.2
|
||||
with:
|
||||
pixi-version: v0.48.1
|
||||
pixi-version: v0.41.3
|
||||
cache: false
|
||||
|
||||
- name: Restore Compiler Cache
|
||||
id: cache-restore
|
||||
if: always()
|
||||
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
@@ -140,14 +128,13 @@ jobs:
|
||||
|
||||
- name: CMake Configure
|
||||
run: |
|
||||
pixi run configure-${{ env.config }}
|
||||
pixi run configure-release
|
||||
|
||||
- name: CMake Build
|
||||
run: |
|
||||
pixi run build-${{ env.config }}
|
||||
pixi run build
|
||||
|
||||
- name: Print ccache statistics after Build
|
||||
if: always()
|
||||
run: |
|
||||
pixi run ccache -s
|
||||
|
||||
@@ -182,7 +169,7 @@ jobs:
|
||||
|
||||
- name: CMake Install
|
||||
run: |
|
||||
pixi run install-${{ env.config }}
|
||||
pixi run install
|
||||
|
||||
- name: FreeCAD CLI tests on install
|
||||
if: runner.os != 'Windows'
|
||||
@@ -207,16 +194,15 @@ jobs:
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Save Compiler Cache
|
||||
id: cache-save
|
||||
if: always()
|
||||
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-${{ matrix.os }}-Logs
|
||||
path: |
|
||||
@@ -225,7 +211,7 @@ jobs:
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
|
||||
@@ -1,237 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Ubuntu 22.04 using GCC.
|
||||
|
||||
name: Build Ubuntu 22.04
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-22.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_NODIRECT: true
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_NOINODECACHE: true
|
||||
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
|
||||
CC: /usr/bin/gcc
|
||||
CXX: /usr/bin/g++
|
||||
#CC: /usr/bin/clang
|
||||
#CXX: /usr/bin/clang++
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
config: release
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install FreeCAD dependencies
|
||||
run: ./package/ubuntu/install-apt-packages.sh
|
||||
|
||||
- name: Install FreeCAD Python test dependencies
|
||||
run: |
|
||||
sudo apt-get update -y -qq
|
||||
sudo apt-get install -y -qq python3-pip
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install ifcopenshell==0.8.2
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
qt_major_version: 5
|
||||
|
||||
- name: Restore Compiler Cache
|
||||
id: cache-restore
|
||||
if: always()
|
||||
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
|
||||
- name: Install cmake
|
||||
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
|
||||
with:
|
||||
cmake-version: '3.31.6'
|
||||
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: -G Ninja --preset ${{ env.config }}
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Print ccache statistics after Build
|
||||
if: always()
|
||||
run: |
|
||||
ccache -s
|
||||
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: xvfb-run FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Save Compiler Cache
|
||||
id: cache-save
|
||||
if: always()
|
||||
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -0,0 +1,266 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Ubuntu 20.04 using GCC.
|
||||
|
||||
name: Build Ubuntu 20.04
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:20.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
LC_ALL: en_US.utf8
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
# set in a step to workaround https://github.com/actions/runner/issues/2058
|
||||
#CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
#CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CC: /usr/bin/gcc
|
||||
CXX: /usr/bin/g++
|
||||
#CC: /usr/bin/clang
|
||||
#CXX: /usr/bin/clang++
|
||||
# set in a step to workaround https://github.com/actions/runner/issues/2058
|
||||
#builddir: ${{ github.workspace }}/build/release/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Install basic packages
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y --no-install-recommends --reinstall language-pack-en sudo git ca-certificates build-essential cmake
|
||||
- name: set env variables
|
||||
run: |
|
||||
echo "CCACHE_DIR=$GITHUB_WORKSPACE/ccache" >> "$GITHUB_ENV"
|
||||
echo "CCACHE_CONFIGPATH=$GITHUB_WORKSPACE/ccache/config" >> "$GITHUB_ENV"
|
||||
echo "builddir=$GITHUB_WORKSPACE/build/release/" >> "$GITHUB_ENV"
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install FreeCAD dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
ccache \
|
||||
doxygen \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcoin-dev \
|
||||
libeigen3-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
libmedc-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk7-dev \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libyaml-cpp-dev \
|
||||
libzipios++-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
ninja-build \
|
||||
occt-draw \
|
||||
pyqt5-dev-tools \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-git \
|
||||
python3-markdown \
|
||||
python3-matplotlib \
|
||||
python3-packaging \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwidgets \
|
||||
python3-yaml \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
shiboken2 \
|
||||
swig \
|
||||
xvfb
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
qt_major_version: 5
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: -G Ninja -D CMAKE_BUILD_TYPE=Release
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: xvfb-run FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -0,0 +1,201 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on a Conda environment on Linux.
|
||||
|
||||
name: Build Ubuntu 24.04 (Conda)
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: ubuntu-24.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -l {0}
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Miniconda
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
activate-environment: .conda/freecad
|
||||
environment-file: conda/conda-env.yaml
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
run: |
|
||||
./conda/setup-environment.sh
|
||||
- name: Set Environment Variables
|
||||
run: |
|
||||
echo "CC=$CC" >> "$GITHUB_ENV"
|
||||
echo "CXX=$CXX" >> "$GITHUB_ENV"
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
qt_major_version: 5
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: --preset conda-linux-release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.conda/freecad/opt/freecad
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: xvfb-run ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -42,22 +42,19 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
CCACHE_DIR: C:/FC/cache/
|
||||
CCACHE_LOGFILE: C:/logs/ccache.log
|
||||
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_NODIRECT: true
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_NOINODECACHE: true
|
||||
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros" # Can't get PCH to work on Windows
|
||||
CCACHE_DIRECT: true
|
||||
#CCACHE_SLOPPINESS: "pch_defines,time_macros" # Can't get PCH to work on Windows
|
||||
CCACHE_LOGFILE: C:/logs/ccache.log
|
||||
## Have to use C:\ because not enough space on workspace drive
|
||||
builddir: C:/FC/build/release/
|
||||
cacheKey: Windows
|
||||
ccachebindir: C:/FC/ccache/
|
||||
config: release
|
||||
libpackdir: C:/FC/libpack/
|
||||
ccachebindir: C:/FC/ccache/
|
||||
logdir: C:/logs/
|
||||
reportdir: C:/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
@@ -65,16 +62,10 @@ jobs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
@@ -85,43 +76,32 @@ jobs:
|
||||
mkdir ${{ env.logdir }}
|
||||
mkdir ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get Ccache
|
||||
uses: ./.github/workflows/actions/windows/getCcache
|
||||
with:
|
||||
ccachebindir: ${{ env.ccachebindir }}
|
||||
|
||||
- name: Get Libpack
|
||||
uses: ./.github/workflows/actions/windows/getLibpack
|
||||
with:
|
||||
libpackdir: ${{ env.libpackdir }}
|
||||
|
||||
- name: Restore compiler cache
|
||||
id: cache-restore
|
||||
if: always()
|
||||
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
key: FC-Windows-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ env.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ env.cacheKey }}-
|
||||
|
||||
FC-Windows-${{ github.ref }}-
|
||||
FC-Windows-
|
||||
- name: Print Ccache statistics before build, reset stats and print config
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
. $env:ccachebindir\ccache -z
|
||||
. $env:ccachebindir\ccache -p
|
||||
|
||||
- name: Install cmake
|
||||
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
|
||||
with:
|
||||
cmake-version: '3.31.6'
|
||||
|
||||
- name: Configuring CMake
|
||||
run: >
|
||||
cmake -B"${{ env.builddir }}" .
|
||||
--preset ${{ env.config }}
|
||||
--preset release
|
||||
-DCMAKE_VS_NO_COMPILE_BATCHING=ON
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DFREECAD_USE_PCH=OFF
|
||||
@@ -130,41 +110,26 @@ jobs:
|
||||
-DFREECAD_COPY_DEPEND_DIRS_TO_BUILD=ON
|
||||
-DFREECAD_COPY_LIBPACK_BIN_TO_BUILD=ON
|
||||
-DFREECAD_COPY_PLUGINS_BIN_TO_BUILD=ON
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
||||
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Compiling sources
|
||||
run: |
|
||||
cd $env:builddir
|
||||
msbuild ALL_BUILD.vcxproj /m /p:Configuration=Release /p:TrackFileAccess=false /p:CLToolPath=${{ env.ccachebindir }}
|
||||
|
||||
- name: Print Ccache statistics after build
|
||||
if: always()
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
|
||||
- name: C++ unit tests
|
||||
if: false # Disabled because seems to not function on Windows build
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
. ${{ env.builddir }}\tests\Release\Tests_run --gtest_output=json:${{ env.reportdir }}gtest_results.json # 2>&1 | tee -filepath ${{ env.logdir }}\unitTests.log
|
||||
|
||||
- name: FreeCAD CLI tests
|
||||
run: |
|
||||
. ${{ env.builddir }}\bin\FreeCADCmd -t 0 # 2>&1 | tee -filepath ${{ env.logdir }}\integrationTests.log
|
||||
|
||||
- name: Save Compiler Cache
|
||||
id: cache-save
|
||||
if: always()
|
||||
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
|
||||
+509
-111
@@ -34,21 +34,12 @@ on:
|
||||
changedFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedLines:
|
||||
type: string
|
||||
required: false
|
||||
changedCppFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedCppLines:
|
||||
type: string
|
||||
required: false
|
||||
changedPythonFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedPythonLines:
|
||||
type: string
|
||||
required: false
|
||||
checkLineendings:
|
||||
default: false
|
||||
type: boolean
|
||||
@@ -85,6 +76,14 @@ on:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
cpplintFilters:
|
||||
default: -whitespace-*
|
||||
type: string
|
||||
required: false
|
||||
cpplintLineLength:
|
||||
default: 120
|
||||
type: string
|
||||
required: false
|
||||
cpplintFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
@@ -130,7 +129,7 @@ on:
|
||||
type: string
|
||||
required: false
|
||||
spellingIgnore:
|
||||
default: ./.git*,*.po,*.ts,*.svg,./src/3rdParty,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL*,./src/Doc/FreeCAD.uml,./build/
|
||||
default: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL*,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/
|
||||
type: string
|
||||
required: false
|
||||
codespellFailSilent:
|
||||
@@ -141,12 +140,16 @@ on:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clangTidyChecks:
|
||||
default: # empty to use the .clang-tidy file
|
||||
type: string
|
||||
required: false
|
||||
clangTidyFailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazy: # for the Message codes see: https://invent.kde.org/sdk/clazy#list-of-checks
|
||||
default: false
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clazyChecks:
|
||||
@@ -158,7 +161,7 @@ on:
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazyQT6:
|
||||
default: false
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clazyQT6Checks:
|
||||
@@ -177,9 +180,6 @@ on:
|
||||
reportFile:
|
||||
value: ${{ jobs.Lint.outputs.reportFile }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
Lint:
|
||||
@@ -197,16 +197,10 @@ jobs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
@@ -214,157 +208,561 @@ jobs:
|
||||
mkdir -p ${{ env.fixesdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
# Generic lints steps
|
||||
- name: Check File Case Sensitivity
|
||||
uses: credfeto/action-case-checker@cb652aeab29ed363bbdb7d9ee1bfcc010c46cac5 # v1.3.0
|
||||
|
||||
# Run generic lints
|
||||
- name: Check for non Unix line ending
|
||||
if: inputs.checkLineendings && always()
|
||||
continue-on-error: ${{ inputs.lineendingsFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/generic_checks.py \
|
||||
--lineendings-check \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}" \
|
||||
--log-dir "${{ env.logdir }}"
|
||||
|
||||
lineendings=0
|
||||
for file in ${{ inputs.changedFiles }}
|
||||
do
|
||||
# Check for DOS or MAC line endings
|
||||
if [[ $(file -b $file) =~ "with CR" ]]
|
||||
then
|
||||
echo "::warning file=$file,title=$file::File has non Unix line endings"
|
||||
echo "$file has non Unix line endings" >> ${{ env.logdir }}lineendings.log
|
||||
((lineendings=lineendings+1))
|
||||
fi
|
||||
done
|
||||
echo "Found $lineendings line ending errors"
|
||||
# Write the report
|
||||
if [ $lineendings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:information_source: Found $lineendings problems with line endings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}lineendings.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No line ending problem found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $lineendings -eq 0 ]
|
||||
- name: Check for trailing whitespaces
|
||||
if: inputs.checkWhitespace && always()
|
||||
continue-on-error: ${{ inputs.whitespaceFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/generic_checks.py \
|
||||
--whitespace-check \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}" \
|
||||
--log-dir "${{ env.logdir }}"
|
||||
|
||||
whitespaceErrors=0
|
||||
exclude="*[.md]"
|
||||
for file in ${{ inputs.changedFiles }}
|
||||
do
|
||||
# Check for trailing whitespaces
|
||||
grep -nIHE --exclude="$exclude" " $" $file | sed -e "s/$/<-- trailing whitespace/" >> ${{ env.logdir }}whitespace.log || true
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}whitespace.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}whitespace.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
whitespaceErrors=$(wc -l < ${{ env.logdir }}whitespace.log)
|
||||
fi
|
||||
echo "Found $whitespaceErrors whitespace errors"
|
||||
# Write the report
|
||||
if [ $whitespaceErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:information_source: Found $whitespaceErrors trailing whitespace</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}whitespace.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No trailing whitespace found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $whitespaceErrors -eq 0 ]
|
||||
- name: Check for Tab usage
|
||||
if: inputs.checkTabs && always()
|
||||
continue-on-error: ${{ inputs.tabsFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/generic_checks.py \
|
||||
--tabs-check \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}" \
|
||||
--log-dir "${{ env.logdir }}"
|
||||
|
||||
# Python linting steps
|
||||
|
||||
tabErrors=0
|
||||
exclude="*[.md]"
|
||||
# Check for Tab usage
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
do
|
||||
grep -nIHE --exclude="$exclude" $'\t' $file | sed -e "s/$/ <-- contains tab/" >> ${{ env.logdir }}tab.log || true
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}tab.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}tab.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
tabErrors=$(wc -l < ${{ env.logdir }}tab.log)
|
||||
fi
|
||||
echo "Found $tabErrors tab errors"
|
||||
# Write the report
|
||||
if [ $tabErrors -gt 0 ]; then
|
||||
echo "<details><summary>:information_source: Found $tabErrors tabs, better to use spaces</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}tab.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No tabs found" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $tabErrors -eq 0 ]
|
||||
# Run Python lints
|
||||
- name: Pylint
|
||||
if: inputs.checkPylint && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.pylintFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/pylint.py \
|
||||
--files "${{ inputs.changedPythonFiles }}" \
|
||||
--disable "${{ inputs.pylintDisable }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
- name: Black
|
||||
pylintErrors=0
|
||||
pylintWarnings=0
|
||||
pylintRefactorings=0
|
||||
pylintConventions=0
|
||||
pip install --break-system-packages pylint
|
||||
# List enabled pylint checks
|
||||
pylint --list-msgs-enabled > ${{ env.logdir }}pylint-enabled-checks.log
|
||||
# Run pylint on all python files
|
||||
set +e
|
||||
pylint --disable=${{ inputs.pylintDisable }} ${{ inputs.changedPythonFiles }} > ${{ env.logdir }}pylint.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If pylint has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}pylint.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintError.json"
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintWarning.json"
|
||||
cat ${{ env.logdir }}pylint.log
|
||||
echo "::remove-matcher owner=pylint-error::"
|
||||
echo "::remove-matcher owner=pylint-warning::"
|
||||
pylintErrors=$( grep -oP '(?<=error \|)\d+' ${{ env.logdir }}pylint.log) || true # grep returns 0 if no match is found
|
||||
pylintWarnings=$( grep -oP '(?<=warning \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
pylintRefactorings=$( grep -oP '(?<=refactor \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
pylintConventions=$( grep -oP '(?<=convention \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
fi
|
||||
echo "Found $pylintErrors errors, $pylintWarnings warnings, $pylintRefactorings refactorings, $pylintConventions conventions"
|
||||
# Write the report
|
||||
if [ $pylintErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Pylint found :fire: $pylintErrors errors, :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintWarnings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Pylint found :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintRefactorings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:construction: Pylint found :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintConventions -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Pylint found :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: No pylint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# List enabled checks in the report
|
||||
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}pylint-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}pylint.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $pylintErrors -eq 0 ]
|
||||
- name: Black (Python)
|
||||
if: inputs.checkBlack && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.blackFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/black.py \
|
||||
--files "${{ inputs.changedPythonFiles }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
# C++ linting steps
|
||||
|
||||
blackReformats=0
|
||||
blackFails=0
|
||||
pip install --break-system-packages black
|
||||
set +e
|
||||
black --line-length 100 --check ${{ inputs.changedPythonFiles }} &> ${{ env.logdir }}black.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If black has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}black.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/blackWarning.json"
|
||||
cat ${{ env.logdir }}black.log
|
||||
echo "::remove-matcher owner=black-warning::"
|
||||
blackReformats=$( grep -oP '\d+(?= fil.+ would be reformatted)' ${{ env.logdir }}black.log) || true # grep returns 0 if no match is found
|
||||
blackFails=$( grep -oP '\d+(?= fil.+ would fail to reformat)' ${{ env.logdir }}black.log) || true
|
||||
fi
|
||||
echo "Found $blackReformats files would be reformatted and $blackFails files would fail to reformat"
|
||||
# Write the report
|
||||
if [ $blackReformats -gt 0 ] || [ $blackFails -gt 0 ] #FIXME purpose of testing $blackFails as we don't use it then
|
||||
then
|
||||
echo "<details><summary>:pencil2: Black would reformat $blackReformats files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Black would reformat no file</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}black.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $exitCode -eq 0 ]
|
||||
# Run C++ lints
|
||||
- name: Install FreeCAD dependencies
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: ./package/ubuntu/install-apt-packages.sh
|
||||
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
doxygen \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcoin-dev \
|
||||
libeigen3-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
libmedc-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk9-dev \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libyaml-cpp-dev \
|
||||
libzipios++-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
occt-draw \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-git \
|
||||
python3-markdown \
|
||||
python3-matplotlib \
|
||||
python3-packaging \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwidgets \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
shiboken2 \
|
||||
swig \
|
||||
ccache \
|
||||
xvfb
|
||||
- name: Run CMake # This is needed for Clang tools to work correctly
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: |
|
||||
mkdir build && cmake -S ./ -B ./build/ -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
|
||||
|
||||
- name: Check old Qt string-based connections (https://wiki.qt.io/New_Signal_Slot_Syntax)
|
||||
if: inputs.checkQtConnections && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.qtConnectionsFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/qt_connections.py \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
qtconnectionSyntax=0
|
||||
exclude="*[.md,.log,.ts,.git]"
|
||||
# Check all files for QT string-based connections
|
||||
for file in ${{ inputs.changedFiles }} #TODO does this makes sense in Python files ?
|
||||
do
|
||||
grep -nIHE --exclude="$exclude" $' SIGNAL| SLOT' $file | sed -e "s/$/ <--Consider using Functor-Based Connections/" >> ${{ env.logdir }}qtConnections.log || true #TODO seems to trigger false positives
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}qtConnections.log ]; then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}qtConnections.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
qtconnectionSyntax=$(wc -l < ${{ env.logdir }}qtConnections.log)
|
||||
fi
|
||||
echo "Found $qtconnectionSyntax QT string-based connections"
|
||||
# Write the report
|
||||
if [ $qtconnectionSyntax -gt 0 ]; then
|
||||
echo "<details><summary>:information_source: Found $qtconnectionSyntax QT string-based connections :arrow_right: consider using QT functor-Based Connections</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# documentation link
|
||||
echo "For more information see: https://wiki.qt.io/New_Signal_Slot_Syntax or https://github.com/FreeCAD/FreeCAD/issues/6166" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}qtConnections.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No string-based connections found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $qtconnectionSyntax -eq 0 ]
|
||||
- name: Cpplint
|
||||
if: inputs.checkCpplint && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.cpplintFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/cpplint.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
cpplintErrors=0
|
||||
pip install --break-system-packages cpplint
|
||||
# Run cpplint
|
||||
for file in ${{ inputs.changedCppFiles }}
|
||||
do
|
||||
cpplint --filter=${{ inputs.cpplintFilters }} --linelength=${{ inputs.cpplintLineLength }} $file &>> ${{ env.logdir }}cpplint.log || true
|
||||
done
|
||||
# If cpplint has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ ${{ env.logdir }}cpplint.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/cpplint.json"
|
||||
cat ${{ env.logdir }}cpplint.log
|
||||
echo "::remove-matcher owner=cpplint::"
|
||||
cpplintErrors=$(grep -nIHE "\[[0-9]\]$" ${{ env.logdir }}cpplint.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $cpplintErrors cpplint errors"
|
||||
# Write the report
|
||||
if [ $cpplintErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: CppLint found $cpplintErrors errors / warnings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: No cpplint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}cpplint.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $cpplintErrors -eq 0 ]
|
||||
- name: Clang-format
|
||||
if: inputs.checkClangFormat && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangFormatFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clang_format.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--clang-style "${{ inputs.clangStyle }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
clangFormatErrors=0
|
||||
# Run clang-format on all cpp files
|
||||
clang-format --dry-run --ferror-limit=1 --verbose --style=${{ inputs.clangStyle }} ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-format.log || true
|
||||
# If clang-format has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clang-format.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clang-format.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clangFormatErrors=$(grep -nIHE "\[-Wclang-format-violations]$" ${{ env.logdir }}clang-format.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clangFormatErrors clang-format errors"
|
||||
# Write the report
|
||||
if [ $clangFormatErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clang-format would reformat $clangFormatErrors files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clang-format would reformat no file</summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-format.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clangFormatErrors -eq 0 ]
|
||||
- name: Codespell
|
||||
if: inputs.checkSpelling && always()
|
||||
continue-on-error: ${{ inputs.codespellFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/codespell.py \
|
||||
--files ${{ inputs.changedFiles }} \
|
||||
--ignore-words "${{ inputs.listIgnoredMisspelling }}" \
|
||||
--skip "${{ inputs.spellingIgnore }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
pip install --break-system-packages codespell
|
||||
wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
|
||||
#wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary_rare.txt
|
||||
set +e
|
||||
misspellings=$( { codespell --quiet-level 3 --summary --count --ignore-words ${{ inputs.listIgnoredMisspelling }} --skip ${{ inputs.spellingIgnore }} -D dictionary.txt ${{ inputs.changedFiles }} > ${{ env.logdir }}codespell.log ; } 2>&1 )
|
||||
set -e
|
||||
# If codespell has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}codespell.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/codespell.json"
|
||||
cat ${{ env.logdir }}codespell.log
|
||||
echo "::remove-matcher owner=codespell::"
|
||||
fi
|
||||
echo "Found $misspellings misspellings"
|
||||
# Write the report
|
||||
if [ $misspellings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Codespell found $misspellings misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Codespell found no misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "To ignore false positives, append the word to the [.github/codespellignore](https://github.com/FreeCAD/FreeCAD/blob/master/.github/codespellignore) file (lowercase)" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}codespell.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $misspellings -eq 0 ]
|
||||
- name: Clang-tidy
|
||||
if: inputs.checkClangTidy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangTidyFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clang_tidy.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--line-filter '${{ inputs.changedCppLines }}' \
|
||||
--clang-style "${{ inputs.clangStyle }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
clangTidyErrors=0
|
||||
clangTidyWarnings=0
|
||||
clangTidyNotes=0
|
||||
sudo apt-get install -y --no-install-recommends clang-tidy
|
||||
#TODO: check where this "clang-tidy.yaml" goes ; shall this be put in the fixes ?
|
||||
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ --explain-config &>> ${{ env.logdir }}clang-tidy-enabled-checks.log
|
||||
# Run clang-tidy on all cpp files
|
||||
set +e
|
||||
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-tidy.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If clang-tidy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clang-tidy.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clang-tidy.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clangTidyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
clangTidyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
clangTidyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clangTidyErrors errors, $clangTidyWarnings warnings, $clangTidyNotes notes"
|
||||
# Write the report
|
||||
if [ $clangTidyErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clang-Tidy found :fire: $clangTidyErrors errors, :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $clangTidyWarnings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clang-Tidy found :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $clangTidyNotes -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clang-Tidy found :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clang-Tidy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# List enabled checks in the report
|
||||
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-tidy-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-tidy.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clangTidyErrors -eq 0 ]
|
||||
- name: Clazy
|
||||
if: inputs.checkClazy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clazyFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clazy.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--clazy-checks "${{ inputs.clazyChecks }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
clazyErrors=0
|
||||
clazyWarnings=0
|
||||
clazyNotes=0
|
||||
sudo apt-get install -y --no-install-recommends clazy
|
||||
#TODO: check where this "clazy.yaml" goes ; shall this be put in the fixes ?
|
||||
# Run clazy on all cpp files
|
||||
clazy-standalone --export-fixes=clazy.yaml -checks=${{ inputs.clazyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazy.log || true
|
||||
# If clazy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clazy.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clazy.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clazyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
clazyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
clazyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clazyErrors errors, $clazyWarnings warnings, $clazyNotes notes"
|
||||
# Write the report
|
||||
if [ "$clazyErrors" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clazy found :fire: $clazyErrors errors, :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyWarnings" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clazy found :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyNotes" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "[List of checks](https://github.com/KDE/clazy#list-of-checks), [This explains some of the clazy warnings](https://www.kdab.com/uncovering-32-qt-best-practices-compile-time-clazy/) " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clazy.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clazyErrors -eq 0 ]
|
||||
- name: Clazy-QT6
|
||||
if: inputs.checkClazyQT6 && inputs.changedCppFiles != '' && github.ref == inputs.QT6Branch && always()
|
||||
continue-on-error: ${{ inputs.clazyQT6FailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clazy_qt6.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--clazy-qt6-checks "${{ inputs.clazyQT6Checks }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
# Upload steps
|
||||
|
||||
clazyQT6Errors=0
|
||||
clazyQT6Warnings=0
|
||||
clazyQT6Notes=0
|
||||
sudo apt-get install -y --no-install-recommends clazy
|
||||
#TODO: check where this "clazyQT6.yaml" goes ; shall this be put in the fixes ?
|
||||
# Run clazy checks for Qt6 on all cpp files
|
||||
clazy-standalone --export-fixes=clazyQT6.yaml -checks=${{ inputs.clazyQT6Checks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazyQT6.log || true
|
||||
# If clazy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clazyQT6.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clazyQT6.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clazyQT6Errors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
clazyQT6Warnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
clazyQT6Notes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clazyQT6Errors errors, $clazyQT6Warnings warnings, $clazyQT6Notes notes"
|
||||
# Write the report
|
||||
if [ "$clazyQT6Errors" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clazy found :fire: $clazyQT6Errors errors, :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyQT6Warnings" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clazy found :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyNotes" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clazyQT6.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clazyQT6Errors -eq 0 ]
|
||||
- name: Upload logs and fixes
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
${{ env.fixesdir }}
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
|
||||
@@ -46,16 +46,10 @@ on:
|
||||
value: ${{ jobs.Prepare.outputs.reportFile }}
|
||||
changedFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedFiles }}
|
||||
changedLines:
|
||||
value: ${{ jobs.Prepare.outputs.changedLines }}
|
||||
changedPythonFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedPythonFiles }}
|
||||
changedPythonLines:
|
||||
value: ${{ jobs.Prepare.outputs.changedPythonLines }}
|
||||
changedCppFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedCppFiles }}
|
||||
changedCppLines:
|
||||
value: ${{ jobs.Prepare.outputs.changedCppLines }}
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -73,18 +67,10 @@ jobs:
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
changedFiles: ${{ steps.Output.outputs.changedFiles }}
|
||||
changedLines: ${{ steps.Output.outputs.changedLines }}
|
||||
changedPythonFiles: ${{ steps.Output.outputs.changedPythonFiles }}
|
||||
changedPythonLines: ${{ steps.Output.outputs.changedPythonLines }}
|
||||
changedCppFiles: ${{ steps.Output.outputs.changedCppFiles }}
|
||||
changedCppLines: ${{ steps.Output.outputs.changedCppLines }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
@@ -93,10 +79,6 @@ jobs:
|
||||
commitCnt=0
|
||||
touch ${{ env.logdir }}changedFiles.lst ${{ env.logdir }}changedCppFiles.lst ${{ env.logdir }}changedPythonFiles.lst
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: true
|
||||
- name: Determine base and head SHA in case of PR
|
||||
if: env.isPR == 'true'
|
||||
run: |
|
||||
@@ -146,22 +128,11 @@ jobs:
|
||||
commitCnt=$(jq -re '.ahead_by' ${{ env.logdir }}compare.json)
|
||||
echo "Changeset is composed of $commitCnt commit(s)" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Get files modified in changeset #TODO check what happens with deleted file in the subsequent process
|
||||
if: env.isPR == 'true'
|
||||
env:
|
||||
API_URL: ${{ github.api_url }}
|
||||
TOKEN: ${{ github.token }}
|
||||
REPO: ${{ github.repository }}
|
||||
REF: ${{ github.ref_name }}
|
||||
PR: ${{ github.event.number }}
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
# could reduce this to a single
|
||||
python3 tools/lint/changed_lines.py --api-url ${API_URL} --token ${TOKEN} --repo ${REPO} --ref=${REF} --pr=${PR} > ${{ env.logdir }}changedLines.lst
|
||||
cat ${{ env.logdir }}changedLines.lst | jq '.[].name' > ${{ env.logdir }}changedFiles.lst
|
||||
python3 tools/lint/changed_lines.py --api-url ${API_URL} --token ${TOKEN} --repo ${REPO} --ref=${REF} --pr=${PR} --file-filter '.py, .pyi' > ${{ env.logdir }}changedPythonLines.lst
|
||||
cat ${{ env.logdir }}changedPythonLines.lst | jq '.[].name' > ${{ env.logdir }}changedPythonFiles.lst
|
||||
python3 tools/lint/changed_lines.py --api-url ${API_URL} --token ${TOKEN} --repo ${REPO} --ref=${REF} --pr=${PR} --file-filter '.c, .cc, .cu, .cuh, .c++, .cpp, .cxx, .h, .hh, .h++, .hpp, .hxx' > ${{ env.logdir }}changedCppLines.lst
|
||||
cat ${{ env.logdir }}changedCppLines.lst | jq '.[].name' > ${{ env.logdir }}changedCppFiles.lst
|
||||
|
||||
jq '.files[] | if .status != "removed" then .filename else empty end' ${{ env.logdir }}compare.json > ${{ env.logdir }}changedFiles.lst
|
||||
grep -E '\.(py|py3)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedPythonFiles.lst || true
|
||||
grep -E '\.(c|c\+\+|cc|cpp|cu|cuh|cxx|h|h\+\+|hh|hpp|hxx)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedCppFiles.lst || true
|
||||
# Write the report
|
||||
echo "::group::Modified files in changeset (removed files are ignored) :" ; cat ${{ env.logdir }}changedFiles.lst ; echo "::endgroup::"
|
||||
echo "<details><summary>Modified files (removed files are ignored):</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -172,22 +143,19 @@ jobs:
|
||||
id: Output
|
||||
run: |
|
||||
echo "changedFiles=$(cat ${{ env.logdir }}changedFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedLines=$(cat ${{ env.logdir }}changedLines.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedPythonFiles=$(cat ${{ env.logdir }}changedPythonFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedPythonLines=$(cat ${{ env.logdir }}changedPythonLines.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedCppFiles=$(cat ${{ env.logdir }}changedCppFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedCppLines=$(cat ${{ env.logdir }}changedCppLines.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "" >> $GITHUB_OUTPUT
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
|
||||
@@ -1,170 +0,0 @@
|
||||
name: Weekly Build
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 3"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
tag_build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
build_tag: ${{ steps.tag_build.outputs.build_tag }}
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
fetch-tags: true
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Tag Build
|
||||
id: tag_build
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
export BUILD_TAG=weekly-$(date "+%Y.%m.%d")
|
||||
echo "BUILD_TAG=${BUILD_TAG}" >> "$GITHUB_ENV"
|
||||
echo "build_tag=${BUILD_TAG}" >> "$GITHUB_OUTPUT"
|
||||
gh release create ${BUILD_TAG} --title "Development Build ${BUILD_TAG}" -F .github/workflows/weekly-build-notes.md --prerelease || true
|
||||
|
||||
- name: Upload Source
|
||||
id: upload_source
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
python3 package/rattler-build/scripts/make_version_file.py ../freecad_version.txt
|
||||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
||||
git config user.name 'github-actions[bot]'
|
||||
git apply package/rattler-build/scripts/disable_git_info.patch
|
||||
git commit -a -m "Disable git info write to Version.h"
|
||||
git archive HEAD -o freecad_source_${BUILD_TAG}.tar
|
||||
git submodule foreach --recursive \
|
||||
"git archive HEAD --prefix=\$path/ -o \$sha1.tar && \
|
||||
tar -A -f \$toplevel/freecad_source_${BUILD_TAG}.tar \$sha1.tar && \
|
||||
rm \$sha1.tar"
|
||||
gzip freecad_source_${BUILD_TAG}.tar
|
||||
sha256sum freecad_source_${BUILD_TAG}.tar.gz > freecad_source_${BUILD_TAG}.tar.gz-SHA256.txt
|
||||
gh release upload --clobber ${BUILD_TAG} "freecad_source_${BUILD_TAG}.tar.gz" "freecad_source_${BUILD_TAG}.tar.gz-SHA256.txt"
|
||||
|
||||
build:
|
||||
needs: tag_build
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { target: linux-64, os: ubuntu-22.04 }
|
||||
- { target: linux-arm64, os: ubuntu-22.04-arm }
|
||||
- { target: osx-64, os: macos-13 }
|
||||
- { target: osx-arm64, os: macos-latest }
|
||||
- { target: win-64, os: windows-latest }
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
environment: weekly-build
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
# prevent running out of disk space on Ubuntu runners.
|
||||
- name: Maximize build space
|
||||
if: runner.os == 'Linux'
|
||||
uses: AdityaGarg8/remove-unwanted-software@90e01b21170618765a73370fcc3abbd1684a7793 # v5
|
||||
with:
|
||||
verbose: 'true'
|
||||
remove-android: 'true' # (frees ~9 GB)
|
||||
remove-cached-tools: 'true' # (frees ~8.3 GB)
|
||||
|
||||
- name: Set Platform Environment Variables
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
BUILD_TAG: ${{ needs.tag_build.outputs.build_tag }}
|
||||
OPERATING_SYSTEM: ${{ runner.os }}
|
||||
run: |
|
||||
echo "BUILD_TAG=${BUILD_TAG}" >> "$GITHUB_ENV"
|
||||
if [[ $OPERATING_SYSTEM == 'Windows' ]]; then
|
||||
echo 'PIXI_CACHE_DIR=D:\rattler' >> "$GITHUB_ENV"
|
||||
echo 'RATTLER_CACHE_DIR=D:\rattler' >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
fetch-tags: true
|
||||
submodules: 'recursive'
|
||||
|
||||
- uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0
|
||||
with:
|
||||
pixi-version: v0.48.1
|
||||
cache: false
|
||||
|
||||
- name: Install the Apple certificate and provisioning profile
|
||||
if: runner.os == 'macOS'
|
||||
env:
|
||||
APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
|
||||
DEVELOPER_TEAM_ID: ${{ secrets.DEVELOPER_TEAM_ID }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
||||
run: |
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
PP_PATH=$RUNNER_TEMP/FreeCAD_Weekly.provisionprofile
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
export KEYCHAIN_PASSWORD=$(openssl rand -base64 8)
|
||||
|
||||
# import certificate and provisioning profile from secrets
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
|
||||
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# import certificate to keychain
|
||||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
|
||||
# apply provisioning profile
|
||||
mkdir -p ~/Library/Provisioning\ Profiles
|
||||
cp $PP_PATH ~/Library/Provisioning\ Profiles
|
||||
|
||||
xcrun notarytool store-credentials "FreeCAD" --keychain "$KEYCHAIN_PATH" --apple-id "${APPLE_ID}" --password "${APP_SPECIFIC_PASSWORD}" --team-id "${DEVELOPER_TEAM_ID}"
|
||||
|
||||
- name: Build and Release Packages
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
|
||||
SIGN_RELEASE: "true"
|
||||
TARGET_PLATFORM: ${{ matrix.target }}
|
||||
UPLOAD_RELEASE: "true"
|
||||
run: |
|
||||
python3 package/rattler-build/scripts/make_version_file.py ../freecad_version.txt
|
||||
git apply package/rattler-build/scripts/disable_git_info.patch
|
||||
cd package/rattler-build
|
||||
pixi install
|
||||
pixi run -e package create_bundle
|
||||
|
||||
## Needed if running on a self-hosted runner:
|
||||
# - name: Clean up keychain and provisioning profile
|
||||
# if: ${{ always() }}
|
||||
# run: |
|
||||
# security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||
# rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
|
||||
@@ -39,9 +39,6 @@ on:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
WrapUp:
|
||||
@@ -53,16 +50,11 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
run: |
|
||||
mkdir -p ${{ env.artifactsDownloadDir }}
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ${{ env.artifactsDownloadDir }}
|
||||
- name: Save input data to file
|
||||
@@ -119,7 +111,7 @@ jobs:
|
||||
cat report.md >> $GITHUB_STEP_SUMMARY
|
||||
- name: Delete used artifacts
|
||||
continue-on-error: true
|
||||
uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: |
|
||||
${{ env.usedArtifacts }}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
> [!IMPORTANT]
|
||||
> Bleeding edge FreeCAD development builds for testing bugfixes, regressions, and recently implemented features. Do not use in a production environment.
|
||||
|
||||
|
||||
### How-to use
|
||||
|
||||
1. Download the appropriate asset for your OS below
|
||||
2. Unpack the bundle to any folder on your system
|
||||
3. Launch the application
|
||||
- **Windows**
|
||||
Run `\bin\FreeCAD.exe` in the extracted directory
|
||||
- **macOS**
|
||||
Launch `/FreeCAD.app` in the extracted directory
|
||||
- **Linux**
|
||||
Open the `*.AppImage`
|
||||
@@ -25,8 +25,6 @@
|
||||
*.o
|
||||
*.orig
|
||||
*.output
|
||||
# Ignore .db files created by Qt Designer when editing .ui files
|
||||
*.db
|
||||
qrc_*.cpp
|
||||
BuildLog.htm
|
||||
cmake_install.cmake
|
||||
@@ -47,7 +45,6 @@ install_manifest.txt
|
||||
/Mod/
|
||||
/ZERO_CHECK.dir/
|
||||
/build/
|
||||
/build-*/
|
||||
/cmake-build*/
|
||||
/src/Tools/offlinedoc/localwiki/
|
||||
/src/Tools/offlinedoc/*.txt
|
||||
@@ -58,8 +55,6 @@ tags
|
||||
/CMakeUserPresets.json
|
||||
Testing
|
||||
compile_commands.json
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
|
||||
# crowdin file
|
||||
src/Tools/freecad.zip
|
||||
|
||||
+1
-4
@@ -1,12 +1,9 @@
|
||||
[submodule "src/3rdParty/OndselSolver"]
|
||||
path = src/3rdParty/OndselSolver
|
||||
url = https://github.com/FreeCAD/OndselSolver.git
|
||||
url = https://github.com/Ondsel-Development/OndselSolver.git
|
||||
[submodule "tests/lib"]
|
||||
path = tests/lib
|
||||
url = https://github.com/google/googletest
|
||||
[submodule "src/3rdParty/GSL"]
|
||||
path = src/3rdParty/GSL
|
||||
url = https://github.com/microsoft/GSL
|
||||
[submodule "src/Mod/AddonManager"]
|
||||
path = src/Mod/AddonManager
|
||||
url = https://github.com/FreeCAD/AddonManager.git
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
files: |
|
||||
(?x)^(
|
||||
.github|
|
||||
src/Base|
|
||||
src/Main|
|
||||
src/Tools|
|
||||
tests/src|
|
||||
src/Mod/AddonManager|
|
||||
src/Mod/Assembly|
|
||||
src/Mod/CAM|
|
||||
src/Mod/Cloud|
|
||||
src/Mod/Drawing|
|
||||
src/Mod/Fem|
|
||||
src/Mod/Help|
|
||||
src/Mod/Import|
|
||||
@@ -41,9 +42,6 @@ exclude: |
|
||||
src/App/ExpressionParser.tab.h|
|
||||
src/App/ExpressionParser.y|
|
||||
src/App/lex.ExpressionParser.c|
|
||||
src/Gui/3Dconnexion/navlib|
|
||||
src/Gui/QSint|
|
||||
src/Gui/Quarter|
|
||||
src/Mod/Import/App/SCL|
|
||||
src/Mod/Import/App/SCL_output|
|
||||
src/Mod/Mesh/App/TestData|
|
||||
@@ -53,7 +51,7 @@ exclude: |
|
||||
)
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
|
||||
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
@@ -61,11 +59,11 @@ repos:
|
||||
- id: check-added-large-files
|
||||
- id: mixed-line-ending
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b # frozen: 25.1.0
|
||||
rev: b965c2a5026f8ba399283ba3e01898b012853c79 # frozen: 24.8.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: ['--line-length', '100']
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: 86fdcc9bd34d6afbbd29358b97436c8ffe3aa3b2 # frozen: v21.1.0
|
||||
rev: 7d85583be209cb547946c82fbe51f4bc5dd1d017 # frozen: v18.1.8
|
||||
hooks:
|
||||
- id: clang-format
|
||||
|
||||
+17
-43
@@ -1,42 +1,21 @@
|
||||
# As of February 2025 we require CMake 3.22.0
|
||||
cmake_minimum_required(VERSION 3.22.0 FATAL_ERROR)
|
||||
# As of January 2023 we require CMake 3.16.3
|
||||
# see https://forum.freecad.org/viewtopic.php?f=10&t=72173
|
||||
# for further info why
|
||||
cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR)
|
||||
|
||||
# policy CMP0072 was introduced with CMake 3.11
|
||||
# relates to FindOpenGL module
|
||||
# and cache variables OPENGL_gl_LIBRARY, OPENGL_glu_LIBRARY
|
||||
if (POLICY CMP0072)
|
||||
set(OpenGL_GL_PREFERENCE LEGACY)
|
||||
endif(POLICY CMP0072)
|
||||
|
||||
# As of cMake 3.27, find_package() will look for both case-sensitive and all-uppercase versions
|
||||
# of the package. This seems to affect FLANN as included by Pixi
|
||||
if(POLICY CMP0144)
|
||||
cmake_policy(SET CMP0144 NEW)
|
||||
endif()
|
||||
|
||||
# FindPythonInterp and FindPythonLibs modules are deprecated, but are still in use by
|
||||
# all versions of Shiboken2. This policy must be kept at OLD until Shiboken2 is no longer
|
||||
# supported
|
||||
if(POLICY CMP0148)
|
||||
# FindPythonInterp and FindPythonLibs modules are deprecated.
|
||||
# Currently, they are still used by shiboken's CMake files
|
||||
if (POLICY CMP0148)
|
||||
cmake_policy(SET CMP0148 OLD)
|
||||
endif()
|
||||
|
||||
# The exec_program command was deprecated in cMake 3.0, and policy CMP0153 was added in cMake
|
||||
# 3.28 to control whether this gives a warning (the OLD behavior) or a fatal error (NEW)
|
||||
if(POLICY CMP0153)
|
||||
cmake_policy(SET CMP0153 NEW)
|
||||
endif()
|
||||
|
||||
# Suppress 'FindBoost module is removed' warning. Will use BoostConfig.cmake instead
|
||||
if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 NEW)
|
||||
endif()
|
||||
|
||||
# As of cMake 3.31 add_custom_command() rejects invalid arguments
|
||||
if(POLICY CMP0175)
|
||||
cmake_policy(SET CMP0175 NEW)
|
||||
endif()
|
||||
|
||||
# Added in cMake 3.31, enforce normalization of all DESTINATION paths given to install()
|
||||
if(POLICY CMP0177)
|
||||
cmake_policy(SET CMP0177 NEW)
|
||||
endif()
|
||||
|
||||
|
||||
option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON)
|
||||
|
||||
if(FREECAD_USE_CCACHE)
|
||||
@@ -51,9 +30,9 @@ endif()
|
||||
project(FreeCAD)
|
||||
|
||||
set(PACKAGE_VERSION_MAJOR "1")
|
||||
set(PACKAGE_VERSION_MINOR "1")
|
||||
set(PACKAGE_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
|
||||
set(PACKAGE_VERSION_MINOR "0")
|
||||
set(PACKAGE_VERSION_PATCH "2") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_SUFFIX "") # either "dev" for development snapshot or "" (empty string)
|
||||
set(PACKAGE_BUILD_VERSION "0") # used when the same FreeCAD version will be re-released (for example using an updated LibPack)
|
||||
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
|
||||
@@ -76,8 +55,6 @@ FreeCADLibpackChecks()
|
||||
SetupDoxygen()
|
||||
SetupLibFmt()
|
||||
SetupYamlCpp()
|
||||
SetupZipIos()
|
||||
find_package(ICU REQUIRED COMPONENTS uc i18n)
|
||||
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIBPACK_CHECKFILE_VERSION)
|
||||
SetupPython()
|
||||
SetupPCL()
|
||||
@@ -92,6 +69,7 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIB
|
||||
# OPENGL_gl_LIBRARY empty that results into linker errors
|
||||
SetupOpenGL()
|
||||
endif(BUILD_GUI)
|
||||
SetupBoost()
|
||||
SetupSalomeSMESH()
|
||||
if (BUILD_FEM_NETGEN)
|
||||
find_package(NETGEN)
|
||||
@@ -107,14 +85,10 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIB
|
||||
|
||||
if(BUILD_GUI)
|
||||
SetupCoin3D()
|
||||
SetupPivy()
|
||||
SetupSpaceball()
|
||||
SetupShibokenAndPyside()
|
||||
SetupMatplotlib()
|
||||
endif(BUILD_GUI)
|
||||
|
||||
# SetupCoin3D can overwrite find_package(Boost) output so keep this after.
|
||||
SetupBoost()
|
||||
endif()
|
||||
|
||||
if(BUILD_VR)
|
||||
|
||||
+37
-50
@@ -13,18 +13,6 @@
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_JOB_POOL_COMPILE": {
|
||||
"type": "STRING",
|
||||
"value": "compile_jobs"
|
||||
},
|
||||
"CMAKE_JOB_POOL_LINK": {
|
||||
"type": "STRING",
|
||||
"value": "link_jobs"
|
||||
},
|
||||
"CMAKE_POLICY_VERSION_MINIMUM": {
|
||||
"type": "STRING",
|
||||
"value": "3.5"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -71,10 +59,6 @@
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"BUILD_REVERSEENGINEERING": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"ENABLE_DEVELOPER_TESTS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
@@ -121,38 +105,31 @@
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": {
|
||||
"type": "STRING",
|
||||
"value": "clang"
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include"
|
||||
},
|
||||
"CMAKE_CXX_COMPILER": {
|
||||
"type": "STRING",
|
||||
"value": "clang++"
|
||||
},
|
||||
"CMAKE_EXE_LINKER_FLAGS": {
|
||||
"type": "STRING",
|
||||
"value": "-fuse-ld=mold"
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_SHARED_LINKER_FLAGS": {
|
||||
"type": "STRING",
|
||||
"value": "-fuse-ld=mold"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include/opencascade"
|
||||
},
|
||||
"OCC_LIBRARY_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -164,30 +141,35 @@
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
|
||||
"cacheVariables": {
|
||||
"CMAKE_IGNORE_PREFIX_PATH": {
|
||||
"type": "STRING",
|
||||
"value": "/opt/homebrew;/usr/local/homebrew"
|
||||
},
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"FREECAD_3DCONNEXION_SUPPORT": {
|
||||
"type": "STRING",
|
||||
"value": "Both"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include/opencascade"
|
||||
},
|
||||
"OCC_LIBRARY_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -199,26 +181,31 @@
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"cmakeExecutable": "${sourceDir}/conda/cmake.cmd",
|
||||
"cacheVariables": {
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library"
|
||||
},
|
||||
"FREECAD_3DCONNEXION_SUPPORT": {
|
||||
"type": "STRING",
|
||||
"value": "Both"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/include/opencascade"
|
||||
},
|
||||
"OCC_LIBRARY_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+8
-15
@@ -26,7 +26,7 @@ The FreeCAD Contribution Process is expressed here with the following specific g
|
||||
1. FreeCAD uses the git distributed revision control system.
|
||||
2. Source code for the main application and related subprojects is hosted on github.com in the FreeCAD organization.
|
||||
3. Problems are discrete, well-defined limitations or bugs.
|
||||
4. FreeCAD uses GitHub's issue-tracking system to track problems and contributions. For help requests and general discussions, use the project forum.
|
||||
4. FreeCAD uses GitHub's issue-tracking system to track problems and contributions. For help requests and general discussions, use the project forum.
|
||||
5. Contributions are sets of code changes that resolve a single problem.
|
||||
6. FreeCAD uses the Pull Request workflow for evaluating and accepting contributions.
|
||||
|
||||
@@ -47,7 +47,7 @@ The FreeCAD Contribution Process is expressed here with the following specific g
|
||||
## 5. Contribution Requirements
|
||||
|
||||
1. Contributions are submitted in the form of Pull Requests (PR).
|
||||
2. Maintainers and Contributors MUST have a GitHub account and SHOULD use their real names or a well-known alias.
|
||||
2. Maintainers and Contributors MUST have a GitHub account and SHOULD use their real names or a well-known alias.
|
||||
3. If the GitHub username differs from the username on the FreeCAD Forum, effort SHOULD be taken to avoid confusion.
|
||||
4. A PR SHOULD be a minimal and accurate answer to exactly one identified and agreed-on problem.
|
||||
5. A PR SHOULD refrain from adding additional dependencies to the FreeCAD project unless no other option is available.
|
||||
@@ -55,14 +55,9 @@ The FreeCAD Contribution Process is expressed here with the following specific g
|
||||
7. If a PR contains multiple commits, each commit MUST compile cleanly when merged with all previous commits of the same PR. Each commit SHOULD add value to the history of the project. Checkpoint commits SHOULD be squashed.
|
||||
8. A PR SHALL NOT include non-trivial code from other projects unless the Contributor is the original author of that code.
|
||||
9. A PR MUST compile cleanly and pass project self-tests on all target platforms.
|
||||
10. Changes that break python API used by extensions SHALL be avoided. If it is not possible to avoid breaking changes, the amount of them MUST be minimized and PR MUST clearly describe all breaking changes with clear description on how to replace no longer working solution with newer one. Contributor SHOULD search for addons that will be broken and list them in the PR.
|
||||
11. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION.
|
||||
12. The PR message MUST consist of a single short line, the PR Title, summarizing the problem being solved, followed by a blank line and then the proposed solution in the Body. If a PR consists of more than one commit, the PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state.
|
||||
13. If a PR contains the work of another author (for example, if it is cherry-picked from a fork by someone other than the PR-submitter):
|
||||
1. the PR description MUST contain proper attribution as the first line, for example: "This is work of XYZ cherry-picked from <link>";
|
||||
2. all commits MUST have proper authorship, i.e. be authored by the original author and committed by the author of the PR;
|
||||
3. if changes to cherry-picked commits are necessary they SHOULD be done as follow-up commits. If it is not possible to do so, then the modified commits MUST contain a `Co-Authored-By` trailer in their commit message.
|
||||
14. A “Valid PR” is one which satisfies the above requirements.
|
||||
10. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION.
|
||||
11. The PR message MUST consist of a single short line, the PR Title, summarizing the problem being solved, followed by a blank line and then the proposed solution in the Body. If a PR consists of more than one commit, the PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state.
|
||||
12. A “Valid PR” is one which satisfies the above requirements.
|
||||
|
||||
## 6. Process
|
||||
|
||||
@@ -86,11 +81,9 @@ The FreeCAD Contribution Process is expressed here with the following specific g
|
||||
2. capture toxic contributions in the historical record
|
||||
3. engage with the Contributor on improving their contribution quality.
|
||||
14. Maintainers SHALL NOT make value judgments on correct contributions.
|
||||
15. If a PR requires significant further work before merging, the PR SHOULD be moved to draft status.
|
||||
16. If a PR is complete, but should not be merged yet (for example, because it depends on another in-process PR), the "On hold" label SHOULD be applied.
|
||||
17. Any Contributor who has value judgments on a PR SHOULD express these via their own PR.
|
||||
18. The User who created an issue SHOULD close the issue after checking the PR is successful.
|
||||
19. Maintainers SHOULD close issues that are left open without action or update for an unreasonable period.
|
||||
15. Any Contributor who has value judgments on a PR SHOULD express these via their own PR.
|
||||
16. The User who created an issue SHOULD close the issue after checking the PR is successful.
|
||||
17. Maintainers SHOULD close issues that are left open without action or update for an unreasonable period.
|
||||
|
||||
## 7. Branches and Releases
|
||||
|
||||
|
||||
+8
-4
@@ -4,7 +4,10 @@ The FreeCAD application does not collect, transmit, share or use any Personal Da
|
||||
|
||||
FreeCAD is community-developed Free Software. The community does not condone the unauthorized usage of private data, so our software does not gather or send personal data.
|
||||
|
||||
The FreeCAD website is mostly static, it does not contain any trackers, neither ours nor third-party. The website uses cookies to remember logged in status, timezone and other data related to navigating the site. The website does not contain advertisements.
|
||||
The FreeCAD website is mostly static, it does not contain any trackers, neither ours nor third-party. The website uses cookies to remember logged in status, timezone and other
|
||||
data related to navigating the site.
|
||||
|
||||
The website does not contain advertisements.
|
||||
|
||||
The software does not contain advertisements or trackers either.
|
||||
|
||||
@@ -12,9 +15,9 @@ The software does not contain advertisements or trackers either.
|
||||
|
||||
FreeCAD is able to load or save files to/from remote servers (for some protocols and platforms). If you choose to load or save a remote file, your IP or other private data might be shared as part of the normal connection flow for the given protocol. This is out of our control and it is up to you to decide whether you trust a remote host.
|
||||
|
||||
The FreeCAD eco system includes user developed workbenches. These workbenches can be installed/updated using the Add-on Manager. The Add-on Manager retrieves workbenches from remote servers across the internet. Add-on workbenches are not checked for malicious content. It is your responsibility to decide whether you trust an add-on workbench.
|
||||
The FreeCAD eco system includes user developed workbenches. These workbenches can be installed/updated using the Add-on Manager. The Add-on Manager retrieves workbenches from remote servers across the internet. Add-on workbenches are not checked for malicious content. It is your responsibility to decide whether you trust an add-on workbench.
|
||||
|
||||
FreeCAD is meant to manipulate CAD files which may contain metadata. It is your responsibility to verify the metadata contained in your files before you share them with others. These files may contain local directory paths which could reveal user names if the user name forms part of the path - as in “C:\MrsCAD\Documents\myFreeCADFile.FCstd”.
|
||||
FreeCAD is meant to manipulate CAD files which may contain metadata. It is your responsibility to verify the metadata contained in your files before you share them with others. These files may contain local directory paths which could reveal user names if the user name forms part of the path - as in “C:\MrsCAD\Documents\myFreeCADFile.FCstd”.
|
||||
|
||||
FreeCAD can also be used to create and run macros. These are Python scripts that can perform any action that the user can perform on a system. When running a macro from an outside source, it is your responsibility to ensure you trust the author.
|
||||
|
||||
@@ -25,4 +28,5 @@ When reading the online version of the User Manual within FreeCAD, manual conten
|
||||
FreeCAD is Free Software and therefore may be packaged by other people, who may include additional software or modify the source code. We do not vouch for these third-party packages and cannot tell you what they contain and what they do regarding your privacy. The official packages are explicitly listed in our download page.
|
||||
|
||||
|
||||
*The above privacy policy is based on the [GIMP privacy policy](https://www.gimp.org/about/privacy.html).*
|
||||
- [based on the GIMP privacy policy](https://www.gimp.org/about/privacy.html)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<a href="https://freecad.org"><img src="/src/Gui/Icons/freecad.svg" height="100px" width="100px"></a>
|
||||
|
||||
### Your own 3D Parametric Modeler
|
||||
### Your own 3D parametric modeler
|
||||
|
||||
[Website](https://www.freecad.org) •
|
||||
[Documentation](https://wiki.freecad.org) •
|
||||
@@ -22,8 +22,8 @@ modeler made primarily to design real-life objects of any size.
|
||||
Parametric modeling allows you to easily modify your design by going back into
|
||||
your model history to change its parameters.
|
||||
|
||||
* **Create 3D from 2D and back** FreeCAD lets you sketch geometry-constrained
|
||||
2D shapes and use them as a base to build other objects.
|
||||
* **Create 3D from 2D and back** FreeCAD lets you to sketch geometry constrained
|
||||
2D shapes and use them as a base to build other objects.
|
||||
It contains many components to adjust dimensions or extract design details from
|
||||
3D models to create high quality production-ready drawings.
|
||||
|
||||
@@ -44,25 +44,32 @@ Installing
|
||||
----------
|
||||
|
||||
Precompiled packages for stable releases are available for Windows, macOS and Linux on the
|
||||
[latest releases page](https://github.com/FreeCAD/FreeCAD/releases/latest).
|
||||
[Releases page](https://github.com/FreeCAD/FreeCAD/releases).
|
||||
|
||||
On most Linux distributions, FreeCAD is also directly installable from the
|
||||
software center application.
|
||||
|
||||
For weekly development releases visit the [releases page](https://github.com/FreeCAD/FreeCAD/releases/).
|
||||
For development releases check the [weekly-builds page](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds).
|
||||
|
||||
Other options are described on the [wiki Download page](https://wiki.freecad.org/Download).
|
||||
Other options are described at the [wiki Download page](https://wiki.freecad.org/Download).
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
FreeCAD requires several dependencies to correctly compile for development and
|
||||
production builds. The following pages contain updated build instructions for
|
||||
their respective platforms:
|
||||
Compiling FreeCAD requires installation of several libraries and their
|
||||
development files such as OCCT (Open Cascade), Coin and Qt, listed in the
|
||||
pages below. Once this is done, FreeCAD can be compiled with
|
||||
CMake. On Windows, these libraries are bundled and offered by the
|
||||
FreeCAD team in a convenient package. On Linux, they are usually found
|
||||
in your distribution's repositories, and on macOS and other platforms,
|
||||
you will usually have to compile them yourself.
|
||||
|
||||
The pages below contain up-to-date build instructions:
|
||||
|
||||
- [Linux](https://wiki.freecad.org/Compile_on_Linux)
|
||||
- [Windows](https://wiki.freecad.org/Compile_on_Windows)
|
||||
- [macOS](https://wiki.freecad.org/Compile_on_MacOS)
|
||||
- [Cygwin](https://wiki.freecad.org/Compile_on_Cygwin)
|
||||
- [MinGW](https://wiki.freecad.org/Compile_on_MinGW)
|
||||
|
||||
|
||||
@@ -71,46 +78,45 @@ Reporting Issues
|
||||
|
||||
To report an issue please:
|
||||
|
||||
- Consider posting to the [Forum](https://forum.freecad.org), [Discord](https://discord.com/invite/w2cTKGzccC) channel, or [Reddit](https://www.reddit.com/r/FreeCAD) to verify the issue;
|
||||
- Consider posting to the [Forum](https://forum.freecad.org), [Discord](https://discord.com/invite/F4hdxzYZfc) channel, or [Reddit](https://www.reddit.com/r/FreeCAD) to verify the issue;
|
||||
- Search the existing [issues](https://github.com/FreeCAD/FreeCAD/issues) for potential duplicates;
|
||||
- Use the most updated stable or [development versions](https://github.com/FreeCAD/FreeCAD/releases/) of FreeCAD;
|
||||
- Post version info from `Help > About FreeCAD > Copy to clipboard`;
|
||||
- Restart FreeCAD in safe mode `Help > Restart in safe mode` and try to reproduce the issue again. If the issue is resolved it can be fixed by deleting the FreeCAD config files.
|
||||
- Use the most updated stable or [development versions](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds) of FreeCAD;
|
||||
- Post version info from e.g. `Help > About FreeCAD > Copy to clipboard`;
|
||||
- Start recording a macro `Macro > Macro recording...` and repeat all steps. Stop recording after the issue occurs and upload the saved macro or copy the macro code in the issue;
|
||||
- Post a Step-By-Step explanation on how to recreate the issue;
|
||||
- Upload an example file (FCStd as ZIP file) to demonstrate the problem;
|
||||
|
||||
For more details see:
|
||||
For more detail see:
|
||||
|
||||
- [Bug Tracker](https://github.com/FreeCAD/FreeCAD/issues)
|
||||
- [Reporting Issues and Requesting Features](https://github.com/FreeCAD/FreeCAD/issues/new/choose)
|
||||
- [Contributing](https://github.com/FreeCAD/FreeCAD/blob/main/CONTRIBUTING.md)
|
||||
- [Help Forum](https://forum.freecad.org/viewforum.php?f=3)
|
||||
- [Developers Handbook](https://freecad.github.io/DevelopersHandbook/)
|
||||
|
||||
> [!NOTE]
|
||||
The [FPA](https://fpa.freecad.org) offers developers the opportunity
|
||||
to apply for a grant to work on projects of their choosing. Check
|
||||
[jobs and funding](https://blog.freecad.org/jobs/) to know more.
|
||||
|
||||
|
||||
Usage & Getting Help
|
||||
Usage & Getting help
|
||||
--------------------
|
||||
|
||||
The FreeCAD wiki contains documentation on
|
||||
general FreeCAD usage, Python scripting, and development.
|
||||
View these pages for more information:
|
||||
general FreeCAD usage, Python scripting, and development. These
|
||||
pages might help you get started:
|
||||
|
||||
- [Getting started](https://wiki.freecad.org/Getting_started)
|
||||
- [Features list](https://wiki.freecad.org/Feature_list)
|
||||
- [Frequent questions](https://wiki.freecad.org/FAQ/en)
|
||||
- [Workbenches](https://wiki.freecad.org/Workbenches)
|
||||
- [Scripting](https://wiki.freecad.org/Power_users_hub)
|
||||
- [Developers Handbook](https://freecad.github.io/DevelopersHandbook/)
|
||||
- [Development](https://wiki.freecad.org/Developer_hub)
|
||||
|
||||
The [FreeCAD forum](https://forum.freecad.org) is a great place
|
||||
to find help and solve specific problems when learning to use FreeCAD.
|
||||
The [FreeCAD forum](https://forum.freecad.org) is also a great place
|
||||
to find help and solve specific problems you might encounter when
|
||||
learning to use FreeCAD.
|
||||
|
||||
---
|
||||
|
||||
<p>This project receives generous infrastructure support from
|
||||
<a href="https://www.digitalocean.com/">
|
||||
|
||||
+9
-9
@@ -1,29 +1,29 @@
|
||||
# Security Policy
|
||||
|
||||
The FreeCAD project is a FOSS (Free and Open-Source Software) project that has a community of thousands of users and
|
||||
The FreeCAD project is a FOSS (Free and Open-Source Software) project that has a community of thousands of users and
|
||||
hundreds of developers worldwide. We encourage responsible reporting of security vulnerabilities that may affect users
|
||||
of this software, and will endeavor to address these vulnerabilities when they are discovered.
|
||||
|
||||
## Bounties
|
||||
|
||||
FreeCAD does not have a program to pay bounties for security bugs. If you discover a vulnerability that affects a part
|
||||
of the FreeCAD project (either directly in FreeCAD, in a library it depends on, or in any of the various other
|
||||
FreeCAD does not have a program to pay bounties for security bugs. If you discover a vulnerability that affects a part
|
||||
of the FreeCAD project (either directly in FreeCAD, in a library it depends on, or in any of the various other
|
||||
subprojects such as our website, forums, etc.) we ask you to join the large community of volunteer contributors and
|
||||
file a report about the issue.
|
||||
|
||||
Note that funds may be available from the [FreeCAD Project Association (FPA)](https://fpa.freecad.org) to pursue
|
||||
security research and/or the development of fixes to any vulnerabilities discovered. However, vulnerabilities held as
|
||||
Note that funds may be available from the [FreeCAD Project Association (FPA)](https://fpa.freecad.org) to pursue
|
||||
security research and/or the development of fixes to any vulnerabilities discovered. However, vulnerabilities held as
|
||||
hostage in demands for "bounties" will not be entertained. Contact the FPA at fpa@freecad.org for more information.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
FreeCAD implements security fixes to the current release series, and to the current development on the main branch.
|
||||
FreeCAD implements security fixes to the current release series, and to the current development on the master branch.
|
||||
|
||||
| Version | Supported |
|
||||
|---------| ------------------ |
|
||||
| 1.1dev | :white_check_mark: |
|
||||
| 1.0 | :white_check_mark: |
|
||||
| < 1.0 | :x: |
|
||||
| 0.22dev | :white_check_mark: |
|
||||
| 0.21 | :white_check_mark: |
|
||||
| < 0.21 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# - Try to find Eigen3 lib
|
||||
#
|
||||
# This module supports requiring a minimum version, e.g. you can do
|
||||
# find_package(Eigen3 3.4.0)
|
||||
# to require version 3.4.0 or newer of Eigen3.
|
||||
# find_package(Eigen3 3.1.2)
|
||||
# to require version 3.1.2 or newer of Eigen3.
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
if(NOT Eigen3_FIND_VERSION)
|
||||
set(Eigen3_FIND_VERSION_MAJOR 3)
|
||||
set(Eigen3_FIND_VERSION_MINOR 4)
|
||||
set(Eigen3_FIND_VERSION_MINOR 0)
|
||||
set(Eigen3_FIND_VERSION_PATCH 0)
|
||||
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
|
||||
endif(NOT Eigen3_FIND_VERSION)
|
||||
|
||||
+7
-4
@@ -9,10 +9,10 @@
|
||||
IF ( CMAKE_PKGCONFIG_EXECUTABLE )
|
||||
|
||||
MESSAGE( STATUS "Detecting KDL" )
|
||||
|
||||
|
||||
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/")
|
||||
MESSAGE( "Looking for KDL in: ${KDL_INSTALL}")
|
||||
PKGCONFIG( "orocos-kdl >= 1.4.0" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES KDL_LINK_DIRS KDL_LIBS )
|
||||
PKGCONFIG( "orocos-kdl >= 0.99" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES KDL_LINK_DIRS KDL_LIBS )
|
||||
|
||||
IF( KDL_FOUND )
|
||||
MESSAGE(" Includes in: ${KDL_INCLUDE_DIRS}")
|
||||
@@ -22,10 +22,13 @@ IF ( CMAKE_PKGCONFIG_EXECUTABLE )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${KDL_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES( ${KDL_LINK_DIRS})
|
||||
#OROCOS_PKGCONFIG_INCPATH("${KDLTK_INCLUDE_DIRS}")
|
||||
#OROCOS_PKGCONFIG_LIBS("${KDL_LIBS}")
|
||||
#OROCOS_PKGCONFIG_LIBPATH("${KDL_LINK_DIRS}")
|
||||
|
||||
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig")
|
||||
MESSAGE( "Looking for KDL Toolkit in: ${PKG_CONFIG_PATH}")
|
||||
PKGCONFIG( "orocos-kdltk-${OROCOS_TARGET} >= 1.4.0" KDLTK_FOUND KDLTK_INCLUDE_DIRS KDLTK_DEFINES KDLTK_LINK_DIRS KDLTK_LIBS )
|
||||
PKGCONFIG( "orocos-kdltk-${OROCOS_TARGET} >= 0.99" KDLTK_FOUND KDLTK_INCLUDE_DIRS KDLTK_DEFINES KDLTK_LINK_DIRS KDLTK_LIBS )
|
||||
IF(KDLTK_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${KDLTK_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES( ${KDLTK_LINK_DIRS})
|
||||
@@ -35,7 +38,7 @@ IF ( CMAKE_PKGCONFIG_EXECUTABLE )
|
||||
IF(CORBA_ENABLED)
|
||||
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig")
|
||||
MESSAGE("Looking for KDL Toolkit CORBA extension in ${PKG_CONFIG_PATH}")
|
||||
PKGCONFIG( "orocos-kdltk-corba-${OROCOS_TARGET} >= 1.4.0" KDLTKCORBA_FOUND KDLTKCORBA_INCLUDE_DIRS KDLTKCORBA_DEFINES KDLTKCORBA_LINK_DIRS KDLTKCORBA_LIBS )
|
||||
PKGCONFIG( "orocos-kdltk-corba-${OROCOS_TARGET} >= 0.99" KDLTKCORBA_FOUND KDLTKCORBA_INCLUDE_DIRS KDLTKCORBA_DEFINES KDLTKCORBA_LINK_DIRS KDLTKCORBA_LIBS )
|
||||
IF(KDLTKCORBA_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${KDLTKCORBA_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES( ${KDLTKCORBA_LINK_DIRS})
|
||||
|
||||
@@ -13,7 +13,7 @@ IF(Python3_Interpreter_FOUND)
|
||||
# Try to import matplotlib into Python interpreter. Python
|
||||
# interpreter was found previously as required package, so
|
||||
# don't take care about this.
|
||||
execute_process(COMMAND "${Python3_EXECUTABLE}" "-c"
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
|
||||
"import matplotlib as m; print(m.__version__); print(m.__path__[0]);"
|
||||
RESULT_VARIABLE _MATPLOTLIB_SEARCH_SUCCESS
|
||||
OUTPUT_VARIABLE _MATPLOTLIB_VALUES
|
||||
|
||||
+149
-116
@@ -1,4 +1,4 @@
|
||||
# Try to find OCC
|
||||
# Try to find OCE / OCC
|
||||
# Once done this will define
|
||||
#
|
||||
# OCC_FOUND - system has OCC - OpenCASCADE
|
||||
@@ -7,134 +7,167 @@
|
||||
# OCC_LIBRARIES - Link this to use OCC
|
||||
# OCC_OCAF_LIBRARIES - Link this to use OCC OCAF framework
|
||||
|
||||
# we first try to find opencascade directly:
|
||||
if (NOT OCCT_CMAKE_FALLBACK)
|
||||
# First try to find OpenCASCADE Community Edition
|
||||
if(NOT DEFINED OCE_DIR)
|
||||
# Check for OSX needs to come first because UNIX evaluates to true on OSX
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if(DEFINED MACPORTS_PREFIX)
|
||||
find_package(OCE QUIET HINTS ${MACPORTS_PREFIX}/Library/Frameworks)
|
||||
elseif(DEFINED HOMEBREW_PREFIX)
|
||||
find_package(OCE QUIET HINTS ${HOMEBREW_PREFIX}/Cellar/oce/*)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
set(OCE_DIR "/usr/local/share/cmake/")
|
||||
elseif(WIN32)
|
||||
set(OCE_DIR "c:/OCE-0.4.0/share/cmake")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${FREECAD_USE_OCC_VARIANT} MATCHES "Community Edition")
|
||||
find_package(OCE QUIET)
|
||||
endif()
|
||||
|
||||
if(OCE_FOUND)
|
||||
message(STATUS "-- OpenCASCADE Community Edition has been found.")
|
||||
# Disable this define. For more details see bug #0001872
|
||||
#add_definitions (-DHAVE_CONFIG_H)
|
||||
set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
|
||||
#set(OCC_LIBRARY_DIR ${OCE_LIBRARY_DIR})
|
||||
else(OCE_FOUND) #look for OpenCASCADE
|
||||
# we first try to find opencascade directly:
|
||||
if(NOT OCCT_CMAKE_FALLBACK)
|
||||
find_package(OpenCASCADE CONFIG QUIET)
|
||||
get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
# OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again
|
||||
list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]])
|
||||
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags})
|
||||
endif ()
|
||||
if (OpenCASCADE_FOUND)
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS 3.6.0))
|
||||
get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
# OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again
|
||||
list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]])
|
||||
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags})
|
||||
endif()
|
||||
endif(NOT OCCT_CMAKE_FALLBACK)
|
||||
if(OpenCASCADE_FOUND)
|
||||
set(OCC_FOUND ${OpenCASCADE_FOUND})
|
||||
set(OCC_INCLUDE_DIR ${OpenCASCADE_INCLUDE_DIR})
|
||||
set(OCC_LIBRARY_DIR ${OpenCASCADE_LIBRARY_DIR})
|
||||
set(OCC_LIBRARIES ${OpenCASCADE_LIBRARIES})
|
||||
set(OCC_OCAF_LIBRARIES TKCAF TKXCAF)
|
||||
else ()
|
||||
if (WIN32)
|
||||
if (CYGWIN OR MINGW)
|
||||
find_path(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
find_path(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
else ()
|
||||
find_path(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
|
||||
)
|
||||
find_library(OCC_LIBRARY TKernel
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
|
||||
)
|
||||
endif ()
|
||||
else ()
|
||||
find_path(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/occt
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
else(OpenCASCADE_FOUND)
|
||||
if(WIN32)
|
||||
if(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
find_library(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
endif ()
|
||||
if (OCC_LIBRARY)
|
||||
get_filename_component(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
|
||||
if (NOT OCC_INCLUDE_DIR)
|
||||
find_path(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
${OCC_LIBRARY_DIR}/../inc
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
else(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
|
||||
)
|
||||
endif(CYGWIN OR MINGW)
|
||||
else(WIN32)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/occt
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
endif(WIN32)
|
||||
if(OCC_LIBRARY)
|
||||
GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
|
||||
IF(NOT OCC_INCLUDE_DIR)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
${OCC_LIBRARY_DIR}/../inc
|
||||
)
|
||||
ENDIF()
|
||||
endif(OCC_LIBRARY)
|
||||
endif(OpenCASCADE_FOUND)
|
||||
endif(OCE_FOUND)
|
||||
|
||||
if (OCC_INCLUDE_DIR)
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR
|
||||
REGEX "#define OCC_VERSION_MAJOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR
|
||||
REGEX "#define OCC_VERSION_MINOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT
|
||||
REGEX "#define OCC_VERSION_MAINTENANCE.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
|
||||
if(OCC_INCLUDE_DIR)
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR
|
||||
REGEX "#define OCC_VERSION_MAJOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR
|
||||
REGEX "#define OCC_VERSION_MINOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT
|
||||
REGEX "#define OCC_VERSION_MAINTENANCE.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
|
||||
|
||||
set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
|
||||
endif ()
|
||||
set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
|
||||
endif(OCC_INCLUDE_DIR)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OCC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING)
|
||||
|
||||
if (OCC_FOUND)
|
||||
set(OCC_LIBRARIES
|
||||
TKFillet
|
||||
TKMesh
|
||||
TKernel
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
TKBO
|
||||
TKBRep
|
||||
TKTopAlgo
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
if (OCC_VERSION_STRING VERSION_GREATER_EQUAL 7.9.0)
|
||||
list(APPEND OCC_LIBRARIES TKExpress)
|
||||
endif ()
|
||||
if(OCC_FOUND)
|
||||
set(OCC_LIBRARIES
|
||||
TKFillet
|
||||
TKMesh
|
||||
TKernel
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
TKBO
|
||||
TKBRep
|
||||
TKTopAlgo
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
if (OCC_VERSION_STRING VERSION_GREATER_EQUAL 7.9.0)
|
||||
list(APPEND OCC_LIBRARIES TKExpress)
|
||||
endif ()
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKBin
|
||||
TKBinL
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKVCAF
|
||||
TKCDF
|
||||
TKMeshVS
|
||||
TKService
|
||||
TKV3d
|
||||
)
|
||||
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKBin
|
||||
TKBinL
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKVCAF
|
||||
TKCDF
|
||||
TKMeshVS
|
||||
TKService
|
||||
TKV3d
|
||||
TKRWMesh
|
||||
)
|
||||
|
||||
if (OCC_VERSION_STRING VERSION_LESS 7.8.0)
|
||||
list(APPEND OCC_LIBRARIES TKIGES TKSTL TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKXDESTEP TKXDEIGES)
|
||||
else ()
|
||||
list(APPEND OCC_LIBRARIES TKDESTEP TKDEIGES TKDEGLTF TKDESTL)
|
||||
endif ()
|
||||
message(STATUS "Found OpenCASCADE version: ${OCC_VERSION_STRING}")
|
||||
message(STATUS " OpenCASCADE include directory: ${OCC_INCLUDE_DIR}")
|
||||
message(STATUS " OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}")
|
||||
endif ()
|
||||
if(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKRWMesh)
|
||||
endif(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0)
|
||||
if(OCC_VERSION_STRING VERSION_LESS 7.8.0)
|
||||
list(APPEND OCC_LIBRARIES TKIGES TKSTL TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKXDESTEP TKXDEIGES)
|
||||
else(OCC_VERSION_STRING VERSION_LESS 7.8.0)
|
||||
list(APPEND OCC_LIBRARIES TKDESTEP TKDEIGES TKDEGLTF TKDESTL)
|
||||
endif(OCC_VERSION_STRING VERSION_LESS 7.8.0)
|
||||
message(STATUS "-- Found OCE/OpenCASCADE version: ${OCC_VERSION_STRING}")
|
||||
message(STATUS "-- OCE/OpenCASCADE include directory: ${OCC_INCLUDE_DIR}")
|
||||
message(STATUS "-- OCE/OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}")
|
||||
else(OCC_FOUND)
|
||||
#message(SEND_ERROR "Neither OpenCASCADE Community Edition nor OpenCasCade were found: will not build CAD modules!")
|
||||
endif(OCC_FOUND)
|
||||
|
||||
@@ -118,7 +118,7 @@ if(PYCXX_FOUND)
|
||||
${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx
|
||||
)
|
||||
|
||||
#set old 6.2 pycxx compatibility
|
||||
#set old 6.2 pycxx compatibility
|
||||
list(APPEND PYCXX_SOURCES ${PYCXX_SOURCE_DIR}/cxx_exceptions.cxx)
|
||||
add_definitions(-DPYCXX_6_2_COMPATIBILITY)
|
||||
#end old compatibility
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
#pyside2 tools are often in same location as python interpreter
|
||||
get_filename_component(PYTHON_BIN_DIR ${Python3_EXECUTABLE} PATH)
|
||||
get_filename_component(PYTHON_BIN_DIR ${PYTHON_EXECUTABLE} PATH)
|
||||
set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR})
|
||||
endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
@@ -16,8 +16,8 @@ FIND_PACKAGE(Qt5 COMPONENTS Core Widgets)
|
||||
|
||||
IF(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
# Legacy (< 5.14)
|
||||
FIND_PROGRAM(PYSIDE2_UIC_EXECUTABLE NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2_RCC_EXECUTABLE NAMES pyside2-rcc pyside2-rcc-${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2_UIC_EXECUTABLE NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2_RCC_EXECUTABLE NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
|
||||
set(UICOPTIONS "")
|
||||
set(RCCOPTIONS "")
|
||||
ELSE()
|
||||
|
||||
+12
-12
@@ -4,19 +4,19 @@
|
||||
# cMake find_package() call
|
||||
|
||||
find_package(PySide6 CONFIG QUIET)
|
||||
|
||||
if(NOT PySide6_FOUND)
|
||||
find_pip_package(PySide6)
|
||||
endif()
|
||||
if(NOT PySide6_INCLUDE_DIR AND TARGET PySide6::pyside6)
|
||||
get_property(PySide6_INCLUDE_DIR TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
|
||||
if(NOT PySide6_INCLUDE_DIRS AND TARGET PySide6::pyside6)
|
||||
get_property(PySide6_INCLUDE_DIRS TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
if(NOT PySide6_INCLUDE_DIR)
|
||||
find_pip_package(PySide6)
|
||||
if (PySide6_FOUND)
|
||||
set(PYSIDE_INCLUDE_DIR ${PySide6_INCLUDE_DIRS} CACHE INTERNAL "")
|
||||
set(PYSIDE_LIBRARY ${PySide6_LIBRARIES} CACHE INTERNAL "")
|
||||
set(PYSIDE_FOUND TRUE CACHE BOOL OFF)
|
||||
set(PYSIDE_MAJOR_VERSION 6 CACHE INTERNAL 6)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Also provide the old-style variables so we don't have to update everything yet
|
||||
if (PySide6_FOUND)
|
||||
set(PYSIDE_INCLUDE_DIR ${PySide6_INCLUDE_DIRS})
|
||||
set(PYSIDE_LIBRARY ${PySide6_LIBRARIES})
|
||||
set(PYSIDE_FOUND TRUE)
|
||||
set(PYSIDE_MAJOR_VERSION 6)
|
||||
endif()
|
||||
|
||||
@@ -11,18 +11,18 @@ if(NOT Shiboken6_FOUND)
|
||||
if(NOT Shiboken6_INCLUDE_DIR)
|
||||
find_pip_package(Shiboken6)
|
||||
if (Shiboken6_FOUND)
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES})
|
||||
set(SHIBOKEN_MAJOR_VERSION 6)
|
||||
set(SHIBOKEN_FOUND ON)
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "")
|
||||
set(SHIBOKEN_MAJOR_VERSION 6 CACHE INTERNAL 6)
|
||||
set(SHIBOKEN_FOUND ON CACHE BOOL OFF)
|
||||
endif()
|
||||
# The include directory we actually want is part of shiboken6-generator
|
||||
find_pip_package(shiboken6_generator)
|
||||
if (shiboken6_generator_FOUND)
|
||||
set(SHIBOKEN_INCLUDE_DIR ${shiboken6_generator_INCLUDE_DIRS})
|
||||
set(SHIBOKEN_INCLUDE_DIR ${shiboken6_generator_INCLUDE_DIRS} CACHE PATH "")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(SHIBOKEN_INCLUDE_DIR ${Shiboken6_INCLUDE_DIRS})
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES})
|
||||
set(SHIBOKEN_FOUND ON)
|
||||
set(SHIBOKEN_INCLUDE_DIR ${Shiboken6_INCLUDE_DIRS} CACHE PATH "")
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "")
|
||||
set(SHIBOKEN_FOUND ON CACHE BOOL OFF)
|
||||
endif()
|
||||
|
||||
@@ -8,8 +8,8 @@ macro(CheckInterModuleDependencies)
|
||||
if(${dependent})
|
||||
foreach(prerequisite IN LISTS ARGN)
|
||||
if(NOT ${prerequisite})
|
||||
message(SEND_ERROR "${dependent} requires ${prerequisite} to be ON, but it"
|
||||
" is \"${${prerequisite}}\"")
|
||||
message(STATUS "${dependent} requires ${prerequisite} to be ON, but it"
|
||||
" is \"${${prerequisite}}\"")
|
||||
set(${dependent} OFF PARENT_SCOPE)
|
||||
break()
|
||||
endif(NOT ${prerequisite})
|
||||
@@ -17,19 +17,17 @@ macro(CheckInterModuleDependencies)
|
||||
endif(${dependent})
|
||||
endfunction(REQUIRES_MODS)
|
||||
|
||||
REQUIRES_MODS(BUILD_ASSEMBLY BUILD_PART BUILD_PART_DESIGN BUILD_SPREADSHEET)
|
||||
REQUIRES_MODS(BUILD_BIM BUILD_PART BUILD_MESH BUILD_MESH_PART BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER BUILD_TECHDRAW)
|
||||
REQUIRES_MODS(BUILD_BIM BUILD_PART BUILD_MESH BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER)
|
||||
REQUIRES_MODS(BUILD_DRAWING BUILD_PART BUILD_SPREADSHEET)
|
||||
REQUIRES_MODS(BUILD_FEM BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_IDF BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_IMPORT BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_INSPECTION BUILD_MESH BUILD_POINTS BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_JTREADER BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH BUILD_SMESH)
|
||||
REQUIRES_MODS(BUILD_FLAT_MESH BUILD_MESH_PART)
|
||||
REQUIRES_MODS(BUILD_OPENSCAD BUILD_MESH_PART BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_MATERIAL_EXTERNAL BUILD_MATERIAL)
|
||||
REQUIRES_MODS(BUILD_MEASURE BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_PART BUILD_MATERIAL)
|
||||
REQUIRES_MODS(BUILD_PART_DESIGN BUILD_SKETCHER)
|
||||
# REQUIRES_MODS(BUILD_CAM BUILD_PART BUILD_MESH BUILD_ROBOT)
|
||||
@@ -39,6 +37,5 @@ macro(CheckInterModuleDependencies)
|
||||
REQUIRES_MODS(BUILD_SANDBOX BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_SKETCHER BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_SPREADSHEET BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_SURFACE BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_PART_DESIGN BUILD_SPREADSHEET BUILD_MEASURE BUILD_IMPORT)
|
||||
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_SPREADSHEET)
|
||||
endmacro(CheckInterModuleDependencies)
|
||||
|
||||
@@ -84,15 +84,15 @@ macro(ChooseQtVersion)
|
||||
endif ()
|
||||
set(_FREECAD_QT_VERSION "${FREECAD_QT_VERSION}")
|
||||
else ()
|
||||
find_package(Qt6 QUIET COMPONENTS Core)
|
||||
set(_FREECAD_QT_VERSION 6)
|
||||
if (NOT Qt6_FOUND)
|
||||
find_package(Qt5 QUIET COMPONENTS Core)
|
||||
if (NOT Qt5_FOUND)
|
||||
find_package(Qt5 QUIET COMPONENTS Core)
|
||||
set(_FREECAD_QT_VERSION 5)
|
||||
if (NOT Qt5_FOUND)
|
||||
find_package(Qt6 QUIET COMPONENTS Core)
|
||||
if (NOT Qt6_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"Could not find a valid Qt installation. Consider setting Qt5_DIR or Qt6_DIR (as needed).")
|
||||
endif ()
|
||||
set(_FREECAD_QT_VERSION 5)
|
||||
set(_FREECAD_QT_VERSION 6)
|
||||
endif ()
|
||||
endif ()
|
||||
set(FREECAD_QT_MAJOR_VERSION "${_FREECAD_QT_VERSION}" CACHE INTERNAL
|
||||
|
||||
@@ -9,16 +9,17 @@ macro(CompilerChecksAndSetups)
|
||||
|
||||
# ================================================================================
|
||||
|
||||
# Use a heuristic of 1 GiB of RAM needed per compiler job and limit to
|
||||
# a single link job. Modern linkers are multithreaded and running them concurrently
|
||||
# can exhaust resources.
|
||||
cmake_host_system_information(RESULT avail_mem_MiB QUERY TOTAL_PHYSICAL_MEMORY)
|
||||
math(EXPR max_compile_procs "${avail_mem_MiB} / 1024")
|
||||
set_property(GLOBAL PROPERTY JOB_POOLS compile_jobs=${max_compile_procs} link_jobs=1)
|
||||
# Needed for boost1.69
|
||||
# Avoid that Python (pyerrors.h) defines snprintf and vsnprintf
|
||||
if (MSVC AND NOT MSVC_VERSION VERSION_LESS 1900)
|
||||
add_definitions(-DHAVE_SNPRINTF)
|
||||
elseif (MINGW)
|
||||
add_definitions(-DHAVE_SNPRINTF)
|
||||
endif()
|
||||
|
||||
# Allow developers to use Boost < 1.74
|
||||
# Allow developers to use Boost < 1.65
|
||||
if (NOT BOOST_MIN_VERSION)
|
||||
set(BOOST_MIN_VERSION 1.74)
|
||||
set(BOOST_MIN_VERSION 1.65)
|
||||
endif()
|
||||
|
||||
# For older cmake versions the variable 'CMAKE_CXX_COMPILER_VERSION' is missing
|
||||
@@ -27,27 +28,27 @@ macro(CompilerChecksAndSetups)
|
||||
OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION)
|
||||
|
||||
# Enabled C++20 for Freecad 1.1 and later
|
||||
set(BUILD_ENABLE_CXX_STD "C++20" CACHE STRING "Enable C++ standard")
|
||||
set_property(CACHE BUILD_ENABLE_CXX_STD PROPERTY STRINGS
|
||||
"C++20"
|
||||
"C++23"
|
||||
)
|
||||
# Enabled C++17 for Freecad 0.20 and later
|
||||
set(BUILD_ENABLE_CXX_STD "C++17" CACHE STRING "Enable C++ standard")
|
||||
set_property(CACHE BUILD_ENABLE_CXX_STD PROPERTY STRINGS
|
||||
"C++17"
|
||||
"C++20"
|
||||
)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.2)
|
||||
message(FATAL_ERROR "FreeCAD 1.1 and later requires C++20. G++ must be 11.2 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
elseif(CMAKE_COMPILER_IS_CLANGXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
|
||||
message(FATAL_ERROR "FreeCAD 1.1 and later requires C++20. Clang must be 14.0 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3)
|
||||
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. G++ must be 7.3 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
elseif(CMAKE_COMPILER_IS_CLANGXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
|
||||
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. Clang must be 6.0 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
|
||||
# Escape the two plus chars as otherwise cmake complains about invalid regex
|
||||
if(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+23")
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
else()
|
||||
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
else()#Enabled C++17
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# Log the compiler and version
|
||||
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID}, version: ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
@@ -57,8 +58,6 @@ macro(CompilerChecksAndSetups)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-fdiagnostics-color ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
# For now only set pedantic option for clang
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wno-write-strings ${CMAKE_CXX_FLAGS}")
|
||||
@@ -83,15 +82,6 @@ macro(CompilerChecksAndSetups)
|
||||
endif()
|
||||
endif()
|
||||
endif(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
|
||||
if(BUILD_USE_LIBCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
if(BUILD_ENABLE_TIME_TRACE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftime-trace")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftime-trace")
|
||||
endif()
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
@@ -100,15 +90,15 @@ macro(CompilerChecksAndSetups)
|
||||
#
|
||||
# https://en.wikipedia.org/wiki/Xcode#Latest_versions
|
||||
if (APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
endif()
|
||||
add_definitions(-DGL_SILENCE_DEPRECATION)
|
||||
elseif (UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
endif()
|
||||
|
||||
# boost.preprocessor 1.74 and earlier turns off variadics for clang regardless of version, even though they
|
||||
# work in all versions of clang that we support. Manually force variadic macro support until our oldest
|
||||
# supported version of boost is 1.75 or higher.
|
||||
# older boost.preprocessor turn off variadics for clang
|
||||
add_definitions(-DBOOST_PP_VARIADICS=1)
|
||||
message(STATUS "Force BOOST_PP_VARIADICS=1 for clang")
|
||||
endif()
|
||||
|
||||
@@ -16,10 +16,10 @@ macro(ConfigureCMakeVariables)
|
||||
endif()
|
||||
|
||||
set(PYCXX_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src/3rdParty/PyCXX" CACHE PATH
|
||||
"${CMAKE_SOURCE_DIR}/src" CACHE PATH
|
||||
"Path to the directory containing PyCXX's CXX/Config.hxx include file")
|
||||
set(PYCXX_SOURCE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src/3rdParty/PyCXX/CXX" CACHE PATH
|
||||
"${CMAKE_SOURCE_DIR}/src/CXX" CACHE PATH
|
||||
"Path to the directory containing PyCXX's cxxextensions.c source file")
|
||||
|
||||
# used as compiler defines
|
||||
|
||||
@@ -3,12 +3,12 @@ macro(CopyLibpackDirectories)
|
||||
if(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
|
||||
message(STATUS "Copying libpack dependency directories to build directory...")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/assistant.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/qt.conf DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
if(NOT FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
@@ -45,6 +45,7 @@ macro(CopyLibpackDirectories)
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_LESS "3.1.0")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ macro(CreatePackagingTargets)
|
||||
#
|
||||
#add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
||||
add_custom_target(dist-git
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distdfsg-git
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
@@ -20,7 +20,7 @@ macro(CreatePackagingTargets)
|
||||
)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX OR MINGW)
|
||||
add_custom_target(distcheck-git
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
@@ -28,7 +28,7 @@ macro(CreatePackagingTargets)
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distcheckdfsg-git
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
|
||||
@@ -10,19 +10,11 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_FMT "Use system installed fmt library if available instead of fetching the source." ON)
|
||||
option(FREECAD_USE_EXTERNAL_ONDSELSOLVER "Use system installed OndselSolver instead of git submodule." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_E57FORMAT "Use system installed libE57Format instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_GTEST "Use system installed Google Test and Google Mock" OFF)
|
||||
option(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
|
||||
option(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
|
||||
option(FREECAD_CHECK_PIVY "Check for pivy version using Python at build time" ON)
|
||||
option(FREECAD_PARALLEL_COMPILE_JOBS "Compilation jobs pool size to fit memory limitations.")
|
||||
option(FREECAD_PARALLEL_LINK_JOBS "Linkage jobs pool size to fit memory limitations.")
|
||||
option(BUILD_WITH_CONDA "Set ON if you build FreeCAD with conda" OFF)
|
||||
option(BUILD_DYNAMIC_LINK_PYTHON "If OFF extension-modules do not link against python-libraries" ON)
|
||||
option(BUILD_TRACY_FRAME_PROFILER "If ON then enables support for the Tracy frame profiler" OFF)
|
||||
|
||||
option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" ON)
|
||||
option(INSTALL_PREFER_SYMLINKS "If ON then fc_copy_sources macro will create symlinks instead of copying files" OFF)
|
||||
option(OCCT_CMAKE_FALLBACK "disable usage of occt-config files" OFF)
|
||||
if (WIN32 OR APPLE)
|
||||
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." OFF)
|
||||
@@ -76,6 +68,15 @@ macro(InitializeFreeCADBuildOptions)
|
||||
|
||||
ChooseQtVersion()
|
||||
|
||||
# https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
|
||||
set(FREECAD_USE_OCC_VARIANT "Community Edition" CACHE STRING "Official OpenCASCADE version or community edition")
|
||||
set_property(CACHE FREECAD_USE_OCC_VARIANT PROPERTY STRINGS
|
||||
"Official Version"
|
||||
"Community Edition"
|
||||
)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtOpenGL.h.cmake ${CMAKE_BINARY_DIR}/src/QtOpenGL.h)
|
||||
|
||||
option(BUILD_DESIGNER_PLUGIN "Build and install the designer plugin" OFF)
|
||||
|
||||
if(APPLE)
|
||||
@@ -115,7 +116,6 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(BUILD_INSPECTION "Build the FreeCAD inspection module" ON)
|
||||
option(BUILD_JTREADER "Build the FreeCAD jt reader module" OFF)
|
||||
option(BUILD_MATERIAL "Build the FreeCAD material module" ON)
|
||||
option(BUILD_MATERIAL_EXTERNAL "Build the FreeCAD material external interface module" OFF)
|
||||
option(BUILD_MESH "Build the FreeCAD mesh module" ON)
|
||||
option(BUILD_MESH_PART "Build the FreeCAD mesh part module" ON)
|
||||
option(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" ON)
|
||||
@@ -170,7 +170,7 @@ macro(InitializeFreeCADBuildOptions)
|
||||
|
||||
if(MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF) # 3/5/2021 current LibPack uses non-C++17 FLANN
|
||||
endif(MSVC)
|
||||
if(NOT MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" OFF)
|
||||
@@ -179,28 +179,19 @@ macro(InitializeFreeCADBuildOptions)
|
||||
|
||||
# if this is set override some options
|
||||
if (FREECAD_BUILD_DEBIAN)
|
||||
# Disable it until the upstream package has been fixed. See
|
||||
# https://github.com/FreeCAD/FreeCAD/issues/13676#issuecomment-2539978468
|
||||
# https://github.com/FreeCAD/FreeCAD/issues/13676#issuecomment-2541513308
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS OFF )
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS ON )
|
||||
# A Debian package for SMESH doesn't exist
|
||||
#set(FREECAD_USE_EXTERNAL_SMESH ON )
|
||||
endif (FREECAD_BUILD_DEBIAN)
|
||||
|
||||
if(BUILD_FEM OR BUILD_MESH_PART)
|
||||
set(FREECAD_USE_SMESH ON)
|
||||
if(FREECAD_USE_EXTERNAL_SMESH)
|
||||
set(BUILD_SMESH OFF)
|
||||
else()
|
||||
set(BUILD_SMESH ON)
|
||||
endif()
|
||||
else()
|
||||
set(FREECAD_USE_SMESH OFF)
|
||||
set(BUILD_SMESH OFF)
|
||||
if(BUILD_FEM)
|
||||
set(BUILD_SMESH ON )
|
||||
endif()
|
||||
|
||||
if (BUILD_CAM OR BUILD_FLAT_MESH)
|
||||
set(FREECAD_USE_PYBIND11 ON)
|
||||
# for Windows the minimum required cmake version is 3.4.3 to build the CAM module
|
||||
if(WIN32 AND CMAKE_VERSION VERSION_LESS 3.4.3)
|
||||
message(WARNING "Disable CAM, requires cmake >= 3.4.3 in order to build this module")
|
||||
set(BUILD_CAM OFF )
|
||||
endif()
|
||||
|
||||
# force build directory to be different to source directory
|
||||
@@ -210,22 +201,4 @@ macro(InitializeFreeCADBuildOptions)
|
||||
"Please choose another build directory! Or disable the option BUILD_FORCE_DIRECTORY.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_PARALLEL_COMPILE_JOBS)
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${FREECAD_PARALLEL_COMPILE_JOBS})
|
||||
set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
|
||||
else()
|
||||
message(WARNING "Job pooling is only available with Ninja generators.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_PARALLEL_LINK_JOBS)
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${FREECAD_PARALLEL_LINK_JOBS})
|
||||
set(CMAKE_JOB_POOL_LINK link_job_pool)
|
||||
else()
|
||||
message(WARNING "Job pooling is only available with Ninja generators.")
|
||||
endif()
|
||||
endif()
|
||||
endmacro(InitializeFreeCADBuildOptions)
|
||||
|
||||
@@ -14,7 +14,7 @@ macro(PrintFinalReport)
|
||||
|
||||
# just a value
|
||||
macro(value)
|
||||
unset(val)
|
||||
unset(val)
|
||||
set(name ${ARGV0})
|
||||
if(${name})
|
||||
set(val ${${name}}) # name has a value
|
||||
@@ -58,14 +58,13 @@ macro(PrintFinalReport)
|
||||
|
||||
simple(Compiler "${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
value(CMAKE_VERSION)
|
||||
conditional(ccache CCACHE_PROGRAM "not enabled" ${CCACHE_PROGRAM})
|
||||
simple(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
simple(bindir ${CMAKE_INSTALL_BINDIR})
|
||||
simple(datadir ${CMAKE_INSTALL_DATADIR})
|
||||
simple(docdir ${CMAKE_INSTALL_DOCDIR})
|
||||
simple(includedir ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
simple(libdir ${CMAKE_INSTALL_LIBDIR})
|
||||
simple(Python "${Python3_VERSION} [${Python3_EXECUTABLE}] Suffix: [${PYTHON_CONFIG_SUFFIX}]")
|
||||
simple(Python "${Python3_VERSION} [${PYTHON_EXECUTABLE}] Suffix: [${PYTHON_CONFIG_SUFFIX}]")
|
||||
value(BLAS)
|
||||
|
||||
section_end()
|
||||
@@ -84,12 +83,11 @@ macro(PrintFinalReport)
|
||||
value(BUILD_VR)
|
||||
value(CMAKE_PREFIX_PATH)
|
||||
value(FREECAD_QT_VERSION)
|
||||
value(Python3_EXECUTABLE)
|
||||
value(PYTHON_EXECUTABLE)
|
||||
value(PYTHON_LIBRARY)
|
||||
value(FREECAD_CREATE_MAC_APP)
|
||||
value(FREECAD_USE_PYBIND11)
|
||||
value(FREECAD_USE_EXTERNAL_KDL)
|
||||
value(FREECAD_USE_PYSIDE)
|
||||
value(FREECAD_USE_SHIBOKEN)
|
||||
value(BUILD_ADDONMGR)
|
||||
value(BUILD_BIM)
|
||||
value(BUILD_ASSEMBLY)
|
||||
@@ -104,7 +102,6 @@ macro(PrintFinalReport)
|
||||
value(BUILD_INSPECTION)
|
||||
value(BUILD_JTREADER)
|
||||
value(BUILD_MATERIAL)
|
||||
value(BUILD_MATERIAL_EXTERNAL)
|
||||
value(BUILD_MESH)
|
||||
value(BUILD_MESH_PART)
|
||||
value(BUILD_OPENSCAD)
|
||||
@@ -141,20 +138,20 @@ macro(PrintFinalReport)
|
||||
conditional(pybind11 pybind11_FOUND "not enabled" ${pybind11_VERSION})
|
||||
simple(Boost ${Boost_VERSION})
|
||||
simple(XercesC "${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
|
||||
simple(ICU "${ICU_VERSION}")
|
||||
simple(ZLIB "${ZLIB_VERSION_STRING}")
|
||||
simple(OCC "${OCC_VERSION_STRING} [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
|
||||
simple(OCC_Libs "[${OCC_LIBRARIES}]")
|
||||
if(FREECAD_USE_SMESH)
|
||||
if(BUILD_SMESH)
|
||||
if(FREECAD_USE_EXTERNAL_SMESH)
|
||||
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}")
|
||||
else()
|
||||
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK} build internal")
|
||||
simple(MEDFile "${MEDFILE_VERSION} [${MEDFILE_LIBRARIES}] [${MEDFILE_INCLUDE_DIRS}]")
|
||||
simple(HDF5 ${HDF5_VERSION})
|
||||
simple(VTK ${VTK_VERSION})
|
||||
endif()
|
||||
else()
|
||||
simple(SMESH "not enabled")
|
||||
simple(SMESH "do not build")
|
||||
endif()
|
||||
conditional(NETGEN NETGEN_FOUND
|
||||
"not enabled"
|
||||
@@ -167,7 +164,6 @@ macro(PrintFinalReport)
|
||||
simple(QtCore ${QtCore_VERSION})
|
||||
simple(QtNetwork ${QtNetwork_VERSION})
|
||||
conditional(QtOpenGL BUILD_GUI "not needed" ${QtOpenGL_VERSION})
|
||||
conditional(QtOpenGLWidgets BUILD_GUI "not needed" ${QtOpenGLWidgets_VERSION})
|
||||
conditional(QtPrintSupport BUILD_GUI "not needed" ${QtPrintSupport_VERSION})
|
||||
conditional(QtSvg BUILD_GUI "not needed" ${QtSvg_VERSION})
|
||||
conditional(QtUiTools BUILD_GUI "not needed" ${QtUiTools_VERSION})
|
||||
@@ -220,7 +216,6 @@ macro(PrintFinalReport)
|
||||
conditional(PYCXX PYCXX_FOUND "not found" "${PYCXX_VERSION} Incl: ${PYCXX_INCLUDE_DIR} Src:${PYCXX_SOURCE_DIR}")
|
||||
conditional(fmt fmt_FOUND "Sources downloaded to ${fmt_SOURCE_DIR}" "${fmt_VERSION}")
|
||||
conditional(yaml-cpp yaml-cpp_FOUND "not found" "${yaml-cpp_VERSION}")
|
||||
conditional(Vtk VTK_FOUND "not found" ${VTK_VERSION})
|
||||
|
||||
section_end()
|
||||
|
||||
|
||||
@@ -19,29 +19,18 @@ macro(SetGlobalCompilerAndLinkerSettings)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mxgot")
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
|
||||
# Only add -O0 if no -O* optimization flag exists
|
||||
if (NOT "${CMAKE_C_FLAGS_DEBUG}" MATCHES "-O[a-z0-9]+")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
|
||||
endif()
|
||||
if (NOT "${CMAKE_CXX_FLAGS_DEBUG}" MATCHES "-O[a-z0-9]+")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
|
||||
endif()
|
||||
endif()
|
||||
if(MSVC)
|
||||
# set default compiler settings
|
||||
add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR -DNOMINMAX)
|
||||
add_compile_options(/Zm150 /bigobj)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG")
|
||||
if (MSVC_VERSION LESS 1930) # Anything before VS 2022
|
||||
# set default libs
|
||||
set (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib ")
|
||||
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
# set linker flag /nodefaultlib
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
endif()
|
||||
# set default libs
|
||||
set (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib ")
|
||||
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
# set linker flag /nodefaultlib
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
if(FREECAD_RELEASE_PDB)
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
|
||||
@@ -3,7 +3,7 @@ macro(SetupBoost)
|
||||
|
||||
set(_boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS})
|
||||
|
||||
set (BOOST_COMPONENTS program_options regex system thread date_time)
|
||||
set (BOOST_COMPONENTS filesystem program_options regex system thread date_time)
|
||||
find_package(Boost ${BOOST_MIN_VERSION}
|
||||
COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
||||
|
||||
|
||||
@@ -6,22 +6,16 @@ macro(SetupCoin3D)
|
||||
find_library(COIN3D_LIBRARIES Coin)
|
||||
endif ()
|
||||
|
||||
# Try CONFIG mode -- Coin supports very old CMake files, which emits noisy warnings. Silence them.
|
||||
set(CMAKE_WARN_DEPRECATED_OLD_STATE ${CMAKE_WARN_DEPRECATED})
|
||||
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
|
||||
find_package(Coin CONFIG)
|
||||
set(CMAKE_WARN_DEPRECATED ${CMAKE_WARN_DEPRECATED_OLD_STATE} CACHE BOOL "" FORCE)
|
||||
if (Coin_FOUND)
|
||||
set(COIN3D_INCLUDE_DIRS ${Coin_INCLUDE_DIR})
|
||||
set(COIN3D_LIBRARIES ${Coin_LIBRARIES})
|
||||
set(COIN3D_LIB_DIRS ${Coin_LIB_DIR})
|
||||
else ()
|
||||
# Try MODULE mode (FindCoin3D.cmake, included by CMake)
|
||||
find_package(Coin3D)
|
||||
if (NOT COIN3D_FOUND)
|
||||
message(FATAL_ERROR "Could not find Coin3D")
|
||||
# Try MODULE mode
|
||||
find_package(Coin3D)
|
||||
if (NOT COIN3D_FOUND)
|
||||
# Try CONFIG mode
|
||||
find_package(Coin CONFIG REQUIRED)
|
||||
if (Coin_FOUND)
|
||||
set(COIN3D_INCLUDE_DIRS ${Coin_INCLUDE_DIR})
|
||||
set(COIN3D_LIBRARIES ${Coin_LIBRARIES})
|
||||
endif ()
|
||||
endif ()
|
||||
ENDIF ()
|
||||
|
||||
IF (NOT COIN3D_VERSION)
|
||||
file(READ "${COIN3D_INCLUDE_DIRS}/Inventor/C/basic.h" _coin3d_basic_h)
|
||||
@@ -33,50 +27,18 @@ macro(SetupCoin3D)
|
||||
set(COIN3D_MICRO_VERSION "${CMAKE_MATCH_1}")
|
||||
set(COIN3D_VERSION "${COIN3D_MAJOR_VERSION}.${COIN3D_MINOR_VERSION}.${COIN3D_MICRO_VERSION}")
|
||||
ENDIF ()
|
||||
endmacro(SetupCoin3D)
|
||||
|
||||
macro(SetupPivy)
|
||||
# -------------------------------- Pivy --------------------------------
|
||||
|
||||
IF (FREECAD_CHECK_PIVY) # do not make pivy a host dependency for cross compiling
|
||||
IF (NOT PIVY_VERSION)
|
||||
message(STATUS "Checking Pivy version by importing it in a Python program...")
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')"
|
||||
OUTPUT_VARIABLE PIVY_VERSION
|
||||
RESULT_VARIABLE RETURN_CODE)
|
||||
if (RETURN_CODE EQUAL 0)
|
||||
message(STATUS "Found Pivy ${PIVY_VERSION}")
|
||||
else ()
|
||||
message(ERROR "Failed to import Pivy using ${Python3_EXECUTABLE}")
|
||||
endif ()
|
||||
ENDIF ()
|
||||
|
||||
message(STATUS "Checking Pivy Coin3D version by importing it in a Python program...")
|
||||
IF (NOT PIVY_VERSION)
|
||||
message(STATUS "Checking Pivy version by importing it in a Python program...")
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.SoDB.getVersion(),end='')"
|
||||
OUTPUT_VARIABLE PIVY_COIN_VERSION
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')"
|
||||
OUTPUT_VARIABLE PIVY_VERSION
|
||||
RESULT_VARIABLE RETURN_CODE)
|
||||
if (RETURN_CODE EQUAL 0)
|
||||
message(STATUS "Found Pivy Coin3D ${PIVY_COIN_VERSION}")
|
||||
message(STATUS "Found Pivy ${PIVY_VERSION}")
|
||||
else ()
|
||||
message(ERROR "Failed to get Pivy Coin3D version using ${Python3_EXECUTABLE}")
|
||||
message(ERROR "Failed to import Pivy using ${Python3_EXECUTABLE}")
|
||||
endif ()
|
||||
ENDIF ()
|
||||
|
||||
if (${PIVY_COIN_VERSION} MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
|
||||
set(PIVY_COIN_MAJOR_VERSION ${CMAKE_MATCH_1})
|
||||
set(PIVY_COIN_MINOR_VERSION ${CMAKE_MATCH_2})
|
||||
set(PIVY_COIN_MICRO_VERSION ${CMAKE_MATCH_3})
|
||||
set(PIVY_COIN_VERSION "${PIVY_COIN_MAJOR_VERSION}.${PIVY_COIN_MINOR_VERSION}.${PIVY_COIN_MICRO_VERSION}")
|
||||
else ()
|
||||
message(FATAL_ERROR "Failed to match Pivy Coin3D version string output")
|
||||
endif ()
|
||||
|
||||
if (NOT (
|
||||
(${COIN3D_MAJOR_VERSION} EQUAL ${PIVY_COIN_MAJOR_VERSION}) AND
|
||||
(${COIN3D_MINOR_VERSION} EQUAL ${PIVY_COIN_MINOR_VERSION}) AND
|
||||
(${COIN3D_MICRO_VERSION} EQUAL ${PIVY_COIN_MICRO_VERSION})))
|
||||
message(FATAL_ERROR "Coin3D version ${COIN3D_VERSION} mismatches Pivy Coin3D ${PIVY_COIN_VERSION}.")
|
||||
endif ()
|
||||
endif(FREECAD_CHECK_PIVY)
|
||||
endmacro(SetupPivy)
|
||||
endmacro(SetupCoin3D)
|
||||
|
||||
@@ -11,10 +11,19 @@ macro(SetupEigen)
|
||||
"=================\n")
|
||||
endif(NOT EIGEN3_FOUND)
|
||||
|
||||
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.4.0")
|
||||
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.1")
|
||||
message(WARNING "Disable module flatmesh because it requires "
|
||||
"minimum Eigen3 version 3.4.0 but version ${EIGEN3_VERSION} was found")
|
||||
"minimum Eigen3 version 3.3.1 but version ${EIGEN3_VERSION} was found")
|
||||
set (BUILD_FLAT_MESH OFF)
|
||||
endif()
|
||||
|
||||
# Older versions raise the warning -Wdeprecated-copy with clang10/gcc10
|
||||
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.8")
|
||||
unset(_flag_found CACHE)
|
||||
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
|
||||
if (_flag_found)
|
||||
set (EIGEN3_NO_DEPRECATED_COPY "-Wno-deprecated-copy")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
endmacro(SetupEigen)
|
||||
|
||||
@@ -34,8 +34,8 @@ macro(SetupLibFmt)
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
endif()
|
||||
FetchContent_Declare(fmt
|
||||
URL https://github.com/fmtlib/fmt/archive/refs/tags/11.1.4.zip
|
||||
URL_MD5 90667b07f34d91554cf8285ae234ff66
|
||||
URL https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip
|
||||
URL_MD5 e6754011ff56bfc37631fcc90961e377
|
||||
)
|
||||
FetchContent_MakeAvailable(fmt)
|
||||
set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
macro(SetupOpenCasCade)
|
||||
# -------------------------------- OpenCasCade --------------------------------
|
||||
|
||||
find_package(OCC)
|
||||
if(NOT OCC_FOUND)
|
||||
message(FATAL_ERROR "================================================================\n"
|
||||
"OpenCASCADE not found!\n"
|
||||
"Neither OpenCASCADE Community Edition nor OpenCASCADE was found!\n"
|
||||
"================================================================\n")
|
||||
endif()
|
||||
endmacro()
|
||||
endif(NOT OCC_FOUND)
|
||||
|
||||
endmacro(SetupOpenCasCade)
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
macro(SetupOpenGL)
|
||||
# -------------------------------- OpenGL --------------------------------
|
||||
|
||||
# If on a system with both a legacy GL library and GLVND, prefer the legacy library.
|
||||
# This is probably needed until we no longer have any gl.*ARB calls in the codebase
|
||||
# See, e.g. SoBrepFaceSet.cpp
|
||||
set(OpenGL_GL_PREFERENCE LEGACY)
|
||||
|
||||
find_package(OpenGL)
|
||||
include(FindPackageMessage)
|
||||
if(OPENGL_GLU_FOUND)
|
||||
|
||||
@@ -2,6 +2,7 @@ macro(SetupPybind11)
|
||||
# -------------------------------- PyBind11 -----------------------------
|
||||
|
||||
# necessary for flat-mesh feature
|
||||
option(FREECAD_USE_PYBIND11 "Use pybind11" OFF)
|
||||
if (FREECAD_USE_PYBIND11)
|
||||
find_package(pybind11 REQUIRED)
|
||||
endif()
|
||||
|
||||
@@ -3,12 +3,7 @@ macro(SetupPython)
|
||||
|
||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||
|
||||
if (${Python3_VERSION} VERSION_LESS "3.10")
|
||||
message(FATAL_ERROR "To build FreeCAD you need at least Python 3.10\n")
|
||||
endif()
|
||||
|
||||
# For backwards compatibility with old CMake scripts
|
||||
# See: https://github.com/FreeCAD/FreeCAD/pull/19635#issuecomment-2725612407
|
||||
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||
set(PYTHON_LIBRARIES ${Python3_LIBRARIES})
|
||||
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
|
||||
@@ -19,4 +14,8 @@ macro(SetupPython)
|
||||
set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH})
|
||||
set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND})
|
||||
|
||||
if (${PYTHON_VERSION_STRING} VERSION_LESS "3.8")
|
||||
message(FATAL_ERROR "To build FreeCAD you need at least Python 3.8\n")
|
||||
endif()
|
||||
|
||||
endmacro(SetupPython)
|
||||
|
||||
@@ -13,7 +13,6 @@ if(BUILD_GUI)
|
||||
elseif (FREECAD_QT_MAJOR_VERSION EQUAL 6)
|
||||
list (APPEND FREECAD_QT_COMPONENTS GuiTools)
|
||||
list (APPEND FREECAD_QT_COMPONENTS SvgWidgets)
|
||||
list (APPEND FREECAD_QT_COMPONENTS OpenGLWidgets)
|
||||
endif()
|
||||
|
||||
list (APPEND FREECAD_QT_COMPONENTS OpenGL PrintSupport Svg UiTools Widgets LinguistTools)
|
||||
@@ -79,7 +78,6 @@ else()
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtCore.h.cmake ${CMAKE_BINARY_DIR}/src/QtCore.h)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtWidgets.h.cmake ${CMAKE_BINARY_DIR}/src/QtWidgets.h)
|
||||
|
||||
function(qt_find_and_add_translation _qm_files _tr_dir _qm_dir)
|
||||
file(GLOB _ts_files ${_tr_dir})
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
macro(SetupSalomeSMESH)
|
||||
# -------------------------------- Salome SMESH --------------------------
|
||||
# Salome SMESH sources are under src/3rdParty now
|
||||
if(FREECAD_USE_SMESH)
|
||||
|
||||
# Salome SMESH sources are under src/3rdParty now
|
||||
if(BUILD_SMESH)
|
||||
# set the internal smesh version:
|
||||
# see src/3rdParty/salomonemesh/CMakeLists.txt and commit https://github.com/FreeCAD/FreeCAD/commit/666a3e5 and https://forum.freecad.org/viewtopic.php?f=10&t=30838
|
||||
set(SMESH_VERSION_MAJOR 7)
|
||||
@@ -42,7 +42,7 @@ macro(SetupSalomeSMESH)
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(VTK_COMPONENTS "CommonCore;CommonDataModel;FiltersVerdict;IOXML;FiltersCore;FiltersGeneral;IOLegacy;FiltersExtraction;FiltersSources;FiltersGeometry;WrappingPythonCore")
|
||||
set(VTK_COMPONENTS "CommonCore;CommonDataModel;FiltersVerdict;IOXML;FiltersCore;FiltersGeneral;IOLegacy;FiltersExtraction;FiltersSources;FiltersGeometry")
|
||||
list(APPEND VTK_COMPONENTS "IOMPIParallel;ParallelMPI;hdf5;FiltersParallelDIY2;RenderingCore;InteractionStyle;RenderingFreeType;RenderingOpenGL2")
|
||||
foreach(_module ${VTK_COMPONENTS})
|
||||
list (FIND VTK_AVAILABLE_COMPONENTS ${_module} _index)
|
||||
@@ -63,17 +63,6 @@ macro(SetupSalomeSMESH)
|
||||
endif()
|
||||
|
||||
set(BUILD_FEM_VTK ON)
|
||||
|
||||
# Check if PythonWrapperCore was found
|
||||
# Note: VTK 9 only, as the implementations use the VTK modules introduced in 8.1
|
||||
# VTK_WrappingPythonCore_FOUND is named differently for versions <9.0
|
||||
if (${VTK_WrappingPythonCore_FOUND})
|
||||
set(BUILD_FEM_VTK_PYTHON 1)
|
||||
message(STATUS "VTK python wrapper: available")
|
||||
else()
|
||||
message(STATUS "VTK python wrapper: NOT available")
|
||||
endif()
|
||||
|
||||
if(${VTK_MAJOR_VERSION} LESS 6)
|
||||
message( FATAL_ERROR "Found VTK version is <6, this is not compatible" )
|
||||
endif()
|
||||
@@ -113,6 +102,10 @@ macro(SetupSalomeSMESH)
|
||||
add_compile_options(${HDF5_CFLAGS})
|
||||
link_directories(${HDF5_LIBRARY_DIRS})
|
||||
link_libraries(${HDF5_LIBRARIES})
|
||||
find_file(Hdf5dotH hdf5.h PATHS ${HDF5_INCLUDE_DIRS} NO_DEFAULT_PATH)
|
||||
if(NOT Hdf5dotH)
|
||||
message( FATAL_ERROR "${HDF5_VARIANT} development header not found.")
|
||||
endif()
|
||||
endif()
|
||||
check_include_file_cxx(hdf5.h HDF5_FOUND)
|
||||
if(NOT HDF5_FOUND)
|
||||
@@ -152,6 +145,6 @@ macro(SetupSalomeSMESH)
|
||||
|
||||
set(SMESH_FOUND TRUE)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/SMESH_Version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/SMESH_Version.h)
|
||||
endif(FREECAD_USE_SMESH)
|
||||
endif(BUILD_SMESH)
|
||||
|
||||
endmacro(SetupSalomeSMESH)
|
||||
|
||||
@@ -59,18 +59,15 @@ macro(SetupShibokenAndPyside)
|
||||
|
||||
find_package(PySide${PYSIDE_MAJOR_VERSION} QUIET)
|
||||
|
||||
if(${PYSIDE_MAJOR_VERSION} EQUAL 2)
|
||||
# Our internal FindPySide6.cmake file already provides these for PySide6
|
||||
if(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
|
||||
get_property(PYSIDE_INCLUDE_DIR TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
|
||||
if(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
|
||||
get_property(PYSIDE_INCLUDE_DIR TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
|
||||
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
find_pip_package(PySide${PYSIDE_MAJOR_VERSION})
|
||||
if (PySide${PYSIDE_MAJOR_VERSION}_FOUND)
|
||||
set(PYSIDE_INCLUDE_DIR ${PySide${PYSIDE_MAJOR_VERSION}_INCLUDE_DIRS})
|
||||
set(PYSIDE_LIBRARY ${PySide${PYSIDE_MAJOR_VERSION}_LIBRARIES})
|
||||
endif()
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
find_pip_package(PySide${PYSIDE_MAJOR_VERSION})
|
||||
if (PySide${PYSIDE_MAJOR_VERSION}_FOUND)
|
||||
set(PYSIDE_INCLUDE_DIR ${PySide${PYSIDE_MAJOR_VERSION}_INCLUDE_DIRS})
|
||||
set(PYSIDE_LIBRARY ${PySide${PYSIDE_MAJOR_VERSION}_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -131,7 +128,7 @@ macro(SetupShibokenAndPyside)
|
||||
|
||||
# Now try to import the shiboken Python module and print a warning if it can't be loaded
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import shiboken${SHIBOKEN_MAJOR_VERSION}"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import shiboken${SHIBOKEN_MAJOR_VERSION}"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PRINT_OUTPUT
|
||||
)
|
||||
@@ -143,7 +140,7 @@ macro(SetupShibokenAndPyside)
|
||||
"==================================\n")
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import shiboken${SHIBOKEN_MAJOR_VERSION};print(shiboken${SHIBOKEN_MAJOR_VERSION}.__version__, end='')"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import shiboken${SHIBOKEN_MAJOR_VERSION};print(shiboken${SHIBOKEN_MAJOR_VERSION}.__version__, end='')"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE Shiboken_VERSION
|
||||
)
|
||||
@@ -157,7 +154,7 @@ macro(SetupShibokenAndPyside)
|
||||
|
||||
# Independent of the build option PySide modules must be loaded at runtime. Print a warning if it fails.
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import PySide${PYSIDE_MAJOR_VERSION};import os;print(os.path.dirname(PySide${PYSIDE_MAJOR_VERSION}.__file__), end='')"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import PySide${PYSIDE_MAJOR_VERSION};import os;print(os.path.dirname(PySide${PYSIDE_MAJOR_VERSION}.__file__), end='')"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PRINT_OUTPUT
|
||||
)
|
||||
@@ -168,7 +165,7 @@ macro(SetupShibokenAndPyside)
|
||||
"================================\n")
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import PySide${PYSIDE_MAJOR_VERSION};print(PySide${PYSIDE_MAJOR_VERSION}.__version__, end='')"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import PySide${PYSIDE_MAJOR_VERSION};print(PySide${PYSIDE_MAJOR_VERSION}.__version__, end='')"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PySide_VERSION
|
||||
)
|
||||
@@ -178,6 +175,38 @@ macro(SetupShibokenAndPyside)
|
||||
endmacro(SetupShibokenAndPyside)
|
||||
|
||||
|
||||
# Macros similar to FindQt4.cmake's WRAP_UI and WRAP_RC, for the automatic generation of Python
|
||||
# code from Qt4's user interface ('.ui') and resource ('.qrc') files. These macros are called:
|
||||
# - PYSIDE_WRAP_UI
|
||||
# - PYSIDE_WRAP_RC
|
||||
|
||||
MACRO(PYSIDE_WRAP_UI outfiles)
|
||||
if (NOT PYSIDE_UIC_EXECUTABLE)
|
||||
message(FATAL_ERROR "Qt uic is required for generating ${ARGN}")
|
||||
endif()
|
||||
FOREACH(it ${ARGN})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.py)
|
||||
if(WIN32 OR APPLE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${PYSIDE_UIC_EXECUTABLE} ${UICOPTIONS} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
else()
|
||||
# Especially on Open Build Service we don't want changing date like
|
||||
# pyside2-uic generates in comments at beginning., which is why
|
||||
# we follow the tool command with a POSIX-friendly sed.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND "${PYSIDE_UIC_EXECUTABLE}" ${UICOPTIONS} "${infile}" -o "${outfile}"
|
||||
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endif()
|
||||
list(APPEND ${outfiles} ${outfile})
|
||||
ENDFOREACH(it)
|
||||
ENDMACRO (PYSIDE_WRAP_UI)
|
||||
|
||||
MACRO(PYSIDE_WRAP_RC outfiles)
|
||||
if (NOT PYSIDE_RCC_EXECUTABLE)
|
||||
message(FATAL_ERROR "Qt rcc is required for generating ${ARGN}")
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
macro(SetupZipIos)
|
||||
# -------------------------------- ZipIos --------------------------------
|
||||
|
||||
# Use external zipios++ if specified.
|
||||
if(FREECAD_USE_EXTERNAL_ZIPIOS)
|
||||
find_library(ZIPIOS_LIBRARY zipios)
|
||||
find_path(ZIPIOS_INCLUDES zipios++/zipios-config.h)
|
||||
if(ZIPIOS_LIBRARY)
|
||||
message(STATUS "Found zipios++: ${ZIPIOS}")
|
||||
endif()
|
||||
if(ZIPIOS_INCLUDES)
|
||||
message(STATUS "Found zipios++ headers.")
|
||||
endif()
|
||||
if(NOT ZIPIOS_LIBRARY OR NOT ZIPIOS_INCLUDES)
|
||||
message(FATAL_ERROR "Using external zipios++ was specified but was not found.")
|
||||
endif()
|
||||
else(FREECAD_USE_EXTERNAL_ZIPIOS)
|
||||
set(ZIPIOS_INCLUDES ${CMAKE_SOURCE_DIR}/src/3rdParty)
|
||||
SET(zipios_SRCS
|
||||
${ZIPIOS_INCLUDES}/zipios++/backbuffer.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/collcoll.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/collcoll.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/deflateoutputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/deflateoutputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/fcoll.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/fcoll.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/fcollexceptions.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/fcollexceptions.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/fileentry.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/fileentry.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/filepath.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/filepath.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/filterinputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/filterinputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/filteroutputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/filteroutputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/gzipoutputstream.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/gzipoutputstream.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/gzipoutputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/gzipoutputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/inflateinputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/inflateinputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/meta-iostreams.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/outputstringstream.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/simplesmartptr.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/virtualseeker.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipfile.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipfile.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/ziphead.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/ziphead.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipheadio.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipheadio.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipinputstream.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipinputstream.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipinputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipinputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipios_common.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipios-config.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipios_defs.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipoutputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipoutputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipoutputstream.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipoutputstream.h
|
||||
)
|
||||
endif(FREECAD_USE_EXTERNAL_ZIPIOS)
|
||||
|
||||
endmacro(SetupZipIos)
|
||||
+28
-69
@@ -9,23 +9,21 @@ MACRO (fc_copy_sources target_name outpath)
|
||||
else()
|
||||
set(fc_details "")
|
||||
endif()
|
||||
if(INSTALL_PREFER_SYMLINKS)
|
||||
set(copy_command create_symlink)
|
||||
else()
|
||||
set(copy_command copy)
|
||||
endif()
|
||||
|
||||
foreach(it ${ARGN})
|
||||
get_filename_component(infile ${it} ABSOLUTE)
|
||||
get_filename_component(outfile "${outpath}/${it}" ABSOLUTE)
|
||||
add_file_dependencies("${infile}" "${outfile}")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
COMMAND "${CMAKE_COMMAND}" -E ${copy_command} "${infile}" "${outfile}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}"
|
||||
OUTPUT "${outfile}"
|
||||
COMMENT "Copying ${infile} to ${outfile}${fc_details}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target_name}
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
ENDMACRO(fc_copy_sources)
|
||||
|
||||
MACRO (fc_copy_file_if_different inputfile outputfile)
|
||||
@@ -78,6 +76,10 @@ MACRO (fc_target_copy_resource target_name inpath outpath)
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target_name}
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
ENDMACRO(fc_target_copy_resource)
|
||||
|
||||
MACRO (fc_target_copy_resource_flat target_name inpath outpath)
|
||||
@@ -109,13 +111,16 @@ MACRO (fc_target_copy_resource_flat target_name inpath outpath)
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target_name}
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
ENDMACRO(fc_target_copy_resource_flat)
|
||||
|
||||
# It would be a bit cleaner to generate these files in ${CMAKE_CURRENT_BINARY_DIR}
|
||||
|
||||
# To be removed once all instances are migrated to generate_from_py
|
||||
macro(generate_from_xml BASE_NAME)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/bindings/generate.py")
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/generate.py")
|
||||
file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.xml" SOURCE_NATIVE_PATH)
|
||||
|
||||
@@ -127,75 +132,34 @@ macro(generate_from_xml BASE_NAME)
|
||||
if(NOT EXISTS "${SOURCE_CPP_PATH}")
|
||||
# assures the source files are generated at least once
|
||||
message(STATUS "${SOURCE_CPP_PATH}")
|
||||
execute_process(COMMAND "${Python3_EXECUTABLE}" "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}"
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
endif()
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.h" "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.cpp"
|
||||
COMMAND ${Python3_EXECUTABLE} "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" ${BASE_NAME}.xml
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.xml"
|
||||
COMMAND ${PYTHON_EXECUTABLE} "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" ${BASE_NAME}.xml
|
||||
MAIN_DEPENDENCY "${BASE_NAME}.xml"
|
||||
DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/src/Tools/bindings/templates/templateClassPyExport.py"
|
||||
"${CMAKE_SOURCE_DIR}/src/Tools/generateTemplates/templateClassPyExport.py"
|
||||
"${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Building ${BASE_NAME}.h/.cpp out of ${BASE_NAME}.xml"
|
||||
)
|
||||
endmacro(generate_from_xml)
|
||||
|
||||
macro(generate_from_py_impl BASE_NAME SUFFIX)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/bindings/generate.py")
|
||||
file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.pyi" SOURCE_NATIVE_PATH)
|
||||
|
||||
set(SOURCE_CPP_PATH "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}Py${SUFFIX}.cpp")
|
||||
set(SOURCE_H_PATH "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}Py${SUFFIX}.h")
|
||||
|
||||
# BASE_NAME may include also a path name
|
||||
GET_FILENAME_COMPONENT(OUTPUT_PATH "${SOURCE_CPP_PATH}" PATH)
|
||||
file(TO_NATIVE_PATH "${OUTPUT_PATH}" OUTPUT_NATIVE_PATH)
|
||||
if(NOT EXISTS "${SOURCE_CPP_PATH}")
|
||||
# Ensure the source files are generated at least once.
|
||||
message(STATUS "${SOURCE_CPP_PATH}")
|
||||
execute_process(
|
||||
COMMAND "${Python3_EXECUTABLE}" "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMAND_ERROR_IS_FATAL ANY
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${SOURCE_H_PATH}" "${SOURCE_CPP_PATH}"
|
||||
COMMAND ${Python3_EXECUTABLE} "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" ${BASE_NAME}.pyi
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.pyi"
|
||||
DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/src/Tools/bindings/templates/templateClassPyExport.py"
|
||||
"${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Building ${BASE_NAME}Py${SUFFIX}.h/.cpp out of ${BASE_NAME}.pyi"
|
||||
)
|
||||
endmacro(generate_from_py_impl)
|
||||
|
||||
macro(generate_from_py BASE_NAME)
|
||||
generate_from_py_impl(${BASE_NAME} "")
|
||||
endmacro(generate_from_py)
|
||||
|
||||
macro(generate_from_py_ BASE_NAME)
|
||||
generate_from_py_impl(${BASE_NAME} "_")
|
||||
endmacro(generate_from_py_)
|
||||
|
||||
macro(generate_embed_from_py BASE_NAME OUTPUT_FILE)
|
||||
macro(generate_from_py BASE_NAME OUTPUT_FILE)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py")
|
||||
file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.py" SOURCE_NATIVE_PATH)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}"
|
||||
COMMAND "${Python3_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}"
|
||||
COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}"
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.py"
|
||||
DEPENDS "${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
COMMENT "Building files out of ${BASE_NAME}.py")
|
||||
endmacro(generate_embed_from_py)
|
||||
endmacro(generate_from_py)
|
||||
|
||||
macro(generate_from_any INPUT_FILE OUTPUT_FILE VARIABLE)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py")
|
||||
@@ -203,7 +167,7 @@ macro(generate_from_any INPUT_FILE OUTPUT_FILE VARIABLE)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}" SOURCE_NATIVE_PATH)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}"
|
||||
COMMAND "${Python3_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}" "${VARIABLE}"
|
||||
COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}" "${VARIABLE}"
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}"
|
||||
DEPENDS "${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
@@ -308,10 +272,8 @@ ENDMACRO(SET_PYTHON_PREFIX_SUFFIX)
|
||||
# Locate the include directory for a pip-installed package -- uses pip show to find the base pip
|
||||
# install directory, and then appends the package name and "/include" to the end
|
||||
macro(find_pip_package PACKAGE)
|
||||
unset(${PACKAGE}_FOUND) # Remove from local scope
|
||||
unset(${PACKAGE}_FOUND CACHE) # Remove from CMake cache (if it exists)
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -m pip show ${PACKAGE}
|
||||
COMMAND ${PYTHON_EXECUTABLE} -m pip show ${PACKAGE}
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PRINT_OUTPUT
|
||||
)
|
||||
@@ -344,18 +306,15 @@ macro(find_pip_package PACKAGE)
|
||||
file(GLOB OPT_LIBRARIES "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/*${PIP_LIB_NAME}*.so.*")
|
||||
endif()
|
||||
if (OPT_LIBRARIES AND DEBUG_LIBRARIES)
|
||||
set(${PACKAGE}_LIBRARIES optimized ${OPT_LIBRARIES} debug ${DEBUG_LIBRARIES} CACHE PATH "Location of the ${PACKAGE} libraries")
|
||||
set(${PACKAGE}_LIBRARIES optimized ${OPT_LIBRARIES} debug ${DEBUG_LIBRARIES} CACHE PATH "")
|
||||
elseif(OPT_LIBRARIES)
|
||||
set(${PACKAGE}_LIBRARIES ${OPT_LIBRARIES} CACHE PATH "Location of the ${PACKAGE} optimized libraries")
|
||||
set(${PACKAGE}_LIBRARIES ${OPT_LIBRARIES} CACHE PATH "")
|
||||
elseif(DEBUG_LIBRARIES)
|
||||
set(${PACKAGE}_LIBRARIES ${DEBUG_LIBRARIES} CACHE PATH "Location of the ${PACKAGE} debug libraries")
|
||||
set(${PACKAGE}_LIBRARIES ${DEBUG_LIBRARIES} CACHE PATH "")
|
||||
endif()
|
||||
set(${PACKAGE}_INCLUDE_DIRS ${INCLUDE_DIR} CACHE PATH "Location of the ${PACKAGE} includes")
|
||||
set(${PACKAGE}_FOUND ON)
|
||||
set(${PACKAGE}_INCLUDE_DIRS ${INCLUDE_DIR} CACHE PATH "")
|
||||
set(${PACKAGE}_FOUND ON CACHE BOOL OFF)
|
||||
message(STATUS "Found pip-installed ${PACKAGE} in ${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}")
|
||||
if(${PACKAGE}_INCLUDE_DIRS)
|
||||
message(STATUS " --> with includes in ${${PACKAGE}_INCLUDE_DIRS}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
+1
-11
@@ -19,25 +19,15 @@ if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.1.0")
|
||||
find_package(pybind11 REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/share/cmake/pybind11 NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 pybind11 ${pybind11_VERSION}")
|
||||
set(FREECAD_USE_PYBIND11 ON)
|
||||
else()
|
||||
# We have completely removed support for boost-python and require pybind11, which requires LibPack 3.1 or later
|
||||
message(FATAL_ERROR "FreeCAD now requires LibPack 3.1.0 or newer (you are using ${FREECAD_LIBPACK_VERSION}): please upgrade your LibPack")
|
||||
endif()
|
||||
|
||||
find_package(XercesC REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/cmake NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 XercesC ${XercesC_VERSION}")
|
||||
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.1.1")
|
||||
set(FREECAD_USE_EXTERNAL_E57FORMAT ON)
|
||||
find_package(E57Format REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake/e57format NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 e57format ${e57format_VERSION}")
|
||||
endif()
|
||||
|
||||
find_package(yaml-cpp REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 yaml-cpp ${yaml-cpp_VERSION}")
|
||||
message(STATUS "Found LibPack 3 yaml-cpp ${XercesC_VERSION}")
|
||||
|
||||
find_package(Coin REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
|
||||
|
||||
message(STATUS "Found LibPack 3 Coin ${Coin_VERSION}")
|
||||
# For compatibility with the rest of the cMake scripts:
|
||||
set (COIN3D_FOUND TRUE)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
mamba run --live-stream -n freecad cmake %*
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
mamba run --live-stream -n freecad cmake $@
|
||||
@@ -0,0 +1,9 @@
|
||||
name: freecad
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- conda-forge/noarch::conda-libmamba-solver==24.7.0
|
||||
- conda-devenv
|
||||
- mamba
|
||||
- python==3.12.*
|
||||
- zstd
|
||||
@@ -0,0 +1,9 @@
|
||||
name: freecad
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- conda-forge/noarch::conda-libmamba-solver==24.7.0
|
||||
- conda-devenv
|
||||
- mamba
|
||||
- python==3.11.*
|
||||
- zstd==1.5.6
|
||||
@@ -0,0 +1,100 @@
|
||||
name: freecad
|
||||
channels:
|
||||
- conda-forge
|
||||
- conda-forge/label/pivy_rc
|
||||
dependencies:
|
||||
- conda-forge/noarch::conda-libmamba-solver==24.7.0
|
||||
- libspnav # [linux]
|
||||
- kernel-headers_linux-64 # [linux and x86_64]
|
||||
- libdrm-cos7-x86_64 # [linux and x86_64]
|
||||
- libselinux-cos7-x86_64 # [linux and x86_64]
|
||||
- libsepol-cos7-x86_64 # [linux and x86_64]
|
||||
- libx11-common-cos7-x86_64 # [linux and x86_64]
|
||||
- libx11-cos7-x86_64 # [linux and x86_64]
|
||||
- libxau-cos7-x86_64 # [linux and x86_64]
|
||||
- libxcb-cos7-x86_64 # [linux and x86_64]
|
||||
- libxdamage-cos7-x86_64 # [linux and x86_64]
|
||||
- libxext-cos7-x86_64 # [linux and x86_64]
|
||||
- libxfixes-cos7-x86_64 # [linux and x86_64]
|
||||
- libxi-cos7-x86_64 # [linux and x86_64]
|
||||
- libxi-devel-cos7-x86_64 # [linux and x86_64]
|
||||
- libxxf86vm-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-dri-drivers-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-devel-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-devel-cos7-x86_64 # [linux and x86_64]
|
||||
- pixman-cos7-x86_64 # [linux and x86_64]
|
||||
- sysroot_linux-64 # [linux and x86_64]
|
||||
- xorg-x11-server-common-cos7-x86_64 # [linux and x86_64]
|
||||
- xorg-x11-server-xvfb-cos7-x86_64 # [linux and x86_64]
|
||||
- kernel-headers_linux-aarch64 # [linux and aarch64]
|
||||
- libdrm-cos7-aarch64 # [linux and aarch64]
|
||||
- libglvnd-cos7-aarch64 # [linux and aarch64]
|
||||
- libglvnd-glx-cos7-aarch64 # [linux and aarch64]
|
||||
- libselinux-cos7-aarch64 # [linux and aarch64]
|
||||
- libsepol-cos7-aarch64 # [linux and aarch64]
|
||||
- libx11-common-cos7-aarch64 # [linux and aarch64]
|
||||
- libx11-cos7-aarch64 # [linux and aarch64]
|
||||
- libxau-cos7-aarch64 # [linux and aarch64]
|
||||
- libxcb-cos7-aarch64 # [linux and aarch64]
|
||||
- libxdamage-cos7-aarch64 # [linux and aarch64]
|
||||
- libxext-cos7-aarch64 # [linux and aarch64]
|
||||
- libxfixes-cos7-aarch64 # [linux and aarch64]
|
||||
- libxi-cos7-aarch64 # [linux and aarch64]
|
||||
- libxi-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- libxxf86vm-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-dri-drivers-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-khr-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libgbm-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libglapi-cos7-aarch64 # [linux and aarch64]
|
||||
- pixman-cos7-aarch64 # [linux and aarch64]
|
||||
- sysroot_linux-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-common-cos7-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-xvfb-cos7-aarch64 # [linux and aarch64]
|
||||
- sed # [unix]
|
||||
- ccache
|
||||
- cmake
|
||||
- coin3d
|
||||
- compilers
|
||||
- conda
|
||||
- conda-devenv
|
||||
- debugpy
|
||||
- doxygen
|
||||
- eigen
|
||||
- fmt
|
||||
- freetype
|
||||
- git
|
||||
- gmsh
|
||||
- graphviz
|
||||
- hdf5
|
||||
- libboost-devel
|
||||
- libcxx
|
||||
- mamba
|
||||
- matplotlib
|
||||
- ninja
|
||||
- numpy
|
||||
- occt
|
||||
- openssl
|
||||
- pcl
|
||||
- pip
|
||||
- conda-forge/label/pivy_rc::pivy
|
||||
- pkg-config
|
||||
- ply
|
||||
- pre-commit
|
||||
- pybind11
|
||||
- pyside6
|
||||
- python==3.12.*
|
||||
- pyyaml
|
||||
- qt6-main
|
||||
- smesh
|
||||
- swig
|
||||
- vtk==9.2.6
|
||||
- xerces-c
|
||||
- yaml-cpp
|
||||
- zlib
|
||||
- zstd
|
||||
@@ -0,0 +1,103 @@
|
||||
name: freecad
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- conda-forge/noarch::conda-libmamba-solver==24.7.0
|
||||
- libspnav # [linux]
|
||||
- kernel-headers_linux-64 # [linux and x86_64]
|
||||
- libdrm-conda-x86_64 # [linux and x86_64]
|
||||
- libselinux-conda-x86_64 # [linux and x86_64]
|
||||
- libsepol-conda-x86_64 # [linux and x86_64]
|
||||
- libx11-common-conda-x86_64 # [linux and x86_64]
|
||||
- libx11-conda-x86_64 # [linux and x86_64]
|
||||
- libxau-conda-x86_64 # [linux and x86_64]
|
||||
- libxcb-conda-x86_64 # [linux and x86_64]
|
||||
- libxdamage-conda-x86_64 # [linux and x86_64]
|
||||
- libxext-conda-x86_64 # [linux and x86_64]
|
||||
- libxfixes-conda-x86_64 # [linux and x86_64]
|
||||
- libxi-conda-x86_64 # [linux and x86_64]
|
||||
- libxi-devel-conda-x86_64 # [linux and x86_64]
|
||||
- libxxf86vm-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-dri-drivers-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-devel-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-devel-conda-x86_64 # [linux and x86_64]
|
||||
- pixman-conda-x86_64 # [linux and x86_64]
|
||||
- sysroot_linux-64 # [linux and x86_64]
|
||||
- xorg-x11-server-common-conda-x86_64 # [linux and x86_64]
|
||||
- xorg-x11-server-xvfb-conda-x86_64 # [linux and x86_64]
|
||||
- kernel-headers_linux-aarch64 # [linux and aarch64]
|
||||
- libdrm-conda-aarch64 # [linux and aarch64]
|
||||
- libglvnd-conda-aarch64 # [linux and aarch64]
|
||||
- libglvnd-glx-conda-aarch64 # [linux and aarch64]
|
||||
- libselinux-conda-aarch64 # [linux and aarch64]
|
||||
- libsepol-conda-aarch64 # [linux and aarch64]
|
||||
- libx11-common-conda-aarch64 # [linux and aarch64]
|
||||
- libx11-conda-aarch64 # [linux and aarch64]
|
||||
- libxau-conda-aarch64 # [linux and aarch64]
|
||||
- libxcb-conda-aarch64 # [linux and aarch64]
|
||||
- libxdamage-conda-aarch64 # [linux and aarch64]
|
||||
- libxext-conda-aarch64 # [linux and aarch64]
|
||||
- libxfixes-conda-aarch64 # [linux and aarch64]
|
||||
- libxi-conda-aarch64 # [linux and aarch64]
|
||||
- libxi-devel-conda-aarch64 # [linux and aarch64]
|
||||
- libxxf86vm-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-dri-drivers-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-khr-devel-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-devel-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libgbm-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-devel-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libglapi-conda-aarch64 # [linux and aarch64]
|
||||
- pixman-conda-aarch64 # [linux and aarch64]
|
||||
- sysroot_linux-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-common-conda-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-xvfb-conda-aarch64 # [linux and aarch64]
|
||||
- sed # [unix]
|
||||
- ccache
|
||||
- cmake
|
||||
- coin3d
|
||||
- compilers
|
||||
- gcc==13.3.* # [linux]
|
||||
- gxx==13.3.* # [linux]
|
||||
- clang==18.1.* # [osx]
|
||||
- clangxx==18.1.* # [osx]
|
||||
- conda
|
||||
- conda-devenv
|
||||
- debugpy
|
||||
- doxygen
|
||||
- eigen
|
||||
- fmt
|
||||
- freetype
|
||||
- git
|
||||
- gmsh
|
||||
- graphviz
|
||||
- hdf5
|
||||
- libboost-devel
|
||||
- libcxx
|
||||
- mamba
|
||||
- matplotlib
|
||||
- ninja
|
||||
- numpy
|
||||
- occt
|
||||
- openssl
|
||||
- pcl
|
||||
- pip
|
||||
- pivy
|
||||
- pkg-config
|
||||
- ply
|
||||
- pre-commit
|
||||
- pybind11
|
||||
- pyside2
|
||||
- python==3.11.*
|
||||
- pyyaml
|
||||
- qt-main
|
||||
- smesh
|
||||
- swig
|
||||
- vtk==9.2.6
|
||||
- xerces-c
|
||||
- yaml-cpp
|
||||
- zlib
|
||||
- zstd
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# create the conda environment as a subdirectory
|
||||
mamba env create -p .conda/freecad -f conda/conda-env.yaml
|
||||
|
||||
# add the environment subdirectory to the conda configuration
|
||||
conda config --add envs_dirs $CONDA_PREFIX/envs
|
||||
conda config --add envs_dirs $(pwd)/.conda
|
||||
conda config --set env_prompt "({name})"
|
||||
|
||||
# install the FreeCAD dependencies into the environment
|
||||
mamba run --live-stream -n freecad mamba-devenv --no-prune -f conda/environment-qt6.devenv.yml
|
||||
@@ -0,0 +1,10 @@
|
||||
:: create the conda environment as a subdirectory
|
||||
call mamba env create -p .conda/freecad -f conda/conda-env.yaml
|
||||
|
||||
:: add the environment subdirectory to the conda configuration
|
||||
call conda config --add envs_dirs %CONDA_PREFIX%/envs
|
||||
call conda config --add envs_dirs %CD%/.conda
|
||||
call conda config --set env_prompt "({name})"
|
||||
|
||||
:: install the FreeCAD dependencies into the environment
|
||||
call mamba run --live-stream -n freecad mamba-devenv --no-prune -f conda/environment.devenv.yml
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# create the conda environment as a subdirectory
|
||||
mamba env create -p .conda/freecad -f conda/conda-env.yaml
|
||||
|
||||
# add the environment subdirectory to the conda configuration
|
||||
conda config --add envs_dirs $CONDA_PREFIX/envs
|
||||
conda config --add envs_dirs $(pwd)/.conda
|
||||
conda config --set env_prompt "({name})"
|
||||
|
||||
# install the FreeCAD dependencies into the environment
|
||||
mamba run --live-stream -n freecad mamba-devenv --no-prune -f conda/environment.devenv.yml
|
||||
Vendored
+7
-47
@@ -16,30 +16,10 @@
|
||||
],
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Load QT pretty-printers for GDB",
|
||||
"text": "python import sys; sys.path.append('${workspaceFolder}/contrib/debugger'); from qt_pretty_printers_gdb import register_qt_printers; register_qt_printers()",
|
||||
"ignoreFailures": false
|
||||
},
|
||||
{
|
||||
"description": "Enable pretty-printing for GDB",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"preRunCommands": [
|
||||
"command script import ${workspaceFolder}/contrib/debugger/qt_pretty_printers_lldb.py"
|
||||
]
|
||||
"MIMode": "lldb"
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
@@ -67,30 +47,10 @@
|
||||
],
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Load QT pretty-printers for GDB",
|
||||
"text": "python import sys; sys.path.append('${workspaceFolder}/contrib/debugger'); from qt_pretty_printers_gdb import register_qt_printers; register_qt_printers()",
|
||||
"ignoreFailures": false
|
||||
},
|
||||
{
|
||||
"description": "Enable pretty-printing for GDB",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"preRunCommands": [
|
||||
"command script import ${workspaceFolder}/contrib/debugger/qt_pretty_printers_lldb.py"
|
||||
]
|
||||
"MIMode": "lldb"
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
@@ -100,13 +60,13 @@
|
||||
},
|
||||
{
|
||||
"name": "Python debugger",
|
||||
"type": "debugpy",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"preLaunchTask": "WaitForDebugpy",
|
||||
"redirectOutput": true,
|
||||
"connect": {
|
||||
"host": "localhost",
|
||||
"port": 5679
|
||||
"port": 5678
|
||||
},
|
||||
"pathMappings": [
|
||||
{
|
||||
@@ -131,4 +91,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
+1
-5
@@ -7,11 +7,7 @@ from freecad.utils import get_python_exe
|
||||
# By default it attempts to use Freecad's PID mistaking it for python.
|
||||
# https://github.com/microsoft/debugpy/issues/262
|
||||
debugpy.configure(python=get_python_exe())
|
||||
# As of Python 3.12, debugpy runs a forwarding process that listens both on the port specified here for the debugger
|
||||
# to connect to, but also on an internal port for the underlying pydevd within the python process to connect to. The
|
||||
# default for that internal port is 5678, so we need to not duplicate it for the external port. Also, on Linux the
|
||||
# attempt to spawn the forwarding process separately fails, so we force it to be internal to our main process.
|
||||
debugpy.listen(('localhost', 5679),in_process_debug_adapter=True)
|
||||
debugpy.listen(('localhost', 5678))
|
||||
|
||||
# Turns out you cannot probe debugpy to see if it is up:
|
||||
# https://github.com/microsoft/debugpy/issues/974
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ def check_socket(host, port):
|
||||
return sock.connect_ex((host, port)) == 0
|
||||
|
||||
def main():
|
||||
# DO NOT CHECK the actual port 5678/5879 or debugpy will break
|
||||
# Check that the other port 39999 used as a flag is manually opened instead
|
||||
# DO NOT CHECK 5678 or debugpy will break
|
||||
# Check other port manually opened instead
|
||||
attempt_counter = 0
|
||||
while (not check_socket('localhost', 39999)) and attempt_counter < MAX_ATTEMPTS:
|
||||
time.sleep(RETRY_DELAY_S)
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import pydevd
|
||||
from multiprocessing.connection import Listener
|
||||
|
||||
print("CLion debugger macro running. Starting listener to get port")
|
||||
listen = Listener(('localhost', 39998), backlog=1)
|
||||
link = listen.accept()
|
||||
port = link.recv()
|
||||
link.close()
|
||||
listen.close()
|
||||
print("Port", port, "received, starting debugger. Check CLion to see if a breakpoint has been hit and continue")
|
||||
pydevd.settrace(port=port)
|
||||
print("Debugger operating, leaving macro.")
|
||||
@@ -1,18 +0,0 @@
|
||||
--- attach_pydevd.py.orig 2024-09-26 10:36:47.131066345 -0400
|
||||
+++ attach_pydevd.py 2024-09-26 10:16:48.687714133 -0400
|
||||
@@ -48,6 +48,15 @@
|
||||
import add_code_to_python_process
|
||||
show_debug_info_on_target_process = 0
|
||||
|
||||
+ print("attach_pydevd is trying to relay the port",setup['port'])
|
||||
+ try:
|
||||
+ from multiprocessing.connection import Client
|
||||
+ link = Client(('localhost',39998))
|
||||
+ link.send(setup['port'])
|
||||
+ link.close()
|
||||
+ except ConnectionError as ce:
|
||||
+ pass
|
||||
+
|
||||
pydevd_dirname = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
if sys.platform == 'win32':
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Change to the directory of this script (any subdirectory in the repository should work)
|
||||
cd "$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" &> /dev/null && pwd -P)"
|
||||
|
||||
# Activate pixi default environment
|
||||
eval "$(pixi shell-hook)"
|
||||
@@ -1,10 +0,0 @@
|
||||
@echo off
|
||||
REM Change to the directory of this script (any subdirectory in the repository should work)
|
||||
cd /d "%~dp0"
|
||||
|
||||
REM Activate pixi default environment
|
||||
REM Write the output of pixi shell-hook to a temporary batch file and execute it
|
||||
set TEMP_BATCH_FILE=%TEMP%\pixi_shell_hook_freecad.bat
|
||||
pixi shell-hook > "%TEMP_BATCH_FILE%"
|
||||
call "%TEMP_BATCH_FILE%"
|
||||
del "%TEMP_BATCH_FILE%"
|
||||
@@ -1,124 +0,0 @@
|
||||
# pylint: disable=line-too-long
|
||||
"""
|
||||
QT Pretty Printer for GDB
|
||||
|
||||
Currently supports displaying the following QT types in the debugger
|
||||
* QString
|
||||
|
||||
|
||||
Can be used from GDB via:
|
||||
|
||||
(gdb) python
|
||||
>import sys
|
||||
>sys.path.insert(0, '{Your FreeCAD source dir}/contrib/debugger')
|
||||
>from qt_pretty_printers_gdb import register_qt_printers
|
||||
>register_qt_printers()
|
||||
>end
|
||||
QT pretty-printer script loaded.
|
||||
QT pretty-printer registered.
|
||||
(gdb) run
|
||||
*breakpoint*
|
||||
(gdb) p testString
|
||||
$1 = This is a QString in the debugger!
|
||||
(gdb)
|
||||
|
||||
|
||||
|
||||
Can be used in VSCode via launch.json
|
||||
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/bin/FreeCAD",
|
||||
"args": [],
|
||||
"stopAtEntry": true,
|
||||
"cwd": "${workspaceFolder}/build",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Load QT pretty-printers for GDB",
|
||||
"text": "python import sys; sys.path.append('${workspaceFolder}/contrib/debugger'); from qt_pretty_printers_gdb import register_qt_printers; register_qt_printers()",
|
||||
"ignoreFailures": false
|
||||
},
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Note: There may be variances between different operating systems and/or build configurations
|
||||
in how QString data is stored internally. This was tested on debian12/amd64. @BootsSiR
|
||||
"""
|
||||
# pylint: enable=line-too-long
|
||||
|
||||
import gdb
|
||||
|
||||
class QStringPrinter:
|
||||
"""Pretty-printer class for QString objects in GDB."""
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
"""Pretty-printer function for QString objects in LLDB."""
|
||||
try:
|
||||
d = self.val["d"]
|
||||
if d == 0:
|
||||
return 'null'
|
||||
|
||||
offset = int(d["offset"])
|
||||
data_ptr = d.cast(gdb.lookup_type("char").pointer()) + offset
|
||||
char16_t_ptr = data_ptr.cast(gdb.lookup_type("char16_t").pointer())
|
||||
|
||||
string_data = []
|
||||
i = 0
|
||||
while char16_t_ptr[i] != 0:
|
||||
string_data.append(chr(char16_t_ptr[i]))
|
||||
i += 1
|
||||
|
||||
return "".join(string_data)
|
||||
except gdb.error as e:
|
||||
if "Cannot access memory at address" in str(e):
|
||||
return "<uninitialized>"
|
||||
return f"<error: {str(e)}>"
|
||||
except Exception as e: # pylint: disable=broad-except
|
||||
return f"<unexpected error: {str(e)}>"
|
||||
|
||||
|
||||
def lookup_function(val):
|
||||
"""Maps a type to the appropriate pretty printer"""
|
||||
try:
|
||||
qstring_type = gdb.lookup_type("QString")
|
||||
if val.type.strip_typedefs() == qstring_type:
|
||||
return QStringPrinter(val)
|
||||
return None
|
||||
except gdb.error:
|
||||
return None
|
||||
|
||||
|
||||
def register_qt_printers(objfile=None):
|
||||
"""Register the QString pretty-printer with GDB."""
|
||||
if objfile is None:
|
||||
objfile = gdb.current_objfile()
|
||||
|
||||
# Check if the printer is already registered
|
||||
if not any(printer == lookup_function for printer in gdb.pretty_printers): # pylint: disable=comparison-with-callable
|
||||
print("QT pretty-printer script loaded.")
|
||||
gdb.pretty_printers.append(lookup_function)
|
||||
print("QT pretty-printer registered.")
|
||||
@@ -1,107 +0,0 @@
|
||||
# pylint: disable=line-too-long
|
||||
"""
|
||||
QT Pretty Printer for LLDB
|
||||
|
||||
Currently supports displaying the following QT types in the debugger
|
||||
* QString
|
||||
|
||||
|
||||
Can be used from LLDB via:
|
||||
|
||||
(lldb) command script import {Your FreeCAD source dir}/contrib/debugger/qt_pretty_printers_lldb.py
|
||||
|
||||
(lldb) frame variable test
|
||||
(QString) test = "This is a test string."
|
||||
(lldb)
|
||||
|
||||
|
||||
Can be used in VSCode via launch.json (tested with CodeLLDB extension)
|
||||
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug LLDB",
|
||||
"stopOnEntry": false,
|
||||
"program": "${workspaceFolder}/build/bin/FreeCAD",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/build/",
|
||||
"preLaunchTask": "CMake: build",
|
||||
"preRunCommands": [
|
||||
"command script import ${workspaceFolder}/contrib/debugger/qt_pretty_printers_lldb.py"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Note: There may be variances between different operating systems and/or build configurations
|
||||
in how QString data is stored internally. This was tested on debian12/amd64 and
|
||||
macOS/arm64. @BootsSiR
|
||||
"""
|
||||
# pylint: enable=line-too-long
|
||||
|
||||
import lldb
|
||||
|
||||
def QStringPrinter(val, _internal_dict):
|
||||
"""Pretty-printer for QString objects in LLDB."""
|
||||
try:
|
||||
# Access the 'd' member of QString
|
||||
d = val.GetChildMemberWithName("d")
|
||||
if not d.IsValid():
|
||||
return 'null'
|
||||
|
||||
# some machines have a different QString object layout (macOS? arm64?) so
|
||||
# first we must check if a ptr member exists
|
||||
ptr_field = d.GetChildMemberWithName("ptr")
|
||||
|
||||
# if the ptr member exists, we will use that as the base address for our text data.
|
||||
if ptr_field.IsValid():
|
||||
# use the ptr value
|
||||
data_base_address = ptr_field.GetValueAsUnsigned()
|
||||
else:
|
||||
# we don't have a ptr member, so let's use an offset from the address of the
|
||||
# QString::Data as our base address
|
||||
d_address = d.GetValueAsUnsigned()
|
||||
|
||||
# Assume the string data starts immediately after the first 24 bytes
|
||||
data_base_address = d_address + 24
|
||||
|
||||
# if at this point, we don't have a valid data base address
|
||||
# we cannot proceed
|
||||
if data_base_address == 0:
|
||||
return "null"
|
||||
|
||||
# Initialize variables for memory reading
|
||||
process = val.GetTarget().GetProcess()
|
||||
error = lldb.SBError()
|
||||
chunk_size = 256 # Size of each memory chunk to read
|
||||
string_data = []
|
||||
offset = 0
|
||||
|
||||
# Read memory in chunks until null-terminator is found
|
||||
while True:
|
||||
raw_data = process.ReadMemory(data_base_address + offset, chunk_size, error)
|
||||
if not error.Success():
|
||||
return f"<error: unable to read memory: {error.GetCString()}>"
|
||||
|
||||
# Parse UTF-16 data from the chunk
|
||||
for i in range(0, len(raw_data), 2): # char16_t is 2 bytes
|
||||
char16_val = int.from_bytes(raw_data[i:i+2], byteorder='little')
|
||||
if char16_val == 0: # Null-terminator found
|
||||
return f'"{ "".join(string_data) }"'
|
||||
string_data.append(chr(char16_val))
|
||||
|
||||
# Increase the offset for the next chunk
|
||||
offset += chunk_size
|
||||
|
||||
except Exception as e: # pylint: disable=broad-except
|
||||
return f"<error: {str(e)}>"
|
||||
|
||||
def __lldb_init_module(debugger, _internal_dict):
|
||||
"""Register the QString pretty-printer with LLDB."""
|
||||
print("QT pretty-printer script loaded.")
|
||||
debugger.HandleCommand('type summary add QString -F qt_pretty_printers_lldb.QStringPrinter')
|
||||
print("QT pretty-printer registered.")
|
||||
Binary file not shown.
@@ -7,7 +7,6 @@ SET(Examples_Files
|
||||
BIMExample.FCStd
|
||||
FEMExample.FCStd
|
||||
AssemblyExample.FCStd
|
||||
ArchDetail.FCStd
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(Example_data ALL
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Cube
|
||||
v -5. -5. -5.
|
||||
v 5. -5. -5.
|
||||
v 5. -5. 5.
|
||||
v -5. -5. 5.
|
||||
v -5. 5. -5.
|
||||
v 5. 5. 5.
|
||||
v 5. 5. -5.
|
||||
v -5. 5. 5.
|
||||
vt 0.645815 0.980689
|
||||
vt 0.549235 0.9999
|
||||
vt 0.5 0.5
|
||||
vt 0.450764 0.9999
|
||||
vt 0.354185 0.980689
|
||||
vt 0.263209 0.943006
|
||||
vt 0.181332 0.888298
|
||||
vt 0.111702 0.818668
|
||||
f 1/1 2/2 3/3
|
||||
f 1/1 3/3 4/4
|
||||
f 5/5 6/6 7/7
|
||||
f 5/5 8/8 6/6
|
||||
f 1/1 8/8 5/5
|
||||
f 1/1 4/4 8/8
|
||||
f 2/2 7/7 6/6
|
||||
f 2/2 6/6 3/3
|
||||
f 1/1 5/5 7/7
|
||||
f 1/1 7/7 2/2
|
||||
f 4/4 6/6 8/8
|
||||
f 4/4 3/3 6/6
|
||||
+15
-12
@@ -10,17 +10,18 @@
|
||||
%global plugins AssemblyApp AssemblyGui CAMSimulator DraftUtils Fem FreeCAD Import Inspection MatGui Materials Measure Mesh MeshPart Part PartDesignGui Path PathApp PathSimulator Points QtUnitGui ReverseEngineering Robot Sketcher Spreadsheet Start Surface TechDraw Web _PartDesign area flatmesh libDriver libDriverDAT libDriverSTL libDriverUNV libE57Format libMEFISTO2 libOndselSolver libSMDS libSMESH libSMESHDS libStdMeshers libarea-native
|
||||
|
||||
# Some configuration options for other environments
|
||||
# rpmbuild --with=bundled_zipios: use bundled version of zipios++
|
||||
%global bundled_zipios %{?_with_bundled_zipios: 1} %{?!_with_bundled_zipios: 1}
|
||||
# rpmbuild --with=bundled_pycxx: use bundled version of pycxx
|
||||
%global bundled_pycxx %{?_with_bundled_pycxx: 1} %{?!_with_bundled_pycxx: 0}
|
||||
# rpmbuild --with=pcl_enabled: build with pcl support
|
||||
%global pcl_enabled %{?_with_pcl_enabled: 1} %{?!_with_pcl_enabled: 0}
|
||||
# rpmbuild --without=bundled_pycxx: use bundled version of pycxx
|
||||
%global bundled_pycxx %{?_without_bundled_pycxx: 0} %{?!_without_bundled_pycxx: 1}
|
||||
# rpmbuild --without=bundled_zipios: use bundled version of zipios++
|
||||
%global bundled_zipios %{?_without_bundled_zipios: 0} %{?!_without_bundled_zipios: 1}
|
||||
# rpmbuild --without=bundled_smesh: don't use bundled version of Salome's Mesh
|
||||
%global bundled_smesh %{?_without_bundled_smesh: 0} %{?!_without_bundled_smesh: 1}
|
||||
|
||||
# Prevent RPM from doing its magical 'build' directory for now
|
||||
%global __cmake_in_source_build 0
|
||||
|
||||
|
||||
# See FreeCAD-main/src/3rdParty/salomesmesh/CMakeLists.txt to find this out.
|
||||
%global bundled_smesh_version 7.7.1.0
|
||||
|
||||
@@ -32,8 +33,8 @@
|
||||
|
||||
Name: %{name}
|
||||
Epoch: 1
|
||||
Version: 1.1.0
|
||||
Release: pre_{{{git_commit_no}}}%{?dist}
|
||||
Version: 1.0.2
|
||||
Release: {{{git_commit_no}}}%{?dist}
|
||||
Summary: A general purpose 3D CAD modeler
|
||||
Group: Applications/Engineering
|
||||
|
||||
@@ -43,8 +44,6 @@ Source0: {{{ git_repo_pack }}}
|
||||
#add all submodule as source
|
||||
Source1: {{{ git_pack path=$GIT_ROOT/src/3rdParty/OndselSolver/ dir_name="OndselSolver" }}}
|
||||
Source2: {{{ git_pack path=$GIT_ROOT/src/3rdParty/GSL/ dir_name="GSL" }}}
|
||||
Source3: {{{ git_pack path=$GIT_ROOT/src/Mod/AddonManager/ dir_name="AddonManager" }}}
|
||||
|
||||
|
||||
# Utilities
|
||||
BuildRequires: cmake gcc-c++ gettext
|
||||
@@ -98,7 +97,9 @@ BuildRequires: openmpi-devel
|
||||
BuildRequires: med-devel
|
||||
BuildRequires: libkdtree++-devel
|
||||
|
||||
%if %{pcl_enabled}
|
||||
BuildRequires: pcl-devel
|
||||
%endif
|
||||
BuildRequires: python3
|
||||
BuildRequires: libglvnd-devel
|
||||
BuildRequires: yaml-cpp-devel
|
||||
@@ -171,11 +172,9 @@ rm -rf %{github_name}
|
||||
# extract submodule archive and move in correct path
|
||||
%setup -T -a 1 -c -q -D -n %{github_name}/src/3rdParty/ #OndselSolver
|
||||
%setup -T -a 2 -c -q -D -n %{github_name}/src/3rdParty/ #GSL
|
||||
%setup -T -a 3 -c -q -D -n %{github_name}/src/Mod/ #AddonManager
|
||||
|
||||
%setup -T -b 0 -q -D -n %{github_name}
|
||||
|
||||
|
||||
# Remove bundled pycxx if we're not using it
|
||||
%if ! %{bundled_pycxx}
|
||||
rm -rf src/CXX
|
||||
@@ -206,7 +205,6 @@ LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS
|
||||
-DRESOURCEDIR=%{_datadir}/%{name} \
|
||||
-DFREECAD_USE_EXTERNAL_PIVY=TRUE \
|
||||
-DFREECAD_USE_EXTERNAL_FMT=TRUE \
|
||||
-DFREECAD_USE_PCL:BOOL=OFF \
|
||||
-DFREECAD_QT_VERSION:STRING=6 \
|
||||
-DSHIBOKEN_INCLUDE_DIR=%{_includedir}/shiboken6 \
|
||||
-DSHIBOKEN_LIBRARY=-lshiboken6.%{py_suffix} \
|
||||
@@ -219,6 +217,11 @@ LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS
|
||||
-DCOIN3D_INCLUDE_DIR=%{_includedir}/Coin4 \
|
||||
-DCOIN3D_DOC_PATH=%{_datadir}/Coin4/Coin \
|
||||
-DUSE_OCC=TRUE \
|
||||
%if %{pcl_enabled}
|
||||
-DFREECAD_USE_PCL:BOOL=ON \
|
||||
%else
|
||||
-DFREECAD_USE_PCL:BOOL=OFF \
|
||||
%endif
|
||||
%if ! %{bundled_smesh}
|
||||
-DFREECAD_USE_EXTERNAL_SMESH=TRUE \
|
||||
-DSMESH_FOUND=TRUE \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user