mirror of https://github.com/aminya/setup-cpp.git
Compare commits
716 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
04f0267e50 | |
|
|
1155f23302 | |
|
|
867d72f10a | |
|
|
daf5d4b9da | |
|
|
31141736b3 | |
|
|
9792a2bbe0 | |
|
|
27061795a8 | |
|
|
1f17f92d6a | |
|
|
bd777f32ba | |
|
|
f3c42a2724 | |
|
|
38bbe83367 | |
|
|
156935991e | |
|
|
51ca1f1f80 | |
|
|
5c16b2f2fd | |
|
|
7c7690a1ac | |
|
|
aaf5bb78ea | |
|
|
4878b35f60 | |
|
|
957a3565d3 | |
|
|
aa2e7dbda1 | |
|
|
c9b0b918df | |
|
|
9306008c10 | |
|
|
9bc9b8cd8a | |
|
|
3481e9e840 | |
|
|
cc0e9fb8ec | |
|
|
131fbe52b0 | |
|
|
d93d404f38 | |
|
|
a55b1da658 | |
|
|
24822b26f9 | |
|
|
747e9cfe05 | |
|
|
26bd7cda45 | |
|
|
6f1d3cd81e | |
|
|
bb0daa4e32 | |
|
|
a276e6e3d1 | |
|
|
1c89539b8f | |
|
|
b32feb04d5 | |
|
|
d8571402cb | |
|
|
aa0fcb9bee | |
|
|
988cdb3377 | |
|
|
d09e6b8dab | |
|
|
c43a237684 | |
|
|
6004eca28b | |
|
|
d42bb0b88f | |
|
|
c9eb020813 | |
|
|
3cb32ec74d | |
|
|
fb3f6ad2f8 | |
|
|
559fcdd572 | |
|
|
8e6c0edd38 | |
|
|
8ffe76cee3 | |
|
|
0fa8654824 | |
|
|
928af1ef3b | |
|
|
751b635450 | |
|
|
056bb3b1d9 | |
|
|
fe10751e1c | |
|
|
c0171961c2 | |
|
|
ce9f94db97 | |
|
|
9392dd1bd8 | |
|
|
2e6bb1caa0 | |
|
|
004edc1952 | |
|
|
46cbfc276f | |
|
|
396258ba63 | |
|
|
70e614fd48 | |
|
|
075261cd2b | |
|
|
fcda129998 | |
|
|
42ccc76417 | |
|
|
af7dd8c367 | |
|
|
b21cd99e0b | |
|
|
085eecfbd1 | |
|
|
197080ad94 | |
|
|
15c6190549 | |
|
|
38b4d16f6e | |
|
|
00a96b353f | |
|
|
8d6f65af17 | |
|
|
55470af31b | |
|
|
820b8f3163 | |
|
|
3a19939866 | |
|
|
3b773c4e87 | |
|
|
0d11c74dbd | |
|
|
f0dab3c2eb | |
|
|
f015113d31 | |
|
|
9dc9c217f4 | |
|
|
5649ee9e2d | |
|
|
ecb2ccca2e | |
|
|
2a58e75f05 | |
|
|
f1825e19b6 | |
|
|
e09ae7eb8e | |
|
|
45a956b27e | |
|
|
1cfde8e589 | |
|
|
a4ca8de391 | |
|
|
022729da27 | |
|
|
6b72a94712 | |
|
|
464f3a00d5 | |
|
|
faff663ab1 | |
|
|
da1971da81 | |
|
|
dbf5b5e2bf | |
|
|
3fd1b0b32c | |
|
|
988b5fd210 | |
|
|
c9348d3629 | |
|
|
9b5350fb6e | |
|
|
b7dcc5b7e6 | |
|
|
264de9ab1a | |
|
|
fc5f36e99b | |
|
|
1134b80cc2 | |
|
|
6540167f34 | |
|
|
62036a9dd7 | |
|
|
350b16f518 | |
|
|
4c0bf0acdb | |
|
|
ecc6c767e0 | |
|
|
00fe6df1cf | |
|
|
46ac5adacc | |
|
|
e10853e3f5 | |
|
|
3fffbe9648 | |
|
|
c9145519e3 | |
|
|
5c5dffcda7 | |
|
|
6c94aa9d63 | |
|
|
80ffb63efd | |
|
|
5accdbc0a7 | |
|
|
d8c2b30cb3 | |
|
|
829f53844a | |
|
|
28288fd7bc | |
|
|
5ea110ae8d | |
|
|
9bc8921c0a | |
|
|
e8ac0e7160 | |
|
|
9d12750bbe | |
|
|
c9007c8f5a | |
|
|
05bd2b5297 | |
|
|
3d8c387d48 | |
|
|
55f022dea4 | |
|
|
75890615f7 | |
|
|
a7162273d0 | |
|
|
f40cb3bc3f | |
|
|
ac92a10732 | |
|
|
d10f4b6db0 | |
|
|
8fb6bd1b28 | |
|
|
a993d3ff56 | |
|
|
d0235b0adb | |
|
|
79f7ff95eb | |
|
|
3bc026fd01 | |
|
|
6c5ed96033 | |
|
|
70850773b2 | |
|
|
186f2dc52d | |
|
|
b683fdffce | |
|
|
bb5b6b1b44 | |
|
|
6370aaa025 | |
|
|
95a7de4f2e | |
|
|
d6447bbe91 | |
|
|
71c0122abf | |
|
|
ad7d44b1e3 | |
|
|
7e66da1495 | |
|
|
f37a612a84 | |
|
|
d60a91780b | |
|
|
a5ee5b0e9b | |
|
|
dc7c474237 | |
|
|
a8782096b0 | |
|
|
f5f4ddffea | |
|
|
6ef4c24024 | |
|
|
d1834415a9 | |
|
|
68964ee26c | |
|
|
6ee48d5c81 | |
|
|
fc7a5158bd | |
|
|
1837c0d47a | |
|
|
83d70f96bc | |
|
|
be9dd533df | |
|
|
2e04f42cca | |
|
|
6ecab5ef9d | |
|
|
8eb691a796 | |
|
|
895d69ee98 | |
|
|
8e78c541a2 | |
|
|
c04f432701 | |
|
|
24ed36b061 | |
|
|
d34b955da5 | |
|
|
ae24e964ab | |
|
|
8a0c8a726b | |
|
|
ad49f54a72 | |
|
|
f23c0b8778 | |
|
|
d8d2caee94 | |
|
|
477dd40685 | |
|
|
2ee99e208e | |
|
|
0730cb5e36 | |
|
|
5b56272eaf | |
|
|
bcc7fc2a92 | |
|
|
d04bcbf1dc | |
|
|
e6bd753a7f | |
|
|
4d2ad5fc8b | |
|
|
1158c50fa0 | |
|
|
9a2e61232c | |
|
|
4c992d0556 | |
|
|
ba81f6ae16 | |
|
|
5a0bbafcb2 | |
|
|
3108fdcf8d | |
|
|
dd785bad39 | |
|
|
18f6af3e6c | |
|
|
f737a07371 | |
|
|
6cd53aa7e2 | |
|
|
f4fab9f74a | |
|
|
7974077db1 | |
|
|
045f4c5242 | |
|
|
2fe3219ef1 | |
|
|
7ea6387acb | |
|
|
01ccf4c1cc | |
|
|
be9505b2e5 | |
|
|
2428548d77 | |
|
|
ae4905b61c | |
|
|
8b1e80507e | |
|
|
af1b02b5ed | |
|
|
9845e6e84d | |
|
|
1273879b4d | |
|
|
a96be2f0e6 | |
|
|
fd0d475a53 | |
|
|
81892a4640 | |
|
|
d11e5d7d70 | |
|
|
29c12dc98c | |
|
|
a63071ebb3 | |
|
|
8115710285 | |
|
|
660206b3e3 | |
|
|
b59e0ce00b | |
|
|
374c0cd9ec | |
|
|
2250f08263 | |
|
|
1916446e22 | |
|
|
67fad8bf37 | |
|
|
a4bc77491c | |
|
|
a835d4b72e | |
|
|
6ef1af9182 | |
|
|
fb55d3cdfe | |
|
|
29cd2e193a | |
|
|
1d64427488 | |
|
|
3cc2476a87 | |
|
|
56767a8edb | |
|
|
a76dd1b9e9 | |
|
|
12841b3f65 | |
|
|
b4d8a5c5a6 | |
|
|
f51e073858 | |
|
|
828e0bb625 | |
|
|
f3b54ce57b | |
|
|
413acc39d5 | |
|
|
7fee45544a | |
|
|
a2dc2bcd46 | |
|
|
6eadc0b59c | |
|
|
8d0a96782d | |
|
|
6cb9980520 | |
|
|
65cf4fec22 | |
|
|
4532f2e61b | |
|
|
4b9980f829 | |
|
|
eab64e395d | |
|
|
15f3a89bc3 | |
|
|
c99abc9332 | |
|
|
595d13eb74 | |
|
|
799b040705 | |
|
|
e4a5426f18 | |
|
|
db6e8f43c7 | |
|
|
935a8bc14f | |
|
|
57e4acf400 | |
|
|
15b21af353 | |
|
|
873a0ce059 | |
|
|
ae8148bb39 | |
|
|
43327b967b | |
|
|
627988e604 | |
|
|
70694dbfc8 | |
|
|
8b8619681b | |
|
|
1b57bfb75c | |
|
|
e4cc1b5646 | |
|
|
09063da084 | |
|
|
14d5c85db3 | |
|
|
f1b09297e4 | |
|
|
24a3400624 | |
|
|
d28287bcdd | |
|
|
ff692ffecf | |
|
|
8ed3641662 | |
|
|
555c4d7266 | |
|
|
65fdb2804b | |
|
|
e7e3464df0 | |
|
|
458bb0507a | |
|
|
0a8eedb221 | |
|
|
380714f257 | |
|
|
17c1155177 | |
|
|
8e4db9105a | |
|
|
50c4edcfba | |
|
|
7b7f98df79 | |
|
|
d4b7fadbc1 | |
|
|
61a2c6e82a | |
|
|
8dd7e1e5c1 | |
|
|
eb5c9f99ea | |
|
|
c5a4ff71d9 | |
|
|
b3b549cd20 | |
|
|
4839c1d280 | |
|
|
6e542e60af | |
|
|
97b09dfba2 | |
|
|
7d8a4af8c4 | |
|
|
40453112a2 | |
|
|
b9d35d9335 | |
|
|
db266b5009 | |
|
|
3aac37c3fb | |
|
|
8a10f32320 | |
|
|
fd2c1df30d | |
|
|
43d46eff60 | |
|
|
3ce1db2ddb | |
|
|
1d824aa3c1 | |
|
|
4f0c49a2d2 | |
|
|
4136222b38 | |
|
|
4019fa56b0 | |
|
|
7c86e32fdd | |
|
|
2b5218b10f | |
|
|
4ed5cf931f | |
|
|
f6ef086bf7 | |
|
|
3883a177d6 | |
|
|
9a1ed094b0 | |
|
|
0fe9cd6e11 | |
|
|
8e83c0e114 | |
|
|
4c635e726f | |
|
|
f3bd8fd76e | |
|
|
45081d3277 | |
|
|
1de0accc14 | |
|
|
a9764989af | |
|
|
1c96aae406 | |
|
|
806ecbfb14 | |
|
|
8a65a11eac | |
|
|
35236e9929 | |
|
|
054a01ce56 | |
|
|
333c93619e | |
|
|
44d6681130 | |
|
|
9dd9fb88cf | |
|
|
348d31f538 | |
|
|
6f636f96f2 | |
|
|
d81982f0b8 | |
|
|
edca93e670 | |
|
|
a00d0ef0b6 | |
|
|
9ba7b69ac1 | |
|
|
1a07db80e7 | |
|
|
8f8b73f53d | |
|
|
068684f46b | |
|
|
3f7161439e | |
|
|
9f3979461e | |
|
|
2294a21607 | |
|
|
ab235ba854 | |
|
|
4330bb5cf2 | |
|
|
176905d067 | |
|
|
ed642e3c97 | |
|
|
5b04f53d41 | |
|
|
3d88ff3446 | |
|
|
818f740c52 | |
|
|
40c2ffd2be | |
|
|
0c09b5d740 | |
|
|
28befc3cbc | |
|
|
063ff00baf | |
|
|
8b818570f5 | |
|
|
b20073c6f5 | |
|
|
77458ed404 | |
|
|
c49e25690a | |
|
|
902ec7be5e | |
|
|
474b9dded5 | |
|
|
7a7572279c | |
|
|
c7d3db8462 | |
|
|
5999587c4c | |
|
|
3f095866c3 | |
|
|
abe2d67f8c | |
|
|
68aea2b63e | |
|
|
49c8316b3c | |
|
|
e584d285f2 | |
|
|
3290875f5f | |
|
|
100c4e6db6 | |
|
|
bdbd5b5fb0 | |
|
|
ef2de93e77 | |
|
|
fce207515b | |
|
|
302c2937a9 | |
|
|
daf22b970d | |
|
|
185a60867a | |
|
|
f7141f2b69 | |
|
|
06230ecbcd | |
|
|
a03cb7ea00 | |
|
|
be9c96f67c | |
|
|
a2312d2e6e | |
|
|
f5bc42aff8 | |
|
|
6f44503311 | |
|
|
a3723b08a9 | |
|
|
c2c30d9a33 | |
|
|
b7e481e350 | |
|
|
e647ab787e | |
|
|
01f6ff6b9c | |
|
|
2ff473f883 | |
|
|
87d6792c19 | |
|
|
8f3364ce7b | |
|
|
c08b751296 | |
|
|
0dee00a185 | |
|
|
d58ee0edd1 | |
|
|
12e62a1b8d | |
|
|
60dbf57778 | |
|
|
035c0629d9 | |
|
|
119345363d | |
|
|
b8c9910896 | |
|
|
d1a8e5ecfe | |
|
|
17f5ebc5b9 | |
|
|
a1e30580e4 | |
|
|
1fd813945e | |
|
|
d90b3b5cdc | |
|
|
0528a87872 | |
|
|
627f57a609 | |
|
|
361073ae6b | |
|
|
113d1f50d6 | |
|
|
770dfb4c2c | |
|
|
025098a948 | |
|
|
f1ec26fa74 | |
|
|
ef74ed30fd | |
|
|
6b8e64ce19 | |
|
|
4c12eccdfd | |
|
|
6351fa6075 | |
|
|
e950a04eab | |
|
|
5f8524ef4c | |
|
|
ecd0bffbc2 | |
|
|
237f9758b3 | |
|
|
50e59f5e2d | |
|
|
8478964054 | |
|
|
c605e7fcc4 | |
|
|
75001ab879 | |
|
|
d8ee0a12c4 | |
|
|
bb6b0562ab | |
|
|
897607b76f | |
|
|
7c123200da | |
|
|
5dca7bce94 | |
|
|
c231ef1f4a | |
|
|
120e8ebbd0 | |
|
|
97d8a63d36 | |
|
|
00565bef9d | |
|
|
508fcd9cb8 | |
|
|
4096f68632 | |
|
|
9eae7b8aaa | |
|
|
b25fd057cf | |
|
|
0a06f2b113 | |
|
|
9c2009ec06 | |
|
|
5e4bb00321 | |
|
|
2a71c9306c | |
|
|
f29afea287 | |
|
|
6c114ac3ab | |
|
|
4481860df9 | |
|
|
867ce44795 | |
|
|
255caeb121 | |
|
|
4d95a50556 | |
|
|
8672e6af19 | |
|
|
b8fbd53a44 | |
|
|
75454f9c75 | |
|
|
e77865a1bd | |
|
|
9f44eb2c24 | |
|
|
f85ad55d63 | |
|
|
4b7354baf0 | |
|
|
819d82997a | |
|
|
e0e749b984 | |
|
|
ac7fe2df3f | |
|
|
780290387b | |
|
|
905cc44d65 | |
|
|
50b145e467 | |
|
|
094e4c470d | |
|
|
3f505ba05e | |
|
|
24f9b03dc4 | |
|
|
d485b24c12 | |
|
|
9935084e22 | |
|
|
2a67ff955e | |
|
|
76f06a9dda | |
|
|
9560b8d586 | |
|
|
59c68f43d8 | |
|
|
ed3b715dd5 | |
|
|
5e9dd36c6f | |
|
|
1e3ecc0794 | |
|
|
526968f7e2 | |
|
|
2653c43e67 | |
|
|
8c22730f32 | |
|
|
8afbb1a7c6 | |
|
|
88f2cb4b22 | |
|
|
52acadc64a | |
|
|
ff4c8289ac | |
|
|
d511d1fb52 | |
|
|
ea49034e9a | |
|
|
b2a7ceb1aa | |
|
|
efdf36d38c | |
|
|
48bca6ce1e | |
|
|
898e68dbc3 | |
|
|
45b558c2a6 | |
|
|
1034f25a9b | |
|
|
9d702fc974 | |
|
|
77859ef9f3 | |
|
|
32a534716d | |
|
|
72f96bf6fe | |
|
|
654b790525 | |
|
|
be3c5a5688 | |
|
|
f6458ee4e1 | |
|
|
056d7a999d | |
|
|
5f4f319fe8 | |
|
|
037f22b114 | |
|
|
e4f89db091 | |
|
|
3a86553eb1 | |
|
|
5d12f41e90 | |
|
|
16c789591a | |
|
|
1e259843db | |
|
|
69b2c1b021 | |
|
|
118cfec161 | |
|
|
19a213deb1 | |
|
|
aae4991f09 | |
|
|
c60a5ed965 | |
|
|
1f6f8322f8 | |
|
|
2a2a8eb39a | |
|
|
f0dd57ea4d | |
|
|
fb2a9a2418 | |
|
|
c9bc540d32 | |
|
|
4d73853d57 | |
|
|
4ebcbc18f2 | |
|
|
d316735ce5 | |
|
|
381411326c | |
|
|
3a8e462ed6 | |
|
|
99db11072d | |
|
|
67a1d8d27d | |
|
|
d7f5466d92 | |
|
|
8a39523391 | |
|
|
fc60b25730 | |
|
|
5d06e63ba4 | |
|
|
22ad634883 | |
|
|
691fa792a8 | |
|
|
5e68b686da | |
|
|
1318ec90f6 | |
|
|
01e15aee5c | |
|
|
b18b6f4875 | |
|
|
90d7a9bccf | |
|
|
bfbfe9ca0b | |
|
|
7b3520d222 | |
|
|
d5024653f1 | |
|
|
6294c32d20 | |
|
|
2e807b3c46 | |
|
|
8ffde703f2 | |
|
|
ed70b16a4c | |
|
|
c98723f655 | |
|
|
590aaa8bb9 | |
|
|
00b86b9dbf | |
|
|
0379559965 | |
|
|
bc81ce31a4 | |
|
|
d95a1c182b | |
|
|
6003b39332 | |
|
|
e714af79eb | |
|
|
dcadbb8407 | |
|
|
e1217a3287 | |
|
|
e003dfdeac | |
|
|
22bfbec1e0 | |
|
|
d0c5d225d2 | |
|
|
8d16de0d38 | |
|
|
f918fcc1fc | |
|
|
a91fdcafff | |
|
|
d54a82148a | |
|
|
cb3bbf182c | |
|
|
57e4019423 | |
|
|
6e3b572a56 | |
|
|
3e4a96d3c7 | |
|
|
ae014dcdc3 | |
|
|
e7ebe0f63e | |
|
|
1fab60e5ce | |
|
|
ab36eabc6a | |
|
|
8302e555d2 | |
|
|
050615f245 | |
|
|
7547f75b96 | |
|
|
fb5b743b5f | |
|
|
8db3315e6c | |
|
|
4e90bbcbd8 | |
|
|
8bbc80d7ce | |
|
|
b923ad9bbd | |
|
|
bd9b386672 | |
|
|
c2e0936c40 | |
|
|
7cb1fce6d7 | |
|
|
4e9255bbdf | |
|
|
6cf096c7bf | |
|
|
a45740c01f | |
|
|
11fad2b093 | |
|
|
81c10d4abc | |
|
|
324effb605 | |
|
|
b6193582b7 | |
|
|
4e7c4bb64b | |
|
|
61855cf251 | |
|
|
ccbe5dcb3e | |
|
|
f07e7e86a4 | |
|
|
d18470dcca | |
|
|
56a945c190 | |
|
|
c17f568574 | |
|
|
9a295dea76 | |
|
|
0dbc7a0d00 | |
|
|
adb1af1e17 | |
|
|
2032957802 | |
|
|
19bf09e888 | |
|
|
12442d6b61 | |
|
|
f5c5e9e808 | |
|
|
0660ca7619 | |
|
|
f2d212e7ec | |
|
|
20b8aaf39f | |
|
|
c38aec23f9 | |
|
|
6827680827 | |
|
|
e486e3676a | |
|
|
c2afe421b0 | |
|
|
20c025d4d7 | |
|
|
41c74d00e3 | |
|
|
f1968293bc | |
|
|
555cb15f76 | |
|
|
35ec48abe6 | |
|
|
286daf2183 | |
|
|
5a68a08a86 | |
|
|
61b376c9e4 | |
|
|
b7b6d75da7 | |
|
|
42d0df7db6 | |
|
|
8a5b753ad5 | |
|
|
ee265991bc | |
|
|
a247573c5d | |
|
|
1a9cdb35d8 | |
|
|
d3b2f3531c | |
|
|
a4b28aacb7 | |
|
|
9d12380389 | |
|
|
e881f4079c | |
|
|
ad1b1ee820 | |
|
|
1865b24b57 | |
|
|
dc74686724 | |
|
|
1704d8457d | |
|
|
080dafd056 | |
|
|
a06af07c8d | |
|
|
c0d283fa60 | |
|
|
287549e862 | |
|
|
429d0724fa | |
|
|
efbc01e1b5 | |
|
|
fce9cac0b5 | |
|
|
382285ae64 | |
|
|
4facf05dc0 | |
|
|
08cf20cc0e | |
|
|
33c1974e70 | |
|
|
0b45dac798 | |
|
|
771228c4ae | |
|
|
77e643057d | |
|
|
5962369655 | |
|
|
933c6eaf84 | |
|
|
f898162cf1 | |
|
|
bcd2a428a8 | |
|
|
315189b36f | |
|
|
a65482651a | |
|
|
a93caaa4ac | |
|
|
7e559c044f | |
|
|
040d33199e | |
|
|
1818c421dc | |
|
|
55af62e5b4 | |
|
|
b86c009455 | |
|
|
41e84d833e | |
|
|
5aa7099535 | |
|
|
a9d70080cf | |
|
|
9ab878fa33 | |
|
|
3774e9b3ac | |
|
|
e2c1dd3622 | |
|
|
76b3fd37b4 | |
|
|
f7abbbcc5d | |
|
|
71d2ff15d2 | |
|
|
be629c9363 | |
|
|
f767bd8819 | |
|
|
72b07394f9 | |
|
|
cb2000c8e4 | |
|
|
e0753dd7d1 | |
|
|
7d9eec942d | |
|
|
75540d0976 | |
|
|
c75a134b9c | |
|
|
45a40e9d95 | |
|
|
7f2f3d2a33 | |
|
|
1257bf3d2f | |
|
|
d9e900ea1f | |
|
|
905b59672f | |
|
|
a993cd60c0 | |
|
|
36e7f447d4 | |
|
|
d5ec3ff06e | |
|
|
ff2af8ebc9 | |
|
|
d59649d812 | |
|
|
e3bbe73e91 | |
|
|
1c6c8db5a9 | |
|
|
4ab758d47f | |
|
|
8aeb5e4f4e | |
|
|
34bb783813 | |
|
|
cceb0f93f2 | |
|
|
1d9b24d3a2 | |
|
|
1cbbd6c740 | |
|
|
17a5a833c4 | |
|
|
072c438abb | |
|
|
183707949f | |
|
|
a4e6fc40b5 | |
|
|
f1bbf95a2d | |
|
|
0ea92a8664 | |
|
|
15f5776d5f | |
|
|
5ff0bde949 | |
|
|
a2421ffd12 | |
|
|
df26d7ef8a | |
|
|
4f1627cf7a | |
|
|
c930e9c0c7 | |
|
|
f2ab88cd91 | |
|
|
0487e80610 | |
|
|
c8867dae41 | |
|
|
fd34bfcefe | |
|
|
3490656d25 | |
|
|
a4e4c6c3be | |
|
|
ebd14f40db | |
|
|
c8e2110f69 | |
|
|
526d06e31f | |
|
|
1f53bd746a | |
|
|
7a90df0732 | |
|
|
85853d5f3a | |
|
|
d6950a396f | |
|
|
2908244529 | |
|
|
41a235324f | |
|
|
ea2732fbf8 | |
|
|
dbfc8a80e6 | |
|
|
77fbfe849b | |
|
|
36d895f6c6 | |
|
|
99a1254616 | |
|
|
32bae2b687 | |
|
|
8ce16c2fbc | |
|
|
1c7c39221b | |
|
|
c0f0580956 | |
|
|
9a5a9cc5b5 | |
|
|
d0aafc239f | |
|
|
f2828c7aeb | |
|
|
f9b35199a3 | |
|
|
b17665893e | |
|
|
5465644a17 | |
|
|
88ef2fc50d | |
|
|
5eefa3d4ef |
|
|
@ -1,7 +1,9 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:base"],
|
||||
"schedule": ["every weekend"],
|
||||
"labels": ["dependencies"],
|
||||
"separateMajorMinor": "false",
|
||||
"separateMajorMinor": true,
|
||||
"packageRules": [
|
||||
{
|
||||
"matchDepTypes": ["devDependencies"],
|
||||
|
|
@ -15,6 +17,11 @@
|
|||
"matchUpdateTypes": ["major", "minor", "patch", "pin", "digest", "lockFileMaintenance", "rollback", "bump"],
|
||||
"groupName": "dependencies",
|
||||
"semanticCommitType": "fix"
|
||||
},
|
||||
{
|
||||
"matchDatasources": ["npm"],
|
||||
"matchPackageNames": ["eslint", "numerous", "execa", "which", ",@types/eslint"],
|
||||
"enabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,67 +2,75 @@ name: CI
|
|||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
- dev
|
||||
tags:
|
||||
- "*"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
NODE_OPTIONS: --enable-source-maps
|
||||
version: "1.8.0"
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Build
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
node:
|
||||
- 20
|
||||
pnpm:
|
||||
- 8
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
path: |
|
||||
~/.pnpm-store
|
||||
D:\.pnpm-store
|
||||
./node_modules
|
||||
./.parcel-cache
|
||||
key: "setupcpp-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}"
|
||||
restore-keys: |
|
||||
"setupcpp-cache-OS:${{ matrix.os }}-"
|
||||
ref: ${{ github.head_ref || github.ref_name }}
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
node-version-file: "./.nvmrc"
|
||||
|
||||
- name: Setup Pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
version: ${{ matrix.pnpm }}
|
||||
bun-version-file: "package.json"
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
pnpm install
|
||||
bun install
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
pnpm build
|
||||
pnpm build.docker_tests
|
||||
bun run build
|
||||
bun run build.docker-ci
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
pnpm run test.lint
|
||||
bun run test.lint
|
||||
|
||||
- name: Update Dist
|
||||
run: |
|
||||
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
|
||||
if [[ "${{ github.ref_name }}" =~ ^refs/heads/ ]]; then
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git add dist/
|
||||
git commit -m "chore(build): update dist"
|
||||
git push
|
||||
else
|
||||
echo "Skipping push for non-branch commit"
|
||||
fi
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload Dist
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v6
|
||||
if: always()
|
||||
with:
|
||||
name: dist
|
||||
path: |
|
||||
|
|
@ -74,7 +82,6 @@ jobs:
|
|||
BuildExecutable:
|
||||
name: Build-Executable-${{ matrix.os }}
|
||||
needs: [Build]
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -82,60 +89,71 @@ jobs:
|
|||
os:
|
||||
- windows-2022
|
||||
- ubuntu-22.04
|
||||
- macos-12
|
||||
node:
|
||||
- 20
|
||||
pnpm:
|
||||
- 8
|
||||
- ubuntu-22.04-arm
|
||||
- macos-15-intel # x64
|
||||
- macos-14 # arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: dist
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
node-version-file: "./.nvmrc"
|
||||
|
||||
- name: Setup Pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
version: ${{ matrix.pnpm }}
|
||||
bun-version-file: "package.json"
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
if: ${{ !contains(matrix.os, 'windows') }}
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: |
|
||||
~/.pnpm-store
|
||||
D:\.pnpm-store
|
||||
~/.bun
|
||||
./node_modules
|
||||
key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}"
|
||||
key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-${{ hashFiles('./.npmrc', './package.json', './.nvmrc', './bun.lock') }}"
|
||||
restore-keys: |
|
||||
"setupcpp-node_modules-cache-OS:${{ matrix.os }}-"
|
||||
|
||||
- name: Cache Turbo
|
||||
uses: rharkor/caching-for-turbo@v1.8
|
||||
|
||||
- name: Cache .cache
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: |
|
||||
./.cache/eslint
|
||||
./.cache/cspell
|
||||
/home/runner/.cache/dprint
|
||||
key: "setupcpp-cache-OS:${{ matrix.os }}-${{ hashFiles('./*.json', './.*rc', './*.yml') }}"
|
||||
restore-keys: |
|
||||
"setupcpp-cache-OS:${{ matrix.os }}-"
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
pnpm install
|
||||
bun install
|
||||
|
||||
# Create self-contained executable that bundles Nodejs
|
||||
- name: Create Executable
|
||||
run: |
|
||||
pnpm run pack.exe
|
||||
bun run pack.exe
|
||||
|
||||
- name: Upload Executables
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: exe
|
||||
name: exe-${{ matrix.os }}
|
||||
path: |
|
||||
./exe
|
||||
retention-days: 1
|
||||
retention-days: 7
|
||||
|
||||
Test:
|
||||
name: Test-${{ matrix.os }}
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
|
||||
needs: [Build]
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
|
@ -143,49 +161,50 @@ jobs:
|
|||
matrix:
|
||||
os:
|
||||
- windows-2022
|
||||
- windows-2019
|
||||
- ubuntu-24.04-arm
|
||||
- ubuntu-24.04
|
||||
- ubuntu-22.04-arm
|
||||
- ubuntu-22.04
|
||||
- ubuntu-20.04
|
||||
- macos-12
|
||||
- macos-11
|
||||
node:
|
||||
- 20
|
||||
pnpm:
|
||||
- 8
|
||||
# - ubuntu-20.04
|
||||
- macos-15 # arm64
|
||||
# - macos-15-large # x64
|
||||
- macos-14 # arm64
|
||||
- macos-15-intel # x64
|
||||
# - macos-14-xlarge #arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Download Dist
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: dist
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
node-version-file: "./.nvmrc"
|
||||
|
||||
- name: Setup Pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
version: ${{ matrix.pnpm }}
|
||||
bun-version-file: "package.json"
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
if: ${{ !contains(matrix.os, 'windows') }}
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: |
|
||||
~/.pnpm-store
|
||||
D:\.pnpm-store
|
||||
~/.bun
|
||||
./node_modules
|
||||
key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}"
|
||||
key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-${{ hashFiles('./.npmrc', './package.json', './.nvmrc', './bun.lock') }}"
|
||||
restore-keys: |
|
||||
"setupcpp-node_modules-cache-OS:${{ matrix.os }}-"
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
pnpm install
|
||||
bun install
|
||||
|
||||
# - name: Setup SSH debugging session
|
||||
# uses: mxschmitt/action-tmate@v3
|
||||
|
|
@ -193,90 +212,360 @@ jobs:
|
|||
- name: Tests
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
|
||||
run: |
|
||||
pnpm run test
|
||||
bun run test
|
||||
env:
|
||||
RUNNER_OS_NAME: ${{ matrix.os }}
|
||||
|
||||
- name: Setup Node 20
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Smoke Test Modern Bundle
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
|
||||
run: |
|
||||
node ./dist/modern/setup-cpp.mjs --help
|
||||
node ./dist/modern/setup-cpp.mjs --gcc true --cmake true
|
||||
env:
|
||||
RUNNER_OS_NAME: ${{ matrix.os }}
|
||||
|
||||
- name: Smoke Test Global Install
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
|
||||
run: |
|
||||
setup-cpp --help
|
||||
|
||||
- name: Setup Node 12
|
||||
uses: actions/setup-node@v4
|
||||
if: ${{ !contains(matrix.os, 'macos-14') && !contains(matrix.os, 'macos-15') }}
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Smoke Test Node 12
|
||||
- name: Smoke Test Legacy Bundle
|
||||
run: |
|
||||
node ./dist/legacy/setup-cpp.js --help
|
||||
|
||||
- name: Setup Node 16
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Smoke Test Node 16
|
||||
run: |
|
||||
node ./dist/actions/setup-cpp.js --help
|
||||
node ./dist/legacy/setup-cpp.js --gcc true --cmake true
|
||||
|
||||
Docker:
|
||||
name: Test-${{ matrix.container }}
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
|
||||
name: Docker-${{ matrix.container.image }}-${{ matrix.platform }}-${{ matrix.container.tag }}
|
||||
needs: [Build]
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
node:
|
||||
- 20
|
||||
pnpm:
|
||||
- 8
|
||||
- ubuntu-24.04
|
||||
platform:
|
||||
- linux/amd64
|
||||
container:
|
||||
- "ubuntu.dockerfile"
|
||||
- "fedora.dockerfile"
|
||||
- "arch.dockerfile"
|
||||
- "ubuntu-mingw.dockerfile"
|
||||
# - "fedora-mingw.dockerfile"
|
||||
# - "arch-mingw.dockerfile"
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04" }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04" }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04" }
|
||||
- { distro: "fedora", image: "setup-cpp-fedora", tag: "44" }
|
||||
- { distro: "arch", image: "setup-cpp-arch", tag: "base" }
|
||||
- { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", base_version: "22-alpine3.21" }
|
||||
include:
|
||||
- os: ubuntu-24.04-arm
|
||||
platform: linux/arm64
|
||||
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04" }
|
||||
- os: ubuntu-24.04-arm
|
||||
platform: linux/arm64
|
||||
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04" }
|
||||
- os: ubuntu-24.04-arm
|
||||
platform: linux/arm64
|
||||
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04" }
|
||||
- os: ubuntu-24.04-arm
|
||||
platform: linux/arm64
|
||||
container: { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", base_version: "22-alpine3.21" }
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Download Dist
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: dist
|
||||
|
||||
- name: Build
|
||||
id: docker_build
|
||||
- name: Define Platform Suffix
|
||||
id: platform
|
||||
run: |
|
||||
docker build -f ./dev/docker/__tests__/${{ matrix.container }} -t setup-cpp .
|
||||
if [[ "${{ matrix.platform }}" == "linux/amd64" ]]; then
|
||||
echo "suffix=amd64" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "suffix=arm64" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
if: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
|
||||
with:
|
||||
username: aminya
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build setup-cpp-${{matrix.container.distro }}
|
||||
id: build_base
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./dev/docker/ci/${{ matrix.container.distro }}.dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
|
||||
load: true
|
||||
provenance: false
|
||||
platforms: ${{ matrix.platform }}
|
||||
tags: aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
|
||||
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
|
||||
cache-to: type=inline
|
||||
build-args: BASE_VERSION=${{ matrix.container.base_version || matrix.container.tag }}
|
||||
|
||||
- name: Tag latest locally
|
||||
run: |
|
||||
docker tag aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}:latest
|
||||
docker tag aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}
|
||||
|
||||
- name: Push latest to Docker Hub
|
||||
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' && matrix.container.distro != 'alpine' }}
|
||||
run: |
|
||||
docker push aminya/${{ matrix.container.image }}:latest
|
||||
docker push aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}
|
||||
|
||||
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}
|
||||
if: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
|
||||
uses: peter-evans/dockerhub-description@v5
|
||||
with:
|
||||
username: aminya
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
repository: aminya/${{ matrix.container.image }}
|
||||
readme-filepath: ./README_DOCKER.md
|
||||
|
||||
- name: Build setup-cpp-${{matrix.container.distro }}-llvm
|
||||
id: build_llvm
|
||||
if: ${{ matrix.container.distro != 'arch' }}
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./dev/docker/ci/${{ matrix.container.distro }}-llvm.dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
|
||||
load: true
|
||||
provenance: false
|
||||
platforms: ${{ matrix.platform }}
|
||||
tags: aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
|
||||
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
|
||||
cache-to: type=inline
|
||||
|
||||
- name: Tag latest locally
|
||||
if: ${{ matrix.container.distro != 'arch' }}
|
||||
run: |
|
||||
docker tag aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-llvm:latest
|
||||
docker tag aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}
|
||||
|
||||
- name: Push latest to Docker Hub
|
||||
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' && matrix.container.distro != 'alpine' && matrix.container.distro != 'arch' }}
|
||||
run: |
|
||||
docker push aminya/${{ matrix.container.image }}-llvm:latest
|
||||
docker push aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}
|
||||
|
||||
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}-llvm
|
||||
if: ${{ (github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]')) && matrix.container.distro != 'arch' }}
|
||||
uses: peter-evans/dockerhub-description@v5
|
||||
with:
|
||||
username: aminya
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
repository: aminya/${{ matrix.container.image }}-llvm
|
||||
readme-filepath: ./README_DOCKER.md
|
||||
|
||||
- name: Test LLVM
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip test]') && matrix.container.distro != 'arch' }}
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./dev/docker/examples/${{ matrix.container.distro }}-llvm.dockerfile
|
||||
push: false
|
||||
platforms: ${{ matrix.platform }}
|
||||
tags: aminya/test-${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}
|
||||
|
||||
- name: Build setup-cpp-${{matrix.container.distro }}-gcc
|
||||
id: build_gcc
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./dev/docker/ci/${{ matrix.container.distro }}-gcc.dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
|
||||
load: true
|
||||
provenance: false
|
||||
platforms: ${{ matrix.platform }}
|
||||
tags: aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
|
||||
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
|
||||
cache-to: type=inline
|
||||
|
||||
- name: Tag latest locally
|
||||
run: |
|
||||
docker tag aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-gcc:latest
|
||||
docker tag aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}
|
||||
|
||||
- name: Push latest to Docker Hub
|
||||
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' && matrix.container.distro != 'alpine' }}
|
||||
run: |
|
||||
docker push aminya/${{ matrix.container.image }}-gcc:latest
|
||||
docker push aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}
|
||||
|
||||
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}-gcc
|
||||
if: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
|
||||
uses: peter-evans/dockerhub-description@v5
|
||||
with:
|
||||
username: aminya
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
repository: aminya/${{ matrix.container.image }}-gcc
|
||||
readme-filepath: ./README_DOCKER.md
|
||||
|
||||
- name: Test gcc
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./dev/docker/examples/${{ matrix.container.distro }}-gcc.dockerfile
|
||||
push: false
|
||||
platforms: ${{ matrix.platform }}
|
||||
tags: aminya/test-${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}
|
||||
|
||||
- name: Build setup-cpp-${{matrix.container.distro }}-mingw
|
||||
id: build_mingw
|
||||
if: ${{ matrix.container.distro != 'fedora' && !(matrix.container.distro == 'alpine' && matrix.platform == 'linux/arm64') }}
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./dev/docker/ci/${{ matrix.container.distro }}-mingw.dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
|
||||
load: true
|
||||
provenance: false
|
||||
platforms: ${{ matrix.platform }}
|
||||
tags: aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
|
||||
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
|
||||
cache-to: type=inline
|
||||
|
||||
- name: Tag latest locally
|
||||
if: ${{ matrix.container.distro != 'fedora' && !(matrix.container.distro == 'alpine' && matrix.platform == 'linux/arm64') }}
|
||||
run: |
|
||||
docker tag aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-mingw:latest
|
||||
docker tag aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}
|
||||
- name: Push latest to Docker Hub
|
||||
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' && matrix.container.distro != 'fedora' && matrix.container.distro != 'alpine' }}
|
||||
run: |
|
||||
docker push aminya/${{ matrix.container.image }}-mingw:latest
|
||||
docker push aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}
|
||||
|
||||
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}-mingw
|
||||
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'fedora' && !(matrix.container.distro == 'alpine' && matrix.platform == 'linux/arm64') }}
|
||||
uses: peter-evans/dockerhub-description@v5
|
||||
with:
|
||||
username: aminya
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
repository: aminya/${{ matrix.container.image }}-mingw
|
||||
readme-filepath: ./README_DOCKER.md
|
||||
|
||||
- name: Test Mingw
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip test]') && matrix.container.distro != 'fedora' && matrix.container.distro != 'alpine' }}
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./dev/docker/examples/${{ matrix.container.distro }}-mingw.dockerfile
|
||||
push: false
|
||||
platforms: ${{ matrix.platform }}
|
||||
tags: aminya/test-${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}
|
||||
|
||||
Docker-Manifest:
|
||||
needs: [Docker]
|
||||
runs-on: ubuntu-24.04
|
||||
if: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
container:
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04", suffix: "", latest: false }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04", suffix: "-llvm", latest: false }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04", suffix: "-gcc", latest: false }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04", suffix: "-mingw", latest: false }
|
||||
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04", suffix: "", latest: false }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04", suffix: "-llvm", latest: false }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04", suffix: "-gcc", latest: false }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04", suffix: "-mingw", latest: false }
|
||||
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04", suffix: "", latest: true }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04", suffix: "-llvm", latest: true }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04", suffix: "-gcc", latest: true }
|
||||
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04", suffix: "-mingw", latest: true }
|
||||
|
||||
- { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", suffix: "", latest: true }
|
||||
- { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", suffix: "-llvm", latest: true }
|
||||
- { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", suffix: "-gcc", latest: true }
|
||||
# - { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", suffix: "-mingw", latest: true }
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: aminya
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- uses: Noelware/docker-manifest-action@0.4.3
|
||||
with:
|
||||
inputs: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}
|
||||
images: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-amd64,aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-arm64
|
||||
push: true
|
||||
amend: true
|
||||
|
||||
- uses: Noelware/docker-manifest-action@0.4.3
|
||||
with:
|
||||
inputs: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}
|
||||
images: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-amd64,aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-arm64
|
||||
push: true
|
||||
amend: true
|
||||
|
||||
- uses: Noelware/docker-manifest-action@0.4.3
|
||||
if: ${{ matrix.container.latest }}
|
||||
with:
|
||||
inputs: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:latest
|
||||
images: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-amd64,aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-arm64
|
||||
push: true
|
||||
amend: true
|
||||
|
||||
Release:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: [Build, BuildExecutable, Test, Docker]
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [Build, BuildExecutable, Test]
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Download All Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Download Executables
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
pattern: exe-*
|
||||
path: ./exe/
|
||||
merge-multiple: true
|
||||
|
||||
- name: Place Artifacts
|
||||
- name: Chmod executables
|
||||
shell: bash
|
||||
run: |
|
||||
mv -v ./dist/ ./dist-artifacts
|
||||
mv -v ./dist-artifacts/* ./
|
||||
|
||||
chmod +x -R ./exe/
|
||||
|
||||
- name: Draft the release
|
||||
uses: meeDamian/github-release@2.0
|
||||
- name: Download Dist
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
gzip: folders
|
||||
draft: true
|
||||
files: >
|
||||
./exe/setup-cpp-x64-windows.exe
|
||||
./exe/setup-cpp-x64-linux
|
||||
./exe/setup-cpp-x64-macos
|
||||
./dist/legacy/setup-cpp.js
|
||||
./dist/legacy/setup-cpp.js.map
|
||||
./dist/legacy/
|
||||
./dist/actions/
|
||||
./dist/modern/
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
- name: Tar Dist
|
||||
run: |
|
||||
tar -czf modern.tgz ./dist/modern
|
||||
tar -czf legacy.tgz ./dist/legacy
|
||||
ls -R ./dist/
|
||||
continue-on-error: true
|
||||
|
||||
- name: Create Release in this repo
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
./exe/*
|
||||
modern.tgz
|
||||
legacy.tgz
|
||||
generate_release_notes: true
|
||||
# fail_on_unmatched_files: true
|
||||
|
|
|
|||
|
|
@ -17,3 +17,12 @@ exe/
|
|||
*.log
|
||||
*.exe
|
||||
.cache/
|
||||
|
||||
coverage
|
||||
.turbo
|
||||
|
||||
/src/llvm/assets/
|
||||
|
||||
/build
|
||||
dist/library
|
||||
*.tgz
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
.DS_Store
|
||||
Thumbs.db
|
||||
**/node_modules
|
||||
**/temp-*
|
||||
**/tsconfig.tsbuildinfo
|
||||
.parcel-cache
|
||||
**/exe/
|
||||
**/log
|
||||
**/exe
|
||||
**/cache
|
||||
**/.cache
|
||||
**/coverage
|
||||
**/.turbo
|
||||
src/llvm/assets/
|
||||
**/build
|
||||
**/__tests__
|
||||
**/dev/cpp_vcpkg_project
|
||||
**/packages/*/dist/
|
||||
**/*.tgz
|
||||
**/.eslintrc.json
|
||||
**/jest.config.mjs
|
||||
.vscode/
|
||||
.github/
|
||||
biome.jsonc
|
||||
4
.npmrc
4
.npmrc
|
|
@ -1,5 +1,3 @@
|
|||
package-lock=false
|
||||
lockfile=true
|
||||
node-linker=hoisted
|
||||
prefer-frozen-lockfile=true
|
||||
side-effects-cache=true
|
||||
shamefully-hoist=true
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
const { buildTerserOptions } = require("terser-config-atomic/dist/builder")
|
||||
module.exports = buildTerserOptions(process.env.NODE_ENV, undefined, true)
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
{
|
||||
"recommendations": ["orta.vscode-jest", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
|
||||
"recommendations": [
|
||||
"orta.vscode-jest",
|
||||
"esbenp.prettier-vscode",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"biomejs.biome",
|
||||
"p42ai.refactor"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"[dockerfile]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"[javascriptreact]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"[yaml]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"[github-actions-workflow]": {
|
||||
"editor.defaultFormatter": "dprint.dprint"
|
||||
},
|
||||
"cSpell.advanced.feature.useReferenceProviderWithRename": true,
|
||||
"cSpell.checkOnlyEnabledFileTypes": false,
|
||||
"cSpell.numSuggestions": 3,
|
||||
"cSpell.showAutocompleteSuggestions": true,
|
||||
"eslint.enable": true,
|
||||
"eslint.options": {
|
||||
"cache": true,
|
||||
"cacheLocation": "./node_modules/.cache/eslint/",
|
||||
"errorOnUnmatchedPattern": false,
|
||||
"extensions": [
|
||||
"ts",
|
||||
"tsx",
|
||||
"js",
|
||||
"jsx",
|
||||
"cjs",
|
||||
"mjs",
|
||||
"json",
|
||||
"yaml",
|
||||
"astro",
|
||||
"mdx",
|
||||
"html"
|
||||
]
|
||||
},
|
||||
"eslint.probe": [
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"json",
|
||||
"jsonc",
|
||||
"yaml",
|
||||
"markdown",
|
||||
"html",
|
||||
"astro"
|
||||
],
|
||||
"explorer.copyRelativePathSeparator": "/",
|
||||
"files.eol": "\n",
|
||||
"files.insertFinalNewline": true,
|
||||
"files.trimFinalNewlines": true,
|
||||
"hadolint.hadolintPath": "./target/bin/hadolint",
|
||||
"prettier.enable": false,
|
||||
"javascript.preferences.importModuleSpecifierEnding": "js",
|
||||
"typescript.preferences.importModuleSpecifierEnding": "js",
|
||||
"eslint.useESLintClass": true,
|
||||
"yaml.schemas": {
|
||||
"https://json.schemastore.org/container-structure-test.json": "/dev/docker/ci/tests/*.yml"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
cmake_minimum_required(VERSION 3.21...3.28)
|
||||
|
||||
project(
|
||||
setup_cpp_tests
|
||||
VERSION 1.8.0
|
||||
DESCRIPTION "Tests for setup-cpp"
|
||||
HOMEPAGE_URL "https://github.com/aminya/setup-cpp"
|
||||
LANGUAGES CXX C)
|
||||
|
||||
add_subdirectory("./dev/cpp_vcpkg_project")
|
||||
|
||||
add_executable(test_gcc ./src/gcc/__tests__/main.cpp)
|
||||
target_compile_features(test_gcc PRIVATE cxx_std_17)
|
||||
|
||||
add_executable(test_llvm ./src/llvm/__tests__/main.cpp)
|
||||
target_compile_features(test_llvm PRIVATE cxx_std_17)
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
# Contributing
|
||||
|
||||
You will need [`pnpm`](https://pnpm.io/installation) to build and test `setup-cpp`:
|
||||
You will need [`bun`](https://bun.com/) to build and test `setup-cpp`:
|
||||
|
||||
```shell
|
||||
pnpm install
|
||||
bun install
|
||||
```
|
||||
|
||||
To avoid permenant changes to your system, you can use the test docker images under `./dev/docker/__tests__`.
|
||||
|
|
|
|||
349
README.md
349
README.md
|
|
@ -2,27 +2,41 @@
|
|||
|
||||
Install all the tools required for building and testing C++/C projects.
|
||||
|
||||

|
||||
[](https://github.com/aminya/setup-cpp/actions/workflows/CI.yml)
|
||||
|
||||
Setting up a **cross-platform** environment for building and testing C++/C projects is a bit tricky. Each platform has its own compilers, and each of them requires a different installation procedure. This package aims to fix this issue.
|
||||
|
||||
`setup-cpp` can be used locally from terminal, from CI services like GitHub Actions and GitLab Pipelines, and inside containers like Docker.
|
||||
|
||||
`setup-cpp` is supported on many platforms. It is continuously tested on several configurations including Windows (11, 10, 2022, 2019), Linux (Ubuntu 22.04, Ubuntu 20.04, Fedora, ArchLinux), and macOS (12, 11, 10.15). `setup-cpp` is backed by unit tests for each tool and integration tests for compiling cpp projects.
|
||||
`setup-cpp` is supported on many platforms. It is continuously tested on several configurations including Windows (11, 10, 2022, 2019) x64/ARM/x86, Linux (Ubuntu 24.0, 22.04, 20.04, 18.04, Fedora, ArchLinux) x64/ARM64, and macOS (15, 14, 13, 12, 11, 10.15) x64/ARM. `setup-cpp` is backed by unit tests for each tool and integration tests for compiling cpp projects.
|
||||
|
||||
<!-- dprint-ignore -->
|
||||
```yaml
|
||||
# GitHub Actions example:
|
||||
- name: Setup Cpp
|
||||
uses: aminya/setup-cpp@v1
|
||||
with:
|
||||
compiler: llvm
|
||||
vcvarsall: true
|
||||
cmake: true
|
||||
ninja: true
|
||||
vcpkg: true
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
`setup-cpp` is **modular** and you can choose to install any of these tools:
|
||||
|
||||
| category | tools |
|
||||
| --------------------- | ------------------------------------------------------------ |
|
||||
| compiler and analyzer | llvm, gcc, msvc, vcvarsall, cppcheck, clangtidy, clangformat |
|
||||
| build system | cmake, ninja, meson, make, task, bazel |
|
||||
| package manager | vcpkg, conan, choco, brew, nala |
|
||||
| cache | cppcache, sccache |
|
||||
| documentation | doxygen, graphviz |
|
||||
| coverage | gcovr, opencppcoverage, kcov |
|
||||
| other | python, powershell, sevenzip |
|
||||
| category | tools |
|
||||
| --------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| compiler | llvm, gcc, msvc, apple-clang, vcvarsall |
|
||||
| build system | cmake, ninja, meson, make, task, bazel |
|
||||
| package manager | vcpkg, conan, choco, brew, apt-fast, nala, git, setup-cpp |
|
||||
| analyzer/linter | clang-tidy, clang-format, cppcheck, cpplint, flawfinder, lizard, infer, cmakelang, cmake-format, cmake-lint |
|
||||
| cache | ccache, sccache |
|
||||
| documentation | doxygen, graphviz |
|
||||
| coverage | gcovr, opencppcoverage, kcov |
|
||||
| other | python, powershell, sevenzip, tar |
|
||||
|
||||
`setup-cpp` automatically handles the dependencies of the selected tool (e.g., `python` is required for `conan`).
|
||||
|
||||
|
|
@ -37,18 +51,16 @@ Run `setup-cpp` with the available options.
|
|||
```shell
|
||||
# Windows example (open PowerShell as admin)
|
||||
npx setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||
|
||||
RefreshEnv.cmd # activate the environment
|
||||
# restart the shell to activate the environment
|
||||
```
|
||||
|
||||
```shell
|
||||
# Linux/Macos example
|
||||
sudo npx setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||
|
||||
source ~/.cpprc
|
||||
source ~/.cpprc # activate cpp environment variables
|
||||
```
|
||||
|
||||
NOTE: In the `compiler` entry, you can specify the version after `-` like `llvm-11.0.0`. For the tools, you can pass a specific version instead of `true` that chooses the default version
|
||||
NOTE: In the `compiler` entry, you can specify the version after `-` like `llvm-18`. For the tools, you can pass a specific version instead of `true` that chooses the default version
|
||||
|
||||
NOTE: On Unix systems, when `setup-cpp` is used locally or in other CI services like GitLab, the environment variables are added to `~/.cpprc`. You should run `source ~/.cpprc` to immediately activate the environment variables. This file is automatically sourced in the next shell restart from `~/.bashrc` or `~/.profile` if `SOURCE_CPPRC` is not set to `0`. To deactivate `.cpprc` in the next shell restart, rename/remove `~/.cpprc`.
|
||||
|
||||
|
|
@ -58,39 +70,65 @@ NOTE: setup-cpp requires Nodejs 12 or higher. If Nodejs shipped with your distri
|
|||
|
||||
#### With executable
|
||||
|
||||
Download the executable for your platform from [here](https://github.com/aminya/setup-cpp/releases/tag/v0.36.2), and run it with the available options. You can also automate downloading using `wget`, `curl`, or other similar tools.
|
||||
Download the executable for your platform from [here](https://github.com/aminya/setup-cpp/releases/tag/v1.8.0), and run it with the available options. You can also automate downloading using `curl`, or other similar tools.
|
||||
|
||||
```shell
|
||||
# windows x64
|
||||
curl -o ./setup-cpp.exe -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-x64-windows.exe"
|
||||
# linux x64
|
||||
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-x64-linux"
|
||||
# linux arm64
|
||||
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-arm64-linux"
|
||||
# macos arm64
|
||||
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-arm64-macos"
|
||||
# macos x64
|
||||
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-x64-macos"
|
||||
```
|
||||
|
||||
An example that installs llvm, cmake, ninja, ccache, and vcpkg:
|
||||
|
||||
```shell
|
||||
# windows example (open PowerShell as admin)
|
||||
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.36.2/setup-cpp-x64-windows.exe"
|
||||
./setup-cpp-x64-windows --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||
|
||||
RefreshEnv.cmd # activate cpp environment variables
|
||||
./setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||
# restart the shell to activate the environment
|
||||
```
|
||||
|
||||
```shell
|
||||
# linux example
|
||||
wget "https://github.com/aminya/setup-cpp/releases/download/v0.36.2/setup-cpp-x64-linux"
|
||||
chmod +x ./setup-cpp-x64-linux
|
||||
sudo ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||
|
||||
# linux/macos example
|
||||
chmod +x ./setup-cpp
|
||||
sudo ./setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||
source ~/.cpprc # activate cpp environment variables
|
||||
```
|
||||
|
||||
```shell
|
||||
# macos example
|
||||
wget "https://github.com/aminya/setup-cpp/releases/download/v0.36.2/setup-cpp-x64-macos"
|
||||
chmod +x ./setup-cpp-x64-macos
|
||||
sudo ./setup-cpp-x64-macos --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||
|
||||
source ~/.cpprc # activate cpp environment variables
|
||||
```
|
||||
NOTE: On Unix systems, if you are already a root user (e.g., in a GitLab runner or Docker), you will not need to use `sudo`.
|
||||
|
||||
### Inside GitHub Actions
|
||||
|
||||
Here is a complete cross-platform example that tests llvm, gcc, and msvc. It also uses cmake, ninja, vcpkg, and cppcheck.
|
||||
A simple example for building with LLVM, cmake, ninja, vcpkg:
|
||||
|
||||
<!-- dprint-ignore -->
|
||||
```yaml
|
||||
- name: Setup Cpp
|
||||
uses: aminya/setup-cpp@v1
|
||||
with:
|
||||
compiler: llvm
|
||||
vcvarsall: true
|
||||
cmake: true
|
||||
ninja: true
|
||||
vcpkg: true
|
||||
```
|
||||
|
||||
A simple example for installing clang-format for code formatting:
|
||||
|
||||
<!-- dprint-ignore -->
|
||||
```yaml
|
||||
- name: Setup Cpp
|
||||
uses: aminya/setup-cpp@v1
|
||||
with:
|
||||
clang-format: true
|
||||
```
|
||||
|
||||
A complete cross-platform example that tests llvm, gcc, and msvc. It also uses cmake, ninja, vcpkg, and cppcheck.
|
||||
|
||||
`.github/workflows/ci.yml`:
|
||||
|
||||
|
|
@ -111,12 +149,13 @@ jobs:
|
|||
matrix:
|
||||
os:
|
||||
- windows-2022
|
||||
- ubuntu-22.04
|
||||
- macos-12
|
||||
- ubuntu-24.04
|
||||
- macos-14 # arm64
|
||||
- macos-13
|
||||
compiler:
|
||||
- llvm
|
||||
- gcc
|
||||
# you can specify the version after `-` like `llvm-13.0.0`.
|
||||
# you can specify the version after `-` like `llvm-18`.
|
||||
include:
|
||||
- os: "windows-2022"
|
||||
compiler: "msvc"
|
||||
|
|
@ -126,13 +165,19 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
./build/
|
||||
~/vcpkg
|
||||
./build/vcpkg_installed
|
||||
${{ env.HOME }}/.cache/vcpkg/archives
|
||||
~/.cache/vcpkg/archives
|
||||
${{ env.LOCALAPPDATA }}/vcpkg/archives
|
||||
${{ env.APPDATA }}/vcpkg/archives
|
||||
${{ env.XDG_CACHE_HOME }}/vcpkg/archives
|
||||
${{ env.LOCALAPPDATA }}\vcpkg\archives
|
||||
${{ env.APPDATA }}\vcpkg\archives
|
||||
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ env.BUILD_TYPE }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}}
|
||||
~/.cache/ccache
|
||||
~/.ccache
|
||||
~/.config/ccache
|
||||
~/Library/Caches/ccache
|
||||
${{ env.LOCALAPPDATA }}/ccache
|
||||
${{ env.XDG_CACHE_HOME }}/ccache
|
||||
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ env.BUILD_TYPE }}-${{ hashFiles('**/CMakeLists.txt', './vcpkg.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.BUILD_TYPE }}-
|
||||
|
||||
|
|
@ -140,16 +185,176 @@ jobs:
|
|||
uses: aminya/setup-cpp@v1
|
||||
with:
|
||||
compiler: ${{ matrix.compiler }}
|
||||
vcvarsall: ${{ contains(matrix.os, 'windows') }}
|
||||
vcvarsall: true
|
||||
cmake: true
|
||||
ninja: true
|
||||
vcpkg: true
|
||||
cppcheck: true
|
||||
clangtidy: true # instead of `true`, which chooses the default version, you can pass a specific version.
|
||||
# ...
|
||||
cppcheck: true # instead of `true`, which chooses the default version, you can pass a specific version.
|
||||
```
|
||||
|
||||
### Inside Docker
|
||||
When using the `setup-cpp` action in GitHub Actions, by default it will also install the `setup-cpp` CLI, which you can use in the subsequent commands. You can modify the default behaviour if needed.
|
||||
|
||||
```yaml
|
||||
- name: Setup Cpp
|
||||
uses: aminya/setup-cpp@v1
|
||||
with:
|
||||
setup-cpp: true
|
||||
node-package-manager: "npm"
|
||||
|
||||
- name: Use Setup Cpp CLI
|
||||
run: setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||
```
|
||||
|
||||
### Prebuilt Docker Images
|
||||
|
||||
To provide fast development environments, `setup-cpp` provides several prebuilt docker images that have the tools you need. You can use these images as a base image for your project.
|
||||
|
||||
The tags are in the following template:
|
||||
|
||||
- Base image: `aminya/setup-cpp-ubuntu:24.04`
|
||||
- Compiler image: `aminya/setup-cpp-ubuntu-llvm:24.04`
|
||||
- Base image with pinned setup-cpp version: `aminya/setup-cpp-ubuntu:24.04-v1.8.0`
|
||||
- Compiler image with pinned setup-cpp version: `aminya/setup-cpp-ubuntu-llvm:24.04-v1.8.0`
|
||||
|
||||
The supported platforms are `ubuntu`, `alpine`, `fedora`, and `arch`. The supported compilers are `llvm`, `gcc`, and `mingw`.
|
||||
|
||||
#### Ubuntu Images (amd64 and arm64)
|
||||
|
||||
Setup-cpp provides prebuilt images for various Ubuntu versions (20.04, 22.04, 24.04) with support for base tools, and compilers `llvm`, `gcc`, and `mingw` available for `amd64` and `arm64` architectures.
|
||||
|
||||
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` for Ubuntu 24.04:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu:24.04 AS builder
|
||||
```
|
||||
|
||||
Image with `llvm` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu-llvm:24.04 AS builder
|
||||
```
|
||||
|
||||
Image with `gcc` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu-gcc:24.04 AS builder
|
||||
```
|
||||
|
||||
Image with `mingw` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu-mingw:24.04 AS builder
|
||||
```
|
||||
|
||||
There are also the variants for Ubuntu `22.04`
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu:22.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-llvm:22.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-gcc:22.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-mingw:22.04 AS builder
|
||||
```
|
||||
|
||||
And for Ubuntu `20.04`:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu:20.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-llvm:20.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-gcc:20.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-mingw:20.04 AS builder
|
||||
```
|
||||
|
||||
#### Alpine Images (amd64 and arm64)
|
||||
|
||||
Setup-cpp provides prebuilt images for Alpine with support for base tools, and compilers `llvm`, `gcc`, and `mingw` available for `amd64` and `arm64` architectures.
|
||||
|
||||
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` for Alpine 3.18:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-alpine:3.21 AS builder
|
||||
```
|
||||
|
||||
Image with `llvm` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-alpine-llvm:3.21 AS builder
|
||||
```
|
||||
|
||||
Image with `gcc` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-alpine-gcc:3.21 AS builder
|
||||
```
|
||||
|
||||
Image with `mingw` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-alpine-mingw:3.21 AS builder
|
||||
```
|
||||
|
||||
#### Fedora Images (amd64)
|
||||
|
||||
<details>
|
||||
|
||||
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-fedora:40 AS builder
|
||||
```
|
||||
|
||||
Image with `llvm` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-fedora-llvm:40 AS builder
|
||||
```
|
||||
|
||||
Image with `gcc` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-fedora-gcc:40 AS builder
|
||||
```
|
||||
|
||||
Image with `mingw` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-fedora-mingw:40 AS builder
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
#### ArchLinux Images (amd64)
|
||||
|
||||
<details>
|
||||
|
||||
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-arch:base AS builder
|
||||
```
|
||||
|
||||
Image with `llvm` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-arch-llvm:base AS builder
|
||||
```
|
||||
|
||||
Image with `gcc` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-arch-gcc:base AS builder
|
||||
```
|
||||
|
||||
Image with `mingw` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-arch-mingw:base AS builder
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Custom Docker Images
|
||||
|
||||
If you need to install the tools selectively, you can create your own Docker image with the tools you need.
|
||||
|
||||
Here is an example for using setup-cpp to make a builder image that has the Cpp tools you need.
|
||||
|
||||
|
|
@ -161,8 +366,9 @@ RUN apt-get update -qq && \
|
|||
# install nodejs
|
||||
apt-get install -y --no-install-recommends nodejs npm && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v0.36.2 && \
|
||||
npm install -g setup-cpp@v1.8.0 && \
|
||||
# install the compiler and tools
|
||||
NODE_OPTIONS="--enable-source-maps" \
|
||||
setup-cpp \
|
||||
--nala true \
|
||||
--compiler llvm \
|
||||
|
|
@ -184,15 +390,15 @@ RUN apt-get update -qq && \
|
|||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
||||
#### Building (example)
|
||||
FROM setup-cpp-ubuntu AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build'
|
||||
RUN task build
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
|
|
@ -211,7 +417,7 @@ If you want to build the ones included, then run:
|
|||
```shell
|
||||
git clone --recurse-submodules https://github.com/aminya/setup-cpp
|
||||
cd ./setup-cpp
|
||||
docker build -f ./dev/docker/setup-cpp-ubuntu.dockerfile -t setup-cpp-ubuntu .
|
||||
docker build -f ./dev/docker/setup-cpp/setup-cpp-ubuntu.dockerfile -t setup-cpp-ubuntu-llvm:22.04-17 ./
|
||||
```
|
||||
|
||||
Where you should use the path to the dockerfile after `-f`.
|
||||
|
|
@ -219,7 +425,7 @@ Where you should use the path to the dockerfile after `-f`.
|
|||
After build, run the following to start an interactive shell in your container
|
||||
|
||||
```shell
|
||||
docker run -it setup-cpp
|
||||
docker run -it setup-cpp-ubuntu-llvm:22.04-17
|
||||
```
|
||||
|
||||
### Inside Docker inside GitHub Actions
|
||||
|
|
@ -233,7 +439,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
- ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
|
|
@ -270,7 +476,7 @@ stages:
|
|||
apt-get install -y --no-install-recommends nodejs npm
|
||||
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v0.36.2
|
||||
npm install -g setup-cpp@v1.8.0
|
||||
|
||||
# install the compiler and tools
|
||||
./setup-cpp-x64-linux --compiler $compiler --cmake true --ninja true --ccache true --vcpkg true
|
||||
|
|
@ -299,6 +505,37 @@ test_linux_gcc:
|
|||
- *test
|
||||
```
|
||||
|
||||
### As a Library in Nodejs
|
||||
|
||||
```ts
|
||||
import { setupCpp, success, error } from "setup-cpp"
|
||||
|
||||
async function main() {
|
||||
const { errorMessages, successMessages } = await setupCpp({
|
||||
compiler: "llvm",
|
||||
cmake: true,
|
||||
ninja: true,
|
||||
vcpkg: true,
|
||||
})
|
||||
|
||||
for (const message of errorMessages) {
|
||||
error(message)
|
||||
}
|
||||
for (const message of successMessages) {
|
||||
success(message)
|
||||
}
|
||||
|
||||
if (errorMessages.length !== 0) {
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(err => {
|
||||
console.error(err)
|
||||
process.exit(1)
|
||||
})
|
||||
```
|
||||
|
||||
## Articles
|
||||
|
||||
[Setup-Cpp on Dev.to](https://dev.to/aminya/setup-cpp-3ia4)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,160 @@
|
|||
# setup-cpp
|
||||
|
||||
Install all the tools required for building and testing C++/C projects.
|
||||
|
||||
[](https://github.com/aminya/setup-cpp/actions/workflows/CI.yml)
|
||||
|
||||
Setting up a **cross-platform** environment for building and testing C++/C projects is a bit tricky. Each platform has its own compilers, and each of them requires a different installation procedure. This package aims to fix this issue.
|
||||
|
||||
`setup-cpp` can be used locally from terminal, from CI services like GitHub Actions and GitLab Pipelines, and inside containers like Docker.
|
||||
|
||||
`setup-cpp` is supported on many platforms. It is continuously tested on several configurations including Windows (11, 10, 2022, 2019) x64/ARM/x86, Linux (Ubuntu 24.0, 22.04, 20.04, 18.04, Fedora, ArchLinux) x64/ARM64, and macOS (15, 14, 13, 12, 11, 10.15) x64/ARM. `setup-cpp` is backed by unit tests for each tool and integration tests for compiling cpp projects.
|
||||
|
||||
See https://github.com/aminya/setup-cpp for more information about using `setup-cpp` in different environments.
|
||||
|
||||
### Prebuilt Docker Images
|
||||
|
||||
To provide fast development environments, `setup-cpp` provides several prebuilt docker images that have the tools you need. You can use these images as a base image for your project.
|
||||
|
||||
The tags are in the following template:
|
||||
|
||||
- Base image: `aminya/setup-cpp-ubuntu:24.04`
|
||||
- Compiler image: `aminya/setup-cpp-ubuntu-llvm:24.04`
|
||||
- Base image with pinned setup-cpp version: `aminya/setup-cpp-ubuntu:24.04-v1.8.0`
|
||||
- Compiler image with pinned setup-cpp version: `aminya/setup-cpp-ubuntu-llvm:24.04-v1.8.0`
|
||||
|
||||
The supported platforms are `ubuntu`, `alpine`, `fedora`, and `arch`. The supported compilers are `llvm`, `gcc`, and `mingw`.
|
||||
|
||||
#### Ubuntu Images (amd64 and arm64)
|
||||
|
||||
Setup-cpp provides prebuilt images for various Ubuntu versions (20.04, 22.04, 24.04) with support for base tools, and compilers `llvm`, `gcc`, and `mingw` available for `amd64` and `arm64` architectures.
|
||||
|
||||
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` for Ubuntu 24.04:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu:24.04 AS builder
|
||||
```
|
||||
|
||||
Image with `llvm` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu-llvm:24.04 AS builder
|
||||
```
|
||||
|
||||
Image with `gcc` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu-gcc:24.04 AS builder
|
||||
```
|
||||
|
||||
Image with `mingw` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu-mingw:24.04 AS builder
|
||||
```
|
||||
|
||||
There are also the variants for Ubuntu `22.04`
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu:22.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-llvm:22.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-gcc:22.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-mingw:22.04 AS builder
|
||||
```
|
||||
|
||||
And for Ubuntu `20.04`:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-ubuntu:20.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-llvm:20.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-gcc:20.04 AS builder
|
||||
FROM aminya/setup-cpp-ubuntu-mingw:20.04 AS builder
|
||||
```
|
||||
|
||||
#### Alpine Images (amd64 and arm64)
|
||||
|
||||
Setup-cpp provides prebuilt images for Alpine with support for base tools, and compilers `llvm`, `gcc`, and `mingw` available for `amd64` and `arm64` architectures.
|
||||
|
||||
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` for Alpine 3.18:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-alpine:3.21 AS builder
|
||||
```
|
||||
|
||||
Image with `llvm` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-alpine-llvm:3.21 AS builder
|
||||
```
|
||||
|
||||
Image with `gcc` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-alpine-gcc:3.21 AS builder
|
||||
```
|
||||
|
||||
Image with `mingw` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-alpine-mingw:3.21 AS builder
|
||||
```
|
||||
|
||||
#### Fedora Images (amd64)
|
||||
|
||||
<details>
|
||||
|
||||
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-fedora:40 AS builder
|
||||
```
|
||||
|
||||
Image with `llvm` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-fedora-llvm:40 AS builder
|
||||
```
|
||||
|
||||
Image with `gcc` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-fedora-gcc:40 AS builder
|
||||
```
|
||||
|
||||
Image with `mingw` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-fedora-mingw:40 AS builder
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
#### ArchLinux Images (amd64)
|
||||
|
||||
<details>
|
||||
|
||||
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-arch:base AS builder
|
||||
```
|
||||
|
||||
Image with `llvm` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-arch-llvm:base AS builder
|
||||
```
|
||||
|
||||
Image with `gcc` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-arch-gcc:base AS builder
|
||||
```
|
||||
|
||||
Image with `mingw` and the base tools:
|
||||
|
||||
```dockerfile
|
||||
FROM aminya/setup-cpp-arch-mingw:base AS builder
|
||||
```
|
||||
|
||||
</details>
|
||||
247
action.yml
247
action.yml
|
|
@ -3,95 +3,176 @@ description: "Install all the tools required for building and testing C++/C proj
|
|||
author: "Amin Yahyaabadi"
|
||||
|
||||
inputs:
|
||||
compiler:
|
||||
description: "The compiler to use and its optional version separated by - e.g. llvm-13.0.0"
|
||||
required: false
|
||||
architecture:
|
||||
description: "The CPU architecture"
|
||||
required: false
|
||||
llvm:
|
||||
description: "The llvm version to install"
|
||||
required: false
|
||||
gcc:
|
||||
description: "The gcc version to install"
|
||||
required: false
|
||||
msvc:
|
||||
description: "The msvc version to install"
|
||||
required: false
|
||||
vcvarsall:
|
||||
description: "If should run vcvarsall?"
|
||||
required: false
|
||||
cmake:
|
||||
description: "The cmake version to install."
|
||||
required: false
|
||||
ninja:
|
||||
description: "The ninja version to install."
|
||||
required: false
|
||||
conan:
|
||||
description: "The conan version to install."
|
||||
required: false
|
||||
make:
|
||||
description: "The make version to install."
|
||||
required: false
|
||||
task:
|
||||
description: "The task version to install."
|
||||
required: false
|
||||
vcpkg:
|
||||
description: "The vcpkg version to install."
|
||||
required: false
|
||||
meson:
|
||||
description: "The meson version to install."
|
||||
required: false
|
||||
gcovr:
|
||||
description: "The gcovr version to install."
|
||||
required: false
|
||||
python:
|
||||
description: "The python version to install."
|
||||
required: false
|
||||
ccache:
|
||||
description: "The ccache version to install."
|
||||
required: false
|
||||
sccache:
|
||||
description: "The sccache version to install."
|
||||
required: false
|
||||
doxygen:
|
||||
description: "The doxygen version to install."
|
||||
required: false
|
||||
graphviz:
|
||||
description: "The graphviz version to install."
|
||||
required: false
|
||||
cppcheck:
|
||||
description: "The cppcheck version to install."
|
||||
required: false
|
||||
clangtidy:
|
||||
description: "The clang-tidy version to install."
|
||||
required: false
|
||||
clangformat:
|
||||
description: "The clang-format version to install."
|
||||
required: false
|
||||
opencppcoverage:
|
||||
description: "The opencppcoverage version to install."
|
||||
required: false
|
||||
kcov:
|
||||
description: "The kcov version to install."
|
||||
required: false
|
||||
sevenzip:
|
||||
description: "The 7z version to install."
|
||||
required: false
|
||||
nala:
|
||||
description: 'The nala version to install ("" or "legacy").'
|
||||
required: false
|
||||
powershell:
|
||||
description: "The powershell version to install."
|
||||
required: false
|
||||
timeout:
|
||||
description: "The timeout for installation of one tool (in minutes)."
|
||||
default: "20"
|
||||
required: false
|
||||
cache-tools:
|
||||
description: "If should cache the installed tools? (Default: false)"
|
||||
required: false
|
||||
architecture:
|
||||
description: "The CPU architecture"
|
||||
required: false
|
||||
compiler:
|
||||
description: "The compiler to use and its optional version separated by - e.g. llvm-13.0.0"
|
||||
required: false
|
||||
llvm:
|
||||
description: "Wether to install llvm (true/false) or the specific version to install"
|
||||
required: false
|
||||
clang:
|
||||
description: "Wether to install clang (true/false) or the specific version to install"
|
||||
required: false
|
||||
gcc:
|
||||
description: "Wether to install gcc (true/false) or the specific version to install"
|
||||
required: false
|
||||
msvc:
|
||||
description: "Wether to install msvc (true/false) or the specific version to install"
|
||||
required: false
|
||||
cl:
|
||||
description: "Wether to install cl (true/false) or the specific version to install"
|
||||
required: false
|
||||
msbuild:
|
||||
description: "Wether to install msbuild (true/false) or the specific version to install"
|
||||
required: false
|
||||
visualstudio:
|
||||
description: "Wether to install visualstudio (true/false) or the specific version to install"
|
||||
required: false
|
||||
apple-clang:
|
||||
description: "Wether to install apple-clang (true/false) or the specific version to install"
|
||||
required: false
|
||||
apple-llvm:
|
||||
description: "Wether to install apple-llvm (true/false) or the specific version to install"
|
||||
required: false
|
||||
appleclang:
|
||||
description: "Wether to install apple-clang (true/false) or the specific version to install"
|
||||
required: false
|
||||
applellvm:
|
||||
description: "Wether to install apple-llvm (true/false) or the specific version to install"
|
||||
required: false
|
||||
vcvarsall:
|
||||
description: "If should run vcvarsall?"
|
||||
required: false
|
||||
cppcheck:
|
||||
description: "Wether to install cppcheck (true/false) or the specific version to install."
|
||||
required: false
|
||||
cpplint:
|
||||
description: "Wether to install cpplint (true/false) or the specific version to install."
|
||||
required: false
|
||||
flawfinder:
|
||||
description: "Wether to install flawfinder (true/false) or the specific version to install."
|
||||
required: false
|
||||
lizard:
|
||||
description: "Wether to install lizard (true/false) or the specific version to install."
|
||||
required: false
|
||||
infer:
|
||||
description: "Wether to install facebook/infer (true/false) or the specific version to install."
|
||||
required: false
|
||||
clang-tidy:
|
||||
description: "Wether to install clang-tidy (true/false) or the specific version to install."
|
||||
required: false
|
||||
clangtidy:
|
||||
description: "The clangWether to install tidy (true/false) or the specific version to install."
|
||||
required: false
|
||||
clang-format:
|
||||
description: "The clangWether to install format (true/false) or the specific version to install."
|
||||
required: false
|
||||
clangformat:
|
||||
description: "The clangWether to install format (true/false) or the specific version to install."
|
||||
required: false
|
||||
cmake:
|
||||
description: "Wether to install cmake (true/false) or the specific version to install."
|
||||
required: false
|
||||
cmakelang:
|
||||
description: "Wether to install cmakelang (true/false) or the specific version to install."
|
||||
required: false
|
||||
cmake-lint:
|
||||
description: "Wether to install cmake-lint (true/false) or the specific version to install."
|
||||
required: false
|
||||
cmakelint:
|
||||
description: "Wether to install cmake-lint (true/false) or the specific version to install."
|
||||
required: false
|
||||
cmake-format:
|
||||
description: "Wether to install cmake-format (true/false) or the specific version to install."
|
||||
required: false
|
||||
cmakeformat:
|
||||
description: "Wether to install cmake-format (true/false) or the specific version to install."
|
||||
required: false
|
||||
ninja:
|
||||
description: "Wether to install ninja (true/false) or the specific version to install."
|
||||
required: false
|
||||
conan:
|
||||
description: "Wether to install conan (true/false) or the specific version to install."
|
||||
required: false
|
||||
make:
|
||||
description: "Wether to install make (true/false) or the specific version to install."
|
||||
required: false
|
||||
task:
|
||||
description: "Wether to install task (true/false) or the specific version to install."
|
||||
required: false
|
||||
vcpkg:
|
||||
description: "Wether to install vcpkg (true/false) or the specific version to install."
|
||||
required: false
|
||||
meson:
|
||||
description: "Wether to install meson (true/false) or the specific version to install."
|
||||
required: false
|
||||
choco:
|
||||
description: "Wether to install chocolatey (true/false) or the specific version to install."
|
||||
required: false
|
||||
brew:
|
||||
description: "Wether to install brew (true/false) or the specific version to install."
|
||||
required: false
|
||||
nala:
|
||||
description: 'Wether to install nala (true/false) or the specific version to install ("" or "legacy").'
|
||||
required: false
|
||||
ccache:
|
||||
description: "Wether to install ccache (true/false) or the specific version to install."
|
||||
required: false
|
||||
sccache:
|
||||
description: "Wether to install sccache (true/false) or the specific version to install."
|
||||
required: false
|
||||
doxygen:
|
||||
description: "Wether to install doxygen (true/false) or the specific version to install."
|
||||
required: false
|
||||
graphviz:
|
||||
description: "Wether to install graphviz (true/false) or the specific version to install."
|
||||
required: false
|
||||
gcovr:
|
||||
description: "Wether to install gcovr (true/false) or the specific version to install."
|
||||
required: false
|
||||
opencppcoverage:
|
||||
description: "Wether to install opencppcoverage (true/false) or the specific version to install."
|
||||
required: false
|
||||
kcov:
|
||||
description: "Wether to install kcov (true/false) or the specific version to install."
|
||||
required: false
|
||||
sevenzip:
|
||||
description: "Wether to install 7z (true/false) or the specific version to install."
|
||||
required: false
|
||||
powershell:
|
||||
description: "Wether to install powershell (true/false) or the specific version to install."
|
||||
required: false
|
||||
pwsh:
|
||||
description: "Wether to install pwsh (true/false) or the specific version to install."
|
||||
required: false
|
||||
python:
|
||||
description: "Wether to install python (true/false) or the specific version to install."
|
||||
required: false
|
||||
setup-cpp:
|
||||
description: "Wether to install setup-cpp (true/false) or the specific version to install. (Default to the current version called by the action)"
|
||||
required: false
|
||||
node-package-manager:
|
||||
description: "The node package manager to use (npm/yarn/pnpm) when installing setup-cpp globally"
|
||||
required: false
|
||||
git:
|
||||
description: "Wether to install git (true/false) or the specific version to install."
|
||||
required: false
|
||||
tar:
|
||||
description: "Wether to install tar (true/false) or the specific version to install."
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "node16"
|
||||
main: "dist/actions/setup-cpp.js"
|
||||
using: "node20"
|
||||
main: "dist/modern/setup-cpp.mjs"
|
||||
|
||||
branding:
|
||||
icon: "award"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import type { TransformOptions } from "@babel/core"
|
||||
// @ts-expect-error no types
|
||||
import RemoveNodePrefix from "@upleveled/babel-plugin-remove-node-prefix"
|
||||
|
||||
const babelConfig: TransformOptions = {
|
||||
plugins: [
|
||||
RemoveNodePrefix,
|
||||
],
|
||||
sourceMaps: true,
|
||||
sourceType: "module",
|
||||
}
|
||||
export default babelConfig
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.9.1/schema.json",
|
||||
"files": {
|
||||
"ignore": [
|
||||
"**/node_modules/**",
|
||||
"**/.pnpm-store/**",
|
||||
"**/dist/**",
|
||||
"dev/cpp_vcpkg_project/**/*",
|
||||
"**/.venv/",
|
||||
"**/.*cache/",
|
||||
"coverage/",
|
||||
"**/coverage/",
|
||||
"**/github_brechtsanders_winlibs_mingw.json"
|
||||
],
|
||||
"ignoreUnknown": true
|
||||
},
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"style": {
|
||||
"noInferrableTypes": "off",
|
||||
"noUselessElse": "off",
|
||||
"noNonNullAssertion": "off",
|
||||
"useNodejsImportProtocol": "off"
|
||||
},
|
||||
"complexity": {
|
||||
"useLiteralKeys": "off"
|
||||
},
|
||||
"suspicious": {
|
||||
"noConfusingVoidType": "off"
|
||||
},
|
||||
"correctness": {
|
||||
"useImportExtensions": {
|
||||
"level": "error",
|
||||
"options": {
|
||||
"suggestedExtensions": {
|
||||
"ts": {
|
||||
"component": "js",
|
||||
"module": "js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": false,
|
||||
"indentWidth": 4,
|
||||
"indentStyle": "space"
|
||||
},
|
||||
"json": {
|
||||
"formatter": {
|
||||
"enabled": false,
|
||||
"trailingCommas": "none"
|
||||
},
|
||||
"parser": {
|
||||
"allowComments": true,
|
||||
"allowTrailingCommas": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[install]
|
||||
linker = "hoisted"
|
||||
|
|
@ -10,18 +10,29 @@ ignorePaths:
|
|||
- dev/cpp_vcpkg_project
|
||||
- "**/node_modules/"
|
||||
- .vscode/extensions.json
|
||||
- patches/*.patch
|
||||
- "**/github_*.json"
|
||||
- "**/llvm_org_releases.json"
|
||||
words:
|
||||
- aarch
|
||||
- aminya
|
||||
- applellvm
|
||||
- armv
|
||||
- bazel
|
||||
- bazelisk
|
||||
- binfmt
|
||||
- biome
|
||||
- biomejs
|
||||
- buildtools
|
||||
- Buildx
|
||||
- caxa
|
||||
- ccache
|
||||
- choco
|
||||
- clangd
|
||||
- cmake
|
||||
- cmakeformat
|
||||
- cmakelang
|
||||
- cmakelint
|
||||
- cobertura
|
||||
- copr
|
||||
- CPATH
|
||||
|
|
@ -33,9 +44,15 @@ words:
|
|||
- dearmor
|
||||
- deps
|
||||
- devel
|
||||
- dpkg
|
||||
- dprint
|
||||
- DVCPKG
|
||||
- dyld
|
||||
- eabi
|
||||
- envosman
|
||||
- envosmanrc
|
||||
- esac
|
||||
- esbuild
|
||||
- esmodule
|
||||
- execa
|
||||
- ftxui
|
||||
|
|
@ -43,9 +60,13 @@ words:
|
|||
- gcovr
|
||||
- ghes
|
||||
- Graphviz
|
||||
- gtar
|
||||
- hadolint
|
||||
- iarna
|
||||
- inja
|
||||
- isci
|
||||
- isroot
|
||||
- jsonify
|
||||
- kcov
|
||||
- LDFLAGS
|
||||
- lefticus
|
||||
|
|
@ -54,6 +75,11 @@ words:
|
|||
- libdw
|
||||
- libstdc
|
||||
- libtinfo
|
||||
- liuli
|
||||
- llvmorg
|
||||
- mdimporterdir
|
||||
- memoizee
|
||||
- mkdirp
|
||||
- msbuild
|
||||
- msvc
|
||||
- msvcrt
|
||||
|
|
@ -63,24 +89,32 @@ words:
|
|||
- nala
|
||||
- noconfirm
|
||||
- nodistro
|
||||
- NOPASSWD
|
||||
- noprogressbar
|
||||
- noreply
|
||||
- nothrow
|
||||
- npmrc
|
||||
- nvmrc
|
||||
- Opencppcoverage
|
||||
- OSSDK
|
||||
- papm
|
||||
- patha
|
||||
- pipx
|
||||
- pnpm
|
||||
- pnpx
|
||||
- pwsh
|
||||
- pygments
|
||||
- pypy
|
||||
- qlplugindir
|
||||
- rharkor
|
||||
- Sccache
|
||||
- setupcpp
|
||||
- setx
|
||||
- sparcv
|
||||
- SYSROOT
|
||||
- Syuu
|
||||
- terserrc
|
||||
- tonistiigi
|
||||
- Trofimovich
|
||||
- tsbuildinfo
|
||||
- ucrt
|
||||
|
|
@ -98,6 +132,7 @@ words:
|
|||
- vsversion
|
||||
- whatwg
|
||||
- xcrun
|
||||
- xlarge
|
||||
- Yahyaabadi
|
||||
ignoreWords: []
|
||||
import: []
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c30589196b2c59a3055dfc7c24244b4a1f48b081
|
||||
Subproject commit b3f3cd5726740baa888d9e71ec783ca22596c057
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
## base image
|
||||
FROM archlinux:base-devel as setup-cpp-arch-mingw
|
||||
|
||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||
|
||||
# install git
|
||||
RUN pacman -Syuu --noconfirm && \
|
||||
pacman-db-upgrade && \
|
||||
pacman -S --noconfirm --needed git
|
||||
# install yay
|
||||
RUN useradd -m -G nobody -s /bin/bash yay && passwd -d yay && echo "yay ALL=(ALL) ALL" >> /etc/sudoers
|
||||
RUN git clone --depth 1 https://aur.archlinux.org/yay.git /opt/yay
|
||||
WORKDIR /opt/yay
|
||||
RUN chown -R yay:root . && chmod -R 775 .
|
||||
USER yay
|
||||
WORKDIR /opt/yay
|
||||
RUN makepkg -si --noprogressbar --noconfirm
|
||||
## clean up
|
||||
USER root
|
||||
WORKDIR /
|
||||
RUN rm -rf /opt/yay
|
||||
|
||||
RUN pacman -Syuu --noconfirm && \
|
||||
pacman-db-upgrade && \
|
||||
# install nodejs
|
||||
pacman -S --noconfirm --needed nodejs npm && \
|
||||
# install the compiler and tools
|
||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||
--compiler mingw \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true && \
|
||||
# arch cleanup
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/cache/pacman/pkg/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
||||
#### Cross Building (example)
|
||||
FROM setup-cpp-arch-mingw AS builder-mingw
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build_cross_mingw'
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: mingw c compiler
|
||||
command: x86_64-w64-mingw32-gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-gcc.*"]
|
||||
- name: mingw c++ compiler
|
||||
command: x86_64-w64-mingw32-g++
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-g\\+\\+*"]
|
||||
- name: powershell
|
||||
command: pwsh
|
||||
args: ["-Version"]
|
||||
expectedOutput: [".*PowerShell.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "cross root"
|
||||
path: "/usr/x86_64-w64-mingw32"
|
||||
shouldExist: true
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
## base image
|
||||
FROM archlinux:base as setup-cpp-arch
|
||||
|
||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||
|
||||
RUN pacman -Syuu --noconfirm && \
|
||||
pacman-db-upgrade && \
|
||||
# install nodejs
|
||||
pacman -S --noconfirm --needed nodejs npm && \
|
||||
|
||||
# install the compiler and tools
|
||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||
--compiler llvm \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true && \
|
||||
# arch cleanup
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/cache/pacman/pkg/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
||||
#### Building (example)
|
||||
FROM setup-cpp-arch AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build'
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM archlinux:base as runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
WORKDIR /home/app/
|
||||
ENTRYPOINT ["./my_exe"]
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*ccache.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: clang
|
||||
command: /usr/lib/llvm-15/bin/clang
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*clang.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
## base image
|
||||
FROM fedora:40 as setup-cpp-fedora-mingw
|
||||
|
||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||
|
||||
# install nodejs
|
||||
RUN dnf -y install nodejs npm && \
|
||||
|
||||
# install the compiler and tools
|
||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||
--compiler mingw \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true \
|
||||
--powershell true && \
|
||||
# cleanup
|
||||
dnf clean all && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
||||
#### Cross Building (example)
|
||||
FROM setup-cpp-fedora-mingw AS builder-mingw
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build_cross_mingw'
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
## base image
|
||||
FROM fedora:40 as setup-cpp-fedora
|
||||
|
||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||
|
||||
# install nodejs
|
||||
RUN dnf -y install nodejs npm && \
|
||||
|
||||
# install the compiler and tools
|
||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||
--compiler llvm \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true && \
|
||||
# cleanup
|
||||
dnf clean all && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
||||
#### Building (example)
|
||||
FROM setup-cpp-fedora AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build'
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM fedora:40 as runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
WORKDIR /home/app/
|
||||
ENTRYPOINT ["./my_exe"]
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*ccache.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: clang
|
||||
command: /usr/lib/llvm-15/bin/clang
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*clang.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { readFile, writeFile } from "fs/promises"
|
||||
|
||||
async function main() {
|
||||
const dockerFiles = ["ubuntu", "arch", "fedora", "ubuntu-mingw", "arch-mingw", "fedora-mingw"]
|
||||
await Promise.all(
|
||||
dockerFiles.map(async (dockerFile) => {
|
||||
const dockerFileContent = await readFile(`./dev/docker/setup-cpp-${dockerFile}.dockerfile`, "utf-8")
|
||||
const builderExample = await readFile(`./dev/docker/${dockerFile}.dockerfile`, "utf-8")
|
||||
|
||||
const modifiedDockerFile = dockerFileContent
|
||||
// load the externally built setup-cpp
|
||||
.replace(/FROM (.*)/g, `FROM $1\n\nCOPY "./dist/legacy" "/usr/lib/setup-cpp/"`)
|
||||
.replace("setup-cpp ", "node /usr/lib/setup-cpp/setup-cpp.js ")
|
||||
// remove the npm install line
|
||||
.replace(/# install setup-cpp\n\s*npm install -g setup-cpp.*/, "")
|
||||
|
||||
// concat the two files
|
||||
const newDockerFileContent = `${modifiedDockerFile}\n${builderExample}`
|
||||
|
||||
// write the new file in dev/docker/__tests__
|
||||
await writeFile(`./dev/docker/__tests__/${dockerFile}.dockerfile`, newDockerFileContent)
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
await main()
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
#### Base Image
|
||||
FROM ubuntu:22.04 as setup-cpp-ubuntu-mingw
|
||||
|
||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||
|
||||
RUN apt-get update -qq && \
|
||||
# install nodejs
|
||||
apt-get install -y --no-install-recommends nodejs npm && \
|
||||
|
||||
# install the compiler and tools
|
||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||
--nala true \
|
||||
--compiler mingw \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true \
|
||||
--powershell true && \
|
||||
# cleanup
|
||||
nala autoremove -y && \
|
||||
nala autopurge -y && \
|
||||
apt-get clean && \
|
||||
nala clean --lists && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
||||
#### Cross Building (example)
|
||||
FROM setup-cpp-ubuntu-mingw AS builder-mingw
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build_cross_mingw'
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: mingw c compiler
|
||||
command: x86_64-w64-mingw32-gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-gcc.*"]
|
||||
- name: mingw c++ compiler
|
||||
command: x86_64-w64-mingw32-g++
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-g\\+\\+*"]
|
||||
- name: powershell
|
||||
command: pwsh
|
||||
args: ["-Version"]
|
||||
expectedOutput: [".*PowerShell.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "cross root"
|
||||
path: "/usr/x86_64-w64-mingw32"
|
||||
shouldExist: true
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
#### Base Image
|
||||
FROM ubuntu:22.04 as setup-cpp-ubuntu
|
||||
|
||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||
|
||||
RUN apt-get update -qq && \
|
||||
# install nodejs
|
||||
apt-get install -y --no-install-recommends nodejs npm && \
|
||||
|
||||
# install the compiler and tools
|
||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||
--nala true \
|
||||
--compiler llvm \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true && \
|
||||
# cleanup
|
||||
nala autoremove -y && \
|
||||
nala autopurge -y && \
|
||||
apt-get clean && \
|
||||
nala clean --lists && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
||||
#### Building (example)
|
||||
FROM setup-cpp-ubuntu AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build'
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM ubuntu:22.04 as runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
WORKDIR /home/app/
|
||||
ENTRYPOINT ["./my_exe"]
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: gcovr
|
||||
command: /usr/local/bin/gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: ccache
|
||||
command: /usr/bin/ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*ccache.*"]
|
||||
- name: doxygen
|
||||
command: /usr/bin/doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: cppcheck
|
||||
command: /usr/bin/cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Cppcheck.*"]
|
||||
- name: clang
|
||||
command: /usr/lib/llvm-15/bin/clang
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*clang.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "llvm"
|
||||
path: "/root/llvm"
|
||||
shouldExist: true
|
||||
- name: "ninja"
|
||||
path: "/root/ninja"
|
||||
shouldExist: true
|
||||
- name: "cmake"
|
||||
path: "/root/cmake"
|
||||
shouldExist: true
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
FROM aminya/setup-cpp-alpine:latest AS setup-cpp-alpine-gcc
|
||||
|
||||
# install gcc
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler gcc && \
|
||||
# cleanup
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
|
||||
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
FROM aminya/setup-cpp-alpine:latest AS setup-cpp-alpine-llvm
|
||||
|
||||
# install llvm
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler llvm && \
|
||||
# cleanup
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
|
||||
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
FROM aminya/setup-cpp-alpine:latest AS setup-cpp-alpine-mingw
|
||||
|
||||
# install mingw/powershell
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler mingw \
|
||||
--powershell true && \
|
||||
# cleanup
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
|
||||
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
ARG BASE_VERSION=22-alpine3.21
|
||||
|
||||
#### Base Image with Node.js
|
||||
FROM --platform=$BUILDPLATFORM node:${BASE_VERSION} AS alpine-nodejs
|
||||
|
||||
#### Base Image with Tools
|
||||
FROM alpine-nodejs AS setup-cpp-alpine
|
||||
|
||||
COPY "./dist/modern" "/usr/lib/setup-cpp/"
|
||||
|
||||
# install the cpp tools
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--vcpkg true \
|
||||
--ccache true \
|
||||
--conan true \
|
||||
--cmakelang true \
|
||||
--meson true && \
|
||||
# cleanup
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Custom entrypoint due to bash -l limitations on Alpine
|
||||
RUN printf '#!/bin/bash\nsource $HOME/.cpprc\nexec "$@"\n' > /entrypoint.sh && \
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
|
||||
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
FROM aminya/setup-cpp-arch:latest AS setup-cpp-arch-gcc
|
||||
|
||||
# install llvm
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler gcc && \
|
||||
# arch cleanup
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/cache/pacman/pkg/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
FROM aminya/setup-cpp-arch:latest AS setup-cpp-arch-llvm
|
||||
|
||||
# install llvm
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler llvm && \
|
||||
# arch cleanup
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/cache/pacman/pkg/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
FROM aminya/setup-cpp-arch:latest AS setup-cpp-arch-mingw
|
||||
|
||||
# install mingw/powershell
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler mingw \
|
||||
--powershell true && \
|
||||
# arch cleanup
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/cache/pacman/pkg/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
## base image
|
||||
FROM --platform=$BUILDPLATFORM archlinux:base AS arch-nodejs
|
||||
|
||||
# Setup bash environment
|
||||
RUN echo '[[ -f ~/.bashrc ]] && . ~/.bashrc' > /root/.bash_profile
|
||||
|
||||
RUN pacman -Syuu --noconfirm && \
|
||||
pacman-db-upgrade && \
|
||||
# install nodejs
|
||||
pacman -S --noconfirm --needed nodejs npm && \
|
||||
# cleanup
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/cache/pacman/pkg/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
FROM arch-nodejs AS setup-cpp-arch
|
||||
|
||||
COPY "./dist/modern" "/usr/lib/setup-cpp/"
|
||||
|
||||
# install the cpp tools
|
||||
RUN pacman -Syuu --noconfirm && \
|
||||
pacman-db-upgrade && \
|
||||
node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true \
|
||||
--conan true \
|
||||
--cmakelang true \
|
||||
--meson true && \
|
||||
# arch cleanup
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/cache/pacman/pkg/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
import { readFile, writeFile } from "fs/promises"
|
||||
|
||||
async function main() {
|
||||
const names = ["ubuntu-llvm", "arch-llvm", "fedora-llvm", "ubuntu-mingw", "arch-mingw", "fedora-mingw"]
|
||||
await Promise.all(
|
||||
names.map(async (name) => {
|
||||
const dockerFileContent = await readFile(`./dev/docker/setup-cpp/setup-cpp-${name}.dockerfile`, "utf-8")
|
||||
const modifiedDockerFile = dockerFileContent
|
||||
// load the externally built setup-cpp
|
||||
.replace(/FROM (.*)/g, `FROM $1\n\nCOPY "./dist/modern" "/usr/lib/setup-cpp/"`)
|
||||
.replace("setup-cpp ", "node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs ")
|
||||
// remove the npm install line
|
||||
.replace(/# install setup-cpp\n\s*npm install -g setup-cpp.*\n/, "")
|
||||
|
||||
// write the new file in dev/docker/ci
|
||||
await writeFile(`./dev/docker/ci/${name}.dockerfile`, modifiedDockerFile)
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
await main()
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
FROM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-gcc
|
||||
|
||||
# install gcc
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler gcc && \
|
||||
# cleanup
|
||||
dnf clean all && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
FROM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-llvm
|
||||
|
||||
# install llvm
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler llvm && \
|
||||
# cleanup
|
||||
dnf clean all && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
FROM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-mingw
|
||||
|
||||
# install mingw
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler mingw \
|
||||
--powershell true && \
|
||||
# cleanup
|
||||
dnf clean all && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
## base image
|
||||
FROM --platform=$BUILDPLATFORM fedora:44 AS fedora-nodejs
|
||||
|
||||
# install nodejs
|
||||
RUN dnf -y install nodejs npm && \
|
||||
# cleanup
|
||||
dnf clean all && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
FROM fedora-nodejs AS setup-cpp-fedora
|
||||
|
||||
COPY "./dist/modern" "/usr/lib/setup-cpp/"
|
||||
|
||||
# install the cpp tools
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true \
|
||||
--conan true \
|
||||
--cmakelang true \
|
||||
--meson true && \
|
||||
# cleanup
|
||||
dnf clean all && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: bash
|
||||
args: ["-l", "-c", "cmake --version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: bash
|
||||
args: ["-l", "-c", "ninja --version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: bash
|
||||
args: ["-l", "-c", "task --version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: bash
|
||||
args: ["-l", "-c", "python --version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: bash
|
||||
args: ["-l", "-c", "python3 --version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: bash
|
||||
args: ["-l", "-c", "make --version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: bash
|
||||
args: ["-l", "-c", "cppcheck --version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: bash
|
||||
args: ["-l", "-c", "gcovr --version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: bash
|
||||
args: ["-l", "-c", "doxygen --version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: bash
|
||||
args: ["-l", "-c", "ccache --version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: bash
|
||||
args: ["-l", "-c", "conan --version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: bash
|
||||
args: ["-l", "-c", "meson --version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: bash
|
||||
args: ["-l", "-c", "cmake-format --version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: bash
|
||||
args: ["-l", "-c", "cmake-lint --version"]
|
||||
expectedOutput: [".*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "ninja"
|
||||
path: "/root/ninja"
|
||||
shouldExist: true
|
||||
- name: "cmake"
|
||||
path: "/root/cmake"
|
||||
shouldExist: true
|
||||
- name: "task"
|
||||
path: "/root/task"
|
||||
shouldExist: true
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: gcc
|
||||
command: bash
|
||||
args: ["-l", "-c", "gcc --version"]
|
||||
expectedOutput: [".*gcc.*"]
|
||||
- name: g++
|
||||
command: bash
|
||||
args: ["-l", "-c", "g++ --version"]
|
||||
expectedOutput: [".*g\\+\\+.*"]
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
import path from "path"
|
||||
import { fileURLToPath } from "url"
|
||||
import { execa } from "execa"
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
const rootDir = path.resolve(__dirname, "..", "..", "..", "..")
|
||||
const testsDir = path.resolve(rootDir, "./dev/docker/ci/tests")
|
||||
|
||||
async function main() {
|
||||
const variants = ["base", "gcc", "llvm", "mingw"]
|
||||
|
||||
const distros = ["ubuntu", "fedora", "arch"]
|
||||
|
||||
let failed = false
|
||||
for (const distro of distros) {
|
||||
for (const variant of variants) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const result = await testDocker(variant, distro)
|
||||
if (result !== 0) {
|
||||
failed = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
await main()
|
||||
|
||||
/**
|
||||
* Test the docker image
|
||||
* @param variant - The variant to test
|
||||
* @param distro - The distro to test
|
||||
* @returns The exit code of the test
|
||||
*/
|
||||
async function testDocker(variant: string, distro: string): Promise<number> {
|
||||
try {
|
||||
const image = variant === "base"
|
||||
? `aminya/setup-cpp-${distro}:latest`
|
||||
: `aminya/setup-cpp-${distro}-${variant}:latest`
|
||||
const testConfig = path.join(testsDir, `${variant}.yml`)
|
||||
|
||||
console.log(`Testing ${image} with ${testConfig} `)
|
||||
|
||||
// Test the specific config
|
||||
await runContainerStructureTest(image, testConfig)
|
||||
|
||||
// Test the base config
|
||||
if (variant !== "base") {
|
||||
const baseResult = await testDocker("base", distro)
|
||||
if (baseResult !== 0) {
|
||||
return baseResult
|
||||
}
|
||||
}
|
||||
|
||||
return 0
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message)
|
||||
} else {
|
||||
console.error(error)
|
||||
}
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
async function runContainerStructureTest(image: string, testConfig: string) {
|
||||
await execa("container-structure-test", [
|
||||
"test",
|
||||
"--pull",
|
||||
"--image",
|
||||
image,
|
||||
"--config",
|
||||
testConfig,
|
||||
"--platform",
|
||||
"linux/amd64",
|
||||
], {
|
||||
stdio: "inherit",
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: clang
|
||||
command: bash
|
||||
args: ["-l", "-c", "clang --version"]
|
||||
expectedOutput: [".*clang version.*"]
|
||||
- name: clang++
|
||||
command: bash
|
||||
args: ["-l", "-c", "clang++ --version"]
|
||||
expectedOutput: [".*clang version.*"]
|
||||
|
|
@ -2,22 +2,19 @@ schemaVersion: 2.0.0
|
|||
|
||||
commandTests:
|
||||
- name: mingw c compiler
|
||||
command: x86_64-w64-mingw32-gcc
|
||||
args: ["--version"]
|
||||
command: bash
|
||||
args: ["-l", "-c", "x86_64-w64-mingw32-gcc --version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-gcc.*"]
|
||||
- name: mingw c++ compiler
|
||||
command: x86_64-w64-mingw32-cpp
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-cpp.*"]
|
||||
command: bash
|
||||
args: ["-l", "-c", "x86_64-w64-mingw32-g++ --version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-g\\+\\+.*"]
|
||||
- name: powershell
|
||||
command: pwsh
|
||||
args: ["-Version"]
|
||||
command: bash
|
||||
args: ["-l", "-c", "pwsh --version"]
|
||||
expectedOutput: [".*PowerShell.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "cross root"
|
||||
path: "/usr/x86_64-w64-mingw32"
|
||||
shouldExist: true
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
FROM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-gcc
|
||||
|
||||
# install gcc
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler gcc && \
|
||||
# cleanup
|
||||
apt-get clean autoclean && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
FROM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-llvm
|
||||
|
||||
# install llvm
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler llvm && \
|
||||
# cleanup
|
||||
apt-get clean autoclean && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
FROM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-mingw
|
||||
|
||||
# install mingw/powershell
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--compiler mingw \
|
||||
--powershell true && \
|
||||
# cleanup
|
||||
apt-get clean autoclean && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
ARG BASE_VERSION=22.04
|
||||
|
||||
#### Base Image with Node.js
|
||||
FROM --platform=$BUILDPLATFORM ubuntu:${BASE_VERSION} AS ubuntu-nodejs
|
||||
|
||||
# install latest nodejs
|
||||
RUN apt-get update -qq && \
|
||||
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
|
||||
mkdir -p /etc/apt/keyrings && \
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
|
||||
apt-get update -qq && \
|
||||
apt-get install -y --no-install-recommends nodejs && \
|
||||
# cleanup
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
#### Base Image with Tools
|
||||
FROM ubuntu-nodejs AS setup-cpp-ubuntu
|
||||
|
||||
COPY "./dist/modern" "/usr/lib/setup-cpp/"
|
||||
|
||||
# install the cpp tools
|
||||
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
|
||||
--apt-fast true \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--vcpkg true \
|
||||
--ccache true \
|
||||
--conan true \
|
||||
--cmakelang true \
|
||||
--meson true && \
|
||||
# cleanup
|
||||
apt-get clean autoclean && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
#### Building (example)
|
||||
FROM setup-cpp-fedora AS builder
|
||||
FROM aminya/setup-cpp-alpine-gcc AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build'
|
||||
RUN task build
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM fedora:40 as runner
|
||||
FROM alpine:3.21 AS runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
#### Building (example)
|
||||
FROM setup-cpp-ubuntu AS builder
|
||||
FROM aminya/setup-cpp-alpine-llvm AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build'
|
||||
RUN task build
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM ubuntu:22.04 as runner
|
||||
FROM alpine:3.21 AS runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#### Cross Building (example)
|
||||
FROM aminya/setup-cpp-alpine-mingw AS builder-mingw
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build_cross_mingw'
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
#### Building (example)
|
||||
FROM setup-cpp-arch AS builder
|
||||
FROM aminya/setup-cpp-arch-gcc AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN bash -c 'source ~/.cpprc \
|
||||
&& task build'
|
||||
RUN task build
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM archlinux:base as runner
|
||||
FROM archlinux:base AS runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#### Building (example)
|
||||
FROM aminya/setup-cpp-arch-llvm AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN task build
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM archlinux:base AS runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
WORKDIR /home/app/
|
||||
ENTRYPOINT ["./my_exe"]
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#### Cross Building (example)
|
||||
FROM setup-cpp-arch-mingw AS builder-mingw
|
||||
FROM aminya/setup-cpp-arch-mingw AS builder-mingw
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#### Building (example)
|
||||
FROM aminya/setup-cpp-fedora-gcc AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN task build
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM fedora:40 AS runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
WORKDIR /home/app/
|
||||
ENTRYPOINT ["./my_exe"]
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#### Building (example)
|
||||
FROM aminya/setup-cpp-fedora-llvm AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN task build
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM fedora:40 AS runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
WORKDIR /home/app/
|
||||
ENTRYPOINT ["./my_exe"]
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#### Cross Building (example)
|
||||
FROM setup-cpp-fedora-mingw AS builder-mingw
|
||||
FROM aminya/setup-cpp-fedora-mingw AS builder-mingw
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#### Building (example)
|
||||
FROM aminya/setup-cpp-ubuntu-gcc AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN task build
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM ubuntu:22.04 AS runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
WORKDIR /home/app/
|
||||
ENTRYPOINT ["./my_exe"]
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#### Building (example)
|
||||
FROM aminya/setup-cpp-ubuntu-llvm AS builder
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
RUN task build
|
||||
|
||||
#### Running environment
|
||||
# use a fresh image as the runner
|
||||
FROM ubuntu:22.04 AS runner
|
||||
|
||||
# copy the built binaries and their runtime dependencies
|
||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||
WORKDIR /home/app/
|
||||
ENTRYPOINT ["./my_exe"]
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#### Cross Building (example)
|
||||
FROM setup-cpp-ubuntu-mingw AS builder-mingw
|
||||
FROM aminya/setup-cpp-ubuntu-mingw AS builder-mingw
|
||||
|
||||
COPY ./dev/cpp_vcpkg_project /home/app
|
||||
WORKDIR /home/app
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
#### Base Image
|
||||
FROM ubuntu:22.04 as setup-cpp-ubuntu-mingw
|
||||
|
||||
RUN apt-get update -qq && \
|
||||
# install nodejs
|
||||
apt-get install -y --no-install-recommends nodejs npm && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v0.36.2 && \
|
||||
# install the compiler and tools
|
||||
setup-cpp \
|
||||
--nala true \
|
||||
--compiler mingw \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true \
|
||||
--powershell true && \
|
||||
# cleanup
|
||||
nala autoremove -y && \
|
||||
nala autopurge -y && \
|
||||
apt-get clean && \
|
||||
nala clean --lists && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#### Base Image
|
||||
FROM ubuntu:22.04 as setup-cpp-ubuntu
|
||||
|
||||
RUN apt-get update -qq && \
|
||||
# install nodejs
|
||||
apt-get install -y --no-install-recommends nodejs npm && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v0.36.2 && \
|
||||
# install the compiler and tools
|
||||
setup-cpp \
|
||||
--nala true \
|
||||
--compiler llvm \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true && \
|
||||
# cleanup
|
||||
nala autoremove -y && \
|
||||
nala autopurge -y && \
|
||||
apt-get clean && \
|
||||
nala clean --lists && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
## base image
|
||||
FROM archlinux:base as setup-cpp-arch
|
||||
FROM archlinux:base AS setup-cpp-arch
|
||||
|
||||
RUN pacman -Syuu --noconfirm && \
|
||||
pacman-db-upgrade && \
|
||||
# install nodejs
|
||||
# install nodejs
|
||||
pacman -S --noconfirm --needed nodejs npm && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v0.36.2 && \
|
||||
# install the compiler and tools
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v1.1.1 && \
|
||||
# install the compiler and tools
|
||||
NODE_OPTIONS="--enable-source-maps" \
|
||||
setup-cpp \
|
||||
--compiler llvm \
|
||||
--cmake true \
|
||||
|
|
@ -20,9 +21,10 @@ RUN pacman -Syuu --noconfirm && \
|
|||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true && \
|
||||
# arch cleanup
|
||||
# arch cleanup
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/cache/pacman/pkg/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
## base image
|
||||
FROM archlinux:base as setup-cpp-arch-mingw
|
||||
FROM archlinux:base AS setup-cpp-arch-mingw
|
||||
|
||||
RUN pacman -Syuu --noconfirm && \
|
||||
pacman-db-upgrade && \
|
||||
# install nodejs
|
||||
# install nodejs
|
||||
pacman -S --noconfirm --needed nodejs npm && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v0.36.2 && \
|
||||
# install the compiler and tools
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v1.1.1 && \
|
||||
# install the compiler and tools
|
||||
NODE_OPTIONS="--enable-source-maps" \
|
||||
setup-cpp \
|
||||
--compiler mingw \
|
||||
--cmake true \
|
||||
|
|
@ -20,9 +21,10 @@ RUN pacman -Syuu --noconfirm && \
|
|||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true && \
|
||||
# arch cleanup
|
||||
# arch cleanup
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/cache/pacman/pkg/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
## base image
|
||||
FROM fedora:40 as setup-cpp-fedora
|
||||
FROM fedora:44 AS setup-cpp-fedora
|
||||
|
||||
# install nodejs
|
||||
RUN dnf -y install nodejs npm && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v0.36.2 && \
|
||||
# install the compiler and tools
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v1.1.1 && \
|
||||
# install the compiler and tools
|
||||
NODE_OPTIONS="--enable-source-maps" \
|
||||
setup-cpp \
|
||||
--compiler llvm \
|
||||
--cmake true \
|
||||
|
|
@ -18,8 +19,9 @@ RUN dnf -y install nodejs npm && \
|
|||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true && \
|
||||
# cleanup
|
||||
# cleanup
|
||||
dnf clean all && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
## base image
|
||||
FROM fedora:40 as setup-cpp-fedora-mingw
|
||||
FROM fedora:44 AS setup-cpp-fedora-mingw
|
||||
|
||||
# install nodejs
|
||||
RUN dnf -y install nodejs npm && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v0.36.2 && \
|
||||
# install the compiler and tools
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v1.1.1 && \
|
||||
# install the compiler and tools
|
||||
NODE_OPTIONS="--enable-source-maps" \
|
||||
setup-cpp \
|
||||
--compiler mingw \
|
||||
--cmake true \
|
||||
|
|
@ -19,8 +20,9 @@ RUN dnf -y install nodejs npm && \
|
|||
--doxygen true \
|
||||
--ccache true \
|
||||
--powershell true && \
|
||||
# cleanup
|
||||
# cleanup
|
||||
dnf clean all && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
#### Base Image
|
||||
FROM ubuntu:20.04 AS setup-cpp-ubuntu-mingw
|
||||
|
||||
RUN apt-get update -qq && \
|
||||
# install latest nodejs on ubuntu 20.04
|
||||
apt-get update -qq && \
|
||||
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
|
||||
mkdir -p /etc/apt/keyrings && \
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
|
||||
apt-get update -qq && \
|
||||
apt-get install -y --no-install-recommends nodejs && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v1.1.1 && \
|
||||
# install the compiler and tools
|
||||
NODE_OPTIONS="--enable-source-maps" \
|
||||
setup-cpp \
|
||||
--nala true \
|
||||
--compiler mingw \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true \
|
||||
--powershell true && \
|
||||
# cleanup
|
||||
nala autoremove -y && \
|
||||
nala autopurge -y && \
|
||||
apt-get clean && \
|
||||
nala clean --lists && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
#### Base Image
|
||||
FROM ubuntu:22.04 AS setup-cpp-ubuntu
|
||||
|
||||
# install latest nodejs
|
||||
RUN apt-get update -qq && \
|
||||
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
|
||||
mkdir -p /etc/apt/keyrings && \
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
|
||||
apt-get update -qq && \
|
||||
apt-get install -y --no-install-recommends nodejs && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v1.1.1 && \
|
||||
# install the compiler and tools
|
||||
NODE_OPTIONS="--enable-source-maps" \
|
||||
setup-cpp \
|
||||
--nala true \
|
||||
--compiler llvm \
|
||||
--cmake true \
|
||||
--ninja true \
|
||||
--task true \
|
||||
--vcpkg true \
|
||||
--python true \
|
||||
--make true \
|
||||
--cppcheck true \
|
||||
--gcovr true \
|
||||
--doxygen true \
|
||||
--ccache true && \
|
||||
# cleanup
|
||||
nala autoremove -y && \
|
||||
nala autopurge -y && \
|
||||
apt-get clean && \
|
||||
nala clean --lists && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
#### Base Image
|
||||
FROM ubuntu:20.04 as setup-cpp-ubuntu-mingw
|
||||
FROM ubuntu:22.04 AS setup-cpp-ubuntu-mingw
|
||||
|
||||
# install latest nodejs
|
||||
RUN apt-get update -qq && \
|
||||
# install latest nodejs on ubuntu 20.04
|
||||
apt-get update -qq && \
|
||||
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
|
||||
mkdir -p /etc/apt/keyrings && \
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
|
||||
apt-get update -qq && \
|
||||
apt-get install -y --no-install-recommends nodejs && \
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v0.36.2 && \
|
||||
# install the compiler and tools
|
||||
# install setup-cpp
|
||||
npm install -g setup-cpp@v1.1.1 && \
|
||||
# install the compiler and tools
|
||||
NODE_OPTIONS="--enable-source-maps" \
|
||||
setup-cpp \
|
||||
--nala true \
|
||||
--compiler mingw \
|
||||
|
|
@ -27,7 +27,7 @@ RUN apt-get update -qq && \
|
|||
--doxygen true \
|
||||
--ccache true \
|
||||
--powershell true && \
|
||||
# cleanup
|
||||
# cleanup
|
||||
nala autoremove -y && \
|
||||
nala autopurge -y && \
|
||||
apt-get clean && \
|
||||
|
|
@ -35,4 +35,5 @@ RUN apt-get update -qq && \
|
|||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-l"]
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
const { minify } = require("terser")
|
||||
const { readFileSync, writeFileSync } = require("fs")
|
||||
const { join, dirname } = require("path")
|
||||
|
||||
async function main() {
|
||||
console.log("Disabling debug messages inside @actions/core")
|
||||
const file = join(dirname(__dirname), "dist", "setup-cpp.js")
|
||||
const { code, map } = await minify(readFileSync(file, "utf8"), { sourceMap: true, ...require("../.terserrc.js") })
|
||||
|
||||
writeFileSync(file, code)
|
||||
writeFileSync(`${file}.map`, map)
|
||||
}
|
||||
|
||||
main().catch(function (err) {
|
||||
throw err
|
||||
})
|
||||
|
|
@ -15,29 +15,18 @@ function getPlatformName() {
|
|||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
let exes
|
||||
if (process.platform === "win32") {
|
||||
exes = [".exe"]
|
||||
} else if (process.platform === "darwin") {
|
||||
exes = [""]
|
||||
} else {
|
||||
exes = [""]
|
||||
}
|
||||
async function main() {
|
||||
const exe = process.platform === "win32" ? ".exe" : ""
|
||||
|
||||
return Promise.all(
|
||||
exes.map((exe) =>
|
||||
execaNode("./node_modules/caxa/build/index.mjs", [
|
||||
"--input",
|
||||
"./dist/modern",
|
||||
"--output",
|
||||
`./exe/setup-cpp-${process.arch}-${getPlatformName()}${exe}`,
|
||||
"--",
|
||||
`{{caxa}}/node_modules/.bin/node${exe}`,
|
||||
`{{caxa}}/setup-cpp.js`,
|
||||
]),
|
||||
),
|
||||
)
|
||||
await execaNode("./node_modules/caxa/build/index.mjs", [
|
||||
"--input",
|
||||
"./dist/modern",
|
||||
"--output",
|
||||
`./exe/setup-cpp-${process.arch}-${getPlatformName()}${exe}`,
|
||||
"--",
|
||||
`{{caxa}}/node_modules/.bin/node${exe}`,
|
||||
"{{caxa}}/setup-cpp.mjs",
|
||||
])
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "gcc",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "llvm",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "msvc",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(?:\\s+\\d+>)?(\\S.*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"code": 5,
|
||||
"message": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "python",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$",
|
||||
"file": 1,
|
||||
"line": 2
|
||||
},
|
||||
{
|
||||
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$",
|
||||
"message": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
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
|
|
@ -1,17 +1 @@
|
|||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "gcc",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{"problemMatcher":[{"owner":"gcc","pattern":[{"regexp":"^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$","file":1,"line":2,"column":3,"severity":4,"message":5}]}]}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
{"v1.2.0":["infer-osx-x86_64-v1.2.0.tar.xz","infer-osx-arm64-v1.2.0.tar.xz","infer-linux-x86_64-v1.2.0.tar.xz"],"v1.1.0":["infer-linux64-v1.1.0.tar.xz"],"v1.0.0":["infer-osx-v1.0.0.tar.xz","infer-linux64-v1.0.0.tar.xz"],"v0.17.0":["infer-osx-v0.17.0.tar.xz","infer-linux64-v0.17.0.tar.xz"],"v0.16.0":["infer-osx-v0.16.0.tar.xz","infer-linux64-v0.16.0.tar.xz"],"v0.15.0":["infer-osx-v0.15.0.tar.xz","infer-linux64-v0.15.0.tar.xz"],"v0.14.0":["infer-osx-v0.14.0.tar.xz","infer-linux64-v0.14.0.tar.xz"],"v0.13.1":["infer-osx-v0.13.1.tar.xz","infer-linux64-v0.13.1.tar.xz"],"v0.13.0":["infer-osx-v0.13.0.tar.xz","infer-linux64-v0.13.0.tar.xz"],"v0.12.1":["infer-osx-v0.12.1.tar.xz","infer-linux64-v0.12.1.tar.xz"],"v0.12.0":["infer-osx-v0.12.0.tar.xz","infer-linux64-v0.12.0.tar.xz"],"v0.11.0":["infer-osx-v0.11.0.tar.xz","infer-linux64-v0.11.0.tar.xz"],"v0.10.0":["infer-osx-v0.10.0.tar.xz","infer-linux64-v0.10.0.tar.xz"],"v0.9.5":["infer-osx-v0.9.5.tar.xz","infer-linux64-v0.9.5.tar.xz"],"v0.9.4.1":["infer-osx-v0.9.4.1.tar.xz","infer-linux64-v0.9.4.1.tar.xz"],"v0.9.4":["infer-osx-v0.9.4.tar.xz","infer-linux64-v0.9.4.tar.xz"],"v0.9.3":["infer-osx-v0.9.3.tar.xz","infer-linux64-v0.9.3.tar.xz"],"v0.9.2":["infer-osx-v0.9.2.tar.xz","infer-linux64-v0.9.2.tar.xz"],"v0.9.1":["infer-osx-v0.9.1.tar.xz","infer-linux64-v0.9.1.tar.xz"],"v0.9.0":["infer-osx-v0.9.0.tar.xz","infer-linux64-v0.9.0.tar.xz"],"v0.8.1":["infer-osx-v0.8.1.tar.xz","infer-linux64-v0.8.1.tar.xz"],"v0.8.0":["infer-osx-v0.8.0.tar.xz","infer-linux64-v0.8.0.tar.xz"],"v0.7.0":["infer-osx-v0.7.0.tar.xz","infer-linux64-v0.7.0.tar.xz"],"v0.6.0":["infer-osx-v0.6.0.tar.xz","infer-linux64-v0.6.0.tar.xz"],"v0.5.0":["infer-osx-v0.5.0.tar.xz","infer-linux64-v0.5.0.tar.xz"],"v0.4.0":["infer-osx-v0.4.0.tar.xz","infer-linux64-v0.4.0.tar.xz"],"v0.3.0":["infer-osx-v0.3.0.tar.xz","infer-linux64-v0.3.0.tar.xz"]}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,17 +1 @@
|
|||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "llvm",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{"problemMatcher":[{"owner":"llvm","pattern":[{"regexp":"^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$","file":1,"line":2,"column":3,"severity":4,"message":5}]}]}
|
||||
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
Loading…
Reference in New Issue