Compare commits
880 Commits
kcl-0.2.18
...
jtran/sequ
Author | SHA1 | Date | |
---|---|---|---|
fb5314d2ad | |||
6cce3cda36 | |||
5d25f4a0e5 | |||
79d37d360a | |||
69553fded7 | |||
200a9af61f | |||
2696ddb996 | |||
4e1b0daacb | |||
8aa46099a8 | |||
00ff6371ed | |||
b947dad6e9 | |||
c13bdbb749 | |||
e500fad0e1 | |||
bcac4d3798 | |||
63897bd60e | |||
d429e868ac | |||
faa51ddc18 | |||
c28eb360c0 | |||
69cac17543 | |||
50c7356b6a | |||
37715d9fa8 | |||
e8af61e11f | |||
de85c31e71 | |||
725c56ea6f | |||
1b958ee29f | |||
4b0f67e604 | |||
8ba1a5cd4d | |||
df278c7e6a | |||
6e57a80c13 | |||
efe6565857 | |||
fa0a34585b | |||
dec74f633b | |||
dfcea282ec | |||
191dcf8bb0 | |||
cb1bbe4660 | |||
ff66cb1deb | |||
ab46349d63 | |||
cffad78bf7 | |||
bfb81877d3 | |||
c56398db83 | |||
36e0d35968 | |||
62bf7d8715 | |||
a4db302174 | |||
66f3500ca9 | |||
c3bdc6f106 | |||
0a2bf4b55f | |||
bbae9b6363 | |||
180d52280d | |||
dce1dca7c7 | |||
343f6572a2 | |||
c8e58d49e0 | |||
c18546fb2f | |||
466c23a9d8 | |||
8403025c77 | |||
9ce591a1a1 | |||
f238f3882b | |||
a91208eb1c | |||
b92b0a9afe | |||
964347f43a | |||
3811c88b5c | |||
69a1473197 | |||
1f1e996cfa | |||
58167deda7 | |||
83d22a4f5f | |||
7003b19a70 | |||
687ef1429d | |||
b1b00a9a22 | |||
a0924bcfa3 | |||
5ce22e2de8 | |||
850c5c62d1 | |||
b31786c9ab | |||
936549d60f | |||
0babbcff49 | |||
02c2e80b31 | |||
da236d9a3e | |||
1104d908c0 | |||
2efea3ec06 | |||
775007ef0d | |||
f490e7d6fe | |||
89bc93e4cd | |||
12edb6375d | |||
8d9bba02d6 | |||
56e100fad7 | |||
38f7a4089e | |||
91f5465e2d | |||
58a9c60d0b | |||
725c4d95f8 | |||
615b7feabb | |||
5743b9ced0 | |||
8896d06028 | |||
1f217ef50b | |||
5ef5c6280c | |||
aac95e1e2e | |||
18f4a1303c | |||
ded97eda61 | |||
f6b06520ee | |||
dcfcdc98ce | |||
9ab3325580 | |||
cb5ad3ab27 | |||
1e539cc134 | |||
4297dc43ae | |||
935b4ee7f5 | |||
2523242bb1 | |||
309e4fadf0 | |||
842054de09 | |||
af146284b6 | |||
5ac40e6849 | |||
d3e0625e8a | |||
484da28374 | |||
fa9e6ccea9 | |||
77fbb68419 | |||
253a7910b0 | |||
88c6be810f | |||
2860926571 | |||
fb81c02877 | |||
d78648f0f8 | |||
fe31769be5 | |||
388371b05d | |||
9db69007e5 | |||
f2a6492ab7 | |||
3ddce116e5 | |||
57f7d022ca | |||
cbc12559c7 | |||
b3cd5ef3ba | |||
a094995730 | |||
46b4b01d23 | |||
4d1eaf9381 | |||
df3668adc8 | |||
270781d5cd | |||
96b93f8d51 | |||
59b1c414f0 | |||
fd07b8cff5 | |||
21efb2c0bd | |||
30029a63a1 | |||
9f5003cafc | |||
5232e1d40a | |||
23c25c2b50 | |||
50273c0edc | |||
8a03bf50e3 | |||
7500ef0065 | |||
099c48cd63 | |||
f35cd3ef26 | |||
695c432d1e | |||
2835665a6a | |||
45707d2974 | |||
b2e1d21d45 | |||
b98f5605b6 | |||
c050e03df1 | |||
b6fa4325f0 | |||
0804aecc63 | |||
3dfc2c86e1 | |||
71647ede29 | |||
cd679f4be3 | |||
18d87b99bd | |||
70a2202877 | |||
f5c9f84ae9 | |||
71f701dec7 | |||
bffbed1d42 | |||
9f60ed8e75 | |||
57b366b2d0 | |||
6f3f5dbda9 | |||
8dd25715fb | |||
834f7133d8 | |||
8c5662e458 | |||
f37fc357af | |||
e27e9ecc63 | |||
78b42ea191 | |||
5d02a27122 | |||
49d52ce94b | |||
a572d7b0db | |||
1f405b9327 | |||
0874891dd0 | |||
59d0e079a1 | |||
b9862baed0 | |||
592c5259c6 | |||
950f5cebfd | |||
4c0ea136e0 | |||
81c0035adc | |||
c68e5d7774 | |||
ed8a0e4aaa | |||
322f398049 | |||
bc4d254297 | |||
10b7a772bf | |||
86ba586318 | |||
cc313afb89 | |||
d0c8311e41 | |||
28311d160a | |||
162856064b | |||
652f82e8c3 | |||
d4d9bf6c7f | |||
0e9d37c0a0 | |||
9c18060d73 | |||
e2be66b024 | |||
1bb372b642 | |||
627fbda671 | |||
74bdb72edc | |||
a9182bf357 | |||
5f14023404 | |||
9a3ac64603 | |||
67e60cb832 | |||
110037df79 | |||
30b1dae38a | |||
f20fc5b467 | |||
1bfc3a0a3c | |||
f6e975db84 | |||
b82eec85fd | |||
5dc4213295 | |||
61807e7629 | |||
357bbffce5 | |||
6ac9c49773 | |||
020497cde2 | |||
688852a5df | |||
6c635bd70d | |||
1c0a38a1e2 | |||
019cb815f9 | |||
c8653beae7 | |||
9ea3cb51ba | |||
e0de0493ab | |||
11cac0c30e | |||
4de50edf5a | |||
bebace193d | |||
f4d5578faf | |||
fed922cfb8 | |||
2b7325655b | |||
d3b02b8c5b | |||
9008fb636f | |||
eb4048cd16 | |||
c30b161e95 | |||
0e68d03612 | |||
95fd14eedc | |||
3c367426c6 | |||
a277cce636 | |||
df86c93a04 | |||
8aabac0be7 | |||
138728a95d | |||
9a92e7d642 | |||
efedc8de58 | |||
f7ee248a26 | |||
336f4f27ba | |||
e1f128d64a | |||
f858a611f1 | |||
6ce270c0d0 | |||
30ac0e4f48 | |||
8f90c352fe | |||
bc6f0fceca | |||
5c830a4ed4 | |||
8a9d50226f | |||
8397405998 | |||
f5b8298735 | |||
25ad603502 | |||
86349375d0 | |||
56d861f2cc | |||
3e8ee3ffc4 | |||
a44516bc7e | |||
ce62fe67cf | |||
763a1b6628 | |||
3281e62e6b | |||
f1a458f124 | |||
229433126d | |||
b962b5fcb3 | |||
428d125139 | |||
cffeb52b4b | |||
e0ef10e7bb | |||
7095ce2377 | |||
5b207d7d1a | |||
2fac213c58 | |||
2f72a8ef14 | |||
27ce9f8aa4 | |||
b0426e3f94 | |||
d707c66e53 | |||
f8f44743fa | |||
f262eda12a | |||
9e1136195a | |||
4ff07ddaee | |||
1e565379a7 | |||
76e34ac4da | |||
4cd427bf91 | |||
f321ecdff0 | |||
d114ab798c | |||
69fec37107 | |||
8ca8c49cc3 | |||
b25fc302fd | |||
648b37c1dd | |||
18e5da5ca4 | |||
46524cda10 | |||
4585671a5d | |||
e7203b9e7a | |||
ab375f4b92 | |||
04ed6f52ee | |||
2332338ca1 | |||
41b97de3d1 | |||
8ef31a0be1 | |||
3adb42b5f2 | |||
20016b101e | |||
8d9dbf36c3 | |||
440704ed9f | |||
2261217a5d | |||
10da986649 | |||
10789d9c3c | |||
67cc4f5835 | |||
2692f2b73a | |||
965cb18059 | |||
a022b8ef6c | |||
4d24bf7c94 | |||
9a537da183 | |||
df81b76b8b | |||
ac3f7ab712 | |||
dac91d3b79 | |||
0698432abf | |||
0592d3b5da | |||
31e4d60045 | |||
c0817b00e4 | |||
4ea1d16fb6 | |||
d049bf33e8 | |||
7b11047d07 | |||
412e9568f2 | |||
9be208e5e1 | |||
842ef5ede9 | |||
3f855d7bad | |||
0a1a6e50cf | |||
d4e955289c | |||
c147a219f4 | |||
38513a1e25 | |||
c0c5c790ca | |||
8b60f75220 | |||
f91ad4331f | |||
59103a2118 | |||
9737c2550a | |||
bf9d01a8dd | |||
702e322f90 | |||
e82830754d | |||
7806377a5a | |||
859afa2fd8 | |||
0a5f3093fc | |||
b65f7939f6 | |||
c35dea5e07 | |||
fc66d4745f | |||
b313d26c2a | |||
00b94ead62 | |||
0531ea1ce9 | |||
5f9a4887c1 | |||
da7dfa16d8 | |||
363ae10658 | |||
ac4a6c84cf | |||
c6fad2e2dc | |||
013cb10961 | |||
6261083cb1 | |||
2b0ba37ed0 | |||
96174f3cf6 | |||
aed62ff912 | |||
9334d64608 | |||
4fa7d2d8c8 | |||
3e615dfdbc | |||
c9860af29f | |||
23a42f0195 | |||
a77fa639f3 | |||
0a5ad7c95b | |||
4a654523d2 | |||
73a7e2bfd6 | |||
eb0850fea9 | |||
029f76f273 | |||
28b5f7080c | |||
5b1dcfecd6 | |||
f89d191425 | |||
2f4e4b62a8 | |||
5ebd5c8dbb | |||
a9ceaf2678 | |||
c8afd3399b | |||
5dda4828c6 | |||
72acab752c | |||
81df38ad1c | |||
0576a2bef1 | |||
4b2f6b4647 | |||
69edaa4183 | |||
2eb7c382bf | |||
38913ecb98 | |||
debd06129f | |||
d38bd342a0 | |||
f026f10335 | |||
895d7ebc6d | |||
65edf17a44 | |||
0c2a0a8c07 | |||
97cef4d16c | |||
9358278f7b | |||
a174e084d4 | |||
df7246897a | |||
0c9f64dd7c | |||
d2b9d3a058 | |||
7e54f08778 | |||
d9c2dd376e | |||
275a2150e7 | |||
8b8feb8d68 | |||
e21ef3f122 | |||
66834931aa | |||
06c1bcaf2e | |||
fc7df7ecbe | |||
67cb7b33bb | |||
ea74b94fac | |||
529833c63f | |||
92da86391a | |||
e7cb390db4 | |||
8a66bbbdbd | |||
3c53babb50 | |||
474acb1c68 | |||
1c941112d7 | |||
6f1d718097 | |||
36957237c0 | |||
da9cae98aa | |||
9ae025dc56 | |||
579ab23d78 | |||
4bef33e745 | |||
ac7bd28c5a | |||
d478d81156 | |||
3d27f0191b | |||
30c2acd18a | |||
a83b4b2145 | |||
70b8541038 | |||
bb51646738 | |||
c02e31a530 | |||
1d06cc7845 | |||
e0c07eecfe | |||
c5d42500fa | |||
e6e47f77f0 | |||
662c2485ac | |||
9f891deebb | |||
d08a07a1f8 | |||
872b196a86 | |||
d535a2862d | |||
63a3bc7bc6 | |||
02055a8b31 | |||
93891422f7 | |||
7193b4110a | |||
76e7d80a55 | |||
b816df21d2 | |||
3630696848 | |||
f165d19fda | |||
3dd98ae1d5 | |||
a46e0a0fe7 | |||
8f9dc06228 | |||
fa22c14723 | |||
1d39983b08 | |||
da301ba862 | |||
efe8089b08 | |||
49de3b0ac9 | |||
2b2ed470c1 | |||
96652a0c48 | |||
04e586d07b | |||
fe5f574a77 | |||
e787495ad0 | |||
8bb9be7a5e | |||
00892464e8 | |||
05ed2a3367 | |||
10cc5bce59 | |||
a32f150fc1 | |||
ac60082e67 | |||
d44dc1b21a | |||
813962ea4c | |||
738443a6ab | |||
4b6bbbe2c5 | |||
6ff8addc8b | |||
da05c38b9e | |||
191b9b71fd | |||
05163fdded | |||
7ed26e21c6 | |||
c668d40efc | |||
f38c6b90b7 | |||
7bc8bae0ec | |||
3804aca27e | |||
b127680f2f | |||
b7de8e60cf | |||
058fccb5e1 | |||
00e97257ae | |||
aeb656d176 | |||
ac49ebd6e0 | |||
b40f03ad25 | |||
a8ad86e645 | |||
87f50cd5e9 | |||
0400e6228e | |||
26f150fd6c | |||
3049f405f5 | |||
53d40301dc | |||
671c01e36f | |||
e80151979b | |||
668e2afb99 | |||
548c664db0 | |||
d3a3f4410c | |||
22eb343171 | |||
f2cfa4d5cf | |||
3f1f40eeba | |||
ff2d161606 | |||
210c78029d | |||
e27840219b | |||
c943a3f192 | |||
6aa588f09f | |||
59a6333aad | |||
403f1507ae | |||
eac7b83504 | |||
667500d1b9 | |||
b15aac9f48 | |||
54153aa646 | |||
943cf21d34 | |||
5a6728c45a | |||
ff2103d493 | |||
2dfa8f2176 | |||
29ed330326 | |||
ca2cc825a6 | |||
83fe1b7ce0 | |||
157b76cc78 | |||
cf957d880e | |||
dfc3d19677 | |||
dd370a9365 | |||
2274d6459c | |||
32ce857119 | |||
88b51da417 | |||
30d365aeb3 | |||
7af62399ac | |||
441d957228 | |||
9e57034873 | |||
eb96d6539c | |||
513c76ecc8 | |||
51d9449280 | |||
6366bc4766 | |||
7a21918223 | |||
8072f1db63 | |||
18e1855fa9 | |||
7be53c7d4a | |||
2bf20988ef | |||
1495cc6d18 | |||
f876e6ca3c | |||
60a0c811ab | |||
cab0c1e6a1 | |||
417d720b22 | |||
77293952c0 | |||
ea3d604b73 | |||
023a659491 | |||
dd3a2b14f9 | |||
424b409cc1 | |||
82a58e69c2 | |||
776b420031 | |||
1087d4223b | |||
089d6df889 | |||
efb067af58 | |||
2aa27eab01 | |||
9c47ac5b57 | |||
5ae1aecd74 | |||
68ae7e98f9 | |||
56771d561a | |||
f09411817c | |||
bed7ae3b8b | |||
c43510732c | |||
51f0b669a4 | |||
3cbedcd3e7 | |||
5d2fa43150 | |||
ec49b0752e | |||
3b171fb881 | |||
0548409da0 | |||
dd052b35fd | |||
46be4e7eef | |||
412d1b7a99 | |||
cfdd22af74 | |||
68a11e7aa5 | |||
3139e18dc7 | |||
d461b09a4d | |||
9c42c39ba9 | |||
aa3f40e22c | |||
4423ae16dc | |||
1d45bed649 | |||
64aac7bccc | |||
002edeaf19 | |||
5424252dac | |||
30bc85add8 | |||
39a2bd685b | |||
23a3e330f6 | |||
99dd8b87dc | |||
5ff1d9e268 | |||
ce1a37e0bc | |||
ac605c2434 | |||
f6ecdfcb02 | |||
28815eb2f1 | |||
166fa71f7e | |||
00c45114ba | |||
6cfefd8611 | |||
4fe17fe3ab | |||
66f6b741c4 | |||
f760a77b14 | |||
7b36a5d1ee | |||
b415349af6 | |||
6f169ab297 | |||
2529066f38 | |||
79dc537900 | |||
77bae6983d | |||
56ef859bb3 | |||
455fb49fb6 | |||
676ac201bb | |||
0092922565 | |||
d6b26ff718 | |||
fcb0a6d9ca | |||
59e0df7879 | |||
c17cb1067f | |||
6fb493f209 | |||
30afa65ccf | |||
a2f9e70d18 | |||
986675fe89 | |||
d8ce5ad8bd | |||
1a9926be8a | |||
54b5774f9e | |||
66bbbf81e2 | |||
652519aeae | |||
f826afb32d | |||
f71fafdece | |||
16b7544d69 | |||
34f019305b | |||
79e06b3a00 | |||
24bc4fcd8c | |||
97b9529c81 | |||
8e5fc02941 | |||
909690f3c7 | |||
14ba66378d | |||
b2e895e508 | |||
05f4f34269 | |||
fbb7b08b62 | |||
16c7a2457a | |||
c429bc6ed7 | |||
a0493cb332 | |||
b798f7da03 | |||
c5d051855f | |||
0b24216dc5 | |||
2d3841bf61 | |||
51a71a180e | |||
1ec25dfe96 | |||
8de29dd461 | |||
b11040c23c | |||
2bc4f076cb | |||
9e1cf90c81 | |||
062fae1e54 | |||
d7660e221c | |||
938e27adac | |||
17b9af2416 | |||
64f0f5b773 | |||
f452f9bf00 | |||
97705234c6 | |||
30dfc167d3 | |||
d8105627c0 | |||
6b7fac3642 | |||
35805916aa | |||
4a4400e979 | |||
efd1f288b9 | |||
0337ab9cff | |||
f0dda692f6 | |||
2ce0c59d08 | |||
393b43d485 | |||
4fbcde8773 | |||
12d444fa69 | |||
683b4488af | |||
e1c1e07046 | |||
984420c155 | |||
7bad60dfa3 | |||
aaca88220c | |||
360384e8c8 | |||
ab2ad1313f | |||
897205acc2 | |||
862ca1124e | |||
d9981d9d7b | |||
8df0581831 | |||
54e6358df1 | |||
daf20a978d | |||
8e64798dda | |||
a1ceb4fa47 | |||
2db8d13051 | |||
aceb8052e2 | |||
62fae1e93b | |||
2abfbb9788 | |||
ad1cd56891 | |||
26951364cf | |||
26e995dc3f | |||
a8b816a3e2 | |||
43bec115c0 | |||
0c6c646fe7 | |||
0d52851da2 | |||
6b105897f7 | |||
9ff51de301 | |||
c161f578fd | |||
4804eedf3e | |||
99db31a6a4 | |||
90b57ec202 | |||
3f86f99f5e | |||
83e2b093a6 | |||
58f7e0086d | |||
c147b3bfa2 | |||
7103ded32a | |||
81279aa4e8 | |||
550c8ae165 | |||
05610bb0f3 | |||
4a62862ca0 | |||
a4783d4951 | |||
30cfac06b8 | |||
c5509dabb1 | |||
239ab6850e | |||
4a7dd6e650 | |||
af2609e678 | |||
30909dedda | |||
39d76ed54f | |||
4925251c29 | |||
9772869545 | |||
a7e830cd02 | |||
ca102116b6 | |||
c2fba89e77 | |||
7e31678ba2 | |||
1140ced121 | |||
32b7ddaa7c | |||
2525f99515 | |||
4b8ce34b31 | |||
6617f72373 | |||
e9033e1754 | |||
9b697e30cf | |||
a70facdab4 | |||
4083f9f3dd | |||
7ead2bb875 | |||
19d01c563e | |||
dfe7cfc91c | |||
01443e445d | |||
e16eb49f51 | |||
5d5138e8e6 | |||
e1d6e29523 | |||
49657ad2e5 | |||
b40d353994 | |||
62ffa53add | |||
64dce4d8b1 | |||
02588b2672 | |||
3d1ac2ac0b | |||
ff5ce29fd7 | |||
4bd7e02271 | |||
26042790b6 | |||
af74f3bb05 | |||
0bdedf5854 | |||
d2c6b5cf3a | |||
c42967d0e7 | |||
cb8fc33adb | |||
2dc8b429ff | |||
19ffa220e8 | |||
5332ddd88e | |||
11d9a2ee00 | |||
bfebc41a5c | |||
824b4c823e | |||
785002fa4e | |||
f650281855 | |||
9f6999829a | |||
a14bbaa237 | |||
0706624381 | |||
ef0ae5e06e | |||
a010743abb | |||
057ee479c3 | |||
7218efc489 | |||
b6dd6e7dd0 | |||
47af18f533 | |||
0505220dac | |||
f7711b71d6 | |||
0255fde5fe | |||
ebade29ed0 | |||
582d37e51b | |||
4ef9429842 | |||
0577b6a984 | |||
7d44de0c12 | |||
f7d5313588 | |||
bd4783e885 | |||
8794696b26 | |||
1c2e415c70 | |||
248ef8ebb3 | |||
fbac9935fe | |||
b4c171a347 | |||
0811d9fa4e | |||
1efc2b9762 | |||
d361bda180 | |||
1d3ade114f | |||
3382b66075 | |||
5e8b5c254d | |||
b99b2d9a96 | |||
81041661c7 | |||
9d99b5be7f | |||
85a39109f8 | |||
23c2aa948a | |||
1fd4aa9ede | |||
e8a9fb7f55 | |||
cc4345b7c3 | |||
6035e834c2 | |||
b1ccc6df0f | |||
9563bd322c | |||
1e35c03dc8 | |||
7caa0aff7b | |||
accbc1fc3b | |||
05b21f100c | |||
0fb5ff7f10 | |||
e525b319d0 | |||
01c6774c54 | |||
b745cec079 | |||
90af99abf4 | |||
3c5bf70269 | |||
24cd1b2ea5 | |||
7de0b74c16 | |||
e5c20debfe | |||
2de3ad7457 | |||
9038dc4104 | |||
1491e80153 | |||
bdf45f92aa | |||
d104ca2b05 | |||
ec8cacb788 | |||
4e0dd12f5a | |||
bcf2572739 | |||
074c285e04 | |||
d7bc92afd9 | |||
11dfd87240 | |||
bf3815086a | |||
115e6baa53 | |||
e1406012b4 | |||
46d335f916 | |||
c84c0b0fef | |||
c0afbff377 | |||
88510e30b2 | |||
f9a07627d8 | |||
3ad3c56b2c | |||
30e417dffd | |||
631513443d | |||
e7aebeac12 | |||
0c478680cb | |||
a24789c236 | |||
3035ad16fc | |||
74faf0461c | |||
47e472e984 | |||
cd91774881 | |||
88cd27425e | |||
a284a270b7 | |||
e2f5ad47a2 | |||
2a3693651a | |||
9ca49c6366 | |||
2a2e4a8b63 | |||
258bce8adc | |||
a3c0a2b03b | |||
2ed2e9cf86 | |||
438d1ec746 | |||
5112b48324 | |||
8cb17a8936 | |||
125207f60c | |||
6dfadbea18 | |||
0d48dff151 | |||
f74b436e3d | |||
bb3f9e0377 | |||
02be831c67 | |||
2e72f235dd | |||
3949b6acf4 | |||
168f4fc545 | |||
85541c76f5 | |||
7ed29e2ce4 | |||
2a35dd2398 | |||
790af3842c | |||
37bb696a30 | |||
e50de134b1 | |||
9a437ca973 | |||
30bcf21912 | |||
9ceb247fcd | |||
6303130e08 | |||
47b1c1654a | |||
e53bb07843 | |||
9d0f06b58f | |||
20777a60aa | |||
71c5451e3a | |||
fd21850e48 | |||
294040b618 | |||
ca95427f21 | |||
27c6f75a49 | |||
579151a9bb | |||
90f0f13d26 | |||
1a23d96f7e | |||
6595fca000 | |||
8b0b5a0215 | |||
2263958fd0 | |||
66e60f2ddb | |||
5f51a0f569 | |||
aee1d66e56 | |||
1d1bb8cee0 | |||
c7dd89e720 |
@ -1,3 +1,3 @@
|
|||||||
[codespell]
|
[codespell]
|
||||||
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,absolutey,atleast,ue,afterall
|
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall,ser
|
||||||
skip: **/target,node_modules,build,**/Cargo.lock,./docs/kcl/*.md,.yarn.lock,**/yarn.lock
|
skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/kcl/*.md,.yarn.lock,**/yarn.lock,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,./public/kcl-samples,./rust/kcl-lib/tests/kcl_samples,tsconfig.tsbuildinfo
|
||||||
|
@ -2,8 +2,8 @@ NODE_ENV=development
|
|||||||
DEV=true
|
DEV=true
|
||||||
VITE_KC_API_WS_MODELING_URL=wss://api.dev.zoo.dev/ws/modeling/commands
|
VITE_KC_API_WS_MODELING_URL=wss://api.dev.zoo.dev/ws/modeling/commands
|
||||||
VITE_KC_API_BASE_URL=https://api.dev.zoo.dev
|
VITE_KC_API_BASE_URL=https://api.dev.zoo.dev
|
||||||
BASE_URL=https://api.dev.zoo.dev
|
|
||||||
VITE_KC_SITE_BASE_URL=https://dev.zoo.dev
|
VITE_KC_SITE_BASE_URL=https://dev.zoo.dev
|
||||||
|
VITE_KC_SITE_APP_URL=https://app.dev.zoo.dev
|
||||||
VITE_KC_SKIP_AUTH=false
|
VITE_KC_SKIP_AUTH=false
|
||||||
VITE_KC_CONNECTION_TIMEOUT_MS=5000
|
VITE_KC_CONNECTION_TIMEOUT_MS=5000
|
||||||
# ONLY add your token in .env.development.local if you want to skip auth, otherwise this token takes precedence!
|
# ONLY add your token in .env.development.local if you want to skip auth, otherwise this token takes precedence!
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
NODE_ENV=production
|
||||||
VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands
|
VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands
|
||||||
VITE_KC_API_BASE_URL=https://api.zoo.dev
|
VITE_KC_API_BASE_URL=https://api.zoo.dev
|
||||||
VITE_KC_SITE_BASE_URL=https://zoo.dev
|
VITE_KC_SITE_BASE_URL=https://zoo.dev
|
||||||
|
VITE_KC_SITE_APP_URL=https://app.zoo.dev
|
||||||
VITE_KC_SKIP_AUTH=false
|
VITE_KC_SKIP_AUTH=false
|
||||||
VITE_KC_CONNECTION_TIMEOUT_MS=15000
|
VITE_KC_CONNECTION_TIMEOUT_MS=15000
|
||||||
|
@ -1,2 +1,6 @@
|
|||||||
src/wasm-lib/*
|
rust/**/*.ts
|
||||||
|
!rust/kcl-language-server/client/src/**/*.ts
|
||||||
*.typegen.ts
|
*.typegen.ts
|
||||||
|
packages/codemirror-lsp-client/dist/*
|
||||||
|
e2e/playwright/snapshots/prompt-to-edit/*
|
||||||
|
.vscode-test
|
||||||
|
36
.eslintrc
36
.eslintrc
@ -4,17 +4,41 @@
|
|||||||
"project": "./tsconfig.json"
|
"project": "./tsconfig.json"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
"react-perf",
|
||||||
"css-modules",
|
"css-modules",
|
||||||
|
"jest",
|
||||||
|
"jsx-a11y",
|
||||||
|
"react",
|
||||||
|
"react-hooks",
|
||||||
"suggest-no-throw",
|
"suggest-no-throw",
|
||||||
|
"testing-library",
|
||||||
|
"@typescript-eslint"
|
||||||
],
|
],
|
||||||
"extends": [
|
"extends": [
|
||||||
"react-app",
|
"plugin:css-modules/recommended",
|
||||||
"react-app/jest",
|
"plugin:jsx-a11y/recommended",
|
||||||
"plugin:css-modules/recommended"
|
"plugin:react-hooks/recommended"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/no-floating-promises": "error",
|
"@typescript-eslint/no-floating-promises": "error",
|
||||||
"@typescript-eslint/no-misused-promises": "error",
|
"@typescript-eslint/no-misused-promises": "error",
|
||||||
|
"jsx-a11y/click-events-have-key-events": "off",
|
||||||
|
"jsx-a11y/no-autofocus": "off",
|
||||||
|
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||||
|
"no-restricted-globals": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"name": "isNaN",
|
||||||
|
"message": "Use Number.isNaN() instead."
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"no-restricted-syntax": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"selector": "CallExpression[callee.object.name='Array'][callee.property.name='isArray']",
|
||||||
|
"message": "Use isArray() in lib/utils.ts instead of Array.isArray()."
|
||||||
|
}
|
||||||
|
],
|
||||||
"semi": [
|
"semi": [
|
||||||
"error",
|
"error",
|
||||||
"never"
|
"never"
|
||||||
@ -25,6 +49,9 @@
|
|||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["e2e/**/*.ts"], // Update the pattern based on your file structure
|
"files": ["e2e/**/*.ts"], // Update the pattern based on your file structure
|
||||||
|
"extends": [
|
||||||
|
"plugin:testing-library/react"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"suggest-no-throw/suggest-no-throw": "off",
|
"suggest-no-throw/suggest-no-throw": "off",
|
||||||
"testing-library/prefer-screen-queries": "off",
|
"testing-library/prefer-screen-queries": "off",
|
||||||
@ -33,6 +60,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["src/**/*.test.ts"],
|
"files": ["src/**/*.test.ts"],
|
||||||
|
"extends": [
|
||||||
|
"plugin:testing-library/react"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"suggest-no-throw/suggest-no-throw": "off",
|
"suggest-no-throw/suggest-no-throw": "off",
|
||||||
}
|
}
|
||||||
|
13
.gitattributes
vendored
Normal file
13
.gitattributes
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Set default behavior to automatically normalize line endings.
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
|
||||||
|
# in Windows via a file share from Linux, the scripts will work.
|
||||||
|
*.{cmd,[cC][mM][dD]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
*.{bat,[bB][aA][tT]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
*.{ics,[iI][cC][sS]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
*.{ps1,[iP][sS][1]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
|
||||||
|
# Force bash scripts to always use LF line endings so that if a repo is accessed
|
||||||
|
# in Unix via a file share from Windows, the scripts will work.
|
||||||
|
*.sh text eol=lfol=lf
|
8
.github/actions/github-release/Dockerfile
vendored
Normal file
8
.github/actions/github-release/Dockerfile
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM node:slim
|
||||||
|
|
||||||
|
COPY . /action
|
||||||
|
WORKDIR /action
|
||||||
|
|
||||||
|
RUN npm install --production
|
||||||
|
|
||||||
|
ENTRYPOINT ["node", "/action/main.js"]
|
21
.github/actions/github-release/README.md
vendored
Normal file
21
.github/actions/github-release/README.md
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# github-release
|
||||||
|
|
||||||
|
Copy-pasted from
|
||||||
|
https://github.com/bytecodealliance/wasmtime/tree/8acfdbdd8aa550d1b84e0ce1e6222a6605d14e38/.github/actions/github-release
|
||||||
|
|
||||||
|
An action used to publish GitHub releases for `wasmtime`.
|
||||||
|
|
||||||
|
As of the time of this writing there's a few actions floating around which
|
||||||
|
perform github releases but they all tend to have their set of drawbacks.
|
||||||
|
Additionally nothing handles deleting releases which we need for our rolling
|
||||||
|
`dev` release.
|
||||||
|
|
||||||
|
To handle all this, this action rolls its own implementation using the
|
||||||
|
actions/toolkit repository and packages published there. These run in a Docker
|
||||||
|
container and take various inputs to orchestrate the release from the build.
|
||||||
|
|
||||||
|
More comments can be found in `main.js`.
|
||||||
|
|
||||||
|
Testing this is really hard. If you want to try though run `npm install` and
|
||||||
|
then `node main.js`. You'll have to configure a bunch of env vars though to get
|
||||||
|
anything reasonably working.
|
15
.github/actions/github-release/action.yml
vendored
Normal file
15
.github/actions/github-release/action.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name: "wasmtime github releases"
|
||||||
|
description: "wasmtime github releases"
|
||||||
|
inputs:
|
||||||
|
token:
|
||||||
|
description: ""
|
||||||
|
required: true
|
||||||
|
name:
|
||||||
|
description: ""
|
||||||
|
required: true
|
||||||
|
files:
|
||||||
|
description: ""
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: "docker"
|
||||||
|
image: "Dockerfile"
|
143
.github/actions/github-release/main.js
vendored
Normal file
143
.github/actions/github-release/main.js
vendored
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
const core = require("@actions/core");
|
||||||
|
const path = require("path");
|
||||||
|
const fs = require("fs");
|
||||||
|
const github = require("@actions/github");
|
||||||
|
const glob = require("glob");
|
||||||
|
|
||||||
|
function sleep(milliseconds) {
|
||||||
|
return new Promise((resolve) => setTimeout(resolve, milliseconds));
|
||||||
|
}
|
||||||
|
|
||||||
|
async function runOnce() {
|
||||||
|
// Load all our inputs and env vars. Note that `getInput` reads from `INPUT_*`
|
||||||
|
const files = core.getInput("files");
|
||||||
|
const name = core.getInput("name");
|
||||||
|
const token = core.getInput("token");
|
||||||
|
const slug = process.env.GITHUB_REPOSITORY;
|
||||||
|
const owner = slug.split("/")[0];
|
||||||
|
const repo = slug.split("/")[1];
|
||||||
|
const sha = process.env.HEAD_SHA;
|
||||||
|
|
||||||
|
core.info(`files: ${files}`);
|
||||||
|
core.info(`name: ${name}`);
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
request: {
|
||||||
|
timeout: 30000,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const octokit = github.getOctokit(token, options);
|
||||||
|
|
||||||
|
// Delete the previous release since we can't overwrite one. This may happen
|
||||||
|
// due to retrying an upload or it may happen because we're doing the dev
|
||||||
|
// release.
|
||||||
|
const releases = await octokit.paginate("GET /repos/:owner/:repo/releases", { owner, repo });
|
||||||
|
for (const release of releases) {
|
||||||
|
if (release.tag_name !== name) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const release_id = release.id;
|
||||||
|
core.info(`deleting release ${release_id}`);
|
||||||
|
await octokit.rest.repos.deleteRelease({ owner, repo, release_id });
|
||||||
|
}
|
||||||
|
|
||||||
|
// We also need to update the `dev` tag while we're at it on the `dev` branch.
|
||||||
|
if (name == "nightly") {
|
||||||
|
try {
|
||||||
|
core.info(`updating nightly tag`);
|
||||||
|
await octokit.rest.git.updateRef({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
ref: "tags/nightly",
|
||||||
|
sha,
|
||||||
|
force: true,
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
core.error(e);
|
||||||
|
core.info(`creating nightly tag`);
|
||||||
|
await octokit.rest.git.createTag({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
tag: "nightly",
|
||||||
|
message: "nightly release",
|
||||||
|
object: sha,
|
||||||
|
type: "commit",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates an official GitHub release for this `tag`, and if this is `dev`
|
||||||
|
// then we know that from the previous block this should be a fresh release.
|
||||||
|
core.info(`creating a release`);
|
||||||
|
const release = await octokit.rest.repos.createRelease({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
name,
|
||||||
|
tag_name: name,
|
||||||
|
target_commitish: sha,
|
||||||
|
prerelease: name === "nightly",
|
||||||
|
});
|
||||||
|
const release_id = release.data.id;
|
||||||
|
|
||||||
|
// Upload all the relevant assets for this release as just general blobs.
|
||||||
|
for (const file of glob.sync(files)) {
|
||||||
|
const size = fs.statSync(file).size;
|
||||||
|
const name = path.basename(file);
|
||||||
|
|
||||||
|
await runWithRetry(async function () {
|
||||||
|
// We can't overwrite assets, so remove existing ones from a previous try.
|
||||||
|
let assets = await octokit.rest.repos.listReleaseAssets({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
release_id,
|
||||||
|
});
|
||||||
|
for (const asset of assets.data) {
|
||||||
|
if (asset.name === name) {
|
||||||
|
core.info(`delete asset ${name}`);
|
||||||
|
const asset_id = asset.id;
|
||||||
|
await octokit.rest.repos.deleteReleaseAsset({ owner, repo, asset_id });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
core.info(`upload ${file}`);
|
||||||
|
const headers = { "content-length": size, "content-type": "application/octet-stream" };
|
||||||
|
const data = fs.createReadStream(file);
|
||||||
|
await octokit.rest.repos.uploadReleaseAsset({
|
||||||
|
data,
|
||||||
|
headers,
|
||||||
|
name,
|
||||||
|
url: release.data.upload_url,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function runWithRetry(f) {
|
||||||
|
const retries = 10;
|
||||||
|
const maxDelay = 4000;
|
||||||
|
let delay = 1000;
|
||||||
|
|
||||||
|
for (let i = 0; i < retries; i++) {
|
||||||
|
try {
|
||||||
|
await f();
|
||||||
|
break;
|
||||||
|
} catch (e) {
|
||||||
|
if (i === retries - 1) throw e;
|
||||||
|
|
||||||
|
core.error(e);
|
||||||
|
const currentDelay = Math.round(Math.random() * delay);
|
||||||
|
core.info(`sleeping ${currentDelay} ms`);
|
||||||
|
await sleep(currentDelay);
|
||||||
|
delay = Math.min(delay * 2, maxDelay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
await runWithRetry(runOnce);
|
||||||
|
}
|
||||||
|
|
||||||
|
run().catch((err) => {
|
||||||
|
core.error(err);
|
||||||
|
core.setFailed(err.message);
|
||||||
|
});
|
10
.github/actions/github-release/package.json
vendored
Normal file
10
.github/actions/github-release/package.json
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "wasmtime-github-release",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"main": "main.js",
|
||||||
|
"dependencies": {
|
||||||
|
"@actions/core": "^1.6",
|
||||||
|
"@actions/github": "^5.0",
|
||||||
|
"glob": "^7.1.5"
|
||||||
|
}
|
||||||
|
}
|
65
.github/ci-cd-scripts/playwright-electron.sh
vendored
Executable file
65
.github/ci-cd-scripts/playwright-electron.sh
vendored
Executable file
@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# bash strict mode
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [[ ! -f "test-results/.last-run.json" ]]; then
|
||||||
|
# if no last run artifact, than run plawright normally
|
||||||
|
echo "run playwright normally"
|
||||||
|
if [[ "$3" == *ubuntu* ]]; then
|
||||||
|
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:playwright:electron:ubuntu -- --shard=$1/$2 || true
|
||||||
|
elif [[ "$3" == *windows* ]]; then
|
||||||
|
yarn test:playwright:electron:windows -- --shard=$1/$2 || true
|
||||||
|
elif [[ "$3" == *macos* ]]; then
|
||||||
|
yarn test:playwright:electron:macos -- --shard=$1/$2 || true
|
||||||
|
else
|
||||||
|
echo "Do not run playwright. Unable to detect os runtime."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# # send to axiom
|
||||||
|
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
retry=1
|
||||||
|
max_retrys=1
|
||||||
|
|
||||||
|
# retry failed tests, doing our own retries because using inbuilt playwright retries causes connection issues
|
||||||
|
while [[ $retry -le $max_retrys ]]; do
|
||||||
|
if [[ -f "test-results/.last-run.json" ]]; then
|
||||||
|
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
||||||
|
if [[ $failed_tests -gt 0 ]]; then
|
||||||
|
echo "retried=true" >>$GITHUB_OUTPUT
|
||||||
|
echo "run playwright with last failed tests and retry $retry"
|
||||||
|
if [[ "$3" == *ubuntu* ]]; then
|
||||||
|
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:playwright:electron:ubuntu -- --last-failed || true
|
||||||
|
elif [[ "$3" == *windows* ]]; then
|
||||||
|
yarn test:playwright:electron:windows -- --last-failed || true
|
||||||
|
elif [[ "$3" == *macos* ]]; then
|
||||||
|
yarn test:playwright:electron:macos -- --last-failed || true
|
||||||
|
else
|
||||||
|
echo "Do not run playwright. Unable to detect os runtime."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# send to axiom
|
||||||
|
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
||||||
|
retry=$((retry + 1))
|
||||||
|
else
|
||||||
|
echo "retried=false" >>$GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "retried=false" >>$GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "retried=false" >>$GITHUB_OUTPUT
|
||||||
|
|
||||||
|
if [[ -f "test-results/.last-run.json" ]]; then
|
||||||
|
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
||||||
|
if [[ $failed_tests -gt 0 ]]; then
|
||||||
|
# if it still fails after 3 retrys, then fail the job
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
exit 0
|
66
.github/dependabot.yml
vendored
66
.github/dependabot.yml
vendored
@ -5,24 +5,48 @@
|
|||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: 'npm' # See documentation for possible values
|
- package-ecosystem: 'npm' # See documentation for possible values
|
||||||
directory: '/' # Location of package manifests
|
directories:
|
||||||
schedule:
|
- '/'
|
||||||
interval: 'daily'
|
- '/packages/codemirror-lang-kcl/'
|
||||||
reviewers:
|
- '/packages/codemirror-lsp-client/'
|
||||||
- franknoirot
|
- '/rust/kcl-language-server/'
|
||||||
- irev-dev
|
schedule:
|
||||||
- package-ecosystem: 'github-actions' # See documentation for possible values
|
interval: weekly
|
||||||
directory: '/' # Location of package manifests
|
day: monday
|
||||||
schedule:
|
reviewers:
|
||||||
interval: 'daily'
|
- franknoirot
|
||||||
reviewers:
|
- irev-dev
|
||||||
- adamchalmers
|
- package-ecosystem: 'github-actions' # See documentation for possible values
|
||||||
- jessfraz
|
directory: '/' # Location of package manifests
|
||||||
- package-ecosystem: 'cargo' # See documentation for possible values
|
schedule:
|
||||||
directory: '/src/wasm-lib/' # Location of package manifests
|
interval: weekly
|
||||||
schedule:
|
day: monday
|
||||||
interval: 'daily'
|
reviewers:
|
||||||
reviewers:
|
- adamchalmers
|
||||||
- adamchalmers
|
- jessfraz
|
||||||
- jessfraz
|
- package-ecosystem: 'cargo' # See documentation for possible values
|
||||||
|
directory: '/rust/' # Location of package manifests
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
reviewers:
|
||||||
|
- adamchalmers
|
||||||
|
- jessfraz
|
||||||
|
groups:
|
||||||
|
serde-dependencies:
|
||||||
|
patterns:
|
||||||
|
- "serde*"
|
||||||
|
wasm-bindgen-deps:
|
||||||
|
patterns:
|
||||||
|
- "wasm-bindgen*"
|
||||||
|
- package-ecosystem: "pip"
|
||||||
|
directories:
|
||||||
|
- "/public/kcl-samples/"
|
||||||
|
- "/rust/kcl-python-bindings/"
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
day: monday
|
||||||
|
reviewers:
|
||||||
|
- adamchalmers
|
||||||
|
- jessfraz
|
||||||
|
9
.github/workflows/build-and-store-wasm.yml
vendored
9
.github/workflows/build-and-store-wasm.yml
vendored
@ -21,13 +21,16 @@ jobs:
|
|||||||
- name: Cache wasm
|
- name: Cache wasm
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: './src/wasm-lib'
|
workspaces: './rust'
|
||||||
|
- uses: taiki-e/install-action@955a6ff1416eae278c9f833008a9beb4b7f9afe3
|
||||||
|
with:
|
||||||
|
tool: wasm-pack
|
||||||
- name: build wasm
|
- name: build wasm
|
||||||
run: yarn build:wasm
|
run: yarn build:wasm
|
||||||
|
|
||||||
|
|
||||||
# Upload the WASM bundle as an artifact
|
# Upload the WASM bundle as an artifact
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: wasm-bundle
|
name: wasm-bundle
|
||||||
path: src/wasm-lib/pkg
|
path: rust/kcl-wasm-lib/pkg
|
||||||
|
419
.github/workflows/build-apps.yml
vendored
Normal file
419
.github/workflows/build-apps.yml
vendored
Normal file
@ -0,0 +1,419 @@
|
|||||||
|
name: build-apps
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
- 'nightly-v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IS_RELEASE: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
|
||||||
|
IS_NIGHTLY: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'nightly-v') }}
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prepare-files:
|
||||||
|
runs-on: ubuntu-22.04 # seperate job on Ubuntu for easy string manipulations (compared to Windows)
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.export_version.outputs.version }}
|
||||||
|
notes: ${{ steps.export_notes.outputs.notes }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
|
||||||
|
- run: yarn install
|
||||||
|
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: './rust'
|
||||||
|
|
||||||
|
# TODO: see if we can fetch from main instead if no diff at rust
|
||||||
|
- uses: taiki-e/install-action@955a6ff1416eae278c9f833008a9beb4b7f9afe3
|
||||||
|
with:
|
||||||
|
tool: wasm-pack
|
||||||
|
|
||||||
|
- name: Run build:wasm
|
||||||
|
run: "yarn build:wasm"
|
||||||
|
|
||||||
|
- name: Set nightly version, product name, release notes, and icons
|
||||||
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
|
run: |
|
||||||
|
export VERSION=${GITHUB_REF_NAME#nightly-v}
|
||||||
|
yarn files:set-version
|
||||||
|
yarn files:flip-to-nightly
|
||||||
|
|
||||||
|
- name: Set release version
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' }}
|
||||||
|
run: |
|
||||||
|
export VERSION=${GITHUB_REF_NAME#v}
|
||||||
|
yarn files:set-version
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: prepared-files
|
||||||
|
path: |
|
||||||
|
package.json
|
||||||
|
electron-builder.yml
|
||||||
|
rust/kcl-wasm-lib/pkg/kcl_wasm_lib*
|
||||||
|
release-notes.md
|
||||||
|
assets/icon.ico
|
||||||
|
assets/icon.png
|
||||||
|
|
||||||
|
- id: export_version
|
||||||
|
run: echo "version=`cat package.json | jq -r '.version'`" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- id: export_notes
|
||||||
|
run: echo "notes=`cat release-notes.md`" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Prepare electron-builder.yml file for updater test
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' }}
|
||||||
|
run: |
|
||||||
|
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/updater-test"' electron-builder.yml
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' }}
|
||||||
|
with:
|
||||||
|
name: prepared-files-updater-test
|
||||||
|
path: |
|
||||||
|
electron-builder.yml
|
||||||
|
|
||||||
|
|
||||||
|
build-apps:
|
||||||
|
needs: [prepare-files]
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: macos-14
|
||||||
|
platform: mac
|
||||||
|
- os: windows-2022
|
||||||
|
platform: win
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
platform: linux
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
name: prepared-files
|
||||||
|
|
||||||
|
- name: Copy prepared files
|
||||||
|
run: |
|
||||||
|
ls -R prepared-files
|
||||||
|
cp prepared-files/package.json package.json
|
||||||
|
cp prepared-files/electron-builder.yml electron-builder.yml
|
||||||
|
cp prepared-files/rust/kcl-wasm-lib/pkg/kcl_wasm_lib_bg.wasm public
|
||||||
|
mkdir rust/kcl-wasm-lib/pkg
|
||||||
|
cp prepared-files/rust/kcl-wasm-lib/pkg/kcl_wasm_lib* rust/kcl-wasm-lib/pkg
|
||||||
|
cp prepared-files/release-notes.md release-notes.md
|
||||||
|
cp prepared-files/assets/icon.ico assets/icon.ico
|
||||||
|
cp prepared-files/assets/icon.png assets/icon.png
|
||||||
|
|
||||||
|
- name: Sync node version and setup cache
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn' # Set this to npm, yarn or pnpm.
|
||||||
|
|
||||||
|
- name: yarn install
|
||||||
|
# Windows is picky sometimes and fails on fetch. Step takes about ~30s
|
||||||
|
uses: nick-fields/retry@v3.0.2
|
||||||
|
with:
|
||||||
|
shell: bash
|
||||||
|
timeout_minutes: 2
|
||||||
|
max_attempts: 3
|
||||||
|
command: yarn install
|
||||||
|
|
||||||
|
- name: Prepare certificate and variables (Windows only)
|
||||||
|
if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }}
|
||||||
|
run: |
|
||||||
|
echo "${{secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
|
||||||
|
cat /d/Certificate_pkcs12.p12
|
||||||
|
echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
|
||||||
|
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
|
||||||
|
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
|
||||||
|
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
|
||||||
|
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
|
||||||
|
echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH
|
||||||
|
echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH
|
||||||
|
echo "C:\Program Files\DigiCert\DigiCert One Signing Manager Tools" >> $GITHUB_PATH
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Setup certicate with SSM KSP (Windows only)
|
||||||
|
if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }}
|
||||||
|
run: |
|
||||||
|
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi
|
||||||
|
msiexec /i smtools-windows-x64.msi /quiet /qn
|
||||||
|
smksp_registrar.exe list
|
||||||
|
smctl.exe keypair ls
|
||||||
|
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
|
||||||
|
smksp_cert_sync.exe
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: Build the app (debug)
|
||||||
|
if: ${{ env.IS_RELEASE == 'false' && env.IS_NIGHTLY == 'false' }}
|
||||||
|
# electron-builder doesn't have a concept of release vs debug,
|
||||||
|
# this is just not doing any codesign or release yml generation, and points to dev infra
|
||||||
|
run: yarn tronb:package:dev
|
||||||
|
|
||||||
|
- name: Build the app (release)
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }}
|
||||||
|
env:
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
|
CSC_LINK: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
CSC_KEYCHAIN: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||||
|
WINDOWS_CERTIFICATE_THUMBPRINT: ${{ secrets.WINDOWS_CERTIFICATE_THUMBPRINT }}
|
||||||
|
DEBUG: "electron-notarize*"
|
||||||
|
# TODO: Fix electron-notarize flakes. The logs above should help gather more data on failures
|
||||||
|
uses: nick-fields/retry@v3.0.2
|
||||||
|
with:
|
||||||
|
shell: bash
|
||||||
|
timeout_minutes: 10
|
||||||
|
max_attempts: 3
|
||||||
|
command: yarn tronb:package:prod
|
||||||
|
|
||||||
|
- name: List artifacts in out/
|
||||||
|
run: ls -R out
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-arm64-${{ matrix.platform }}
|
||||||
|
# first two will pick both Zoo Modeling App-$VERSION-arm64-win.exe and Zoo Modeling App-$VERSION-win.exe
|
||||||
|
path: |
|
||||||
|
out/*-${{ env.VERSION_NO_V }}-win.*
|
||||||
|
out/*-${{ env.VERSION_NO_V }}-arm64-win.*
|
||||||
|
out/*-arm64-mac.*
|
||||||
|
out/*-arm64-linux.*
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-x64-${{ matrix.platform }}
|
||||||
|
path: |
|
||||||
|
out/*-x64-win.*
|
||||||
|
out/*-x64-mac.*
|
||||||
|
out/*-x86_64-linux.*
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }}
|
||||||
|
with:
|
||||||
|
name: out-yml-${{ matrix.platform }}
|
||||||
|
path: |
|
||||||
|
out/latest*.yml
|
||||||
|
|
||||||
|
# TODO: add the 'Build for Mac TestFlight (nightly)' stage back
|
||||||
|
|
||||||
|
# The steps below are for updater-test builds, only on release
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' }}
|
||||||
|
name: prepared-files-updater-test
|
||||||
|
|
||||||
|
- name: Copy updated electron-builder.yml file for updater test
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' }}
|
||||||
|
run: |
|
||||||
|
ls -R prepared-files-updater-test
|
||||||
|
cp prepared-files-updater-test/electron-builder.yml electron-builder.yml
|
||||||
|
|
||||||
|
- name: Build the app (updater-test)
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' }}
|
||||||
|
env:
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
|
CSC_LINK: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
CSC_KEYCHAIN: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||||
|
WINDOWS_CERTIFICATE_THUMBPRINT: ${{ secrets.WINDOWS_CERTIFICATE_THUMBPRINT }}
|
||||||
|
DEBUG: "electron-notarize*"
|
||||||
|
# TODO: Fix electron-notarize flakes. The logs above should help gather more data on failures
|
||||||
|
uses: nick-fields/retry@v3.0.2
|
||||||
|
with:
|
||||||
|
shell: bash
|
||||||
|
timeout_minutes: 10
|
||||||
|
max_attempts: 3
|
||||||
|
command: yarn tronb:package:prod
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' }}
|
||||||
|
with:
|
||||||
|
name: updater-test-arm64-${{ matrix.platform }}
|
||||||
|
path: |
|
||||||
|
out/*-arm64-win.exe
|
||||||
|
out/*-arm64-mac.dmg
|
||||||
|
out/*-arm64-linux.AppImage
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ env.IS_RELEASE == 'true' }}
|
||||||
|
with:
|
||||||
|
name: updater-test-x64-${{ matrix.platform }}
|
||||||
|
path: |
|
||||||
|
out/*-x64-win.exe
|
||||||
|
out/*-x64-mac.dmg
|
||||||
|
out/*-x86_64-linux.AppImage
|
||||||
|
|
||||||
|
|
||||||
|
upload-apps-release:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
env:
|
||||||
|
VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
|
||||||
|
VERSION: ${{ format('v{0}', needs.prepare-files.outputs.version) }}
|
||||||
|
needs: [prepare-files, build-apps]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-arm64-win
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-x64-win
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-yml-win
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-arm64-mac
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-x64-mac
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-yml-mac
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-arm64-linux
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-x64-linux
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-yml-linux
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- name: Generate the download static endpoint
|
||||||
|
env:
|
||||||
|
NOTES: ${{ needs.prepare-files.outputs.notes }}
|
||||||
|
PUB_DATE: ${{ github.event.repository.updated_at }}
|
||||||
|
WEBSITE_DIR: ${{ env.IS_NIGHTLY == 'true' && 'dl.zoo.dev/releases/modeling-app/nightly' || 'dl.zoo.dev/releases/modeling-app' }}
|
||||||
|
URL_CODED_NAME: ${{ env.IS_NIGHTLY == 'true' && 'Zoo%20Modeling%20App%20%28Nightly%29' || 'Zoo%20Modeling%20App' }}
|
||||||
|
run: |
|
||||||
|
RELEASE_DIR=https://${WEBSITE_DIR}
|
||||||
|
jq --null-input \
|
||||||
|
--arg version "${VERSION}" \
|
||||||
|
--arg pub_date "${PUB_DATE}" \
|
||||||
|
--arg notes "${NOTES}" \
|
||||||
|
--arg mac_arm64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-arm64-mac.dmg" \
|
||||||
|
--arg mac_x64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-x64-mac.dmg" \
|
||||||
|
--arg windows_arm64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-arm64-win.exe" \
|
||||||
|
--arg windows_x64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-x64-win.exe" \
|
||||||
|
--arg linux_arm64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-arm64-linux.AppImage" \
|
||||||
|
--arg linux_x64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-x86_64-linux.AppImage" \
|
||||||
|
'{
|
||||||
|
"version": $version,
|
||||||
|
"pub_date": $pub_date,
|
||||||
|
"notes": $notes,
|
||||||
|
"platforms": {
|
||||||
|
"dmg-arm64": {
|
||||||
|
"url": $mac_arm64_url
|
||||||
|
},
|
||||||
|
"dmg-x64": {
|
||||||
|
"url": $mac_x64_url
|
||||||
|
},
|
||||||
|
"exe-arm64": {
|
||||||
|
"url": $windows_arm64_url
|
||||||
|
},
|
||||||
|
"exe-x64": {
|
||||||
|
"url": $windows_x64_url
|
||||||
|
},
|
||||||
|
"appimage-arm64": {
|
||||||
|
"url": $linux_arm64_url
|
||||||
|
},
|
||||||
|
"appimage-x64": {
|
||||||
|
"url": $linux_x64_url
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}' > out/last_download.json
|
||||||
|
cat out/last_download.json
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-download-json
|
||||||
|
path: out/last_download.json
|
||||||
|
|
||||||
|
- name: List artifacts
|
||||||
|
run: "ls -R out"
|
||||||
|
|
||||||
|
- name: Set more complete nightly release notes
|
||||||
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
|
run: |
|
||||||
|
# Note: preferred going this way instead of a full clone in the checkout step,
|
||||||
|
# see https://github.com/actions/checkout/issues/1471
|
||||||
|
git fetch --prune --unshallow --tags
|
||||||
|
export TAG="nightly-${VERSION}"
|
||||||
|
export PREVIOUS_TAG=$(git tag --list --sort=-committerdate "nightly-v[0-9]*" | head -n2 | tail -n1)
|
||||||
|
export NOTES=$(./scripts/get-nightly-changelog.sh)
|
||||||
|
yarn files:set-notes
|
||||||
|
|
||||||
|
- name: Authenticate to Google Cloud
|
||||||
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
|
uses: 'google-github-actions/auth@v2.1.8'
|
||||||
|
with:
|
||||||
|
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
||||||
|
|
||||||
|
- name: Set up Google Cloud SDK
|
||||||
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
|
uses: google-github-actions/setup-gcloud@v2.1.4
|
||||||
|
with:
|
||||||
|
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
|
||||||
|
|
||||||
|
- name: Upload nightly files to public bucket
|
||||||
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
|
uses: google-github-actions/upload-cloud-storage@v2.2.2
|
||||||
|
with:
|
||||||
|
path: out
|
||||||
|
glob: '*'
|
||||||
|
parent: false
|
||||||
|
destination: 'dl.kittycad.io/releases/modeling-app/nightly'
|
||||||
|
|
||||||
|
- name: Invalidate bucket cache on latest*.yml and last_download.json files
|
||||||
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
|
run: yarn files:invalidate-bucket:nightly
|
323
.github/workflows/build-test-publish-apps.yml
vendored
323
.github/workflows/build-test-publish-apps.yml
vendored
@ -1,323 +0,0 @@
|
|||||||
name: build-publish-apps
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
schedule:
|
|
||||||
- cron: '0 4 * * *'
|
|
||||||
# Daily at 04:00 AM UTC
|
|
||||||
# Will checkout the last commit from the default branch (main as of 2023-10-04)
|
|
||||||
|
|
||||||
env:
|
|
||||||
CUT_RELEASE_PR: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.title, 'Cut release v')) }}
|
|
||||||
BUILD_RELEASE: ${{ github.event_name == 'release' || github.event_name == 'schedule' || github.event_name == 'pull_request' && (contains(github.event.pull_request.title, 'Cut release v')) }}
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prepare-files:
|
|
||||||
runs-on: ubuntu-22.04 # seperate job on Ubuntu for easy string manipulations (compared to Windows)
|
|
||||||
outputs:
|
|
||||||
version: ${{ steps.export_version.outputs.version }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'yarn'
|
|
||||||
|
|
||||||
- run: yarn install
|
|
||||||
|
|
||||||
- name: Setup Rust
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
workspaces: './src/wasm-lib'
|
|
||||||
|
|
||||||
# TODO: see if we can fetch from main instead if no diff at src/wasm-lib
|
|
||||||
- name: Run build:wasm
|
|
||||||
run: "yarn build:wasm"
|
|
||||||
|
|
||||||
- name: Set nightly version
|
|
||||||
if: github.event_name == 'schedule'
|
|
||||||
run: |
|
|
||||||
VERSION=$(date +'%-y.%-m.%-d') yarn bump-jsons
|
|
||||||
|
|
||||||
# TODO: see if we need to inject updater nightly URL here https://dl.zoo.dev/releases/modeling-app/nightly/last_update.json
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: prepared-files
|
|
||||||
path: |
|
|
||||||
package.json
|
|
||||||
src/wasm-lib/pkg/wasm_lib*
|
|
||||||
|
|
||||||
- id: export_version
|
|
||||||
run: echo "version=`cat package.json | jq -r '.version'`" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Prepare electron-builder.yml file for updater test
|
|
||||||
if: ${{ env.CUT_RELEASE_PR == 'true' }}
|
|
||||||
run: |
|
|
||||||
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/updater-test"' electron-builder.yml
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: prepared-files-updater-test
|
|
||||||
path: |
|
|
||||||
electron-builder.yml
|
|
||||||
|
|
||||||
|
|
||||||
build-apps:
|
|
||||||
needs: [prepare-files]
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [macos-14, windows-2022, ubuntu-22.04]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
env:
|
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
||||||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
||||||
CSC_LINK: ${{ secrets.APPLE_CERTIFICATE }}
|
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
||||||
CSC_KEYCHAIN: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
|
||||||
CSC_FOR_PULL_REQUEST: true
|
|
||||||
VERSION: ${{ github.event_name == 'schedule' && needs.prepare-files.outputs.version || format('v{0}', needs.prepare-files.outputs.version) }}
|
|
||||||
VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
|
|
||||||
WINDOWS_CERTIFICATE_THUMBPRINT: F4C9A52FF7BC26EE5E054946F6B11DEEA94C748D
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
name: prepared-files
|
|
||||||
|
|
||||||
- name: Copy prepared files
|
|
||||||
run: |
|
|
||||||
ls -R prepared-files
|
|
||||||
cp prepared-files/package.json package.json
|
|
||||||
cp prepared-files/src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
|
||||||
mkdir src/wasm-lib/pkg
|
|
||||||
cp prepared-files/src/wasm-lib/pkg/wasm_lib* src/wasm-lib/pkg
|
|
||||||
|
|
||||||
- name: Sync node version and setup cache
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'yarn' # Set this to npm, yarn or pnpm.
|
|
||||||
|
|
||||||
- run: yarn install
|
|
||||||
|
|
||||||
- run: yarn tronb:vite
|
|
||||||
|
|
||||||
- name: Prepare certificate and variables (Windows only)
|
|
||||||
if: ${{ env.BUILD_RELEASE == 'true' && matrix.os == 'windows-2022' }}
|
|
||||||
run: |
|
|
||||||
echo "${{secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
|
|
||||||
cat /d/Certificate_pkcs12.p12
|
|
||||||
echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
|
|
||||||
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
|
|
||||||
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
|
|
||||||
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
|
|
||||||
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
|
|
||||||
echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH
|
|
||||||
echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH
|
|
||||||
echo "C:\Program Files\DigiCert\DigiCert One Signing Manager Tools" >> $GITHUB_PATH
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Setup certicate with SSM KSP (Windows only)
|
|
||||||
if: ${{ env.BUILD_RELEASE == 'true' && matrix.os == 'windows-2022' }}
|
|
||||||
run: |
|
|
||||||
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi
|
|
||||||
msiexec /i smtools-windows-x64.msi /quiet /qn
|
|
||||||
smksp_registrar.exe list
|
|
||||||
smctl.exe keypair ls
|
|
||||||
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
|
|
||||||
smksp_cert_sync.exe
|
|
||||||
shell: cmd
|
|
||||||
|
|
||||||
- name: Build the app
|
|
||||||
run: yarn electron-builder --config ${{ env.BUILD_RELEASE && '--publish always' || '' }}
|
|
||||||
|
|
||||||
- name: List artifacts in out/
|
|
||||||
run: ls -R out
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: out-${{ matrix.os }}
|
|
||||||
path: |
|
|
||||||
out/Zoo*.*
|
|
||||||
out/latest*.yml
|
|
||||||
|
|
||||||
# TODO: add the 'Build for Mac TestFlight (nightly)' stage back
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
if: ${{ env.CUT_RELEASE_PR == 'true' }}
|
|
||||||
name: prepared-files-updater-test
|
|
||||||
|
|
||||||
- name: Copy updated electron-builder.yml file for updater test
|
|
||||||
if: ${{ env.CUT_RELEASE_PR == 'true' }}
|
|
||||||
run: |
|
|
||||||
ls -R prepared-files-updater-test
|
|
||||||
cp prepared-files-updater-test/electron-builder.yml electron-builder.yml
|
|
||||||
|
|
||||||
- name: Build the app (updater-test)
|
|
||||||
if: ${{ env.CUT_RELEASE_PR == 'true' }}
|
|
||||||
run: yarn electron-builder --config ${{ env.BUILD_RELEASE && '--publish always' || '' }}
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
if: ${{ env.CUT_RELEASE_PR == 'true' }}
|
|
||||||
with:
|
|
||||||
name: updater-test-${{ matrix.os }}
|
|
||||||
path: |
|
|
||||||
out/Zoo*.*
|
|
||||||
out/latest*.yml
|
|
||||||
|
|
||||||
|
|
||||||
publish-apps-release:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
|
|
||||||
needs: [prepare-files, build-apps]
|
|
||||||
env:
|
|
||||||
VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
|
|
||||||
VERSION: ${{ github.event_name == 'schedule' && needs.prepare-files.outputs.version || format('v{0}', needs.prepare-files.outputs.version) }}
|
|
||||||
PUB_DATE: ${{ github.event_name == 'release' && github.event.release.created_at || github.event.repository.updated_at }}
|
|
||||||
NOTES: ${{ github.event_name == 'release' && github.event.release.body || format('Non-release build, commit {0}', github.sha) }}
|
|
||||||
BUCKET_DIR: ${{ github.event_name == 'schedule' && 'dl.kittycad.io/releases/modeling-app/nightly' || 'dl.kittycad.io/releases/modeling-app' }}
|
|
||||||
WEBSITE_DIR: ${{ github.event_name == 'schedule' && 'dl.zoo.dev/releases/modeling-app/nightly' || 'dl.zoo.dev/releases/modeling-app' }}
|
|
||||||
URL_CODED_NAME: ${{ github.event_name == 'schedule' && 'Zoo%20Modeling%20App%20%28Nightly%29' || 'Zoo%20Modeling%20App' }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: out-windows-2022
|
|
||||||
path: out
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: out-macos-14
|
|
||||||
path: out
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: out-ubuntu-22.04
|
|
||||||
path: out
|
|
||||||
|
|
||||||
- name: Generate the download static endpoint
|
|
||||||
run: |
|
|
||||||
RELEASE_DIR=https://${WEBSITE_DIR}
|
|
||||||
jq --null-input \
|
|
||||||
--arg version "${VERSION}" \
|
|
||||||
--arg pub_date "${PUB_DATE}" \
|
|
||||||
--arg notes "${NOTES}" \
|
|
||||||
--arg mac_arm64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-arm64-mac.dmg" \
|
|
||||||
--arg mac_x64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-x64-mac.dmg" \
|
|
||||||
--arg windows_arm64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-arm64-win.exe" \
|
|
||||||
--arg windows_x64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-x64-win.exe" \
|
|
||||||
--arg linux_arm64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-arm64-linux.AppImage" \
|
|
||||||
--arg linux_x64_url "$RELEASE_DIR/${{ env.URL_CODED_NAME }}-${VERSION_NO_V}-x86_64-linux.AppImage" \
|
|
||||||
'{
|
|
||||||
"version": $version,
|
|
||||||
"pub_date": $pub_date,
|
|
||||||
"notes": $notes,
|
|
||||||
"platforms": {
|
|
||||||
"dmg-arm64": {
|
|
||||||
"url": $mac_arm64_url
|
|
||||||
},
|
|
||||||
"dmg-x64": {
|
|
||||||
"url": $mac_x64_url
|
|
||||||
},
|
|
||||||
"exe-arm64": {
|
|
||||||
"url": $windows_arm64_url
|
|
||||||
},
|
|
||||||
"exe-x64": {
|
|
||||||
"url": $windows_x64_url
|
|
||||||
},
|
|
||||||
"appimage-arm64": {
|
|
||||||
"url": $linux_arm64_url
|
|
||||||
},
|
|
||||||
"appimage-x64": {
|
|
||||||
"url": $linux_x64_url
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}' > last_download.json
|
|
||||||
cat last_download.json
|
|
||||||
|
|
||||||
- name: List artifacts
|
|
||||||
run: "ls -R out"
|
|
||||||
|
|
||||||
- name: Authenticate to Google Cloud
|
|
||||||
uses: 'google-github-actions/auth@v2.1.5'
|
|
||||||
with:
|
|
||||||
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
|
||||||
|
|
||||||
- name: Set up Google Cloud SDK
|
|
||||||
uses: google-github-actions/setup-gcloud@v2.1.0
|
|
||||||
with:
|
|
||||||
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
|
|
||||||
|
|
||||||
- name: Upload release files to public bucket
|
|
||||||
uses: google-github-actions/upload-cloud-storage@v2.2.0
|
|
||||||
with:
|
|
||||||
path: out
|
|
||||||
glob: 'Zoo*'
|
|
||||||
parent: false
|
|
||||||
destination: ${{ env.BUCKET_DIR }}
|
|
||||||
|
|
||||||
- name: Upload update endpoint to public bucket
|
|
||||||
uses: google-github-actions/upload-cloud-storage@v2.2.0
|
|
||||||
with:
|
|
||||||
path: out
|
|
||||||
glob: 'latest*'
|
|
||||||
parent: false
|
|
||||||
destination: ${{ env.BUCKET_DIR }}
|
|
||||||
|
|
||||||
- name: Upload download endpoint to public bucket
|
|
||||||
uses: google-github-actions/upload-cloud-storage@v2.2.0
|
|
||||||
with:
|
|
||||||
path: last_download.json
|
|
||||||
destination: ${{ env.BUCKET_DIR }}
|
|
||||||
|
|
||||||
- name: Upload release files to Github
|
|
||||||
if: ${{ github.event_name == 'release' }}
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
files: 'out/Zoo*'
|
|
||||||
|
|
||||||
# TODO: Add GitHub publisher
|
|
||||||
|
|
||||||
announce_release:
|
|
||||||
needs: [publish-apps-release]
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install requests
|
|
||||||
|
|
||||||
- name: Announce Release
|
|
||||||
env:
|
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
||||||
RELEASE_VERSION: ${{ github.event.release.tag_name }}
|
|
||||||
RELEASE_BODY: ${{ github.event.release.body}}
|
|
||||||
run: python public/announce_release.py
|
|
44
.github/workflows/cargo-bench.yml
vendored
44
.github/workflows/cargo-bench.yml
vendored
@ -1,44 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- '**.rs'
|
|
||||||
- '**/Cargo.toml'
|
|
||||||
- '**/Cargo.lock'
|
|
||||||
- '**/rust-toolchain.toml'
|
|
||||||
- .github/workflows/cargo-bench.yml
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '**.rs'
|
|
||||||
- '**/Cargo.toml'
|
|
||||||
- '**/Cargo.lock'
|
|
||||||
- '**/rust-toolchain.toml'
|
|
||||||
- .github/workflows/cargo-bench.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
permissions: read-all
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
name: cargo bench
|
|
||||||
jobs:
|
|
||||||
cargo-bench:
|
|
||||||
name: Benchmark with iai
|
|
||||||
runs-on: ubuntu-latest-8-cores
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
cargo install cargo-criterion
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y valgrind
|
|
||||||
- name: Rust Cache
|
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
|
||||||
- name: Benchmark kcl library
|
|
||||||
shell: bash
|
|
||||||
run: |-
|
|
||||||
cd src/wasm-lib/kcl; cargo bench --all-features -- iai
|
|
||||||
env:
|
|
||||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
|
||||||
|
|
21
.github/workflows/cargo-check.yml
vendored
21
.github/workflows/cargo-check.yml
vendored
@ -17,24 +17,21 @@ jobs:
|
|||||||
cargocheck:
|
cargocheck:
|
||||||
name: cargo check
|
name: cargo check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
dir: ['src/wasm-lib']
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install latest rust
|
- name: Use correct Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
cache-workspaces: rust
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Rust Cache
|
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
|
||||||
|
|
||||||
- name: Run check
|
- name: Run check
|
||||||
run: |
|
run: |
|
||||||
cd "${{ matrix.dir }}"
|
cd rust
|
||||||
# We specifically want to test the disable-println feature
|
# We specifically want to test the disable-println feature
|
||||||
# Since it is not enabled by default, we need to specify it
|
# Since it is not enabled by default, we need to specify it
|
||||||
# This is used in kcl-lsp
|
# This is used in kcl-lsp
|
||||||
cargo check --all --features disable-println --features pyo3 --features cli
|
cargo check --workspace --features disable-println --features pyo3 --features cli
|
||||||
|
21
.github/workflows/cargo-clippy.yml
vendored
21
.github/workflows/cargo-clippy.yml
vendored
@ -23,25 +23,22 @@ jobs:
|
|||||||
cargoclippy:
|
cargoclippy:
|
||||||
name: cargo clippy
|
name: cargo clippy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
dir: ['src/wasm-lib']
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: taiki-e/install-action@just
|
- uses: taiki-e/install-action@just
|
||||||
- name: Install latest rust
|
- name: Use correct Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
cache-workspaces: rust
|
||||||
override: true
|
components: clippy
|
||||||
components: clippy
|
|
||||||
|
|
||||||
- name: Rust Cache
|
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: |
|
run: |
|
||||||
cd "${{ matrix.dir }}"
|
cd rust
|
||||||
just lint
|
just lint
|
||||||
# If this fails, run "cargo check" to update Cargo.lock,
|
# If this fails, run "cargo check" to update Cargo.lock,
|
||||||
# then add Cargo.lock to the PR.
|
# then add Cargo.lock to the PR.
|
||||||
|
21
.github/workflows/cargo-fmt.yml
vendored
21
.github/workflows/cargo-fmt.yml
vendored
@ -26,23 +26,20 @@ jobs:
|
|||||||
cargofmt:
|
cargofmt:
|
||||||
name: cargo fmt
|
name: cargo fmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
dir: ['src/wasm-lib']
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install latest rust
|
- name: Use correct Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
cache-workspaces: rust
|
||||||
override: true
|
components: rustfmt
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Rust Cache
|
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
|
||||||
|
|
||||||
- name: Run cargo fmt
|
- name: Run cargo fmt
|
||||||
run: |
|
run: |
|
||||||
cd "${{ matrix.dir }}"
|
cd rust
|
||||||
cargo fmt -- --check
|
cargo fmt -- --check
|
||||||
shell: bash
|
shell: bash
|
||||||
|
127
.github/workflows/cargo-test.yml
vendored
127
.github/workflows/cargo-test.yml
vendored
@ -2,42 +2,38 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
|
||||||
- 'src/wasm-lib/**.rs'
|
|
||||||
- '**/Cargo.toml'
|
|
||||||
- '**/Cargo.lock'
|
|
||||||
- '**/rust-toolchain.toml'
|
|
||||||
- 'src/wasm-lib/**.kcl'
|
|
||||||
- .github/workflows/cargo-test.yml
|
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
|
||||||
- 'src/wasm-lib/**.rs'
|
|
||||||
- '**/Cargo.toml'
|
|
||||||
- '**/Cargo.lock'
|
|
||||||
- '**/rust-toolchain.toml'
|
|
||||||
- 'src/wasm-lib/**.kcl'
|
|
||||||
- .github/workflows/cargo-test.yml
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
permissions: read-all
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
name: cargo test of wasm-lib
|
name: cargo test
|
||||||
jobs:
|
jobs:
|
||||||
cargotest:
|
cargotest:
|
||||||
name: cargo test
|
name: cargo test
|
||||||
runs-on: ubuntu-latest-8-cores
|
runs-on: ubuntu-latest-8-cores
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
dir: ['src/wasm-lib']
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/create-github-app-token@v1
|
||||||
- name: Install latest rust
|
id: app-token
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
|
||||||
override: true
|
private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }}
|
||||||
|
owner: ${{ github.repository_owner }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
- name: Use correct Rust toolchain
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
cache: false # Configured below.
|
||||||
- name: Install vector
|
- name: Install vector
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
||||||
@ -54,22 +50,95 @@ jobs:
|
|||||||
${HOME}/.vector/bin/vector --config /tmp/vector.toml &
|
${HOME}/.vector/bin/vector --config /tmp/vector.toml &
|
||||||
- uses: taiki-e/install-action@cargo-llvm-cov
|
- uses: taiki-e/install-action@cargo-llvm-cov
|
||||||
- uses: taiki-e/install-action@nextest
|
- uses: taiki-e/install-action@nextest
|
||||||
|
- name: Install just
|
||||||
|
uses: taiki-e/install-action@just
|
||||||
|
- name: Install cargo-insta
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cargo install cargo-insta
|
||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: rust
|
||||||
|
- name: Fetch the base branch
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
run: git fetch origin ${{ github.base_ref }} --depth=1
|
||||||
|
- name: Check for path changes
|
||||||
|
id: path-changes
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Manual runs or push should run all tests.
|
||||||
|
if [[ ${{ github.event_name }} != 'pull_request' ]]; then
|
||||||
|
echo "outside-kcl-samples=true" >> $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
changed_files=$(git diff --name-only origin/${{ github.base_ref }})
|
||||||
|
echo "$changed_files"
|
||||||
|
if grep -Evq '^public/kcl-samples/|^rust/kcl-lib/tests/kcl_samples/' <<< "$changed_files" ; then
|
||||||
|
echo "outside-kcl-samples=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "outside-kcl-samples=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
- name: cargo test only kcl-samples
|
||||||
|
id: cargo-test-kcl-samples
|
||||||
|
if: steps.path-changes.outputs.outside-kcl-samples == 'false'
|
||||||
|
continue-on-error: true
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
cd rust
|
||||||
|
cargo nextest run --workspace --retries=2 --no-fail-fast --profile ci simulation_tests::kcl_samples 2>&1 | tee /tmp/github-actions.log
|
||||||
|
env:
|
||||||
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||||
|
RUST_BACKTRACE: full
|
||||||
|
RUST_MIN_STACK: 10485760000
|
||||||
|
- name: Commit differences
|
||||||
|
if: steps.path-changes.outputs.outside-kcl-samples == 'false' && steps.cargo-test-kcl-samples.outcome == 'failure'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
cd rust
|
||||||
|
just overwrite-sim-test kcl_samples
|
||||||
|
git add kcl-lib/tests
|
||||||
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||||
|
git fetch origin
|
||||||
|
echo ${{ github.head_ref }}
|
||||||
|
git checkout ${{ github.head_ref }}
|
||||||
|
if ! git commit -m "Update kcl-samples simulation test output" ; then
|
||||||
|
echo "No changes to commit"
|
||||||
|
# This only runs if tests failed, so we should fail the step.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
git push origin ${{ github.head_ref }}
|
||||||
|
env:
|
||||||
|
# The default is auto, and insta behaves differently in CI vs. not.
|
||||||
|
INSTA_UPDATE: always
|
||||||
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||||
|
# Configure nextest when it's run by insta (via just).
|
||||||
|
NEXTEST_PROFILE: ci
|
||||||
|
RUST_BACKTRACE: full
|
||||||
|
RUST_MIN_STACK: 10485760000
|
||||||
- name: cargo test
|
- name: cargo test
|
||||||
|
if: steps.path-changes.outputs.outside-kcl-samples == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |-
|
run: |-
|
||||||
cd "${{ matrix.dir }}"
|
cd rust
|
||||||
cargo llvm-cov nextest --all --lcov --output-path lcov.info --test-threads=1 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --retries=2 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
||||||
env:
|
env:
|
||||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||||
RUST_MIN_STACK: 10485760000
|
RUST_MIN_STACK: 10485760000
|
||||||
- name: Upload to codecov.io
|
- name: Upload to codecov.io
|
||||||
uses: codecov/codecov-action@v4
|
if: steps.path-changes.outputs.outside-kcl-samples == 'true'
|
||||||
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
token: ${{secrets.CODECOV_TOKEN}}
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
flags: wasm-lib
|
flags: rust
|
||||||
verbose: true
|
verbose: true
|
||||||
files: lcov.info
|
files: lcov.info
|
||||||
|
|
||||||
|
22
.github/workflows/check-exampleKcl.yml
vendored
22
.github/workflows/check-exampleKcl.yml
vendored
@ -26,11 +26,21 @@ jobs:
|
|||||||
const issue_number = context.payload.pull_request.number;
|
const issue_number = context.payload.pull_request.number;
|
||||||
const owner = context.repo.owner;
|
const owner = context.repo.owner;
|
||||||
const repo = context.repo.repo;
|
const repo = context.repo.repo;
|
||||||
|
|
||||||
// Post a comment on the PR
|
const { data: comments } = await github.rest.issues.listComments({
|
||||||
await github.rest.issues.createComment({
|
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number,
|
issue_number
|
||||||
body: message,
|
});
|
||||||
});
|
|
||||||
|
const commentExists = comments.some(comment => comment.body === message);
|
||||||
|
|
||||||
|
if (!commentExists) {
|
||||||
|
// Post a comment on the PR
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
issue_number,
|
||||||
|
body: message,
|
||||||
|
});
|
||||||
|
}
|
48
.github/workflows/check-kcl-header.yml
vendored
Normal file
48
.github/workflows/check-kcl-header.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
name: Check kcl-samples files for proper header structure
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'public/kcl-samples/**/*.kcl'
|
||||||
|
- .github/workflows/check-kcl-header.yml
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'public/kcl-samples/**/*.kcl'
|
||||||
|
- .github/workflows/check-kcl-header.yml
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-kcl-header:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check KCL files for header comment block and blank line
|
||||||
|
run: |
|
||||||
|
files=$(find public/kcl-samples -type f -name '*.kcl')
|
||||||
|
failed_files=()
|
||||||
|
|
||||||
|
for file in $files; do
|
||||||
|
if ! awk '
|
||||||
|
NR == 1 && $0 !~ /^\/\// { exit 1 }
|
||||||
|
BEGIN { in_comment = 1 }
|
||||||
|
NF == 0 && in_comment == 1 { in_comment = 0; next }
|
||||||
|
$1 !~ /^\/\// && in_comment == 1 { exit 1 }
|
||||||
|
in_comment == 0 && NF > 0 { exit 0 }
|
||||||
|
END { if (in_comment == 1) exit 1 }
|
||||||
|
' "$file"; then
|
||||||
|
failed_files+=("$file")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ${#failed_files[@]} -ne 0 ]; then
|
||||||
|
echo "One or more KCL files do not begin with a header comment block followed by a blank line:"
|
||||||
|
printf '%s\n' "${failed_files[@]}"
|
||||||
|
exit 1
|
||||||
|
fi
|
32
.github/workflows/codemirror-lang-kcl.yml
vendored
Normal file
32
.github/workflows/codemirror-lang-kcl.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: CodeMirror Lang KCL
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
yarn-unit-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
|
||||||
|
- run: yarn install
|
||||||
|
working-directory: packages/codemirror-lang-kcl
|
||||||
|
|
||||||
|
- run: yarn tsc
|
||||||
|
working-directory: packages/codemirror-lang-kcl
|
||||||
|
|
||||||
|
- name: run unit tests
|
||||||
|
run: yarn test
|
||||||
|
working-directory: packages/codemirror-lang-kcl
|
37
.github/workflows/create-release.yml
vendored
37
.github/workflows/create-release.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
name: Create Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
create-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: read
|
|
||||||
if: contains(github.event.head_commit.message, 'Cut release v')
|
|
||||||
steps:
|
|
||||||
- uses: actions/github-script@v7
|
|
||||||
name: Read Cut release PR info and create release
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const { owner, repo } = context.repo
|
|
||||||
const pulls = await github.rest.repos.listPullRequestsAssociatedWithCommit({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
commit_sha: context.sha,
|
|
||||||
})
|
|
||||||
const { title, body } = pulls.data[0]
|
|
||||||
const version = title.split('Cut release ')[1]
|
|
||||||
|
|
||||||
const result = await github.rest.repos.createRelease({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
body,
|
|
||||||
tag_name: version,
|
|
||||||
name: version,
|
|
||||||
draft: true,
|
|
||||||
})
|
|
||||||
console.log(result)
|
|
264
.github/workflows/e2e-tests.yml
vendored
Normal file
264
.github/workflows/e2e-tests.yml
vendored
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
name: E2E Tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * * # hourly
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
actions: read
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
path-changes:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
significant: ${{ steps.path-changes.outputs.significant }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Fetch the base branch
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
run: git fetch origin ${{ github.base_ref }} --depth=1
|
||||||
|
- name: Check for path changes
|
||||||
|
id: path-changes
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Manual runs or push should run all tests.
|
||||||
|
if [[ ${{ github.event_name }} != 'pull_request' ]]; then
|
||||||
|
echo "significant=true" >> $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
changed_files=$(git diff --name-only origin/${{ github.base_ref }})
|
||||||
|
echo "$changed_files"
|
||||||
|
if grep -Evq '^README.md|^public/kcl-samples/|^rust/kcl-lib/tests/kcl_samples/' <<< "$changed_files" ; then
|
||||||
|
echo "significant=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "significant=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
- name: Display path changes
|
||||||
|
run: |
|
||||||
|
# For debugging purposes.
|
||||||
|
echo "significant: ${{ steps.path-changes.outputs.significant }}"
|
||||||
|
|
||||||
|
electron:
|
||||||
|
timeout-minutes: 60
|
||||||
|
name: playwright:electron:${{ matrix.os }} ${{ matrix.shardIndex }} ${{ matrix.shardTotal }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# TODO: enable self-hosted-windows-8-cores once available
|
||||||
|
os: [namespace-profile-ubuntu-8-cores, namespace-profile-macos-8-cores, windows-16-cores]
|
||||||
|
shardIndex: [1, 2, 3, 4]
|
||||||
|
shardTotal: [4]
|
||||||
|
# TODO: add ref here for main and latest release tag
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
needs: path-changes
|
||||||
|
if: ${{ needs.path-changes.outputs.significant == 'true' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
|
||||||
|
private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }}
|
||||||
|
owner: ${{ github.repository_owner }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
- id: filter
|
||||||
|
name: Check for Rust changes
|
||||||
|
uses: dorny/paths-filter@v3
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
rust:
|
||||||
|
- 'rust/**'
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
- name: Install dependencies
|
||||||
|
id: deps-install
|
||||||
|
shell: bash
|
||||||
|
run: yarn
|
||||||
|
- name: Cache Playwright Browsers
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/ms-playwright/
|
||||||
|
key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }}
|
||||||
|
- name: Install Playwright Browsers
|
||||||
|
shell: bash
|
||||||
|
run: yarn playwright install --with-deps
|
||||||
|
- name: Download Wasm Cache
|
||||||
|
id: download-wasm
|
||||||
|
if: github.event_name != 'schedule' && steps.filter.outputs.rust == 'false'
|
||||||
|
uses: dawidd6/action-download-artifact@v7
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
name: wasm-bundle
|
||||||
|
workflow: build-and-store-wasm.yml
|
||||||
|
branch: main
|
||||||
|
path: rust/kcl-wasm-lib/pkg
|
||||||
|
- name: copy wasm blob
|
||||||
|
if: github.event_name != 'schedule' && steps.filter.outputs.rust == 'false'
|
||||||
|
shell: bash
|
||||||
|
run: cp rust/kcl-wasm-lib/pkg/kcl_wasm_lib_bg.wasm public
|
||||||
|
continue-on-error: true
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- uses: taiki-e/install-action@955a6ff1416eae278c9f833008a9beb4b7f9afe3
|
||||||
|
with:
|
||||||
|
tool: wasm-pack
|
||||||
|
- name: Cache Wasm (because rust diff)
|
||||||
|
if: github.event_name == 'schedule' || steps.filter.outputs.rust == 'true'
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: './rust'
|
||||||
|
- name: OR Cache Wasm (because wasm cache failed)
|
||||||
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: './rust'
|
||||||
|
- name: install good sed
|
||||||
|
if: ${{ startsWith(matrix.os, 'macos') }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
brew install gnu-sed
|
||||||
|
echo "/opt/homebrew/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
|
||||||
|
- name: Install vector
|
||||||
|
shell: bash
|
||||||
|
# TODO: figure out what to do with this, it's failing
|
||||||
|
if: false
|
||||||
|
run: |
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
||||||
|
chmod +x /tmp/vector.sh
|
||||||
|
/tmp/vector.sh -y -no-modify-path
|
||||||
|
mkdir -p /tmp/vector
|
||||||
|
cp .github/workflows/vector.toml /tmp/vector.toml
|
||||||
|
sed -i "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml
|
||||||
|
sed -i "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml
|
||||||
|
sed -i "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml
|
||||||
|
sed -i "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml
|
||||||
|
sed -i "s#GH_ACTIONS_AXIOM_TOKEN#${{secrets.GH_ACTIONS_AXIOM_TOKEN}}#g" /tmp/vector.toml
|
||||||
|
cat /tmp/vector.toml
|
||||||
|
${HOME}/.vector/bin/vector --config /tmp/vector.toml &
|
||||||
|
- name: Build Wasm (because rust diff)
|
||||||
|
if: github.event_name == 'schedule' || steps.filter.outputs.rust == 'true'
|
||||||
|
shell: bash
|
||||||
|
run: yarn build:wasm
|
||||||
|
- name: OR Build Wasm (because wasm cache failed)
|
||||||
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
|
shell: bash
|
||||||
|
run: yarn build:wasm
|
||||||
|
- name: build web
|
||||||
|
shell: bash
|
||||||
|
run: yarn tronb:vite:dev
|
||||||
|
- name: Run ubuntu/chrome snapshots
|
||||||
|
if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 }}
|
||||||
|
shell: bash
|
||||||
|
# TODO: break this in its own job, for now it's not slowing down the overall execution as ubuntu is the quickest,
|
||||||
|
# but we could do better. This forces a large 1/1 shard of all 20 snapshot tests that runs in about 3 minutes.
|
||||||
|
run: |
|
||||||
|
yarn test:snapshots
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
NODE_ENV: development
|
||||||
|
VITE_KC_DEV_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
|
VITE_KC_SKIP_AUTH: true
|
||||||
|
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
|
snapshottoken: ${{ secrets.KITTYCAD_API_TOKEN }}
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ !cancelled() && (success() || failure()) }}
|
||||||
|
with:
|
||||||
|
name: playwright-report-snapshots-${{ matrix.os }}-snapshot-${{ matrix.shardIndex }}-${{ github.sha }}
|
||||||
|
path: playwright-report/
|
||||||
|
include-hidden-files: true
|
||||||
|
retention-days: 30
|
||||||
|
overwrite: true
|
||||||
|
- name: Clean up test-results
|
||||||
|
if: ${{ !cancelled() && (success() || failure()) }}
|
||||||
|
continue-on-error: true
|
||||||
|
run: rm -r test-results
|
||||||
|
- name: check for changes
|
||||||
|
if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 && github.ref != 'refs/heads/main' }}
|
||||||
|
shell: bash
|
||||||
|
id: git-check
|
||||||
|
run: |
|
||||||
|
git add e2e/playwright/snapshot-tests.spec.ts-snapshots e2e/playwright/snapshots
|
||||||
|
if git status | grep -q "Changes to be committed"
|
||||||
|
then echo "modified=true" >> $GITHUB_OUTPUT
|
||||||
|
else echo "modified=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
- name: Commit changes, if any
|
||||||
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git add e2e/playwright/snapshot-tests.spec.ts-snapshots e2e/playwright/snapshots
|
||||||
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||||
|
git fetch origin
|
||||||
|
echo ${{ github.head_ref }}
|
||||||
|
git checkout ${{ github.head_ref }}
|
||||||
|
git commit -m "A snapshot a day keeps the bugs away! 📷🐛 (OS: ${{matrix.os}})" || true
|
||||||
|
git push
|
||||||
|
git push origin ${{ github.head_ref }}
|
||||||
|
# only upload artifacts if there's actually changes
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
|
with:
|
||||||
|
name: playwright-report-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }}
|
||||||
|
path: playwright-report/
|
||||||
|
include-hidden-files: true
|
||||||
|
retention-days: 30
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
if: ${{ !cancelled() && (success() || failure()) }}
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
name: test-results-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }}
|
||||||
|
path: test-results/
|
||||||
|
- name: Run playwright/electron flow (with retries)
|
||||||
|
id: retry
|
||||||
|
if: ${{ !cancelled() && steps.deps-install.outcome == 'success' }}
|
||||||
|
uses: nick-fields/retry@v3.0.2
|
||||||
|
with:
|
||||||
|
shell: bash
|
||||||
|
command: .github/ci-cd-scripts/playwright-electron.sh ${{matrix.shardIndex}} ${{matrix.shardTotal}} ${{matrix.os}}
|
||||||
|
timeout_minutes: 30
|
||||||
|
max_attempts: 25
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
FAIL_ON_CONSOLE_ERRORS: true
|
||||||
|
NODE_ENV: development
|
||||||
|
VITE_KC_DEV_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
|
VITE_KC_SKIP_AUTH: true
|
||||||
|
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: test-results-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }}
|
||||||
|
path: test-results/
|
||||||
|
include-hidden-files: true
|
||||||
|
retention-days: 30
|
||||||
|
overwrite: true
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: playwright-report-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }}
|
||||||
|
path: playwright-report/
|
||||||
|
include-hidden-files: true
|
||||||
|
retention-days: 30
|
||||||
|
overwrite: true
|
||||||
|
|
2
.github/workflows/generate-website-docs.yml
vendored
2
.github/workflows/generate-website-docs.yml
vendored
@ -38,8 +38,10 @@ jobs:
|
|||||||
mkdir -p documentation/content/pages/docs/kcl/
|
mkdir -p documentation/content/pages/docs/kcl/
|
||||||
# cleanup old
|
# cleanup old
|
||||||
rm -rf documentation/content/pages/docs/kcl/*.md
|
rm -rf documentation/content/pages/docs/kcl/*.md
|
||||||
|
rm -rf documentation/content/pages/docs/kcl/types
|
||||||
# move new
|
# move new
|
||||||
mv -f docs/kcl/*.md documentation/content/pages/docs/kcl/
|
mv -f docs/kcl/*.md documentation/content/pages/docs/kcl/
|
||||||
|
mv -f docs/kcl/types documentation/content/pages/docs/kcl/
|
||||||
- name: commit the changes in the docs repo
|
- name: commit the changes in the docs repo
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
401
.github/workflows/kcl-language-server.yml
vendored
Normal file
401
.github/workflows/kcl-language-server.yml
vendored
Normal file
@ -0,0 +1,401 @@
|
|||||||
|
name: kcl-language-server
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- '**/Cargo.toml'
|
||||||
|
- '**/Cargo.lock'
|
||||||
|
- '**/rust-toolchain.toml'
|
||||||
|
- 'rust/kcl-language-server/**'
|
||||||
|
- '**.rs'
|
||||||
|
- .github/workflows/kcl-language-server.yml
|
||||||
|
tags:
|
||||||
|
- 'kcl-*'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**/Cargo.toml'
|
||||||
|
- '**/Cargo.lock'
|
||||||
|
- '**/rust-toolchain.toml'
|
||||||
|
- 'rust/kcl-language-server/**'
|
||||||
|
- '**.rs'
|
||||||
|
- .github/workflows/kcl-language-server.yml
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_INCREMENTAL: 0
|
||||||
|
CARGO_NET_RETRY: 10
|
||||||
|
RUSTFLAGS: ""
|
||||||
|
RUSTUP_MAX_RETRIES: 10
|
||||||
|
FETCH_DEPTH: 0 # pull in the tags for the version string
|
||||||
|
MACOSX_DEPLOYMENT_TARGET: 10.15
|
||||||
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
||||||
|
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: vscode tests
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
yarn install
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
yarn install
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
yarn build
|
||||||
|
yarn test-compile
|
||||||
|
ls -la dist
|
||||||
|
xvfb-run -a yarn test
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
yarn test
|
||||||
|
if: runner.os != 'Linux'
|
||||||
|
build-release:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
code-target:
|
||||||
|
win32-x64
|
||||||
|
#- os: windows-latest
|
||||||
|
#target: i686-pc-windows-msvc
|
||||||
|
#code-target:
|
||||||
|
#win32-ia32
|
||||||
|
#- os: windows-latest
|
||||||
|
#target: aarch64-pc-windows-msvc
|
||||||
|
#code-target: win32-arm64
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
code-target:
|
||||||
|
linux-x64
|
||||||
|
#- os: ubuntu-latest
|
||||||
|
#target: aarch64-unknown-linux-musl
|
||||||
|
#code-target: linux-arm64
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: aarch64-unknown-linux-gnu
|
||||||
|
code-target: linux-arm64
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: arm-unknown-linux-gnueabihf
|
||||||
|
code-target: linux-armhf
|
||||||
|
- os: macos-latest
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
code-target: darwin-x64
|
||||||
|
- os: macos-latest
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
code-target: darwin-arm64
|
||||||
|
|
||||||
|
name: build-release (${{ matrix.target }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
RA_TARGET: ${{ matrix.target }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: ${{ env.FETCH_DEPTH }}
|
||||||
|
|
||||||
|
- name: Use correct Rust toolchain
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
rm rust/rust-toolchain.toml
|
||||||
|
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
cache: rust
|
||||||
|
components: rust-src
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
|
- name: Update apt repositories
|
||||||
|
if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf' || matrix.os == 'ubuntu-latest'
|
||||||
|
run: sudo apt-get update
|
||||||
|
|
||||||
|
- if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
|
name: Install deps
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt install -y \
|
||||||
|
ca-certificates \
|
||||||
|
clang \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
|
gcc-mingw-w64-i686 \
|
||||||
|
gcc-mingw-w64 \
|
||||||
|
jq \
|
||||||
|
libmpc-dev \
|
||||||
|
libmpfr-dev \
|
||||||
|
libgmp-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
mingw-w64 \
|
||||||
|
wget \
|
||||||
|
zlib1g-dev
|
||||||
|
|
||||||
|
cargo install cross
|
||||||
|
|
||||||
|
- name: Install AArch64 target toolchain
|
||||||
|
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
||||||
|
run: sudo apt-get install gcc-aarch64-linux-gnu
|
||||||
|
|
||||||
|
- name: Install ARM target toolchain
|
||||||
|
if: matrix.target == 'arm-unknown-linux-gnueabihf'
|
||||||
|
run: sudo apt-get install gcc-arm-linux-gnueabihf
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
run: |
|
||||||
|
cd rust
|
||||||
|
cargo kcl-language-server-release build --client-patch-version ${{ github.run_number }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
- name: Package Extension (release)
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
npx vsce package -o "../build/kcl-language-server-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }}
|
||||||
|
|
||||||
|
- name: Package Extension (nightly)
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/') == false
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
npx vsce package -o "../build/kcl-language-server-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }} --pre-release
|
||||||
|
|
||||||
|
- name: remove server
|
||||||
|
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
rm -rf server
|
||||||
|
|
||||||
|
- name: Package Extension (no server, release)
|
||||||
|
if: matrix.target == 'x86_64-unknown-linux-gnu' && startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
npx vsce package -o ../build/kcl-language-server-no-server.vsix
|
||||||
|
|
||||||
|
- name: Package Extension (no server, nightly)
|
||||||
|
if: matrix.target == 'x86_64-unknown-linux-gnu' && startsWith(github.event.ref, 'refs/tags/') == false
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
npx vsce package -o ../build/kcl-language-server-no-server.vsix --pre-release
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-${{ matrix.target }}
|
||||||
|
path: ./rust/build
|
||||||
|
|
||||||
|
build-release-x86_64-unknown-linux-musl:
|
||||||
|
name: build-release (x86_64-unknown-linux-musl)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RA_TARGET: x86_64-unknown-linux-musl
|
||||||
|
# For some reason `-crt-static` is not working for clang without lld
|
||||||
|
RUSTFLAGS: "-C link-arg=-fuse-ld=lld -C target-feature=-crt-static"
|
||||||
|
container:
|
||||||
|
image: alpine:latest
|
||||||
|
volumes:
|
||||||
|
- /usr/local/cargo/registry:/usr/local/cargo/registry
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apk add --no-cache \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
clang \
|
||||||
|
lld \
|
||||||
|
musl-dev \
|
||||||
|
nodejs \
|
||||||
|
yarn \
|
||||||
|
npm
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: ${{ env.FETCH_DEPTH }}
|
||||||
|
|
||||||
|
- name: Use correct Rust toolchain
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
rm rust/rust-toolchain.toml
|
||||||
|
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
cache: rust
|
||||||
|
components: rust-src
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
run: |
|
||||||
|
cd rust
|
||||||
|
cargo kcl-language-server-release build --client-patch-version ${{ github.run_number }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
- name: Package Extension (release)
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
npx vsce package -o "../build/kcl-language-server-alpine-x64.vsix" --target alpine-x64
|
||||||
|
|
||||||
|
- name: Package Extension (release)
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/') == false
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
npx vsce package -o "../build/kcl-language-server-alpine-x64.vsix" --target alpine-x64 --pre-release
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-x86_64-unknown-linux-musl
|
||||||
|
path: ./rust/build
|
||||||
|
|
||||||
|
publish:
|
||||||
|
name: publish
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: ["build-release", "build-release-x86_64-unknown-linux-musl"]
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags')
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- run: 'echo "TAG: $TAG"'
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: ${{ env.FETCH_DEPTH }}
|
||||||
|
|
||||||
|
- name: Install Nodejs
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
|
- run: echo "HEAD_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
|
- run: 'echo "HEAD_SHA: $HEAD_SHA"'
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-aarch64-apple-darwin
|
||||||
|
path: rust/build
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-x86_64-apple-darwin
|
||||||
|
path: rust/build
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-x86_64-unknown-linux-gnu
|
||||||
|
path: rust/build
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-x86_64-unknown-linux-musl
|
||||||
|
path: rust/build
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-aarch64-unknown-linux-gnu
|
||||||
|
path: rust/build
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-arm-unknown-linux-gnueabihf
|
||||||
|
path: rust/build
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-x86_64-pc-windows-msvc
|
||||||
|
path:
|
||||||
|
rust/build
|
||||||
|
#- uses: actions/download-artifact@v4
|
||||||
|
#with:
|
||||||
|
#name: release-i686-pc-windows-msvc
|
||||||
|
#path:
|
||||||
|
#build
|
||||||
|
#- uses: actions/download-artifact@v4
|
||||||
|
#with:
|
||||||
|
#name: release-aarch64-pc-windows-msvc
|
||||||
|
#path: rust/build
|
||||||
|
- run: ls -al ./rust/build
|
||||||
|
|
||||||
|
- name: Publish Release
|
||||||
|
uses: ./.github/actions/github-release
|
||||||
|
with:
|
||||||
|
files: "rust/build/*"
|
||||||
|
name: ${{ env.TAG }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: move files to dir for upload
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd rust
|
||||||
|
mkdir -p releases/language-server/${{ env.TAG }}
|
||||||
|
cp -r build/* releases/language-server/${{ env.TAG }}
|
||||||
|
|
||||||
|
- name: "Authenticate to Google Cloud"
|
||||||
|
uses: "google-github-actions/auth@v2.1.8"
|
||||||
|
with:
|
||||||
|
credentials_json: "${{ secrets.GOOGLE_CLOUD_DL_SA }}"
|
||||||
|
- name: Set up Cloud SDK
|
||||||
|
uses: google-github-actions/setup-gcloud@v2.1.2
|
||||||
|
with:
|
||||||
|
project_id: kittycadapi
|
||||||
|
- name: "upload files to gcp"
|
||||||
|
id: upload-files
|
||||||
|
uses: google-github-actions/upload-cloud-storage@v2.2.2
|
||||||
|
with:
|
||||||
|
path: rust/releases
|
||||||
|
destination: dl.kittycad.io
|
||||||
|
|
||||||
|
- run: rm rust/build/kcl-language-server-no-server.vsix
|
||||||
|
|
||||||
|
- name: Publish Extension (Code Marketplace, release)
|
||||||
|
# token from https://dev.azure.com/kcl-language-server/
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
npx vsce publish --pat ${{ secrets.VSCE_PAT }} --packagePath ../build/kcl-language-server-*.vsix
|
||||||
|
|
||||||
|
- name: Publish Extension (OpenVSX, release)
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-language-server
|
||||||
|
npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../build/kcl-language-server-*.vsix
|
||||||
|
timeout-minutes: 2
|
179
.github/workflows/kcl-python-bindings.yml
vendored
Normal file
179
.github/workflows/kcl-python-bindings.yml
vendored
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
# This file is autogenerated by maturin v1.6.0 and then modified
|
||||||
|
# To update, run
|
||||||
|
#
|
||||||
|
# maturin generate-ci github
|
||||||
|
#
|
||||||
|
name: kcl-python-bindings
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- '**/Cargo.toml'
|
||||||
|
- '**/Cargo.lock'
|
||||||
|
- '**/rust-toolchain.toml'
|
||||||
|
- 'rust/kcl-python-bindings/**'
|
||||||
|
- '**.rs'
|
||||||
|
- .github/workflows/kcl-python-bindings.yml
|
||||||
|
tags:
|
||||||
|
- 'kcl-*'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**/Cargo.toml'
|
||||||
|
- '**/Cargo.lock'
|
||||||
|
- '**/rust-toolchain.toml'
|
||||||
|
- 'rust/kcl-python-bindings/**'
|
||||||
|
- '**.rs'
|
||||||
|
- .github/workflows/kcl-python-bindings.yml
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux-x86_64:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Build wheels
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
with:
|
||||||
|
working-directory: rust/kcl-python-bindings
|
||||||
|
target: x86_64
|
||||||
|
args: --release --out dist --find-interpreter
|
||||||
|
sccache: 'true'
|
||||||
|
manylinux: auto
|
||||||
|
before-script-linux: |
|
||||||
|
yum install openssl-devel -y
|
||||||
|
- name: Upload wheels
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wheels-linux-x86_64
|
||||||
|
path: rust/kcl-python-bindings/dist
|
||||||
|
|
||||||
|
windows:
|
||||||
|
runs-on: windows-16-cores
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target:
|
||||||
|
- x64
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
architecture: ${{ matrix.target }}
|
||||||
|
- name: Build wheels
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
with:
|
||||||
|
working-directory: rust/kcl-python-bindings
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
args: --release --out dist --find-interpreter
|
||||||
|
sccache: 'true'
|
||||||
|
- name: Upload wheels
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wheels-windows-${{ matrix.target }}
|
||||||
|
path: rust/kcl-python-bindings/dist
|
||||||
|
|
||||||
|
macos:
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target:
|
||||||
|
- x86_64
|
||||||
|
- aarch64
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Build wheels
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
with:
|
||||||
|
working-directory: rust/kcl-python-bindings
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
args: --release --out dist --find-interpreter
|
||||||
|
sccache: 'true'
|
||||||
|
- name: Upload wheels
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wheels-macos-${{ matrix.target }}
|
||||||
|
path: rust/kcl-python-bindings/dist
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v5
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
- uses: taiki-e/install-action@just
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-python-bindings
|
||||||
|
just setup-uv
|
||||||
|
just test
|
||||||
|
env:
|
||||||
|
KITTYCAD_API_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN }}
|
||||||
|
|
||||||
|
sdist:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install the latest version of uv
|
||||||
|
uses: astral-sh/setup-uv@v5
|
||||||
|
- name: Install codespell
|
||||||
|
run: |
|
||||||
|
uv venv .venv
|
||||||
|
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
|
||||||
|
echo "$PWD/.venv/bin" >> $GITHUB_PATH
|
||||||
|
uv pip install pip --upgrade
|
||||||
|
- name: Build sdist
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
with:
|
||||||
|
working-directory: rust/kcl-python-bindings
|
||||||
|
command: sdist
|
||||||
|
args: --out dist
|
||||||
|
- name: Upload sdist
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wheels-sdist
|
||||||
|
path: rust/kcl-python-bindings/dist
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
needs: [linux-x86_64, windows, macos, sdist]
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
- name: Install the latest version of uv
|
||||||
|
uses: astral-sh/setup-uv@v5
|
||||||
|
- name: Install codespell
|
||||||
|
run: |
|
||||||
|
cd rust/kcl-python-bindings
|
||||||
|
uv venv .venv
|
||||||
|
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
|
||||||
|
echo "$PWD/.venv/bin" >> $GITHUB_PATH
|
||||||
|
uv pip install pip --upgrade
|
||||||
|
- name: Publish to PyPI
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
env:
|
||||||
|
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
with:
|
||||||
|
working-directory: rust/kcl-python-bindings
|
||||||
|
command: upload
|
||||||
|
args: --non-interactive --skip-existing wheels-*/*
|
52
.github/workflows/kcl-samples-manifest.yml
vendored
Normal file
52
.github/workflows/kcl-samples-manifest.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: KCL Samples Manifest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch: # Allows manual triggering from the Actions tab
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate-manifest:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Checkout the repository
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Set up Node.js
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
|
||||||
|
# Run the script to generate the manifest.json
|
||||||
|
- name: Run manifest generation script
|
||||||
|
working-directory: public/kcl-samples
|
||||||
|
run: node generate-manifest.js
|
||||||
|
|
||||||
|
# Check if the manifest.json has changed
|
||||||
|
- name: Check for changes
|
||||||
|
id: check-for-changes
|
||||||
|
working-directory: public/kcl-samples
|
||||||
|
run: |
|
||||||
|
git diff --exit-code ./manifest.json || echo "changed=changes detected" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
# Stage and commit the changes if any were made
|
||||||
|
- name: Commit and push changes
|
||||||
|
if: ${{ success() && (steps.check-for-changes.outputs.changed == 'changes detected') }}
|
||||||
|
working-directory: public/kcl-samples
|
||||||
|
run: |
|
||||||
|
git add ./manifest.json
|
||||||
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||||
|
git fetch origin
|
||||||
|
echo ${{ github.head_ref }}
|
||||||
|
git checkout ${{ github.head_ref }}
|
||||||
|
git commit -m "Update manifest.json"
|
||||||
|
git push origin ${{ github.head_ref }}
|
438
.github/workflows/playwright.yml
vendored
438
.github/workflows/playwright.yml
vendored
@ -1,438 +0,0 @@
|
|||||||
name: Playwright Tests
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
actions: read
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
check-rust-changes:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
rust-changed: ${{ steps.filter.outputs.rust }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- id: filter
|
|
||||||
name: Check for Rust changes
|
|
||||||
uses: dorny/paths-filter@v3
|
|
||||||
with:
|
|
||||||
filters: |
|
|
||||||
rust:
|
|
||||||
- 'src/wasm-lib/**'
|
|
||||||
|
|
||||||
playwright-chrome:
|
|
||||||
timeout-minutes: ${{ matrix.os == 'macos-14' && 60 || 50 }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest]
|
|
||||||
shardIndex: [1, 2, 3, 4]
|
|
||||||
shardTotal: [4]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
needs: check-rust-changes
|
|
||||||
steps:
|
|
||||||
- name: Tune GitHub-hosted runner network
|
|
||||||
uses: smorimoto/tune-github-hosted-runner-network@v1
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'yarn'
|
|
||||||
- uses: KittyCAD/action-install-cli@main
|
|
||||||
- name: Install dependencies
|
|
||||||
shell: bash
|
|
||||||
run: yarn
|
|
||||||
- name: Cache Playwright Browsers
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cache/ms-playwright/
|
|
||||||
key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }}
|
|
||||||
- name: Install Playwright Browsers
|
|
||||||
shell: bash
|
|
||||||
run: yarn playwright install --with-deps
|
|
||||||
- name: Download Wasm Cache
|
|
||||||
id: download-wasm
|
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
|
||||||
uses: dawidd6/action-download-artifact@v6
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
name: wasm-bundle
|
|
||||||
workflow: build-and-store-wasm.yml
|
|
||||||
branch: main
|
|
||||||
path: src/wasm-lib/pkg
|
|
||||||
- name: copy wasm blob
|
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
|
||||||
shell: bash
|
|
||||||
run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
|
||||||
continue-on-error: true
|
|
||||||
- name: Setup Rust
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Cache Wasm (because rust diff)
|
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
workspaces: './src/wasm-lib'
|
|
||||||
- name: OR Cache Wasm (because wasm cache failed)
|
|
||||||
if: steps.download-wasm.outcome == 'failure'
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
workspaces: './src/wasm-lib'
|
|
||||||
- name: install good sed
|
|
||||||
if: ${{ startsWith(matrix.os, 'macos') }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
brew install gnu-sed
|
|
||||||
echo "/opt/homebrew/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
|
|
||||||
- name: Install vector
|
|
||||||
shell: bash
|
|
||||||
if: ${{ !startsWith(matrix.os, 'windows') }}
|
|
||||||
run: |
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
|
||||||
chmod +x /tmp/vector.sh
|
|
||||||
/tmp/vector.sh -y -no-modify-path
|
|
||||||
mkdir -p /tmp/vector
|
|
||||||
cp .github/workflows/vector.toml /tmp/vector.toml
|
|
||||||
sed -i "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml
|
|
||||||
sed -i "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml
|
|
||||||
sed -i "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml
|
|
||||||
sed -i "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml
|
|
||||||
sed -i "s#GH_ACTIONS_AXIOM_TOKEN#${{secrets.GH_ACTIONS_AXIOM_TOKEN}}#g" /tmp/vector.toml
|
|
||||||
cat /tmp/vector.toml
|
|
||||||
${HOME}/.vector/bin/vector --config /tmp/vector.toml &
|
|
||||||
- name: Build Wasm (because rust diff)
|
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
|
||||||
shell: bash
|
|
||||||
run: yarn build:wasm
|
|
||||||
- name: OR Build Wasm (because wasm cache failed)
|
|
||||||
if: steps.download-wasm.outcome == 'failure'
|
|
||||||
shell: bash
|
|
||||||
run: yarn build:wasm
|
|
||||||
- name: build web
|
|
||||||
run: yarn build:local
|
|
||||||
shell: bash
|
|
||||||
- name: Run ubuntu/chrome snapshots
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
yarn playwright test --project="Google Chrome" --config=playwright.ci.config.ts --retries="3" --update-snapshots --grep=@snapshot --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
|
|
||||||
env:
|
|
||||||
CI: true
|
|
||||||
NODE_ENV: development
|
|
||||||
VITE_KC_DEV_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
|
||||||
VITE_KC_SKIP_AUTH: true
|
|
||||||
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
|
||||||
snapshottoken: ${{ secrets.KITTYCAD_API_TOKEN }}
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: ${{ !cancelled() && (success() || failure()) }}
|
|
||||||
with:
|
|
||||||
name: playwright-report-${{ matrix.os }}-snapshot-${{ matrix.shardIndex }}-${{ github.sha }}
|
|
||||||
path: playwright-report/
|
|
||||||
retention-days: 30
|
|
||||||
overwrite: true
|
|
||||||
- name: Clean up test-results
|
|
||||||
if: ${{ !cancelled() && (success() || failure()) }}
|
|
||||||
continue-on-error: true
|
|
||||||
run: rm -r test-results
|
|
||||||
- name: check for changes
|
|
||||||
shell: bash
|
|
||||||
id: git-check
|
|
||||||
run: |
|
|
||||||
git add .
|
|
||||||
if git status | grep -q "Changes to be committed"
|
|
||||||
then echo "modified=true" >> $GITHUB_OUTPUT
|
|
||||||
else echo "modified=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
- name: Commit changes, if any
|
|
||||||
if: steps.git-check.outputs.modified == 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git add .
|
|
||||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
git config --local user.name "github-actions[bot]"
|
|
||||||
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
|
||||||
git fetch origin
|
|
||||||
echo ${{ github.head_ref }}
|
|
||||||
git checkout ${{ github.head_ref }}
|
|
||||||
git commit -am "A snapshot a day keeps the bugs away! 📷🐛 (OS: ${{matrix.os}})" || true
|
|
||||||
git push
|
|
||||||
git push origin ${{ github.head_ref }}
|
|
||||||
# only upload artifacts if there's actually changes
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: steps.git-check.outputs.modified == 'true'
|
|
||||||
with:
|
|
||||||
name: playwright-report-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }}
|
|
||||||
path: playwright-report/
|
|
||||||
retention-days: 30
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
if: ${{ !cancelled() && (success() || failure()) }}
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
name: test-results-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }}
|
|
||||||
path: test-results/
|
|
||||||
- name: Run playwright/chrome flow (with retries)
|
|
||||||
id: retry
|
|
||||||
if: ${{ !cancelled() && (success() || failure()) }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [[ ! -f "test-results/.last-run.json" ]]; then
|
|
||||||
# if no last run artifact, than run plawright normally
|
|
||||||
echo "run playwright normally"
|
|
||||||
yarn playwright test --project="Google Chrome" --config=playwright.ci.config.ts --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --grep-invert="@snapshot|@electron" || true
|
|
||||||
# # send to axiom
|
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
retry=1
|
|
||||||
max_retrys=4
|
|
||||||
|
|
||||||
# retry failed tests, doing our own retries because using inbuilt playwright retries causes connection issues
|
|
||||||
while [[ $retry -le $max_retrys ]]; do
|
|
||||||
if [[ -f "test-results/.last-run.json" ]]; then
|
|
||||||
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
|
||||||
if [[ $failed_tests -gt 0 ]]; then
|
|
||||||
echo "retried=true" >>$GITHUB_OUTPUT
|
|
||||||
echo "run playwright with last failed tests and retry $retry"
|
|
||||||
yarn playwright test --project="Google Chrome" --config=playwright.ci.config.ts --last-failed --grep-invert="@snapshot|@electron" || true
|
|
||||||
# send to axiom
|
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
|
||||||
retry=$((retry + 1))
|
|
||||||
else
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
|
|
||||||
if [[ -f "test-results/.last-run.json" ]]; then
|
|
||||||
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
|
||||||
if [[ $failed_tests -gt 0 ]]; then
|
|
||||||
# if it still fails after 3 retrys, then fail the job
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
env:
|
|
||||||
CI: true
|
|
||||||
FAIL_ON_CONSOLE_ERRORS: true
|
|
||||||
NODE_ENV: development
|
|
||||||
VITE_KC_DEV_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
|
||||||
VITE_KC_SKIP_AUTH: true
|
|
||||||
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
|
||||||
- name: send to axiom
|
|
||||||
if: always()
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: test-results-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }}
|
|
||||||
path: test-results/
|
|
||||||
retention-days: 30
|
|
||||||
overwrite: true
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: playwright-report-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }}
|
|
||||||
path: playwright-report/
|
|
||||||
retention-days: 30
|
|
||||||
overwrite: true
|
|
||||||
|
|
||||||
|
|
||||||
playwright-electron:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest, macos-14]
|
|
||||||
timeout-minutes: 60
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
needs: check-rust-changes
|
|
||||||
steps:
|
|
||||||
- name: Tune GitHub-hosted runner network
|
|
||||||
uses: smorimoto/tune-github-hosted-runner-network@v1
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'yarn'
|
|
||||||
- uses: KittyCAD/action-install-cli@main
|
|
||||||
- name: Install dependencies
|
|
||||||
shell: bash
|
|
||||||
run: yarn
|
|
||||||
- name: Cache Playwright Browsers
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cache/ms-playwright/
|
|
||||||
key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }}
|
|
||||||
- name: Install Playwright Browsers
|
|
||||||
shell: bash
|
|
||||||
run: yarn playwright install chromium --with-deps
|
|
||||||
- name: Download Wasm Cache
|
|
||||||
id: download-wasm
|
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
|
||||||
uses: dawidd6/action-download-artifact@v6
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
name: wasm-bundle
|
|
||||||
workflow: build-and-store-wasm.yml
|
|
||||||
branch: main
|
|
||||||
path: src/wasm-lib/pkg
|
|
||||||
- name: copy wasm blob
|
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
|
||||||
shell: bash
|
|
||||||
run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
|
||||||
continue-on-error: true
|
|
||||||
- name: Setup Rust
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Cache Wasm (because rust diff)
|
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
workspaces: './src/wasm-lib'
|
|
||||||
- name: OR Cache Wasm (because wasm cache failed)
|
|
||||||
if: steps.download-wasm.outcome == 'failure'
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
workspaces: './src/wasm-lib'
|
|
||||||
- name: install good sed
|
|
||||||
if: ${{ startsWith(matrix.os, 'macos') }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
brew install gnu-sed
|
|
||||||
echo "/opt/homebrew/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
|
|
||||||
- name: Install vector
|
|
||||||
if: ${{ !startsWith(matrix.os, 'windows') }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
|
||||||
chmod +x /tmp/vector.sh
|
|
||||||
/tmp/vector.sh -y -no-modify-path
|
|
||||||
mkdir -p /tmp/vector
|
|
||||||
cp .github/workflows/vector.toml /tmp/vector.toml
|
|
||||||
sed -i "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml
|
|
||||||
sed -i "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml
|
|
||||||
sed -i "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml
|
|
||||||
sed -i "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml
|
|
||||||
sed -i "s#GH_ACTIONS_AXIOM_TOKEN#${{secrets.GH_ACTIONS_AXIOM_TOKEN}}#g" /tmp/vector.toml
|
|
||||||
cat /tmp/vector.toml
|
|
||||||
${HOME}/.vector/bin/vector --config /tmp/vector.toml &
|
|
||||||
- name: Build Wasm (because rust diff)
|
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
|
||||||
shell: bash
|
|
||||||
run: yarn build:wasm
|
|
||||||
- name: OR Build Wasm (because wasm cache failed)
|
|
||||||
if: steps.download-wasm.outcome == 'failure'
|
|
||||||
shell: bash
|
|
||||||
run: yarn build:wasm
|
|
||||||
- name: build electron
|
|
||||||
shell: bash
|
|
||||||
run: yarn tron:package
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
if: ${{ !cancelled() && (success() || failure()) }}
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
name: test-results-${{ matrix.os }}-${{ github.sha }}
|
|
||||||
path: test-results/
|
|
||||||
- name: Run electron tests (with retries)
|
|
||||||
id: retry
|
|
||||||
if: ${{ !cancelled() && (success() || failure()) }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [[ ! -f "test-results/.last-run.json" ]]; then
|
|
||||||
# if no last run artifact, than run plawright normally
|
|
||||||
echo "run playwright normally"
|
|
||||||
if [[ "$IS_UBUNTU" == "true" ]]; then
|
|
||||||
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn playwright test --config=playwright.electron.config.ts --grep=@electron || true
|
|
||||||
else
|
|
||||||
yarn playwright test --config=playwright.electron.config.ts --grep=@electron || true
|
|
||||||
fi
|
|
||||||
# # send to axiom
|
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
retry=1
|
|
||||||
max_retrys=2
|
|
||||||
|
|
||||||
# retry failed tests, doing our own retries because using inbuilt playwright retries causes connection issues
|
|
||||||
while [[ $retry -le $max_retrys ]]; do
|
|
||||||
if [[ -f "test-results/.last-run.json" ]]; then
|
|
||||||
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
|
||||||
if [[ $failed_tests -gt 0 ]]; then
|
|
||||||
echo "retried=true" >>$GITHUB_OUTPUT
|
|
||||||
echo "run playwright with last failed tests and retry $retry"
|
|
||||||
if [[ "$IS_UBUNTU" == "true" ]]; then
|
|
||||||
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn playwright test --config=playwright.electron.config.ts --last-failed --grep=@electron || true
|
|
||||||
else
|
|
||||||
yarn playwright test --config=playwright.electron.config.ts --grep=@electron || true
|
|
||||||
fi
|
|
||||||
# send to axiom
|
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
|
||||||
retry=$((retry + 1))
|
|
||||||
else
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
|
|
||||||
if [[ -f "test-results/.last-run.json" ]]; then
|
|
||||||
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
|
||||||
if [[ $failed_tests -gt 0 ]]; then
|
|
||||||
# if it still fails after 3 retrys, then fail the job
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
env:
|
|
||||||
CI: true
|
|
||||||
FAIL_ON_CONSOLE_ERRORS: true
|
|
||||||
NODE_ENV: development
|
|
||||||
VITE_KC_DEV_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
|
||||||
VITE_KC_SKIP_AUTH: true
|
|
||||||
IS_UBUNTU: ${{ startsWith(matrix.os, 'ubuntu') && 'true' || 'false' }}
|
|
||||||
#DEBUG: 'pw:browser*'
|
|
||||||
- name: send to axiom
|
|
||||||
if: ${{ !cancelled() && (success() || failure()) && !startsWith(matrix.os, 'windows') }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: ${{ !cancelled() && (success() || failure()) }}
|
|
||||||
with:
|
|
||||||
name: test-results-electron-${{ matrix.os }}-${{ github.sha }}
|
|
||||||
path: test-results/
|
|
||||||
retention-days: 30
|
|
||||||
overwrite: true
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: ${{ !cancelled() && (success() || failure()) }}
|
|
||||||
with:
|
|
||||||
name: playwright-report-electron-${{ matrix.os }}-${{ github.sha }}
|
|
||||||
path: playwright-report/
|
|
||||||
retention-days: 30
|
|
||||||
overwrite: true
|
|
64
.github/workflows/pr-kcl-samples-repo.yml
vendored
Normal file
64
.github/workflows/pr-kcl-samples-repo.yml
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'public/kcl-samples/**'
|
||||||
|
# pull_request:
|
||||||
|
# paths:
|
||||||
|
# - .github/workflows/pr-kcl-samples-repo.yml
|
||||||
|
workflow_dispatch:
|
||||||
|
name: Create PR in kcl-samples repo
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
jobs:
|
||||||
|
pr-kcl-samples-repo:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
# required
|
||||||
|
app-id: ${{ secrets.GH_ORG_APP_ID }}
|
||||||
|
private-key: ${{ secrets.GH_ORG_APP_PRIVATE_KEY }}
|
||||||
|
owner: ${{ github.repository_owner }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
# Checkout the other repo since we want to update the files there.
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: 'KittyCAD/kcl-samples'
|
||||||
|
ref: next
|
||||||
|
path: kcl-samples-repo
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
- name: Move files to repo work tree
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
rsync -av --delete \
|
||||||
|
--exclude='.git' \
|
||||||
|
--exclude='.github' \
|
||||||
|
--exclude='screenshots' \
|
||||||
|
--exclude='step' \
|
||||||
|
public/kcl-samples/ kcl-samples-repo/
|
||||||
|
- name: Commit the changes in the repo
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
cd kcl-samples-repo
|
||||||
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
export NEW_BRANCH="update-from-modeling-app"
|
||||||
|
git switch -c "$NEW_BRANCH"
|
||||||
|
git add --all .
|
||||||
|
git commit -m "Updates from modeling-app repo" || exit 0
|
||||||
|
git push -f origin "$NEW_BRANCH"
|
||||||
|
gh pr create --title "Update from modeling-app" \
|
||||||
|
--body "Updating files from the modeling-app repo" \
|
||||||
|
--head "$NEW_BRANCH" \
|
||||||
|
--reviewer jtran \
|
||||||
|
--base next || true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
160
.github/workflows/publish-apps-release.yml
vendored
Normal file
160
.github/workflows/publish-apps-release.yml
vendored
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
name: publish-apps-release
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-apps-release:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
|
||||||
|
- name: Find tag workflow id
|
||||||
|
id: tag_workflow_id
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
id=$(gh run ls --repo kittycad/modeling-app -w build-apps.yml --branch ${{ github.event.release.tag_name }} --json databaseId | jq '.[0].databaseId')
|
||||||
|
echo "id=$id" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-arm64-win
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-x64-win
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-yml-win
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-arm64-mac
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-x64-mac
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-yml-mac
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-arm64-linux
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-x64-linux
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-yml-linux
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: out-download-json
|
||||||
|
path: out
|
||||||
|
run-id: ${{ steps.tag_workflow_id.outputs.id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: List artifacts
|
||||||
|
run: ls -R out
|
||||||
|
|
||||||
|
- name: Override release notes
|
||||||
|
env:
|
||||||
|
NOTES: ${{ github.event.release.body }}
|
||||||
|
run: yarn files:set-notes
|
||||||
|
|
||||||
|
- name: Authenticate to Google Cloud
|
||||||
|
uses: 'google-github-actions/auth@v2.1.8'
|
||||||
|
with:
|
||||||
|
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
||||||
|
|
||||||
|
- name: Set up Google Cloud SDK
|
||||||
|
uses: google-github-actions/setup-gcloud@v2.1.4
|
||||||
|
with:
|
||||||
|
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
|
||||||
|
|
||||||
|
- name: Upload release files to public bucket
|
||||||
|
uses: google-github-actions/upload-cloud-storage@v2.2.2
|
||||||
|
with:
|
||||||
|
path: out
|
||||||
|
glob: '*'
|
||||||
|
parent: false
|
||||||
|
destination: 'dl.kittycad.io/releases/modeling-app'
|
||||||
|
|
||||||
|
- name: Invalidate bucket cache on latest*.yml and last_download.json files
|
||||||
|
run: yarn files:invalidate-bucket
|
||||||
|
|
||||||
|
- name: Upload release files to Github
|
||||||
|
if: ${{ github.event_name == 'release' }}
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: 'out/Zoo*'
|
||||||
|
|
||||||
|
|
||||||
|
announce_release:
|
||||||
|
needs: [publish-apps-release]
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install requests
|
||||||
|
|
||||||
|
- name: Announce Release
|
||||||
|
env:
|
||||||
|
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
RELEASE_VERSION: ${{ github.event.release.tag_name }}
|
||||||
|
RELEASE_BODY: ${{ github.event.release.body }}
|
||||||
|
run: python public/announce_release.py
|
24
.github/workflows/ruff.yml
vendored
Normal file
24
.github/workflows/ruff.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: ruff
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: main
|
||||||
|
paths:
|
||||||
|
- '**.py'
|
||||||
|
- .github/workflows/ruff.yml
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**.py'
|
||||||
|
- .github/workflows/ruff.yml
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
jobs:
|
||||||
|
ruff:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: astral-sh/ruff-action@v3
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
name: build-test-web
|
name: Static Analysis
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -16,7 +16,7 @@ permissions:
|
|||||||
actions: read
|
actions: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-format:
|
yarn-fmt-check:
|
||||||
runs-on: 'ubuntu-22.04'
|
runs-on: 'ubuntu-22.04'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -27,7 +27,7 @@ jobs:
|
|||||||
- run: yarn install
|
- run: yarn install
|
||||||
- run: yarn fmt-check
|
- run: yarn fmt-check
|
||||||
|
|
||||||
check-types:
|
yarn-build-wasm:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -37,18 +37,46 @@ jobs:
|
|||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
- run: yarn install
|
- run: yarn install
|
||||||
|
- uses: taiki-e/install-action@955a6ff1416eae278c9f833008a9beb4b7f9afe3
|
||||||
|
with:
|
||||||
|
tool: wasm-pack
|
||||||
|
- run: yarn build:wasm
|
||||||
|
|
||||||
|
yarn-tsc:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
- run: yarn install
|
||||||
|
- run: yarn --cwd ./rust/kcl-language-server --modules-folder node_modules install
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: './src/wasm-lib'
|
workspaces: './rust'
|
||||||
|
|
||||||
|
- uses: taiki-e/install-action@955a6ff1416eae278c9f833008a9beb4b7f9afe3
|
||||||
|
with:
|
||||||
|
tool: wasm-pack
|
||||||
- run: yarn build:wasm
|
- run: yarn build:wasm
|
||||||
- run: yarn xstate:typegen
|
|
||||||
- run: yarn tsc
|
- run: yarn tsc
|
||||||
- name: Lint
|
|
||||||
run: yarn eslint --max-warnings 0 src e2e packages/codemirror-lsp-client
|
|
||||||
|
|
||||||
|
yarn-lint:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
check-typos:
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
- run: yarn install
|
||||||
|
- run: yarn --cwd ./rust/kcl-language-server --modules-folder node_modules install
|
||||||
|
- run: yarn lint
|
||||||
|
|
||||||
|
python-codespell:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -61,8 +89,7 @@ jobs:
|
|||||||
- name: Run codespell
|
- name: Run codespell
|
||||||
run: codespell --config .codespellrc # Edit this file to tweak the typo list and other configuration.
|
run: codespell --config .codespellrc # Edit this file to tweak the typo list and other configuration.
|
||||||
|
|
||||||
|
yarn-unit-test-kcl-samples:
|
||||||
build-test-web:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -73,14 +100,41 @@ jobs:
|
|||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
|
|
||||||
- run: yarn install
|
- run: yarn install
|
||||||
|
- uses: taiki-e/install-action@955a6ff1416eae278c9f833008a9beb4b7f9afe3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
with:
|
||||||
workspaces: './src/wasm-lib'
|
tool: wasm-pack
|
||||||
|
|
||||||
- run: yarn build:wasm
|
- run: yarn build:wasm
|
||||||
|
|
||||||
- run: yarn simpleserver:ci
|
- run: yarn simpleserver:bg
|
||||||
|
if: ${{ github.event_name != 'release' && github.event_name != 'schedule' }}
|
||||||
|
|
||||||
|
- name: Install Chromium Browser
|
||||||
|
if: ${{ github.event_name != 'release' && github.event_name != 'schedule' }}
|
||||||
|
run: yarn playwright install chromium --with-deps
|
||||||
|
|
||||||
|
- name: run unit tests for kcl samples
|
||||||
|
if: ${{ github.event_name != 'release' && github.event_name != 'schedule' }}
|
||||||
|
run: yarn test:unit:kcl-samples
|
||||||
|
env:
|
||||||
|
VITE_KC_DEV_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
|
|
||||||
|
yarn-unit-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
|
||||||
|
- run: yarn install
|
||||||
|
- uses: taiki-e/install-action@955a6ff1416eae278c9f833008a9beb4b7f9afe3
|
||||||
|
with:
|
||||||
|
tool: wasm-pack
|
||||||
|
- run: yarn build:wasm
|
||||||
|
|
||||||
|
- run: yarn simpleserver:bg
|
||||||
if: ${{ github.event_name != 'release' && github.event_name != 'schedule' }}
|
if: ${{ github.event_name != 'release' && github.event_name != 'schedule' }}
|
||||||
|
|
||||||
- name: Install Chromium Browser
|
- name: Install Chromium Browser
|
||||||
@ -89,7 +143,7 @@ jobs:
|
|||||||
|
|
||||||
- name: run unit tests
|
- name: run unit tests
|
||||||
if: ${{ github.event_name != 'release' && github.event_name != 'schedule' }}
|
if: ${{ github.event_name != 'release' && github.event_name != 'schedule' }}
|
||||||
run: yarn test:nowatch
|
run: xvfb-run -a yarn test:unit
|
||||||
env:
|
env:
|
||||||
VITE_KC_DEV_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
VITE_KC_DEV_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
|
|
39
.github/workflows/tag-nightly.yml
vendored
Normal file
39
.github/workflows/tag-nightly.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: tag-nightly
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 4 * * *'
|
||||||
|
# Daily at 04:00 AM UTC
|
||||||
|
# Will checkout the last commit from the default branch (main as of 2023-10-04)
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tag-nightly:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
|
||||||
|
private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }}
|
||||||
|
owner: ${{ github.repository_owner }}
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- run: yarn install
|
||||||
|
|
||||||
|
- name: Push tag
|
||||||
|
run: |
|
||||||
|
VERSION_NO_V=$(date +'%-y.%-m.%-d')
|
||||||
|
TAG="nightly-v$VERSION_NO_V"
|
||||||
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
git tag $TAG
|
||||||
|
git push origin tag $TAG
|
44
.gitignore
vendored
44
.gitignore
vendored
@ -1,7 +1,7 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
/node_modules
|
node_modules
|
||||||
/.pnp
|
/.pnp
|
||||||
.pnp.js
|
.pnp.js
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
/coverage
|
/coverage
|
||||||
|
|
||||||
# production
|
# production
|
||||||
/build
|
build
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@ -25,26 +25,36 @@ yarn-error.log*
|
|||||||
|
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
src/wasm-lib/.idea
|
.helix
|
||||||
src/wasm-lib/.vscode
|
|
||||||
|
|
||||||
# rust
|
# rust
|
||||||
src/wasm-lib/target
|
rust/target
|
||||||
src/wasm-lib/bindings
|
rust/kcl-lib/bindings
|
||||||
src/wasm-lib/kcl/bindings
|
public/kcl_wasm_lib_bg.wasm
|
||||||
public/wasm_lib_bg.wasm
|
rust/lcov.info
|
||||||
src/wasm-lib/lcov.info
|
rust/kcl-wasm-lib/pkg
|
||||||
src/wasm-lib/grackle/test_json_output
|
*.snap.new
|
||||||
|
rust/kcl-lib/fuzz/Cargo.lock
|
||||||
|
rust/kcl-language-server-release/Cargo.lock
|
||||||
|
|
||||||
|
# kcl language server package
|
||||||
|
rust/kcl-language-server/dist/
|
||||||
|
|
||||||
e2e/playwright/playwright-secrets.env
|
e2e/playwright/playwright-secrets.env
|
||||||
e2e/playwright/temp1.png
|
e2e/playwright/temp1.png
|
||||||
e2e/playwright/temp2.png
|
e2e/playwright/temp2.png
|
||||||
e2e/playwright/temp3.png
|
e2e/playwright/temp3.png
|
||||||
|
# this will be overridden for specific directories
|
||||||
|
e2e/playwright/**/*.png
|
||||||
# exports from snapshot-tests.spec.ts "exports of each format should work"
|
# exports from snapshot-tests.spec.ts "exports of each format should work"
|
||||||
e2e/playwright/export-snapshots/*
|
e2e/playwright/export-snapshots/*
|
||||||
!e2e/playwright/export-snapshots/*.png
|
!e2e/playwright/export-snapshots/*.png
|
||||||
|
!e2e/playwright/snapshot-tests.spec.ts-snapshots/*.png
|
||||||
|
|
||||||
|
/public/kcl-samples.zip
|
||||||
|
/public/kcl-samples/.github
|
||||||
|
/public/kcl-samples/screenshots
|
||||||
|
/public/kcl-samples/step
|
||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/blob-report/
|
/blob-report/
|
||||||
@ -55,14 +65,20 @@ e2e/playwright/export-snapshots/*
|
|||||||
## generated files
|
## generated files
|
||||||
src/**/*.typegen.ts
|
src/**/*.typegen.ts
|
||||||
|
|
||||||
src/wasm-lib/grackle/stdlib_cube_partial.json
|
|
||||||
Mac_App_Distribution.provisionprofile
|
Mac_App_Distribution.provisionprofile
|
||||||
|
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
src/wasm-lib/pkg
|
|
||||||
|
|
||||||
venv
|
.eslintcache
|
||||||
.vite/
|
.vite/
|
||||||
|
|
||||||
# electron
|
# electron
|
||||||
out/
|
out/
|
||||||
|
|
||||||
|
# python
|
||||||
|
__pycache__/
|
||||||
|
uv.lock
|
||||||
|
dist
|
||||||
|
venv
|
||||||
|
|
||||||
|
.vscode-test
|
||||||
|
2
.helix/config.toml
Normal file
2
.helix/config.toml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[editor]
|
||||||
|
auto-format = true
|
10
.helix/languages.toml
Normal file
10
.helix/languages.toml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[language-server.eslint]
|
||||||
|
args = ["--stdio"]
|
||||||
|
command = "vscode-eslint-language-server"
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "typescript"
|
||||||
|
auto-format = true
|
||||||
|
formatter = { command = "node_modules/.bin/prettier", args = ["--parser", "typescript"] }
|
||||||
|
language-servers = [ { name = "eslint", only-features = [ "diagnostics" ] }, "typescript-language-server" ]
|
||||||
|
|
@ -5,11 +5,12 @@ coverage
|
|||||||
|
|
||||||
# Ignore Rust projects:
|
# Ignore Rust projects:
|
||||||
*.rs
|
*.rs
|
||||||
|
*.hbs
|
||||||
target
|
target
|
||||||
src/wasm-lib/pkg
|
|
||||||
src/wasm-lib/kcl/bindings
|
|
||||||
e2e/playwright/export-snapshots
|
e2e/playwright/export-snapshots
|
||||||
|
e2e/playwright/snapshots/prompt-to-edit
|
||||||
|
|
||||||
|
|
||||||
# XState generated files
|
# XState generated files
|
||||||
src/machines/**.typegen.ts
|
src/machines/**.typegen.ts
|
||||||
|
.vscode-test
|
||||||
|
43
INSTALL.md
Normal file
43
INSTALL.md
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# Setting Up Zoo Modeling App
|
||||||
|
|
||||||
|
Compared to other CAD software, getting Zoo Modeling App up and running is quick and straightforward across platforms. It's about 100MB to download and is quick to install.
|
||||||
|
|
||||||
|
## Windows
|
||||||
|
|
||||||
|
1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for Windows and for your processor type.
|
||||||
|
|
||||||
|
2. Once downloaded, run the installer `Zoo Modeling App-{version}-{arch}-win.exe` which should take a few seconds.
|
||||||
|
|
||||||
|
3. The installation happens at `C:\Program Files\Zoo Modeling App`. A shortcut in the start menu is also created so you can run the app easily by clicking on it.
|
||||||
|
|
||||||
|
## macOS
|
||||||
|
|
||||||
|
1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for macOS and for your processor type.
|
||||||
|
|
||||||
|
2. Once downloaded, open the disk image `Zoo Modeling App-{version}-{arch}-mac.dmg` and drag the applications to your `Applications` directory.
|
||||||
|
|
||||||
|
3. You can then open your `Applications` directory and double-click on `Zoo Modeling App` to open.
|
||||||
|
|
||||||
|
|
||||||
|
## Linux
|
||||||
|
|
||||||
|
1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for Linux and for your processor type.
|
||||||
|
|
||||||
|
2. Install the dependencies needed to run the [AppImage format](https://appimage.org/).
|
||||||
|
- On Ubuntu, install the FUSE library with these commands in a terminal.
|
||||||
|
```bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install libfuse2
|
||||||
|
```
|
||||||
|
- Optionally, follow [these steps](https://github.com/probonopd/go-appimage/blob/master/src/appimaged/README.md#initial-setup) to install `appimaged`. It is a daemon that makes interacting with AppImage files more seamless.
|
||||||
|
- Once installed, copy the downloaded `Zoo Modeling App-{version}-{arch}-linux.AppImage` to the directory of your choice, for instance `~/Applications`.
|
||||||
|
|
||||||
|
- `appimaged` should automatically find it and make it executable. If not, run:
|
||||||
|
```bash
|
||||||
|
chmod a+x ~/Applications/Zoo\ Modeling\ App-{version}-{arch}-linux.AppImage
|
||||||
|
```
|
||||||
|
|
||||||
|
3. You can double-click on the AppImage to run it, or in a terminal with this command:
|
||||||
|
```bash
|
||||||
|
~/Applications/Zoo\ Modeling\ App-{version}-{arch}-linux.AppImage
|
||||||
|
```
|
6
Makefile
6
Makefile
@ -1,6 +1,6 @@
|
|||||||
.PHONY: dev
|
.PHONY: dev
|
||||||
|
|
||||||
WASM_LIB_FILES := $(wildcard src/wasm-lib/**/*.rs)
|
KCL_WASM_LIB_FILES := $(wildcard rust/**/*.rs)
|
||||||
TS_SRC := $(wildcard src/**/*.tsx) $(wildcard src/**/*.ts)
|
TS_SRC := $(wildcard src/**/*.tsx) $(wildcard src/**/*.ts)
|
||||||
XSTATE_TYPEGENS := $(wildcard src/machines/*.typegen.ts)
|
XSTATE_TYPEGENS := $(wildcard src/machines/*.typegen.ts)
|
||||||
|
|
||||||
@ -18,8 +18,8 @@ lee-electron-test:
|
|||||||
$(XSTATE_TYPEGENS): $(TS_SRC)
|
$(XSTATE_TYPEGENS): $(TS_SRC)
|
||||||
yarn xstate typegen 'src/**/*.ts?(x)'
|
yarn xstate typegen 'src/**/*.ts?(x)'
|
||||||
|
|
||||||
public/wasm_lib_bg.wasm: $(WASM_LIB_FILES)
|
public/kcl_wasm_lib_bg.wasm: $(KCL_WASM_LIB_FILES)
|
||||||
yarn build:wasm-dev
|
yarn build:wasm
|
||||||
|
|
||||||
node_modules: package.json yarn.lock
|
node_modules: package.json yarn.lock
|
||||||
yarn install
|
yarn install
|
||||||
|
236
README.md
236
README.md
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Zoo Modeling App
|
## Zoo Modeling App
|
||||||
|
|
||||||
live at [app.zoo.dev](https://app.zoo.dev/)
|
download at [zoo.dev/modeling-app/download](https://zoo.dev/modeling-app/download)
|
||||||
|
|
||||||
A CAD application from the future, brought to you by the [Zoo team](https://zoo.dev).
|
A CAD application from the future, brought to you by the [Zoo team](https://zoo.dev).
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ The 3D view in Modeling App is just a video stream from our hosted geometry engi
|
|||||||
|
|
||||||
[Original demo video](https://drive.google.com/file/d/183_wjqGdzZ8EEZXSqZ3eDcJocYPCyOdC/view?pli=1)
|
[Original demo video](https://drive.google.com/file/d/183_wjqGdzZ8EEZXSqZ3eDcJocYPCyOdC/view?pli=1)
|
||||||
|
|
||||||
[Original demo slides](https://github.com/KittyCAD/Eng/files/10398178/demo.pdf)
|
[Original demo slides](https://github.com/user-attachments/files/19010536/demo.pdf)
|
||||||
|
|
||||||
## Get started
|
## Get started
|
||||||
|
|
||||||
@ -48,33 +48,64 @@ We recommend downloading the latest application binary from [our Releases page](
|
|||||||
|
|
||||||
## Running a development build
|
## Running a development build
|
||||||
|
|
||||||
First, [install Rust via `rustup`](https://www.rust-lang.org/tools/install). This project uses a lot of Rust compiled to [WASM](https://webassembly.org/) within it. We always use the latest stable version of Rust, so you may need to run `rustup update stable`. Then, run:
|
Install a node version manager such as [fnm](https://github.com/Schniz/fnm?tab=readme-ov-#installation).
|
||||||
|
|
||||||
|
On Windows, it's also recommended to [upgrade your PowerShell version](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5#winget), we're using 7.
|
||||||
|
|
||||||
|
Then in the repo run the following to install and use the node version specified in `.nvmrc`. You might need to specify your processor architecture with `--arch arm64` or `--arch x64` if it's not autodetected.
|
||||||
|
|
||||||
|
```
|
||||||
|
fnm install --corepack-enabled
|
||||||
|
fnm use
|
||||||
|
```
|
||||||
|
|
||||||
|
Install the NPM dependencies with:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn install
|
yarn install
|
||||||
```
|
```
|
||||||
|
|
||||||
followed by:
|
This project uses a lot of Rust compiled to [WASM](https://webassembly.org/) within it. We have package scripts to run rustup, see `package.json` for reference:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn build:wasm-dev
|
# macOS/Linux
|
||||||
|
yarn install:rust
|
||||||
|
yarn install:wasm-pack:sh
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
yarn install:rust:windows
|
||||||
|
yarn install:wasm-pack:cargo
|
||||||
```
|
```
|
||||||
|
|
||||||
or if you have the gh cli installed
|
Then to build the WASM layer, run:
|
||||||
|
|
||||||
```
|
```
|
||||||
./get-latest-wasm-bundle.sh # this will download the latest main wasm bundle
|
# macOS/Linux
|
||||||
|
yarn build:wasm
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
yarn build:wasm:windows
|
||||||
```
|
```
|
||||||
|
|
||||||
That will build the WASM binary and put in the `public` dir (though gitignored)
|
Or if you have the `gh` cli installed and want to download the latest main wasm bundle. Note that on Windows, you need to associate .ps1 files with PowerShell, which can be done via the right click menu, selecting `C:\Program Files\PowerShell\7\pwsh.exe`, and you can install tools like `gh` via `yarn install:tools:windows`.
|
||||||
|
|
||||||
finally, to run the web app only, run:
|
```
|
||||||
|
# macOS/Linux
|
||||||
|
yarn fetch:wasm
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
yarn fetch:wasm:windows
|
||||||
|
```
|
||||||
|
|
||||||
|
That will build the WASM binary and put in the `public` dir (though gitignored).
|
||||||
|
|
||||||
|
Finally, to run the web app only, run:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn start
|
yarn start
|
||||||
```
|
```
|
||||||
|
|
||||||
If you're not an KittyCAD employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens ofcourse, then navigate to localhost:3000 again. Note that navigating to localhost:3000/signin removes your token so you will need to set the token again.
|
If you're not a Zoo employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens of course, then navigate to localhost:3000 again. Note that navigating to `localhost:3000/signin` removes your token so you will need to set the token again.
|
||||||
|
|
||||||
### Development environment variables
|
### Development environment variables
|
||||||
|
|
||||||
@ -91,26 +122,27 @@ Third-Party Cookies".
|
|||||||
|
|
||||||
## Desktop
|
## Desktop
|
||||||
|
|
||||||
To spin up the desktop app, `yarn install` and `yarn build:wasm-dev` need to have been done before hand then
|
To spin up the desktop app, `yarn install` and `yarn build:wasm` need to have been done before hand then
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn electron:start
|
yarn tron:start
|
||||||
```
|
```
|
||||||
|
|
||||||
This will start the application and hot-reload on changed.
|
This will start the application and hot-reload on changes.
|
||||||
|
|
||||||
Devtools can be opened with the usual Cmd/Ctrl-Shift-I.
|
Devtools can be opened with the usual Cmd-Opt-I (Mac) or Ctrl-Shift-I (Linux and Windows).
|
||||||
|
|
||||||
To build, run `yarn tron:package`.
|
To package the app for your platform with electron-builder, run `yarn tronb:package:dev` (or `yarn tronb:package:prod` to point to the .env.production variables)
|
||||||
|
|
||||||
## Checking out commits / Bisecting
|
## Checking out commits / Bisecting
|
||||||
|
|
||||||
Which commands from setup are one off vs need to be run every time?
|
Which commands from setup are one off vs need to be run every time?
|
||||||
|
|
||||||
The following will need to be run when checking out a new commit and guarantees the build is not stale:
|
The following will need to be run when checking out a new commit and guarantees the build is not stale:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn install
|
yarn install
|
||||||
yarn build:wasm-dev # or yarn build:wasm for slower but more production-like build
|
yarn build:wasm
|
||||||
yarn start # or yarn build:local && yarn serve for slower but more production-like build
|
yarn start # or yarn build:local && yarn serve for slower but more production-like build
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -128,40 +160,64 @@ Before you submit a contribution PR to this repo, please ensure that:
|
|||||||
|
|
||||||
## Release a new version
|
## Release a new version
|
||||||
|
|
||||||
#### 1. Bump the versions by running `./make-release.sh` and create a Cut Release PR
|
#### 1. Create a 'Cut release $VERSION' issue
|
||||||
|
|
||||||
That will create the branch with the updated json files for you:
|
It will be used to document changelog discussions and release testing.
|
||||||
- run `./make-release.sh` or `./make-release.sh patch` for a patch update;
|
|
||||||
- run `./make-release.sh minor` for minor; or
|
|
||||||
- run `./make-release.sh major` for major.
|
|
||||||
|
|
||||||
After it runs you should just need the push the branch and open a PR.
|
https://github.com/KittyCAD/modeling-app/issues/new
|
||||||
|
|
||||||
**Important:** It needs to be prefixed with `Cut release v` to build in release mode and a few other things to test in the best context possible, the intent would be for instance to have `Cut release v1.2.3` for the `v1.2.3` release candidate.
|
#### 2. Push a new tag
|
||||||
|
|
||||||
The PR may then serve as a place to discuss the human-readable changelog and extra QA. The `make-release.sh` tool suggests a changelog for you too to be used as PR description, just make sure to delete lines that are not user facing.
|
Create a new tag and push it to the repo. The `semantic-release.sh` script will automatically bump the minor part, which we use the most. For instance going from `v0.27.0` to `v0.28.0`.
|
||||||
|
|
||||||
#### 2. Smoke test artifacts from the Cut Release PR
|
```
|
||||||
|
VERSION=$(./scripts/semantic-release.sh)
|
||||||
|
git tag $VERSION
|
||||||
|
git push origin --tags
|
||||||
|
```
|
||||||
|
|
||||||
The release builds can be find under the `artifact` zip, at the very bottom of the `ci` action page for each commit on this branch.
|
This will trigger the `build-apps` workflow, set the version, build & sign the apps, and generate release files as well as updater-test artifacts.
|
||||||
|
|
||||||
We don't have a strict process, but click around and check for anything obvious, posting results as comments in the Cut Release PR.
|
The workflow should be listed right away [in this list](https://github.com/KittyCAD/modeling-app/actions/workflows/build-apps.yml?query=event%3Apush)).
|
||||||
|
|
||||||
The other `ci` output in Cut Release PRs is `updater-test`, because we don't have a way to test this fully automated, we have a semi-automated process. Download updater-test zip file, install the app, run it, expect an updater prompt to a dummy v0.99.99, install it and check that the app comes back at that version (on both macOS and Windows).
|
#### 3. Manually test artifacts
|
||||||
|
|
||||||
#### 3. Merge the Cut Release PR
|
##### Release builds
|
||||||
|
|
||||||
This will kick the `create-release` action, that creates a _Draft_ release out of this Cut Release PR merge after less than a minute, with the new version as title and Cut Release PR as description.
|
The release builds can be found under the `out-{arch}-{platform}` zip files, at the very bottom of the `build-apps` summary page for the workflow (triggered by the tag in 2.).
|
||||||
|
|
||||||
|
Manually test against this [list](https://github.com/KittyCAD/modeling-app/issues/3588) across Windows, MacOS, Linux and posting results as comments in the issue.
|
||||||
|
|
||||||
|
##### Updater-test builds
|
||||||
|
|
||||||
|
The other `build-apps` output in the release `build-apps` workflow (triggered by 2.) is `updater-test-{arch}-{platform}`. It's a semi-automated process: for macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version.
|
||||||
|
|
||||||
|
The only difference with these builds is that they point to a different update location on the release bucket, with this dummy v0.255.255 always available. This helps ensuring that the version we release will be able to update to the next one available.
|
||||||
|
|
||||||
|
If the prompt doesn't show up, start the app in command line to grab the electron-updater logs. This is likely an issue with the current build that needs addressing (or the updater-test location in the storage bucket).
|
||||||
|
|
||||||
|
```
|
||||||
|
# Windows (PowerShell)
|
||||||
|
& 'C:\Program Files\Zoo Modeling App\Zoo Modeling App.exe'
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
/Applications/Zoo\ Modeling\ App.app/Contents/MacOS/Zoo\ Modeling\ App
|
||||||
|
|
||||||
|
# Linux
|
||||||
|
./Zoo Modeling App-{version}-{arch}-linux.AppImage
|
||||||
|
```
|
||||||
|
|
||||||
#### 4. Publish the release
|
#### 4. Publish the release
|
||||||
|
|
||||||
Head over to https://github.com/KittyCAD/modeling-app/releases, the draft release corresponding to the merged Cut Release PR should show up at the top as _Draft_. Click on it, verify the content, and hit _Publish_.
|
Head over to https://github.com/KittyCAD/modeling-app/releases/new, pick the newly created tag and type it in the _Release title_ field as well.
|
||||||
|
|
||||||
#### 5. Profit
|
Hit _Generate release notes_ as a starting point to discuss the changelog in the issue. Once done, make sure _Set as the latest release_ is checked, and hit _Publish release_.
|
||||||
|
|
||||||
A new Action kicks in at https://github.com/KittyCAD/modeling-app/actions, which can be found under `release` event filter.
|
A new `publish-apps-release` will kick in and you should be able to find it [here](https://github.com/KittyCAD/modeling-app/actions?query=event%3Arelease). On success, the files will be uploaded to the public bucket as well as to the GitHub release, and the announcement on Discord will be sent.
|
||||||
|
|
||||||
|
#### 5. Close the issue
|
||||||
|
|
||||||
|
If everything is well and the release is out to the public, the issue tracking the release shall be closed.
|
||||||
|
|
||||||
## Fuzzing the parser
|
## Fuzzing the parser
|
||||||
|
|
||||||
@ -172,7 +228,7 @@ $ cargo install cargo-fuzz
|
|||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cd src/wasm-lib/kcl
|
$ cd rust/kcl-lib
|
||||||
|
|
||||||
# list the fuzz targets
|
# list the fuzz targets
|
||||||
$ cargo fuzz list
|
$ cargo fuzz list
|
||||||
@ -200,6 +256,7 @@ snapshottoken=<your-snapshot-token>
|
|||||||
For a portable way to run Playwright you'll need Docker.
|
For a portable way to run Playwright you'll need Docker.
|
||||||
|
|
||||||
#### Generic example
|
#### Generic example
|
||||||
|
|
||||||
After that, open a terminal and run:
|
After that, open a terminal and run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -212,7 +269,6 @@ and in another terminal, run:
|
|||||||
PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" <test suite>
|
PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" <test suite>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### Specific example
|
#### Specific example
|
||||||
|
|
||||||
open a terminal and run:
|
open a terminal and run:
|
||||||
@ -230,7 +286,6 @@ PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project=
|
|||||||
run a specific test change the test from `test('...` to `test.only('...`
|
run a specific test change the test from `test('...` to `test.only('...`
|
||||||
(note if you commit this, the tests will instantly fail without running any of the tests)
|
(note if you commit this, the tests will instantly fail without running any of the tests)
|
||||||
|
|
||||||
|
|
||||||
**Gotcha**: running the docker container with a mismatched image against your `./node_modules/playwright` will cause a failure. Make sure the versions are matched and up to date.
|
**Gotcha**: running the docker container with a mismatched image against your `./node_modules/playwright` will cause a failure. Make sure the versions are matched and up to date.
|
||||||
|
|
||||||
run headed
|
run headed
|
||||||
@ -304,7 +359,7 @@ yarn start
|
|||||||
and finally:
|
and finally:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn test:nowatch
|
yarn test:unit
|
||||||
```
|
```
|
||||||
|
|
||||||
For individual testing:
|
For individual testing:
|
||||||
@ -313,14 +368,105 @@ For individual testing:
|
|||||||
yarn test abstractSyntaxTree -t "unexpected closed curly brace" --silent=false
|
yarn test abstractSyntaxTree -t "unexpected closed curly brace" --silent=false
|
||||||
```
|
```
|
||||||
|
|
||||||
Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro/) tests, in interactive mode by default.
|
Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro) tests, in interactive mode by default.
|
||||||
|
|
||||||
### Rust tests
|
### Rust tests
|
||||||
|
|
||||||
```bash
|
**Dependencies**
|
||||||
cd src/wasm-lib
|
|
||||||
cargo test
|
- `KITTYCAD_API_TOKEN`
|
||||||
|
- `cargo-nextest`
|
||||||
|
- `just`
|
||||||
|
|
||||||
|
#### Setting KITTYCAD_API_TOKEN
|
||||||
|
|
||||||
|
Use the production zoo.dev token, set this environment variable before running the tests
|
||||||
|
|
||||||
|
#### Installing cargonextest
|
||||||
|
|
||||||
```
|
```
|
||||||
|
cd rust
|
||||||
|
cargo search cargo-nextest
|
||||||
|
cargo install cargo-nextest
|
||||||
|
```
|
||||||
|
|
||||||
|
#### just
|
||||||
|
|
||||||
|
install [`just`](https://github.com/casey/just?tab=readme-ov-file#pre-built-binaries)
|
||||||
|
|
||||||
|
#### Running the tests
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# With just
|
||||||
|
# Make sure KITTYCAD_API_TOKEN=<prod zoo.dev token> is set
|
||||||
|
# Make sure you installed cargo-nextest
|
||||||
|
# Make sure you installed just
|
||||||
|
cd rust
|
||||||
|
just test
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Without just
|
||||||
|
# Make sure KITTYCAD_API_TOKEN=<prod zoo.dev token> is set
|
||||||
|
# Make sure you installed cargo-nextest
|
||||||
|
cd rust
|
||||||
|
export RUST_BRACKTRACE="full" && cargo nextest run --workspace --test-threads=1
|
||||||
|
```
|
||||||
|
|
||||||
|
Where `XXX` is an API token from the production engine (NOT the dev environment).
|
||||||
|
|
||||||
|
We recommend using [nextest](https://nexte.st/) to run the Rust tests (its faster and is used in CI). Once installed, run the tests using
|
||||||
|
|
||||||
|
```
|
||||||
|
cd rust
|
||||||
|
KITTYCAD_API_TOKEN=XXX cargo run nextest
|
||||||
|
```
|
||||||
|
|
||||||
|
### Mapping CI CD jobs to local commands
|
||||||
|
|
||||||
|
When you see the CI CD fail on jobs you may wonder three things
|
||||||
|
|
||||||
|
- Do I have a bug in my code?
|
||||||
|
- Is the test flaky?
|
||||||
|
- Is there a bug in `main`?
|
||||||
|
|
||||||
|
To answer these questions the following commands will give you confidence to locate the issue.
|
||||||
|
|
||||||
|
#### Static Analysis
|
||||||
|
|
||||||
|
Part of the CI CD pipeline performs static analysis on the code. Use the following commands to mimic the CI CD jobs.
|
||||||
|
|
||||||
|
The following set of commands should get us closer to one and done commands to instantly retest issues.
|
||||||
|
|
||||||
|
```
|
||||||
|
yarn test-setup
|
||||||
|
```
|
||||||
|
|
||||||
|
> Gotcha, are packages up to date and is the wasm built?
|
||||||
|
|
||||||
|
```
|
||||||
|
yarn tsc
|
||||||
|
yarn fmt-check
|
||||||
|
yarn lint
|
||||||
|
yarn test:unit:local
|
||||||
|
```
|
||||||
|
|
||||||
|
> Gotcha: Our unit tests have integration tests in them. You need to run a localhost server to run the unit tests.
|
||||||
|
|
||||||
|
#### E2E Tests
|
||||||
|
|
||||||
|
**Playwright Electron**
|
||||||
|
|
||||||
|
These E2E tests run in electron. There are tests that are skipped if they are ran in a windows, linux, or macos environment. We can use playwright tags to implement test skipping.
|
||||||
|
|
||||||
|
```
|
||||||
|
yarn test:playwright:electron:local
|
||||||
|
yarn test:playwright:electron:windows:local
|
||||||
|
yarn test:playwright:electron:macos:local
|
||||||
|
yarn test:playwright:electron:ubuntu:local
|
||||||
|
```
|
||||||
|
|
||||||
|
> Why does it say local? The CI CD commands that run in the pipeline cannot be ran locally. A single command will not properly setup the testing environment locally.
|
||||||
|
|
||||||
#### Some notes on CI
|
#### Some notes on CI
|
||||||
|
|
||||||
@ -353,4 +499,10 @@ PS: for the debug panel, the following JSON is useful for snapping the camera
|
|||||||
|
|
||||||
## KCL
|
## KCL
|
||||||
|
|
||||||
For how to contribute to KCL, [see our KCL README](https://github.com/KittyCAD/modeling-app/tree/main/src/wasm-lib/kcl).
|
For how to contribute to KCL, [see our KCL README](https://github.com/KittyCAD/modeling-app/tree/main/rust/kcl-lib).
|
||||||
|
|
||||||
|
### Logging
|
||||||
|
|
||||||
|
To display logging (to the terminal or console) set `ZOO_LOG=1`. This will log some warnings and simple performance metrics. To view these in test runs, use `-- --nocapture`.
|
||||||
|
|
||||||
|
To enable memory metrics, build with `--features dhat-heap`.
|
||||||
|
BIN
assets/icon-nightly.ico
Normal file
BIN
assets/icon-nightly.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 119 KiB |
BIN
assets/icon-nightly.png
Normal file
BIN
assets/icon-nightly.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 259 KiB |
BIN
assets/icon.icns
BIN
assets/icon.icns
Binary file not shown.
BIN
assets/icon.ico
BIN
assets/icon.ico
Binary file not shown.
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 114 KiB |
BIN
assets/icon.png
BIN
assets/icon.png
Binary file not shown.
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 113 KiB |
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
209
docs/kcl/appearance.md
Normal file
209
docs/kcl/appearance.md
Normal file
File diff suppressed because one or more lines are too long
972
docs/kcl/arc.md
972
docs/kcl/arc.md
File diff suppressed because one or more lines are too long
45
docs/kcl/arcTo.md
Normal file
45
docs/kcl/arcTo.md
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
52
docs/kcl/atan2.md
Normal file
52
docs/kcl/atan2.md
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1030
docs/kcl/chamfer.md
1030
docs/kcl/chamfer.md
File diff suppressed because one or more lines are too long
1136
docs/kcl/circle.md
1136
docs/kcl/circle.md
File diff suppressed because one or more lines are too long
47
docs/kcl/circleThreePoint.md
Normal file
47
docs/kcl/circleThreePoint.md
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
15
docs/kcl/const_std-HALF_TURN.md
Normal file
15
docs/kcl/const_std-HALF_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::HALF_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::HALF_TURN: number(deg) = 180deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_std-QUARTER_TURN.md
Normal file
15
docs/kcl/const_std-QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::QUARTER_TURN: number(deg) = 90deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_std-THREE_QUARTER_TURN.md
Normal file
15
docs/kcl/const_std-THREE_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::THREE_QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::THREE_QUARTER_TURN: number(deg) = 270deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_std-XY.md
Normal file
15
docs/kcl/const_std-XY.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::XY"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::XY
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_std-XZ.md
Normal file
15
docs/kcl/const_std-XZ.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::XZ"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::XZ
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_std-YZ.md
Normal file
15
docs/kcl/const_std-YZ.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::YZ"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::YZ
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_std-ZERO.md
Normal file
15
docs/kcl/const_std-ZERO.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::ZERO"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::ZERO: number = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
32
docs/kcl/const_std-math-E.md
Normal file
32
docs/kcl/const_std-math-E.md
Normal file
File diff suppressed because one or more lines are too long
28
docs/kcl/const_std-math-PI.md
Normal file
28
docs/kcl/const_std-math-PI.md
Normal file
File diff suppressed because one or more lines are too long
32
docs/kcl/const_std-math-TAU.md
Normal file
32
docs/kcl/const_std-math-TAU.md
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1030
docs/kcl/fillet.md
1030
docs/kcl/fillet.md
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user