Compare commits

..

39 Commits

Author SHA1 Message Date
Tanya Lattner
45d5bd27cb 2.0 Release docs
llvm-svn: 37312
2007-05-23 18:12:40 +00:00
Tanya Lattner
755a21f3ae Fixing patch mistake.
llvm-svn: 37303
2007-05-23 06:07:37 +00:00
Chris Lattner
688d4d27cf final updates to release notes
llvm-svn: 37300
2007-05-23 04:41:25 +00:00
Tanya Lattner
0df7b6319f Merge from mainline
llvm-svn: 37298
2007-05-23 04:22:41 +00:00
Tanya Lattner
5764e55d63 Merge from mainline
llvm-svn: 37279
2007-05-22 06:23:12 +00:00
Tanya Lattner
b5c059b832 Merge from mainline
llvm-svn: 37276
2007-05-22 05:38:40 +00:00
Chris Lattner
bd43fcf5c5 merge portability fix from mainline
llvm-svn: 37222
2007-05-18 07:07:27 +00:00
Chris Lattner
1dc0dbf64d first cut of llvm 2.0 release notes
llvm-svn: 37220
2007-05-18 06:39:06 +00:00
Tanya Lattner
8c32fe0e61 Merge from mainline
llvm-svn: 37217
2007-05-18 06:21:50 +00:00
Tanya Lattner
2e406e7d52 Merge from mainline.
llvm-svn: 37216
2007-05-18 06:20:09 +00:00
Tanya Lattner
1f6d36ff77 Merge from mainline
llvm-svn: 37215
2007-05-18 06:08:42 +00:00
Tanya Lattner
a5bea192e3 Merge from mainline.
llvm-svn: 37214
2007-05-18 06:03:56 +00:00
Tanya Lattner
28c87da11f Merge from mainline.
llvm-svn: 37213
2007-05-18 06:03:55 +00:00
Tanya Lattner
539eba2303 Merging from mainline.
llvm-svn: 37212
2007-05-18 05:59:52 +00:00
Tanya Lattner
16c912d5f0 Merging from mainline (inline asm fix)
llvm-svn: 37211
2007-05-18 05:55:42 +00:00
Chris Lattner
5e6d2c1282 merge in from mainline
llvm-svn: 37210
2007-05-18 05:51:57 +00:00
Tanya Lattner
ac864c0f53 Merge inline asm fix from mainline.
llvm-svn: 37209
2007-05-18 05:51:20 +00:00
Chris Lattner
35fb6225a6 merge from mainline
llvm-svn: 37208
2007-05-18 05:48:38 +00:00
Reid Spencer
b73b303f76 Regenerate these for the release. They weren't up to date and would
cause non-bison builds to fail.

llvm-svn: 37189
2007-05-17 22:59:30 +00:00
Reid Spencer
25c7375e28 Fix the rules for handling the case when BISON is not available. We want
this to succeed by copying the .h.cvs file to .h and the .cpp.cvs file to
.cpp.

llvm-svn: 37187
2007-05-17 22:42:28 +00:00
Reid Spencer
9a8bae25b7 Merge from mainline to require Perl for build system.
llvm-svn: 37167
2007-05-17 18:12:30 +00:00
Reid Spencer
9eb9228a7b Make Perl required - merge from mainline.
llvm-svn: 37165
2007-05-17 18:07:24 +00:00
Reid Spencer
cbf56c683f Merge arbitrary precision integer documentation from mainline.
llvm-svn: 37110
2007-05-16 18:46:48 +00:00
Tanya Lattner
407e88833c Remove from release.
llvm-svn: 37079
2007-05-15 05:18:30 +00:00
Tanya Lattner
70c8b4ce40 Merge from mainline.
llvm-svn: 37078
2007-05-15 05:15:10 +00:00
Tanya Lattner
9a3b80ebb8 Merging from mainline.
llvm-svn: 37077
2007-05-15 05:08:55 +00:00
Tanya Lattner
d1e8ff86b5 Merge from mainline.
llvm-svn: 37076
2007-05-15 05:00:54 +00:00
Tanya Lattner
05c9c7203d Merge from mainline
PR1413

llvm-svn: 37075
2007-05-15 04:57:33 +00:00
Tanya Lattner
990c707d71 Merging from mainline
llvm-svn: 36970
2007-05-10 04:52:54 +00:00
Tanya Lattner
43195b190b Merging from mainline PR 1403
llvm-svn: 36969
2007-05-10 04:47:38 +00:00
Tanya Lattner
d29e402cca Merge from mainline PR1403
llvm-svn: 36968
2007-05-10 04:42:32 +00:00
Tanya Lattner
02ac6f3362 file 2007-05-09-JumpTables.ll was added on branch release_20 on 2007-05-10 04:47:38 +0000
llvm-svn: 36961
2007-05-09 20:07:09 +00:00
CVS to SVN Conversion
ad4bf2f82b This commit was manufactured by cvs2svn to create branch 'release_20'.
llvm-svn: 36960
2007-05-09 20:07:08 +00:00
Tanya Lattner
200b3953c2 Merging from mainline. PR1399 fix.
llvm-svn: 36949
2007-05-08 23:41:39 +00:00
Tanya Lattner
e43c50a1a4 Merge from mainline
llvm-svn: 36932
2007-05-08 06:37:35 +00:00
Tanya Lattner
09489a21d9 Merging from mainline.
llvm-svn: 36931
2007-05-08 06:36:05 +00:00
Tanya Lattner
1c81a16ffc Setting version number
llvm-svn: 36927
2007-05-08 04:45:26 +00:00
Tanya Lattner
357259b227 Setting version number.
llvm-svn: 36926
2007-05-08 04:45:12 +00:00
CVS to SVN Conversion
15fe03a879 This commit was manufactured by cvs2svn to create branch 'release_20'.
llvm-svn: 36925
2007-05-08 04:45:12 +00:00
175302 changed files with 505930 additions and 43345773 deletions

View File

@ -1,587 +0,0 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --generate-hashes --output-file=./.ci/all_requirements.txt ./.ci/requirements.txt ./lldb/test/requirements.txt ./mlir/python/requirements.txt
#
cachetools==5.5.2 \
--hash=sha256:1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4 \
--hash=sha256:d26a22bcc62eb95c3beabd9f1ee5e820d3d2704fe2967cbe350e20c8ffcd3f0a
# via google-auth
certifi==2025.8.3 \
--hash=sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407 \
--hash=sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5
# via requests
cffi==2.0.0 \
--hash=sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb \
--hash=sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b \
--hash=sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f \
--hash=sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9 \
--hash=sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44 \
--hash=sha256:0f6084a0ea23d05d20c3edcda20c3d006f9b6f3fefeac38f59262e10cef47ee2 \
--hash=sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c \
--hash=sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75 \
--hash=sha256:1cd13c99ce269b3ed80b417dcd591415d3372bcac067009b6e0f59c7d4015e65 \
--hash=sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e \
--hash=sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a \
--hash=sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e \
--hash=sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25 \
--hash=sha256:2081580ebb843f759b9f617314a24ed5738c51d2aee65d31e02f6f7a2b97707a \
--hash=sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe \
--hash=sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b \
--hash=sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91 \
--hash=sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592 \
--hash=sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187 \
--hash=sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c \
--hash=sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1 \
--hash=sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94 \
--hash=sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba \
--hash=sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb \
--hash=sha256:3f4d46d8b35698056ec29bca21546e1551a205058ae1a181d871e278b0b28165 \
--hash=sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529 \
--hash=sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca \
--hash=sha256:4647afc2f90d1ddd33441e5b0e85b16b12ddec4fca55f0d9671fef036ecca27c \
--hash=sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6 \
--hash=sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c \
--hash=sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0 \
--hash=sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743 \
--hash=sha256:61d028e90346df14fedc3d1e5441df818d095f3b87d286825dfcbd6459b7ef63 \
--hash=sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5 \
--hash=sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5 \
--hash=sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4 \
--hash=sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d \
--hash=sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b \
--hash=sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93 \
--hash=sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205 \
--hash=sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27 \
--hash=sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512 \
--hash=sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d \
--hash=sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c \
--hash=sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037 \
--hash=sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26 \
--hash=sha256:89472c9762729b5ae1ad974b777416bfda4ac5642423fa93bd57a09204712322 \
--hash=sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb \
--hash=sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c \
--hash=sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8 \
--hash=sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4 \
--hash=sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414 \
--hash=sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9 \
--hash=sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664 \
--hash=sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9 \
--hash=sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775 \
--hash=sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739 \
--hash=sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc \
--hash=sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062 \
--hash=sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe \
--hash=sha256:b882b3df248017dba09d6b16defe9b5c407fe32fc7c65a9c69798e6175601be9 \
--hash=sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92 \
--hash=sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5 \
--hash=sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13 \
--hash=sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d \
--hash=sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26 \
--hash=sha256:cb527a79772e5ef98fb1d700678fe031e353e765d1ca2d409c92263c6d43e09f \
--hash=sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495 \
--hash=sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b \
--hash=sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6 \
--hash=sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c \
--hash=sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef \
--hash=sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5 \
--hash=sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18 \
--hash=sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad \
--hash=sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3 \
--hash=sha256:de8dad4425a6ca6e4e5e297b27b5c824ecc7581910bf9aee86cb6835e6812aa7 \
--hash=sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5 \
--hash=sha256:e6e73b9e02893c764e7e8d5bb5ce277f1a009cd5243f8228f75f842bf937c534 \
--hash=sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49 \
--hash=sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2 \
--hash=sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5 \
--hash=sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453 \
--hash=sha256:fe562eb1a64e67dd297ccc4f5addea2501664954f2692b69a76449ec7913ecbf
# via
# cryptography
# pynacl
charset-normalizer==3.4.3 \
--hash=sha256:00237675befef519d9af72169d8604a067d92755e84fe76492fef5441db05b91 \
--hash=sha256:02425242e96bcf29a49711b0ca9f37e451da7c70562bc10e8ed992a5a7a25cc0 \
--hash=sha256:027b776c26d38b7f15b26a5da1044f376455fb3766df8fc38563b4efbc515154 \
--hash=sha256:07a0eae9e2787b586e129fdcbe1af6997f8d0e5abaa0bc98c0e20e124d67e601 \
--hash=sha256:0cacf8f7297b0c4fcb74227692ca46b4a5852f8f4f24b3c766dd94a1075c4884 \
--hash=sha256:0e78314bdc32fa80696f72fa16dc61168fda4d6a0c014e0380f9d02f0e5d8a07 \
--hash=sha256:0f2be7e0cf7754b9a30eb01f4295cc3d4358a479843b31f328afd210e2c7598c \
--hash=sha256:13faeacfe61784e2559e690fc53fa4c5ae97c6fcedb8eb6fb8d0a15b475d2c64 \
--hash=sha256:14c2a87c65b351109f6abfc424cab3927b3bdece6f706e4d12faaf3d52ee5efe \
--hash=sha256:1606f4a55c0fd363d754049cdf400175ee96c992b1f8018b993941f221221c5f \
--hash=sha256:16a8770207946ac75703458e2c743631c79c59c5890c80011d536248f8eaa432 \
--hash=sha256:18343b2d246dc6761a249ba1fb13f9ee9a2bcd95decc767319506056ea4ad4dc \
--hash=sha256:18b97b8404387b96cdbd30ad660f6407799126d26a39ca65729162fd810a99aa \
--hash=sha256:1bb60174149316da1c35fa5233681f7c0f9f514509b8e399ab70fea5f17e45c9 \
--hash=sha256:1e8ac75d72fa3775e0b7cb7e4629cec13b7514d928d15ef8ea06bca03ef01cae \
--hash=sha256:1ef99f0456d3d46a50945c98de1774da86f8e992ab5c77865ea8b8195341fc19 \
--hash=sha256:2001a39612b241dae17b4687898843f254f8748b796a2e16f1051a17078d991d \
--hash=sha256:23b6b24d74478dc833444cbd927c338349d6ae852ba53a0d02a2de1fce45b96e \
--hash=sha256:252098c8c7a873e17dd696ed98bbe91dbacd571da4b87df3736768efa7a792e4 \
--hash=sha256:257f26fed7d7ff59921b78244f3cd93ed2af1800ff048c33f624c87475819dd7 \
--hash=sha256:2c322db9c8c89009a990ef07c3bcc9f011a3269bc06782f916cd3d9eed7c9312 \
--hash=sha256:30a96e1e1f865f78b030d65241c1ee850cdf422d869e9028e2fc1d5e4db73b92 \
--hash=sha256:30d006f98569de3459c2fc1f2acde170b7b2bd265dc1943e87e1a4efe1b67c31 \
--hash=sha256:31a9a6f775f9bcd865d88ee350f0ffb0e25936a7f930ca98995c05abf1faf21c \
--hash=sha256:320e8e66157cc4e247d9ddca8e21f427efc7a04bbd0ac8a9faf56583fa543f9f \
--hash=sha256:34a7f768e3f985abdb42841e20e17b330ad3aaf4bb7e7aeeb73db2e70f077b99 \
--hash=sha256:3653fad4fe3ed447a596ae8638b437f827234f01a8cd801842e43f3d0a6b281b \
--hash=sha256:3cd35b7e8aedeb9e34c41385fda4f73ba609e561faedfae0a9e75e44ac558a15 \
--hash=sha256:3cfb2aad70f2c6debfbcb717f23b7eb55febc0bb23dcffc0f076009da10c6392 \
--hash=sha256:416175faf02e4b0810f1f38bcb54682878a4af94059a1cd63b8747244420801f \
--hash=sha256:41d1fc408ff5fdfb910200ec0e74abc40387bccb3252f3f27c0676731df2b2c8 \
--hash=sha256:42e5088973e56e31e4fa58eb6bd709e42fc03799c11c42929592889a2e54c491 \
--hash=sha256:4ca4c094de7771a98d7fbd67d9e5dbf1eb73efa4f744a730437d8a3a5cf994f0 \
--hash=sha256:511729f456829ef86ac41ca78c63a5cb55240ed23b4b737faca0eb1abb1c41bc \
--hash=sha256:53cd68b185d98dde4ad8990e56a58dea83a4162161b1ea9272e5c9182ce415e0 \
--hash=sha256:585f3b2a80fbd26b048a0be90c5aae8f06605d3c92615911c3a2b03a8a3b796f \
--hash=sha256:5b413b0b1bfd94dbf4023ad6945889f374cd24e3f62de58d6bb102c4d9ae534a \
--hash=sha256:5d8d01eac18c423815ed4f4a2ec3b439d654e55ee4ad610e153cf02faf67ea40 \
--hash=sha256:6aab0f181c486f973bc7262a97f5aca3ee7e1437011ef0c2ec04b5a11d16c927 \
--hash=sha256:6cf8fd4c04756b6b60146d98cd8a77d0cdae0e1ca20329da2ac85eed779b6849 \
--hash=sha256:6fb70de56f1859a3f71261cbe41005f56a7842cc348d3aeb26237560bfa5e0ce \
--hash=sha256:6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14 \
--hash=sha256:70bfc5f2c318afece2f5838ea5e4c3febada0be750fcf4775641052bbba14d05 \
--hash=sha256:73dc19b562516fc9bcf6e5d6e596df0b4eb98d87e4f79f3ae71840e6ed21361c \
--hash=sha256:74d77e25adda8581ffc1c720f1c81ca082921329452eba58b16233ab1842141c \
--hash=sha256:78deba4d8f9590fe4dae384aeff04082510a709957e968753ff3c48399f6f92a \
--hash=sha256:86df271bf921c2ee3818f0522e9a5b8092ca2ad8b065ece5d7d9d0e9f4849bcc \
--hash=sha256:88ab34806dea0671532d3f82d82b85e8fc23d7b2dd12fa837978dad9bb392a34 \
--hash=sha256:8999f965f922ae054125286faf9f11bc6932184b93011d138925a1773830bbe9 \
--hash=sha256:8dcfc373f888e4fb39a7bc57e93e3b845e7f462dacc008d9749568b1c4ece096 \
--hash=sha256:939578d9d8fd4299220161fdd76e86c6a251987476f5243e8864a7844476ba14 \
--hash=sha256:96b2b3d1a83ad55310de8c7b4a2d04d9277d5591f40761274856635acc5fcb30 \
--hash=sha256:a2d08ac246bb48479170408d6c19f6385fa743e7157d716e144cad849b2dd94b \
--hash=sha256:b256ee2e749283ef3ddcff51a675ff43798d92d746d1a6e4631bf8c707d22d0b \
--hash=sha256:b5e3b2d152e74e100a9e9573837aba24aab611d39428ded46f4e4022ea7d1942 \
--hash=sha256:b89bc04de1d83006373429975f8ef9e7932534b8cc9ca582e4db7d20d91816db \
--hash=sha256:bd28b817ea8c70215401f657edef3a8aa83c29d447fb0b622c35403780ba11d5 \
--hash=sha256:c60e092517a73c632ec38e290eba714e9627abe9d301c8c8a12ec32c314a2a4b \
--hash=sha256:c6dbd0ccdda3a2ba7c2ecd9d77b37f3b5831687d8dc1b6ca5f56a4880cc7b7ce \
--hash=sha256:c6e490913a46fa054e03699c70019ab869e990270597018cef1d8562132c2669 \
--hash=sha256:c6f162aabe9a91a309510d74eeb6507fab5fff92337a15acbe77753d88d9dcf0 \
--hash=sha256:c6fd51128a41297f5409deab284fecbe5305ebd7e5a1f959bee1c054622b7018 \
--hash=sha256:cc34f233c9e71701040d772aa7490318673aa7164a0efe3172b2981218c26d93 \
--hash=sha256:cc9370a2da1ac13f0153780040f465839e6cccb4a1e44810124b4e22483c93fe \
--hash=sha256:ccf600859c183d70eb47e05a44cd80a4ce77394d1ac0f79dbd2dd90a69a3a049 \
--hash=sha256:ce571ab16d890d23b5c278547ba694193a45011ff86a9162a71307ed9f86759a \
--hash=sha256:cf1ebb7d78e1ad8ec2a8c4732c7be2e736f6e5123a4146c5b89c9d1f585f8cef \
--hash=sha256:d0e909868420b7049dafd3a31d45125b31143eec59235311fc4c57ea26a4acd2 \
--hash=sha256:d22dbedd33326a4a5190dd4fe9e9e693ef12160c77382d9e87919bce54f3d4ca \
--hash=sha256:d716a916938e03231e86e43782ca7878fb602a125a91e7acb8b5112e2e96ac16 \
--hash=sha256:d79c198e27580c8e958906f803e63cddb77653731be08851c7df0b1a14a8fc0f \
--hash=sha256:d95bfb53c211b57198bb91c46dd5a2d8018b3af446583aab40074bf7988401cb \
--hash=sha256:e28e334d3ff134e88989d90ba04b47d84382a828c061d0d1027b1b12a62b39b1 \
--hash=sha256:ec557499516fc90fd374bf2e32349a2887a876fbf162c160e3c01b6849eaf557 \
--hash=sha256:fb6fecfd65564f208cbf0fba07f107fb661bcd1a7c389edbced3f7a493f70e37 \
--hash=sha256:fb731e5deb0c7ef82d698b0f4c5bb724633ee2a489401594c5c88b02e6cb15f7 \
--hash=sha256:fb7f67a1bfa6e40b438170ebdc8158b78dc465a5a67b6dde178a46987b244a72 \
--hash=sha256:fd10de089bcdcd1be95a2f73dbe6254798ec1bda9f450d5828c96f93e2536b9c \
--hash=sha256:fdabf8315679312cfa71302f9bd509ded4f2f263fb5b765cf1433b39106c3cc9
# via requests
cryptography==46.0.3 \
--hash=sha256:00a5e7e87938e5ff9ff5447ab086a5706a957137e6e433841e9d24f38a065217 \
--hash=sha256:01ca9ff2885f3acc98c29f1860552e37f6d7c7d013d7334ff2a9de43a449315d \
--hash=sha256:09859af8466b69bc3c27bdf4f5d84a665e0f7ab5088412e9e2ec49758eca5cbc \
--hash=sha256:0abf1ffd6e57c67e92af68330d05760b7b7efb243aab8377e583284dbab72c71 \
--hash=sha256:1000713389b75c449a6e979ffc7dcc8ac90b437048766cef052d4d30b8220971 \
--hash=sha256:109d4ddfadf17e8e7779c39f9b18111a09efb969a301a31e987416a0191ed93a \
--hash=sha256:10b01676fc208c3e6feeb25a8b83d81767e8059e1fe86e1dc62d10a3018fa926 \
--hash=sha256:10ca84c4668d066a9878890047f03546f3ae0a6b8b39b697457b7757aaf18dbc \
--hash=sha256:15ab9b093e8f09daab0f2159bb7e47532596075139dd74365da52ecc9cb46c5d \
--hash=sha256:191bb60a7be5e6f54e30ba16fdfae78ad3a342a0599eb4193ba88e3f3d6e185b \
--hash=sha256:22d7e97932f511d6b0b04f2bfd818d73dcd5928db509460aaf48384778eb6d20 \
--hash=sha256:23b1a8f26e43f47ceb6d6a43115f33a5a37d57df4ea0ca295b780ae8546e8044 \
--hash=sha256:36e627112085bb3b81b19fed209c05ce2a52ee8b15d161b7c643a7d5a88491f3 \
--hash=sha256:39b6755623145ad5eff1dab323f4eae2a32a77a7abef2c5089a04a3d04366715 \
--hash=sha256:3b51b8ca4f1c6453d8829e1eb7299499ca7f313900dd4d89a24b8b87c0a780d4 \
--hash=sha256:402b58fc32614f00980b66d6e56a5b4118e6cb362ae8f3fda141ba4689bd4506 \
--hash=sha256:416260257577718c05135c55958b674000baef9a1c7d9e8f306ec60d71db850f \
--hash=sha256:46acf53b40ea38f9c6c229599a4a13f0d46a6c3fa9ef19fc1a124d62e338dfa0 \
--hash=sha256:4b7387121ac7d15e550f5cb4a43aef2559ed759c35df7336c402bb8275ac9683 \
--hash=sha256:50fc3343ac490c6b08c0cf0d704e881d0d660be923fd3076db3e932007e726e3 \
--hash=sha256:516ea134e703e9fe26bcd1277a4b59ad30586ea90c365a87781d7887a646fe21 \
--hash=sha256:549e234ff32571b1f4076ac269fcce7a808d3bf98b76c8dd560e42dbc66d7d91 \
--hash=sha256:5d7f93296ee28f68447397bf5198428c9aeeab45705a55d53a6343455dcb2c3c \
--hash=sha256:5ecfccd2329e37e9b7112a888e76d9feca2347f12f37918facbb893d7bb88ee8 \
--hash=sha256:6276eb85ef938dc035d59b87c8a7dc559a232f954962520137529d77b18ff1df \
--hash=sha256:6b5063083824e5509fdba180721d55909ffacccc8adbec85268b48439423d78c \
--hash=sha256:6eae65d4c3d33da080cff9c4ab1f711b15c1d9760809dad6ea763f3812d254cb \
--hash=sha256:6f61efb26e76c45c4a227835ddeae96d83624fb0d29eb5df5b96e14ed1a0afb7 \
--hash=sha256:71e842ec9bc7abf543b47cf86b9a743baa95f4677d22baa4c7d5c69e49e9bc04 \
--hash=sha256:760f83faa07f8b64e9c33fc963d790a2edb24efb479e3520c14a45741cd9b2db \
--hash=sha256:78a97cf6a8839a48c49271cdcbd5cf37ca2c1d6b7fdd86cc864f302b5e9bf459 \
--hash=sha256:7ce938a99998ed3c8aa7e7272dca1a610401ede816d36d0693907d863b10d9ea \
--hash=sha256:8a6e050cb6164d3f830453754094c086ff2d0b2f3a897a1d9820f6139a1f0914 \
--hash=sha256:9394673a9f4de09e28b5356e7fff97d778f8abad85c9d5ac4a4b7e25a0de7717 \
--hash=sha256:94cd0549accc38d1494e1f8de71eca837d0509d0d44bf11d158524b0e12cebf9 \
--hash=sha256:a04bee9ab6a4da801eb9b51f1b708a1b5b5c9eb48c03f74198464c66f0d344ac \
--hash=sha256:a23582810fedb8c0bc47524558fb6c56aac3fc252cb306072fd2815da2a47c32 \
--hash=sha256:a2c0cd47381a3229c403062f764160d57d4d175e022c1df84e168c6251a22eec \
--hash=sha256:a8b17438104fed022ce745b362294d9ce35b4c2e45c1d958ad4a4b019285f4a1 \
--hash=sha256:a9a3008438615669153eb86b26b61e09993921ebdd75385ddd748702c5adfddb \
--hash=sha256:b02cf04496f6576afffef5ddd04a0cb7d49cf6be16a9059d793a30b035f6b6ac \
--hash=sha256:b419ae593c86b87014b9be7396b385491ad7f320bde96826d0dd174459e54665 \
--hash=sha256:c0a7bb1a68a5d3471880e264621346c48665b3bf1c3759d682fc0864c540bd9e \
--hash=sha256:c70cc23f12726be8f8bc72e41d5065d77e4515efae3690326764ea1b07845cfb \
--hash=sha256:c8daeb2d2174beb4575b77482320303f3d39b8e81153da4f0fb08eb5fe86a6c5 \
--hash=sha256:cb3d760a6117f621261d662bccc8ef5bc32ca673e037c83fbe565324f5c46936 \
--hash=sha256:d55f3dffadd674514ad19451161118fd010988540cee43d8bc20675e775925de \
--hash=sha256:d89c3468de4cdc4f08a57e214384d0471911a3830fcdaf7a8cc587e42a866372 \
--hash=sha256:db391fa7c66df6762ee3f00c95a89e6d428f4d60e7abc8328f4fe155b5ac6e54 \
--hash=sha256:dfb781ff7eaa91a6f7fd41776ec37c5853c795d3b358d4896fdbb5df168af422 \
--hash=sha256:e5bf0ed4490068a2e72ac03d786693adeb909981cc596425d09032d372bcc849 \
--hash=sha256:e7aec276d68421f9574040c26e2a7c3771060bc0cff408bae1dcb19d3ab1e63c \
--hash=sha256:ef639cb3372f69ec44915fafcd6698b6cc78fbe0c2ea41be867f6ed612811963 \
--hash=sha256:f260d0d41e9b4da1ed1e0f1ce571f97fe370b152ab18778e9e8f67d6af432018
# via pyjwt
google-api-core==2.25.1 \
--hash=sha256:8a2a56c1fef82987a524371f99f3bd0143702fecc670c72e600c1cda6bf8dbb7 \
--hash=sha256:d2aaa0b13c78c61cb3f4282c464c046e45fbd75755683c9c525e6e8f7ed0a5e8
# via
# google-cloud-core
# google-cloud-storage
google-auth==2.40.3 \
--hash=sha256:1370d4593e86213563547f97a92752fc658456fe4514c809544f330fed45a7ca \
--hash=sha256:500c3a29adedeb36ea9cf24b8d10858e152f2412e3ca37829b3fa18e33d63b77
# via
# google-api-core
# google-cloud-core
# google-cloud-storage
google-cloud-core==2.4.3 \
--hash=sha256:1fab62d7102844b278fe6dead3af32408b1df3eb06f5c7e8634cbd40edc4da53 \
--hash=sha256:5130f9f4c14b4fafdff75c79448f9495cfade0d8775facf1b09c3bf67e027f6e
# via google-cloud-storage
google-cloud-storage==3.3.0 \
--hash=sha256:0338ecd6621b3ecacb108f1cf7513ff0d1bca7f1ff4d58e0220b59f3a725ff23 \
--hash=sha256:ae9d891d53e17d9681d7c4ef1ffeea0cde9bdc53d5b64fa6ff6bf30d1911cf61
# via -r .ci/requirements.txt
google-crc32c==1.7.1 \
--hash=sha256:0f99eaa09a9a7e642a61e06742856eec8b19fc0037832e03f941fe7cf0c8e4db \
--hash=sha256:19eafa0e4af11b0a4eb3974483d55d2d77ad1911e6cf6f832e1574f6781fd337 \
--hash=sha256:1c67ca0a1f5b56162951a9dae987988679a7db682d6f97ce0f6381ebf0fbea4c \
--hash=sha256:1f2b3522222746fff0e04a9bd0a23ea003ba3cccc8cf21385c564deb1f223242 \
--hash=sha256:22beacf83baaf59f9d3ab2bbb4db0fb018da8e5aebdce07ef9f09fce8220285e \
--hash=sha256:2bff2305f98846f3e825dbeec9ee406f89da7962accdb29356e4eadc251bd472 \
--hash=sha256:2d73a68a653c57281401871dd4aeebbb6af3191dcac751a76ce430df4d403194 \
--hash=sha256:32d1da0d74ec5634a05f53ef7df18fc646666a25efaaca9fc7dcfd4caf1d98c3 \
--hash=sha256:3bda0fcb632d390e3ea8b6b07bf6b4f4a66c9d02dcd6fbf7ba00a197c143f582 \
--hash=sha256:6335de12921f06e1f774d0dd1fbea6bf610abe0887a1638f64d694013138be5d \
--hash=sha256:6b211ddaf20f7ebeec5c333448582c224a7c90a9d98826fbab82c0ddc11348e6 \
--hash=sha256:6efb97eb4369d52593ad6f75e7e10d053cf00c48983f7a973105bc70b0ac4d82 \
--hash=sha256:6fbab4b935989e2c3610371963ba1b86afb09537fd0c633049be82afe153ac06 \
--hash=sha256:713121af19f1a617054c41f952294764e0c5443d5a5d9034b2cd60f5dd7e0349 \
--hash=sha256:754561c6c66e89d55754106739e22fdaa93fafa8da7221b29c8b8e8270c6ec8a \
--hash=sha256:7cc81b3a2fbd932a4313eb53cc7d9dde424088ca3a0337160f35d91826880c1d \
--hash=sha256:85fef7fae11494e747c9fd1359a527e5970fc9603c90764843caabd3a16a0a48 \
--hash=sha256:905a385140bf492ac300026717af339790921f411c0dfd9aa5a9e69a08ed32eb \
--hash=sha256:9fc196f0b8d8bd2789352c6a522db03f89e83a0ed6b64315923c396d7a932315 \
--hash=sha256:a8e9afc74168b0b2232fb32dd202c93e46b7d5e4bf03e66ba5dc273bb3559589 \
--hash=sha256:b07d48faf8292b4db7c3d64ab86f950c2e94e93a11fd47271c28ba458e4a0d76 \
--hash=sha256:b6d86616faaea68101195c6bdc40c494e4d76f41e07a37ffdef270879c15fb65 \
--hash=sha256:b7491bdc0c7564fcf48c0179d2048ab2f7c7ba36b84ccd3a3e1c3f7a72d3bba6 \
--hash=sha256:bb5e35dcd8552f76eed9461a23de1030920a3c953c1982f324be8f97946e7127 \
--hash=sha256:d68e17bad8f7dd9a49181a1f5a8f4b251c6dbc8cc96fb79f1d321dfd57d66f53 \
--hash=sha256:dcdf5a64adb747610140572ed18d011896e3b9ae5195f2514b7ff678c80f1603 \
--hash=sha256:df8b38bdaf1629d62d51be8bdd04888f37c451564c2042d36e5812da9eff3c35 \
--hash=sha256:e10554d4abc5238823112c2ad7e4560f96c7bf3820b202660373d769d9e6e4c9 \
--hash=sha256:e42e20a83a29aa2709a0cf271c7f8aefaa23b7ab52e53b322585297bb94d4638 \
--hash=sha256:ed66cbe1ed9cbaaad9392b5259b3eba4a9e565420d734e6238813c428c3336c9 \
--hash=sha256:ee6547b657621b6cbed3562ea7826c3e11cab01cd33b74e1f677690652883e77 \
--hash=sha256:f2226b6a8da04f1d9e61d3e357f2460b9551c5e6950071437e122c958a18ae14 \
--hash=sha256:fa8136cc14dd27f34a3221c0f16fd42d8a40e4778273e61a3c19aedaa44daf6b \
--hash=sha256:fc5319db92daa516b653600794d5b9f9439a9a121f3e162f94b0e1891c7933cb
# via
# google-cloud-storage
# google-resumable-media
google-resumable-media==2.7.2 \
--hash=sha256:3ce7551e9fe6d99e9a126101d2536612bb73486721951e9562fee0f90c6ababa \
--hash=sha256:5280aed4629f2b60b847b0d42f9857fd4935c11af266744df33d8074cae92fe0
# via google-cloud-storage
googleapis-common-protos==1.70.0 \
--hash=sha256:0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257 \
--hash=sha256:b8bfcca8c25a2bb253e0e0b0adaf8c00773e5e6af6fd92397576680b807e0fd8
# via google-api-core
idna==3.10 \
--hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \
--hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3
# via requests
junitparser==3.2.0 \
--hash=sha256:b05e89c27e7b74b3c563a078d6e055d95cf397444f8f689b0ca616ebda0b3c65 \
--hash=sha256:e14fdc0a999edfc15889b637390e8ef6ca09a49532416d3bd562857d42d4b96d
# via -r .ci/requirements.txt
ml-dtypes==0.5.1 \
--hash=sha256:023ce2f502efd4d6c1e0472cc58ce3640d051d40e71e27386bed33901e201327 \
--hash=sha256:05f23447a1c20ddf4dc7c2c661aa9ed93fcb2658f1017c204d1e758714dc28a8 \
--hash=sha256:12651420130ee7cc13059fc56dac6ad300c3af3848b802d475148c9defd27c23 \
--hash=sha256:141b2ea2f20bb10802ddca55d91fe21231ef49715cfc971998e8f2a9838f3dbe \
--hash=sha256:15ad0f3b0323ce96c24637a88a6f44f6713c64032f27277b069f285c3cf66478 \
--hash=sha256:1b7fbe5571fdf28fd3aaab3ef4aafc847de9ebf263be959958c1ca58ec8eadf5 \
--hash=sha256:26ebcc69d7b779c8f129393e99732961b5cc33fcff84090451f448c89b0e01b4 \
--hash=sha256:6f462f5eca22fb66d7ff9c4744a3db4463af06c49816c4b6ac89b16bfcdc592e \
--hash=sha256:6f76232163b5b9c34291b54621ee60417601e2e4802a188a0ea7157cd9b323f4 \
--hash=sha256:7000b6e4d8ef07542c05044ec5d8bbae1df083b3f56822c3da63993a113e716f \
--hash=sha256:810512e2eccdfc3b41eefa3a27402371a3411453a1efc7e9c000318196140fed \
--hash=sha256:8f2c028954f16ede77902b223a8da2d9cbb3892375b85809a5c3cfb1587960c4 \
--hash=sha256:9626d0bca1fb387d5791ca36bacbba298c5ef554747b7ebeafefb4564fc83566 \
--hash=sha256:ac5b58559bb84a95848ed6984eb8013249f90b6bab62aa5acbad876e256002c9 \
--hash=sha256:ad4953c5eb9c25a56d11a913c2011d7e580a435ef5145f804d98efa14477d390 \
--hash=sha256:aefedc579ece2f8fb38f876aa7698204ee4c372d0e54f1c1ffa8ca580b54cc60 \
--hash=sha256:afb2009ac98da274e893e03162f6269398b2b00d947e7057ee2469a921d58135 \
--hash=sha256:b8a9d46b4df5ae2135a8e8e72b465448ebbc1559997f4f9304a9ecc3413efb5b \
--hash=sha256:bd73f51957949069573ff783563486339a9285d72e2f36c18e0c1aa9ca7eb190 \
--hash=sha256:bf9975bda82a99dc935f2ae4c83846d86df8fd6ba179614acac8e686910851da \
--hash=sha256:c09526488c3a9e8b7a23a388d4974b670a9a3dd40c5c8a61db5593ce9b725bab \
--hash=sha256:c9945669d3dadf8acb40ec2e57d38c985d8c285ea73af57fc5b09872c516106d \
--hash=sha256:d13755f8e8445b3870114e5b6240facaa7cb0c3361e54beba3e07fa912a6e12b \
--hash=sha256:fd918d4e6a4e0c110e2e05be7a7814d10dc1b95872accbf6512b80a109b71ae1
# via -r mlir/python/requirements.txt
nanobind==2.9.2 \
--hash=sha256:c37957ffd5eac7eda349cff3622ecd32e5ee1244ecc912c99b5bc8188bafd16e \
--hash=sha256:e7608472de99d375759814cab3e2c94aba3f9ec80e62cfef8ced495ca5c27d6e
# via -r mlir/python/requirements.txt
numpy==2.1.2 \
--hash=sha256:05b2d4e667895cc55e3ff2b56077e4c8a5604361fc21a042845ea3ad67465aa8 \
--hash=sha256:12edb90831ff481f7ef5f6bc6431a9d74dc0e5ff401559a71e5e4611d4f2d466 \
--hash=sha256:13311c2db4c5f7609b462bc0f43d3c465424d25c626d95040f073e30f7570e35 \
--hash=sha256:13532a088217fa624c99b843eeb54640de23b3414b14aa66d023805eb731066c \
--hash=sha256:13602b3174432a35b16c4cfb5de9a12d229727c3dd47a6ce35111f2ebdf66ff4 \
--hash=sha256:1600068c262af1ca9580a527d43dc9d959b0b1d8e56f8a05d830eea39b7c8af6 \
--hash=sha256:1b8cde4f11f0a975d1fd59373b32e2f5a562ade7cde4f85b7137f3de8fbb29a0 \
--hash=sha256:1c193d0b0238638e6fc5f10f1b074a6993cb13b0b431f64079a509d63d3aa8b7 \
--hash=sha256:1ebec5fd716c5a5b3d8dfcc439be82a8407b7b24b230d0ad28a81b61c2f4659a \
--hash=sha256:242b39d00e4944431a3cd2db2f5377e15b5785920421993770cddb89992c3f3a \
--hash=sha256:259ec80d54999cc34cd1eb8ded513cb053c3bf4829152a2e00de2371bd406f5e \
--hash=sha256:2abbf905a0b568706391ec6fa15161fad0fb5d8b68d73c461b3c1bab6064dd62 \
--hash=sha256:2cbba4b30bf31ddbe97f1c7205ef976909a93a66bb1583e983adbd155ba72ac2 \
--hash=sha256:2ffef621c14ebb0188a8633348504a35c13680d6da93ab5cb86f4e54b7e922b5 \
--hash=sha256:30d53720b726ec36a7f88dc873f0eec8447fbc93d93a8f079dfac2629598d6ee \
--hash=sha256:32e16a03138cabe0cb28e1007ee82264296ac0983714094380b408097a418cfe \
--hash=sha256:43cca367bf94a14aca50b89e9bc2061683116cfe864e56740e083392f533ce7a \
--hash=sha256:456e3b11cb79ac9946c822a56346ec80275eaf2950314b249b512896c0d2505e \
--hash=sha256:4d6ec0d4222e8ffdab1744da2560f07856421b367928026fb540e1945f2eeeaf \
--hash=sha256:5006b13a06e0b38d561fab5ccc37581f23c9511879be7693bd33c7cd15ca227c \
--hash=sha256:675c741d4739af2dc20cd6c6a5c4b7355c728167845e3c6b0e824e4e5d36a6c3 \
--hash=sha256:6cdb606a7478f9ad91c6283e238544451e3a95f30fb5467fbf715964341a8a86 \
--hash=sha256:6d95f286b8244b3649b477ac066c6906fbb2905f8ac19b170e2175d3d799f4df \
--hash=sha256:76322dcdb16fccf2ac56f99048af32259dcc488d9b7e25b51e5eca5147a3fb98 \
--hash=sha256:7c1c60328bd964b53f8b835df69ae8198659e2b9302ff9ebb7de4e5a5994db3d \
--hash=sha256:860ec6e63e2c5c2ee5e9121808145c7bf86c96cca9ad396c0bd3e0f2798ccbe2 \
--hash=sha256:8e00ea6fc82e8a804433d3e9cedaa1051a1422cb6e443011590c14d2dea59146 \
--hash=sha256:9c6c754df29ce6a89ed23afb25550d1c2d5fdb9901d9c67a16e0b16eaf7e2550 \
--hash=sha256:a26ae94658d3ba3781d5e103ac07a876b3e9b29db53f68ed7df432fd033358a8 \
--hash=sha256:a65acfdb9c6ebb8368490dbafe83c03c7e277b37e6857f0caeadbbc56e12f4fb \
--hash=sha256:a7d80b2e904faa63068ead63107189164ca443b42dd1930299e0d1cb041cec2e \
--hash=sha256:a84498e0d0a1174f2b3ed769b67b656aa5460c92c9554039e11f20a05650f00d \
--hash=sha256:ab4754d432e3ac42d33a269c8567413bdb541689b02d93788af4131018cbf366 \
--hash=sha256:ad369ed238b1959dfbade9018a740fb9392c5ac4f9b5173f420bd4f37ba1f7a0 \
--hash=sha256:b1d0fcae4f0949f215d4632be684a539859b295e2d0cb14f78ec231915d644db \
--hash=sha256:b42a1a511c81cc78cbc4539675713bbcf9d9c3913386243ceff0e9429ca892fe \
--hash=sha256:bd33f82e95ba7ad632bc57837ee99dba3d7e006536200c4e9124089e1bf42426 \
--hash=sha256:bdd407c40483463898b84490770199d5714dcc9dd9b792f6c6caccc523c00952 \
--hash=sha256:c6eef7a2dbd0abfb0d9eaf78b73017dbfd0b54051102ff4e6a7b2980d5ac1a03 \
--hash=sha256:c82af4b2ddd2ee72d1fc0c6695048d457e00b3582ccde72d8a1c991b808bb20f \
--hash=sha256:d666cb72687559689e9906197e3bec7b736764df6a2e58ee265e360663e9baf7 \
--hash=sha256:d7bf0a4f9f15b32b5ba53147369e94296f5fffb783db5aacc1be15b4bf72f43b \
--hash=sha256:d82075752f40c0ddf57e6e02673a17f6cb0f8eb3f587f63ca1eaab5594da5b17 \
--hash=sha256:da65fb46d4cbb75cb417cddf6ba5e7582eb7bb0b47db4b99c9fe5787ce5d91f5 \
--hash=sha256:e2b49c3c0804e8ecb05d59af8386ec2f74877f7ca8fd9c1e00be2672e4d399b1 \
--hash=sha256:e585c8ae871fd38ac50598f4763d73ec5497b0de9a0ab4ef5b69f01c6a046142 \
--hash=sha256:e8d3ca0a72dd8846eb6f7dfe8f19088060fcb76931ed592d29128e0219652884 \
--hash=sha256:ef444c57d664d35cac4e18c298c47d7b504c66b17c2ea91312e979fcfbdfb08a \
--hash=sha256:f1eb068ead09f4994dec71c24b2844f1e4e4e013b9629f812f292f04bd1510d9 \
--hash=sha256:f2ded8d9b6f68cc26f8425eda5d3877b47343e68ca23d0d0846f4d312ecaa445 \
--hash=sha256:f751ed0a2f250541e19dfca9f1eafa31a392c71c832b6bb9e113b10d050cb0f1 \
--hash=sha256:faa88bc527d0f097abdc2c663cddf37c05a1c2f113716601555249805cf573f1 \
--hash=sha256:fc44e3c68ff00fd991b59092a54350e6e4911152682b4782f68070985aa9e648
# via
# -r mlir/python/requirements.txt
# ml-dtypes
packaging==25.0 \
--hash=sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484 \
--hash=sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f
# via -r lldb/test/requirements.txt
pexpect==4.9.0 ; sys_platform != "win32" \
--hash=sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523 \
--hash=sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f
# via -r lldb/test/requirements.txt
proto-plus==1.26.1 \
--hash=sha256:13285478c2dcf2abb829db158e1047e2f1e8d63a077d94263c2b88b043c75a66 \
--hash=sha256:21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012
# via google-api-core
protobuf==6.32.0 \
--hash=sha256:15eba1b86f193a407607112ceb9ea0ba9569aed24f93333fe9a497cf2fda37d3 \
--hash=sha256:501fe6372fd1c8ea2a30b4d9be8f87955a64d6be9c88a973996cef5ef6f0abf1 \
--hash=sha256:75a2aab2bd1aeb1f5dc7c5f33bcb11d82ea8c055c9becbb41c26a8c43fd7092c \
--hash=sha256:7db8ed09024f115ac877a1427557b838705359f047b2ff2f2b2364892d19dacb \
--hash=sha256:84f9e3c1ff6fb0308dbacb0950d8aa90694b0d0ee68e75719cb044b7078fe741 \
--hash=sha256:a81439049127067fc49ec1d36e25c6ee1d1a2b7be930675f919258d03c04e7d2 \
--hash=sha256:a8bdbb2f009cfc22a36d031f22a625a38b615b5e19e558a7b756b3279723e68e \
--hash=sha256:ba377e5b67b908c8f3072a57b63e2c6a4cbd18aea4ed98d2584350dbf46f2783 \
--hash=sha256:d52691e5bee6c860fff9a1c86ad26a13afbeb4b168cd4445c922b7e2cf85aaf0
# via
# google-api-core
# googleapis-common-protos
# proto-plus
psutil==7.0.0 \
--hash=sha256:101d71dc322e3cffd7cea0650b09b3d08b8e7c4109dd6809fe452dfd00e58b25 \
--hash=sha256:1e744154a6580bc968a0195fd25e80432d3afec619daf145b9e5ba16cc1d688e \
--hash=sha256:1fcee592b4c6f146991ca55919ea3d1f8926497a713ed7faaf8225e174581e91 \
--hash=sha256:39db632f6bb862eeccf56660871433e111b6ea58f2caea825571951d4b6aa3da \
--hash=sha256:4b1388a4f6875d7e2aff5c4ca1cc16c545ed41dd8bb596cefea80111db353a34 \
--hash=sha256:4cf3d4eb1aa9b348dec30105c55cd9b7d4629285735a102beb4441e38db90553 \
--hash=sha256:7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456 \
--hash=sha256:84df4eb63e16849689f76b1ffcb36db7b8de703d1bc1fe41773db487621b6c17 \
--hash=sha256:a5f098451abc2828f7dc6b58d44b532b22f2088f4999a937557b603ce72b1993 \
--hash=sha256:ba3fcef7523064a6c9da440fc4d6bd07da93ac726b5733c29027d7dc95b39d99
# via -r lldb/test/requirements.txt
ptyprocess==0.7.0 \
--hash=sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35 \
--hash=sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220
# via pexpect
pyasn1==0.6.1 \
--hash=sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629 \
--hash=sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034
# via
# pyasn1-modules
# rsa
pyasn1-modules==0.4.2 \
--hash=sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a \
--hash=sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6
# via google-auth
pycparser==2.23 \
--hash=sha256:78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2 \
--hash=sha256:e5c6e8d3fbad53479cab09ac03729e0a9faf2bee3db8208a550daf5af81a5934
# via cffi
pygithub==2.8.1 \
--hash=sha256:23a0a5bca93baef082e03411bf0ce27204c32be8bfa7abc92fe4a3e132936df0 \
--hash=sha256:341b7c78521cb07324ff670afd1baa2bf5c286f8d9fd302c1798ba594a5400c9
# via -r .ci/requirements.txt
pyjwt[crypto]==2.10.1 \
--hash=sha256:3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953 \
--hash=sha256:dcdd193e30abefd5debf142f9adfcdd2b58004e644f25406ffaebd50bd98dacb
# via pygithub
pynacl==1.6.0 \
--hash=sha256:04f20784083014e265ad58c1b2dd562c3e35864b5394a14ab54f5d150ee9e53e \
--hash=sha256:10d755cf2a455d8c0f8c767a43d68f24d163b8fe93ccfaabfa7bafd26be58d73 \
--hash=sha256:140373378e34a1f6977e573033d1dd1de88d2a5d90ec6958c9485b2fd9f3eb90 \
--hash=sha256:16c60daceee88d04f8d41d0a4004a7ed8d9a5126b997efd2933e08e93a3bd850 \
--hash=sha256:16dd347cdc8ae0b0f6187a2608c0af1c8b7ecbbe6b4a06bff8253c192f696990 \
--hash=sha256:25720bad35dfac34a2bcdd61d9e08d6bfc6041bebc7751d9c9f2446cf1e77d64 \
--hash=sha256:2d6cd56ce4998cb66a6c112fda7b1fdce5266c9f05044fa72972613bef376d15 \
--hash=sha256:347dcddce0b4d83ed3f32fd00379c83c425abee5a9d2cd0a2c84871334eaff64 \
--hash=sha256:4853c154dc16ea12f8f3ee4b7e763331876316cc3a9f06aeedf39bcdca8f9995 \
--hash=sha256:49c336dd80ea54780bcff6a03ee1a476be1612423010472e60af83452aa0f442 \
--hash=sha256:4a25cfede801f01e54179b8ff9514bd7b5944da560b7040939732d1804d25419 \
--hash=sha256:51fed9fe1bec9e7ff9af31cd0abba179d0e984a2960c77e8e5292c7e9b7f7b5d \
--hash=sha256:536703b8f90e911294831a7fbcd0c062b837f3ccaa923d92a6254e11178aaf42 \
--hash=sha256:5789f016e08e5606803161ba24de01b5a345d24590a80323379fc4408832d290 \
--hash=sha256:6b08eab48c9669d515a344fb0ef27e2cbde847721e34bba94a343baa0f33f1f4 \
--hash=sha256:6b393bc5e5a0eb86bb85b533deb2d2c815666665f840a09e0aa3362bb6088736 \
--hash=sha256:84709cea8f888e618c21ed9a0efdb1a59cc63141c403db8bf56c469b71ad56f2 \
--hash=sha256:8bfaa0a28a1ab718bad6239979a5a57a8d1506d0caf2fba17e524dbb409441cf \
--hash=sha256:bbcc4452a1eb10cd5217318c822fde4be279c9de8567f78bad24c773c21254f8 \
--hash=sha256:cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2 \
--hash=sha256:cf831615cc16ba324240de79d925eacae8265b7691412ac6b24221db157f6bd1 \
--hash=sha256:dcdeb41c22ff3c66eef5e63049abf7639e0db4edee57ba70531fc1b6b133185d \
--hash=sha256:dea103a1afcbc333bc0e992e64233d360d393d1e63d0bc88554f572365664348 \
--hash=sha256:ef214b90556bb46a485b7da8258e59204c244b1b5b576fb71848819b468c44a7 \
--hash=sha256:f3482abf0f9815e7246d461fab597aa179b7524628a4bc36f86a7dc418d2608d \
--hash=sha256:f46386c24a65383a9081d68e9c2de909b1834ec74ff3013271f1bca9c2d233eb \
--hash=sha256:f4b3824920e206b4f52abd7de621ea7a44fd3cb5c8daceb7c3612345dfc54f2e
# via pygithub
pyyaml==6.0.1 \
--hash=sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5 \
--hash=sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc \
--hash=sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df \
--hash=sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741 \
--hash=sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206 \
--hash=sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27 \
--hash=sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595 \
--hash=sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62 \
--hash=sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98 \
--hash=sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696 \
--hash=sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290 \
--hash=sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9 \
--hash=sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d \
--hash=sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6 \
--hash=sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867 \
--hash=sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47 \
--hash=sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486 \
--hash=sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6 \
--hash=sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3 \
--hash=sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007 \
--hash=sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938 \
--hash=sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0 \
--hash=sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c \
--hash=sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735 \
--hash=sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d \
--hash=sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28 \
--hash=sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4 \
--hash=sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba \
--hash=sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8 \
--hash=sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef \
--hash=sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5 \
--hash=sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd \
--hash=sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3 \
--hash=sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0 \
--hash=sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515 \
--hash=sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c \
--hash=sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c \
--hash=sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924 \
--hash=sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34 \
--hash=sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43 \
--hash=sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859 \
--hash=sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673 \
--hash=sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54 \
--hash=sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a \
--hash=sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b \
--hash=sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab \
--hash=sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa \
--hash=sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c \
--hash=sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585 \
--hash=sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d \
--hash=sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f
# via -r mlir/python/requirements.txt
requests==2.32.5 \
--hash=sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6 \
--hash=sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf
# via
# google-api-core
# google-cloud-storage
# pygithub
rsa==4.9.1 \
--hash=sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762 \
--hash=sha256:e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75
# via google-auth
swig==4.3.1 \
--hash=sha256:07082c2f8693f83ba136136e54e92a5af014488ca4f2a3de4b471337c00d92aa \
--hash=sha256:0743063399e373b17d658481f4cd327245ef58a1d17a3e2071de88dec60082fc \
--hash=sha256:19936cb924e7c86f207bf4e12e00c930342068fcb7073dcc9c8b49bd7a2c7389 \
--hash=sha256:3d34c3fd96c5c288881a25418df06d814aa09e734bc32af5cd92e9217841b5f6 \
--hash=sha256:444b11d8ee27aa64ac83e827dbeb724aa0cfb1062c20ecbb88180bffa39d5dc3 \
--hash=sha256:54fd71196e1999fd0e204c8fa5ab39d472eb8831f30a951d7115c82d07bdf5f3 \
--hash=sha256:5f31b7e815b76b42cc503322ad88e6eb3ebb0bb0b91044445c8a31b5b4aa4664 \
--hash=sha256:7687a1c1b6c3033f75b753d638cac967e3f6011c04fb25ab405cf9086ecf8d4c \
--hash=sha256:86600ddde81e24f6fa989920784d72c3ca7ca6a7583fe74b4c5c80076dddd0a5 \
--hash=sha256:bbb43485d120d3fd2c979f258f81eae78274f83ba3767d5b3fe376ac70504934 \
--hash=sha256:c5391080a3785b0505eb211af1cbb1f1e3838e5bb1e54f740a9d7ba2e385c879 \
--hash=sha256:d4ffde3e87cd2a764495a516751c2c3c301f8b237aba2ac3963f786ff59b7f68 \
--hash=sha256:d84b3e31d943d81b28bd4144dcf5271909ad2313f0f2afbd7f2fb37ef2a6d8bb \
--hash=sha256:efec16327029f682f649a26da726bb0305be8800bd0f1fa3e81bf0769cf5b476 \
--hash=sha256:fc496c0d600cf1bb2d91e28d3d6eae9c4301e5ea7a0dec5a4281b5efed4245a8
# via -r lldb/test/requirements.txt
typing-extensions==4.15.0 \
--hash=sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466 \
--hash=sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548
# via
# -r mlir/python/requirements.txt
# pygithub
urllib3==2.5.0 \
--hash=sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760 \
--hash=sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc
# via
# pygithub
# requests

View File

@ -1,49 +0,0 @@
# ScriptedBuilder Buildbot Workers
This directory contains code shared by LLVM Buildbot workers. The typical
pipeline of a ScriptedBuilder-based builder is as follows.
1. A commit is pushed to [main](https://github.com/llvm/llvm-project/tree/main)
2. The [Buildbot master](https://lab.llvm.org/) polls the repository and finds
new commits. It schedules build requests on every relevant worker.
Alternatively, a build request of a specific llvm-project commit can be
created using the "Force Build" or "Rebuild" buttons.
3. When a worker is ready, the master sends the build steps determined by
[ScriptedBuilder](https://github.com/llvm/llvm-zorg/blob/main/zorg/buildbot/builders/ScriptedBuilder.py)
to the worker.
4. The checkout step checks out llvm-project commit into a directory named
`llvm.src` on the worker.
5. The annotate step executes a predefined Python script from the llvm-project
source tree on the worker. Its working directory is an initially empty
sibling directory named `build`. The argument `--workdir=.` is passed to
override the default build directory (which is different to avoid
accidentally spilling clutter into the cwd)
6. The script is expected to use the utilities from
[`worker.py`](https://github.com/llvm/llvm-project/blob/main/.ci/buildbot/worker.py)
to build LLVM. The `with w.step("stepname"):` pattern is used to visually
separate additional steps in the [Buildbot GUI](https://lab.llvm.org/).
## Reproducing Builds
Users can execute the worker script directly to reproduce a build problem with
a worker using the llvm-project source tree in which it is located. By default
it will use a new directory with `.workdir` suffix (so it can be
`.gitignore`-ignored) next to the script as build directory.
The ScriptedBuilder system tries to keep all worker/build settings within the
script, but some parameters can be overridden using command line parameters.
For instance, `--jobs` overrides the Ninja and llvm-lit `-j` argument that the
worker would use. Script should be written to honor these overrides where they
apply, and may also add additional ones.
See
[`worker.py`](https://github.com/llvm/llvm-project/blob/main/.ci/buildbot/worker.py)
or a
[reference script](https://github.com/llvm/llvm-project/blob/main/polly/polly-x86_64-linux-test-suite)
for further details.

View File

@ -1,589 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Utilities for ScriptedBuilder Buildbot worker scripts"""
import argparse
import filecmp
import os
import stat
import pathlib
import re
import shlex
import shutil
import subprocess
import sys
import traceback
import platform
import multiprocessing
from contextlib import contextmanager
_SHQUOTE_WINDOWS_ESCAPEDCHARS = re.compile(r'(["\\])')
_SHQUOTE_WINDOWS_QUOTEDCHARS = re.compile("[ \t\n]")
def _shquote_windows(txt):
"""shlex.quote for Windows cmd.exe"""
txt = txt.replace("%", "%%")
quoted = re.sub(_SHQUOTE_WINDOWS_ESCAPEDCHARS, r"\\\1", txt)
if len(quoted) == len(txt) and not _SHQUOTE_WINDOWS_QUOTEDCHARS.search(txt):
return txt
else:
return '"' + quoted + '"'
def shjoin(args):
"""Convert a list of shell arguments to an appropriately quoted string."""
if os.name in set(("nt", "os2", "ce")):
return " ".join(map(_shquote_windows, args))
else:
return shlex.join(args)
def report(msg):
"""
Emit a message to the build log. Appears in red font. Lines surrounded
by @@@ may be interpreted as meta-instructions.
"""
print(msg, file=sys.stderr, flush=True)
def report_prog_version(name, cmd):
try:
p = subprocess.run(cmd, check=True, capture_output=True, text=True)
outlines = p.stdout.strip().splitlines()
report_list(name, outlines[0])
except BaseException:
pass
def report_list(category, *items):
items = list(items)
filtered = []
while items:
item = items.pop()
match item:
case tuple() | list():
items += item
continue
case None:
continue
case _:
item = str(item).strip()
if not item:
continue
if item in filtered:
continue
filtered.append(item)
category += ":"
report(f"{category:<9}{', '.join(reversed( filtered))}")
def report_platform():
report_list(
"CPU",
platform.machine(),
platform.architecture()[0],
platform.processor(),
f"{multiprocessing.cpu_count()} native threads",
)
try:
releaseinfo = platform.freedesktop_os_release()
except BaseException:
releaseinfo = dict()
report_list(
"OS",
platform.system(),
platform.architecture()[1],
platform.platform(),
releaseinfo.get("PRETTY_NAME"),
)
report_list("Python", platform.python_implementation(), platform.python_version())
report_prog_version("CMake", ["cmake", "--version"])
report_prog_version("Ninja", ["ninja", "--version"])
report_prog_version("Sphinx", ["sphinx-build", "--version"])
report_prog_version("Doxygen", ["doxygen", "--version"])
report_prog_version("gcc", ["gcc", "--version"])
report_prog_version("ld", ["ld", "--version"])
report_prog_version("LLVM", ["llvm-config", "--version"])
report_prog_version("Clang", ["clang", "--version"])
report_prog_version("LLD", ["ld.lld", "--version"])
def run_command(cmd, shell=False, env=None, add_env=None, **kwargs):
"""
Report which command is being run, then execute it using
subprocess.check_call. Any arguments are forwarded to check_call.
Additional Parameters
----------
add_env : dict
Like env, but adds to the original environment instead of replacing it
"""
report(f"Running: {cmd if shell else shjoin(cmd)}")
sys.stderr.flush()
if add_env:
env = dict(os.environ) if env is None else dict(env)
env.update(add_env)
subprocess.check_call(cmd, shell=shell, env=env, **kwargs)
def _remove_readonly(func, path, _):
"""Clear the readonly bit and reattempt the removal."""
try:
os.chmod(path, stat.S_IWRITE)
except Exception:
pass
func(path)
def rmtree(path):
"""Remove directory path and all its subdirectories. Includes a workaround
for Windows where shutil.rmtree errors on read-only files.
Taken from official Python docs
https://docs.python.org/3/library/shutil.html#rmtree-example
"""
shutil.rmtree(path, onerror=_remove_readonly)
def try_delete(path):
"""
Delete the file or directory;
if not successful, print a warning but continue
"""
try:
os.unlink(path)
except Exception:
try:
_remove_readonly(os.unlink, path, _)
except Exception:
try:
rmtree(path)
except Exception as e:
print(f"Warning: Could not delete {path}: {e}")
def checkout(giturl, sourcepath):
"""
Use git to checkout the remote repository giturl at local directory
sourcepath.
If the repository already exists, clear all local changes and check out the
latest main branch.
"""
if not os.path.exists(sourcepath):
run_command(["git", "clone", giturl, sourcepath])
# Reset repository state no matter what there was before
run_command(["git", "-C", sourcepath, "stash", "--all"])
run_command(["git", "-C", sourcepath, "stash", "clear"])
# Fetch and checkout the newest
run_command(["git", "-C", sourcepath, "fetch", "origin"])
run_command(["git", "-C", sourcepath, "checkout", "origin/main", "--detach"])
@contextmanager
def step(step_name, halt_on_fail=False):
"""Report a new build step being started.
Use like this::
with step("greet-step"):
report("Hello World!")
"""
# Barrier to separate stdio output for the the previous step
sys.stderr.flush()
sys.stdout.flush()
report(f"@@@BUILD_STEP {step_name}@@@")
if halt_on_fail:
report("@@@HALT_ON_FAILURE@@@")
try:
yield
except Exception as e:
if isinstance(e, subprocess.CalledProcessError):
report(f"{shjoin(e.cmd)} exited with return code {e.returncode}.")
report("@@@STEP_FAILURE@@@")
else:
traceback.print_exc()
report("@@@STEP_EXCEPTION@@@")
if halt_on_fail:
# Do not continue with the next steps, but allow except/finally
# blocks to execute
raise e
class Worker:
"""Helper class to keep context in a worker.run() environment"""
def __init__(self, args, clean, clobber, workdir, jobs, cachefile, llvmsrcroot):
self.args = args
self.clean = clean
self.clobber = clobber
self.workdir = workdir
self.jobs = jobs
self.cachefile = cachefile
self.llvmsrcroot = llvmsrcroot
def in_llvmsrc(self, path):
"""
Convert a path in the llvm-project source checkout to an absolute path
"""
return os.path.join(self.llvmsrcroot, path)
def in_workdir(self, path):
"""Convert a path in the workdir to an absolute path"""
return os.path.join(self.workdir, path)
def run_ninja(
self, targets: list = [], *, builddir, ccache_stats: bool = False, **kwargs
):
"""
Run ninja in builddir. If self.jobs is set, automatically adds a
-j option to set the number of parallel jobs.
Parameters
----------
targets : list
List of build targets; build the default target 'all' if list is
empty
builddir
Directory of the build.ninja file
ccache_stats : bool
If true, also emit ccache statistics when finishing the build
"""
cmd = ["ninja"]
if builddir is not None:
cmd += ["-C", builddir]
cmd += targets
if self.jobs:
cmd.append(f"-j{self.jobs}")
if ccache_stats:
run_command(["ccache", "-z"])
try:
run_command(cmd, **kwargs)
finally:
# TODO: Pipe to stderr to separate from build log itself
run_command(["ccache", "-sv"])
else:
run_command(cmd, **kwargs)
@contextmanager
def step(self, step_name, halt_on_fail=False):
"""Convenience wrapper for step()"""
with step(step_name, halt_on_fail=halt_on_fail) as s:
yield s
def report(self, msg):
"""Convenience wrapper for report()"""
report(msg)
def run_command(self, *args, **kwargs):
"""Convenience wrapper for run_command()"""
return run_command(*args, **kwargs)
def rmtree(self, *args, **kwargs):
"""Convenience wrapper for rmtree()"""
return rmtree(*args, *kwargs)
def try_delete(self, *args, **kwargs):
"""Convenience wrapper for try_delete()"""
return try_delete(*args, *kwargs)
def checkout(self, giturl, sourcepath):
"""Convenience wrapper for checkout()"""
return checkout(giturl, sourcepath)
def convert_bool(v):
"""Convert input to bool type
Use to convert the value of bool environment variables. Specifically, the
buildbot master sets 'false' to build properties, which by default Python
would interpret as true-ish.
"""
match v:
case None:
return False
case bool(b):
return b
case str(s):
return not s.strip().upper() in ["", "0", "N", "NO", "FALSE", "OFF"]
case _:
return bool(v)
def relative_if_possible(path, relative_to):
"""
Like os.path.relpath, but does not fail if path is not a parent of
relative_to; keeps the original path in that case
"""
path = os.path.normpath(path)
if not os.path.isabs(path):
# Path is already relative (assumed to relative_to)
return path
try:
result = os.path.relpath(path, start=relative_to)
return result if result else path
except ValueError:
return path
@contextmanager
def run(
scriptpath,
llvmsrcroot,
parser=None,
cachefile=None,
clobberpaths=[],
workerjobs=None,
incremental=None,
):
"""
Runs the boilerplate for a ScriptedBuilder buildbot. It is not necessary to
use this function (one can also call run_command() etc. directly), but
allows for some more flexibility and safety checks. Arguments passed to this
function represent the worker configuration.
We use the term 'clean' for resetting the worker to an empty state. This
involves deleting ${prefix}/llvm.src as well as ${prefix}/build.
The term 'clobber' means deleting build artifacts, but not already
downloaded git repositories. Build artifacts include build- and
install-directories. Changes in the llvm.src directory will
either be force-reset by the buildbot's 'checkout' step anyway,
or -- in case of local invocation -- represents the source the user wants
to reproduce without being tied to a specific commit. In either case the
source directories should not be touched. We consider 'clean' to comprise
'clobber'. llvm-zorg also uses the term 'clean_obj' instead of 'clobber'.
By default, we will always clobber to get the same starting point at every
build. If incremental=True or the --incremental command line option is used,
the starting point is the previous build.
A buildbot worker will invoke this script using this directory structure,
where ${prefix} is a dedicated directory for this builder:
${prefix}/llvm.src # Checkout location for the llvm-source
${prefix}/build # cwd when launching the build script
The build script is called with --workdir=. parameter, i.e. the build
artifacts are written into ${prefix}/build. When cleaning, the worker (NOT
the build script) will delete ${prefix}/llvm.src; Deleting any contents of
${prefix}/build is to be done by the builder script, e.g. by this function.
The builder script can choose to not delete the complete workdir, e.g.
additional source checkouts such as the llvm-test-suite.
The buildbot master will set the 'clean' build property and the environment
variable BUILDBOT_CLEAN when in the GUI the option "Clean source code and
build directory" is checked by the user. The 'clean_obj' build property and
the BUILDBOT_CLEAN_OBJ environment variable will be set when either the
"Clean build directory" GUI option is set, or the master detects a change
to a CMakeLists.txt or *.cmake file.
Parameters
----------
scriptpath
Pass __file__ from the main builder script.
llvmsrcroot
Absolute path to the llvm-project source checkout. Since the builder
script is supposed to be a part of llvm-project itself, the builder
script can compute it from __file__.
parser
Use this argparse.ArgumentParser instead of creating a new one. Allows
adding additional command line switches in addition to the pre-defined
ones. Build scripts are encouraged to apply the pre-defined switches.
cachefile
Path (relative to llvmsrcroot) of the CMake cache file to
use. `None` indicates that the script does not use a cache file. Can be
overridden using --cachefile.
clobberpaths
Directories relative to workdir that need to be deleted if the build
configuration changes (due to changes of CMakeLists.txt or changes of
configuration parameters). Typically, only source checkouts are not
deleted.
workerjobs
Default number of build and test jobs; If set, expected to be the number
of jobs of the actual buildbot worker that executes this script. Can be
overridden using the --jobs parameter so in case someone needs to
reproduce this build, they can adjust the number of jobs for the
reproducer platform. Alternatively, the worker can set the
BUILDBOT_JOBS environment variable or keep ninja/llvm-lit defaults.
incremental
Only clobber the build artifacts when the build configuration changes.
Can be overridden using --incremental.
"""
scriptpath = os.path.abspath(scriptpath)
llvmsrcroot = os.path.abspath(llvmsrcroot)
stem = pathlib.Path(scriptpath).stem
workdir_default = f"{stem}.workdir"
jobs_default = None
if jobs_env := os.environ.get("BUILDBOT_JOBS"):
jobs_default = int(jobs_env)
if not jobs_default:
jobs_default = workerjobs
if not jobs_default:
jobs_default = None
incremental_default = None if incremental else False
parser = parser or argparse.ArgumentParser(
allow_abbrev=True,
description="When executed without arguments, builds the worker's "
f"LLVM build configuration in {os.path.abspath(workdir_default)}. "
"Some build configuration parameters can be altered using the "
"following switches:",
)
parser.add_argument(
"--workdir",
default=workdir_default,
help="Use this dir (relative to cwd) as workdir to write the build "
"artifacts into; --workdir=. uses the current directory.\nWarning: The "
"content of this directory may be deleted",
)
if cachefile is not None:
parser.add_argument(
"--cachefile",
default=relative_if_possible(cachefile, llvmsrcroot),
help="File containing the initial values for the CMakeCache.txt "
"for the llvm build.",
)
parser.add_argument(
"--clean",
action=argparse.BooleanOptionalAction,
default=convert_bool(os.environ.get("BUILDBOT_CLEAN")),
help="Delete the entire workdir before starting the build, including "
"source directories",
)
parser.add_argument(
"--incremental",
action=argparse.BooleanOptionalAction,
default=incremental_default,
help="Keep previous build artifacts when starting the build",
)
parser.add_argument(
"--jobs",
"-j",
type=int,
default=jobs_default,
help="Number of build- and test-jobs",
)
args = parser.parse_args()
workdir = os.path.abspath(args.workdir)
incremental = args.incremental
clean = args.clean
if cachefile is not None:
cachefile = os.path.join(llvmsrcroot, args.cachefile)
if not os.path.isfile(cachefile):
raise Exception(f"--cachefile={cachefile} does not exist")
prevcachepath = os.path.join(workdir, "prevcache.cmake")
prevscriptpath = os.path.join(workdir, "prevscript.py")
if clean:
# Clean implies clobber
clobber = False
elif incremental is None:
# Automatically determine whether to clobber
def has_config_change():
# Has the master scheduler determined a CMakeLists.txt has changed?
if convert_bool(os.environ.get("BUILDBOT_CLOBBER")):
return True
if convert_bool(os.environ.get("BUILDBOT_CLEAN_OBJ")):
return True
# Has the build script changed?
if not os.path.isfile(prevscriptpath):
return True
if not filecmp.cmp(scriptpath, prevscriptpath, shallow=False):
return True
# Has the cache file (if any) changed?
if cachefile:
if not os.path.isfile(prevcachepath):
return True
if not os.path.isfile(cachefile):
return True
if not filecmp.cmp(cachefile, prevcachepath, shallow=False):
return True
return False
clobber = has_config_change()
else:
# Adhere to explicitly set incremental option
clobber = not incremental
# Safety check
parentdir = os.path.dirname(scriptpath)
while True:
if os.path.exists(workdir) and os.path.samefile(parentdir, workdir):
raise Exception(
f"Cannot use {args.workdir} as workdir; it contains the source "
"itself in '{parentdir}'"
)
newparentdir = os.path.dirname(parentdir)
if newparentdir == parentdir:
break
parentdir = newparentdir
w = Worker(
args,
clean=clean,
clobber=clobber,
workdir=workdir,
jobs=args.jobs,
cachefile=cachefile,
llvmsrcroot=llvmsrcroot,
)
with step("platform-info"):
report_platform()
# Ensure that the cwd is not the directory we are going to delete. This
# would not work e.g. under Windows. We will chdir to workdir in the next
# step anyway.
os.chdir("/")
if clean:
if os.path.exists(workdir):
print("Deleting previous build state including sources", file=sys.stderr)
with w.step(f"clean"):
if os.path.exists(workdir):
# Do not delete the directory itself, just the contents; it might be
# a symlink to somewhere else
for d in os.listdir(workdir):
try_delete(os.path.join(workdir, d))
elif clobber:
# Warn user if deleting anything
for p in clobberpaths:
if os.path.exists(os.path.join(workdir, p)):
print(
"Deleting previous build artifacts; use --incremental to keep",
file=sys.stderr,
)
break
with w.step(f"clobber"):
for d in clobberpaths:
try_delete(os.path.join(workdir, d))
try_delete(prevscriptpath)
try_delete(prevcachepath)
os.makedirs(workdir, exist_ok=True)
os.chdir(workdir)
# Remember used script and cachefile to detect changes
shutil.copy(scriptpath, prevscriptpath)
if cachefile:
shutil.copy(cachefile, prevcachepath)
os.environ["NINJA_STATUS"] = "[%p/%es :: %u->%r->%f (of %t)] "
yield w

View File

@ -1,94 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Caches .lit_test_times.txt files between premerge invocations.
.lit_test_times.txt files are used by lit to order tests to best take advantage
of parallelism. Having them around and up to date can result in a ~15%
improvement in test times. This script downloading cached test time files and
uploading new versions to the GCS buckets used for caching.
"""
import sys
import os
import logging
import multiprocessing.pool
import pathlib
import glob
from google.cloud import storage
from google.api_core import exceptions
GCS_PARALLELISM = 100
def _maybe_upload_timing_file(bucket, timing_file_path):
if os.path.exists(timing_file_path):
timing_file_blob = bucket.blob("lit_timing/" + timing_file_path)
timing_file_blob.upload_from_filename(timing_file_path)
def upload_timing_files(storage_client, bucket_name: str):
bucket = storage_client.bucket(bucket_name)
with multiprocessing.pool.ThreadPool(GCS_PARALLELISM) as thread_pool:
futures = []
for timing_file_path in glob.glob("**/.lit_test_times.txt", recursive=True):
futures.append(
thread_pool.apply_async(
_maybe_upload_timing_file, (bucket, timing_file_path)
)
)
for future in futures:
future.get()
print("Done uploading")
def _maybe_download_timing_file(blob):
file_name = blob.name.removeprefix("lit_timing/")
pathlib.Path(os.path.dirname(file_name)).mkdir(parents=True, exist_ok=True)
blob.download_to_filename(file_name)
def download_timing_files(storage_client, bucket_name: str):
bucket = storage_client.bucket(bucket_name)
try:
blobs = bucket.list_blobs(prefix="lit_timing")
except exceptions.ClientError as client_error:
print(
"::warning file=cache_lit_timing_files.py::Failed to list blobs "
"in bucket."
)
sys.exit(0)
with multiprocessing.pool.ThreadPool(GCS_PARALLELISM) as thread_pool:
futures = []
for timing_file_blob in blobs:
futures.append(
thread_pool.apply_async(
_maybe_download_timing_file, (timing_file_blob,)
)
)
for future in futures:
future.wait()
if not future.successful():
print(
"::warning file=cache_lit_timing_files.py::Failed to "
"download lit timing file."
)
continue
print("Done downloading")
if __name__ == "__main__":
if len(sys.argv) != 2:
logging.fatal("Expected usage is cache_lit_timing_files.py <upload/download>")
sys.exit(1)
action = sys.argv[1]
storage_client = storage.Client()
bucket_name = os.environ["CACHE_GCS_BUCKET"]
if action == "download":
download_timing_files(storage_client, bucket_name)
elif action == "upload":
upload_timing_files(storage_client, bucket_name)
else:
logging.fatal("Expected usage is cache_lit_timing_files.py <upload/download>")
sys.exit(1)

View File

@ -1,361 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Computes the list of projects that need to be tested from a diff.
Does some things, spits out a list of projects.
"""
from collections.abc import Set
import pathlib
import platform
import sys
# This mapping lists out the dependencies for each project. These should be
# direct dependencies. The code will handle transitive dependencies. Some
# projects might have optional dependencies depending upon how they are built.
# The dependencies listed here should be the dependencies required for the
# configuration built/tested in the premerge CI.
PROJECT_DEPENDENCIES = {
"llvm": set(),
"clang": {"llvm"},
"CIR": {"clang", "mlir"},
"bolt": {"clang", "lld", "llvm"},
"clang-tools-extra": {"clang", "llvm"},
"compiler-rt": {"clang", "lld"},
"libc": {"clang", "lld"},
"openmp": {"clang", "lld"},
"flang": {"llvm", "clang"},
"flang-rt": {"flang"},
"lldb": {"llvm", "clang"},
"libclc": {"llvm", "clang"},
"lld": {"llvm"},
"mlir": {"llvm"},
"polly": {"llvm"},
}
# This mapping describes the additional projects that should be tested when a
# specific project is touched. We enumerate them specifically rather than
# just invert the dependencies list to give more control over what exactly is
# tested.
DEPENDENTS_TO_TEST = {
"llvm": {
"bolt",
"clang",
"clang-tools-extra",
"lld",
"lldb",
"mlir",
"polly",
"flang",
},
"lld": {"bolt", "cross-project-tests"},
"clang": {"clang-tools-extra", "cross-project-tests", "lldb"},
"mlir": {"flang"},
# Test everything if ci scripts are changed.
".ci": {
"llvm",
"clang",
"CIR",
"lld",
"lldb",
"bolt",
"clang-tools-extra",
"mlir",
"polly",
"flang",
"openmp",
},
}
# This mapping describes runtimes that should be enabled for a specific project,
# but not necessarily run for testing. The only case of this currently is lldb
# which needs some runtimes enabled for tests.
DEPENDENT_RUNTIMES_TO_BUILD = {
"lldb": {"libcxx", "libcxxabi", "libunwind", "compiler-rt"}
}
# This mapping describes runtimes that should be tested when the key project is
# touched.
DEPENDENT_RUNTIMES_TO_TEST = {
"clang": {"compiler-rt"},
"clang-tools-extra": {"libc"},
"libc": {"libc"},
"libclc": {"libclc"},
"compiler-rt": {"compiler-rt"},
"flang": {"flang-rt"},
"flang-rt": {"flang-rt"},
".ci": {"compiler-rt", "libc", "flang-rt", "libclc"},
}
DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG = {
"llvm": {"libcxx", "libcxxabi", "libunwind"},
"clang": {"libcxx", "libcxxabi", "libunwind"},
".ci": {"libcxx", "libcxxabi", "libunwind"},
}
EXCLUDE_LINUX = {
"cross-project-tests", # TODO(issues/132796): Tests are failing.
"openmp", # https://github.com/google/llvm-premerge-checks/issues/410
}
EXCLUDE_WINDOWS = {
"cross-project-tests", # TODO(issues/132797): Tests are failing.
"openmp", # TODO(issues/132799): Does not detect perl installation.
"libc", # No Windows Support.
"lldb", # TODO(issues/132800): Needs environment setup.
"bolt", # No Windows Support.
"libcxx",
"libcxxabi",
"libunwind",
"flang-rt",
}
# These are projects that we should test if the project itself is changed but
# where testing is not yet stable enough or is too expensive for it to be
# enabled on changes to dependencies.
EXCLUDE_DEPENDENTS_WINDOWS = {
"flang",
}
EXCLUDE_MAC = {
"bolt",
"compiler-rt",
"cross-project-tests",
"flang",
"libc",
"lldb",
"openmp",
"polly",
"libcxx",
"libcxxabi",
"libunwind",
}
PROJECT_CHECK_TARGETS = {
"clang-tools-extra": "check-clang-tools",
"compiler-rt": "check-compiler-rt",
"cross-project-tests": "check-cross-project",
"libcxx": "check-cxx",
"libcxxabi": "check-cxxabi",
"libunwind": "check-unwind",
"lldb": "check-lldb",
"llvm": "check-llvm",
"clang": "check-clang",
"CIR": "check-clang-cir",
"bolt": "check-bolt",
"lld": "check-lld",
"flang": "check-flang",
"flang-rt": "check-flang-rt",
"libc": "check-libc",
"libclc": "check-libclc",
"lld": "check-lld",
"lldb": "check-lldb",
"mlir": "check-mlir",
"openmp": "check-openmp",
"polly": "check-polly",
"lit": "check-lit",
}
RUNTIMES = {
"libcxx",
"libcxxabi",
"libunwind",
"compiler-rt",
"libc",
"flang-rt",
"libclc",
}
# Meta projects are projects that need explicit handling but do not reside
# in their own top level folder. To add a meta project, the start of the path
# for the metaproject should be mapped to the name of the project below.
# Multiple paths can map to the same metaproject.
META_PROJECTS = {
("clang", "lib", "CIR"): "CIR",
("clang", "test", "CIR"): "CIR",
("clang", "include", "clang", "CIR"): "CIR",
("*", "docs"): "docs",
("llvm", "utils", "gn"): "gn",
(".github", "workflows", "premerge.yaml"): ".ci",
("third-party",): ".ci",
("llvm", "utils", "lit"): "lit",
}
# Projects that should run tests but cannot be explicitly built.
SKIP_BUILD_PROJECTS = ["CIR", "lit"]
# Projects that should not run any tests. These need to be metaprojects.
SKIP_PROJECTS = ["docs", "gn"]
def _add_dependencies(projects: Set[str], runtimes: Set[str]) -> Set[str]:
projects_with_dependents = set(projects)
current_projects_count = 0
while current_projects_count != len(projects_with_dependents):
current_projects_count = len(projects_with_dependents)
for project in list(projects_with_dependents):
if project in PROJECT_DEPENDENCIES:
projects_with_dependents.update(PROJECT_DEPENDENCIES[project])
for runtime in runtimes:
if runtime in PROJECT_DEPENDENCIES:
projects_with_dependents.update(PROJECT_DEPENDENCIES[runtime])
return projects_with_dependents
def _exclude_projects(current_projects: Set[str], platform: str) -> Set[str]:
if platform == "Linux":
to_exclude = EXCLUDE_LINUX
elif platform == "Windows":
to_exclude = EXCLUDE_WINDOWS
elif platform == "Darwin":
to_exclude = EXCLUDE_MAC
else:
raise ValueError(f"Unexpected platform: {platform}")
return current_projects.difference(to_exclude)
def _compute_projects_to_test(modified_projects: Set[str], platform: str) -> Set[str]:
projects_to_test = set()
for modified_project in modified_projects:
if modified_project in RUNTIMES:
continue
# Skip all projects where we cannot run tests.
if modified_project in PROJECT_CHECK_TARGETS:
projects_to_test.add(modified_project)
if modified_project not in DEPENDENTS_TO_TEST:
continue
for dependent_project in DEPENDENTS_TO_TEST[modified_project]:
if (
platform == "Windows"
and dependent_project in EXCLUDE_DEPENDENTS_WINDOWS
):
continue
projects_to_test.add(dependent_project)
projects_to_test = _exclude_projects(projects_to_test, platform)
return projects_to_test
def _compute_projects_to_build(
projects_to_test: Set[str], runtimes: Set[str]
) -> Set[str]:
return _add_dependencies(projects_to_test, runtimes)
def _compute_project_check_targets(projects_to_test: Set[str]) -> Set[str]:
check_targets = set()
for project_to_test in projects_to_test:
if project_to_test in PROJECT_CHECK_TARGETS:
check_targets.add(PROJECT_CHECK_TARGETS[project_to_test])
return check_targets
def _compute_runtimes_to_test(modified_projects: Set[str], platform: str) -> Set[str]:
runtimes_to_test = set()
for modified_project in modified_projects:
if modified_project in DEPENDENT_RUNTIMES_TO_TEST:
runtimes_to_test.update(DEPENDENT_RUNTIMES_TO_TEST[modified_project])
return _exclude_projects(runtimes_to_test, platform)
def _compute_runtimes_to_test_needs_reconfig(
modified_projects: Set[str], platform: str
) -> Set[str]:
runtimes_to_test = set()
for modified_project in modified_projects:
if modified_project in DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG:
runtimes_to_test.update(
DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG[modified_project]
)
return _exclude_projects(runtimes_to_test, platform)
def _compute_runtimes_to_build(
runtimes_to_test: Set[str], modified_projects: Set[str], platform: str
) -> Set[str]:
runtimes_to_build = set(runtimes_to_test)
for modified_project in modified_projects:
if modified_project in DEPENDENT_RUNTIMES_TO_BUILD:
runtimes_to_build.update(DEPENDENT_RUNTIMES_TO_BUILD[modified_project])
return _exclude_projects(runtimes_to_build, platform)
def _path_matches(matcher: tuple[str], file_path: tuple[str]) -> bool:
if len(file_path) < len(matcher):
return False
for match_part, file_part in zip(matcher, file_path):
if match_part == "*" or file_part == "*":
continue
if match_part != file_part:
return False
return True
def _get_modified_projects_for_file(modified_file: str) -> Set[str]:
modified_projects = set()
path_parts = pathlib.Path(modified_file).parts
for meta_project_files in META_PROJECTS.keys():
if _path_matches(meta_project_files, path_parts):
meta_project = META_PROJECTS[meta_project_files]
if meta_project in SKIP_PROJECTS:
return set()
modified_projects.add(meta_project)
modified_projects.add(pathlib.Path(modified_file).parts[0])
return modified_projects
def _get_modified_projects(modified_files: list[str]) -> Set[str]:
modified_projects = set()
for modified_file in modified_files:
modified_projects.update(_get_modified_projects_for_file(modified_file))
return modified_projects
def get_env_variables(modified_files: list[str], platform: str) -> Set[str]:
modified_projects = _get_modified_projects(modified_files)
projects_to_test = _compute_projects_to_test(modified_projects, platform)
runtimes_to_test = _compute_runtimes_to_test(modified_projects, platform)
runtimes_to_test_needs_reconfig = _compute_runtimes_to_test_needs_reconfig(
modified_projects, platform
)
runtimes_to_build = _compute_runtimes_to_build(
runtimes_to_test | runtimes_to_test_needs_reconfig, modified_projects, platform
)
projects_to_build = _compute_projects_to_build(projects_to_test, runtimes_to_build)
projects_check_targets = _compute_project_check_targets(projects_to_test)
runtimes_check_targets = _compute_project_check_targets(runtimes_to_test)
runtimes_check_targets_needs_reconfig = _compute_project_check_targets(
runtimes_to_test_needs_reconfig
)
# CIR is used as a pseudo-project in this script. It is built as part of the
# clang build, but it requires an explicit option to enable. We set that
# option here, and remove it from the projects_to_build list.
enable_cir = "ON" if "CIR" in projects_to_build else "OFF"
# Remove any metaprojects from the list of projects to build.
for project in SKIP_BUILD_PROJECTS:
projects_to_build.discard(project)
# We use a semicolon to separate the projects/runtimes as they get passed
# to the CMake invocation and thus we need to use the CMake list separator
# (;). We use spaces to separate the check targets as they end up getting
# passed to ninja.
return {
"projects_to_build": ";".join(sorted(projects_to_build)),
"project_check_targets": " ".join(sorted(projects_check_targets)),
"runtimes_to_build": ";".join(sorted(runtimes_to_build)),
"runtimes_check_targets": " ".join(sorted(runtimes_check_targets)),
"runtimes_check_targets_needs_reconfig": " ".join(
sorted(runtimes_check_targets_needs_reconfig)
),
"enable_cir": enable_cir,
}
if __name__ == "__main__":
current_platform = platform.system()
if len(sys.argv) == 2:
current_platform = sys.argv[1]
changed_files = [line.strip() for line in sys.stdin.readlines()]
env_variables = get_env_variables(changed_files, current_platform)
for env_variable in env_variables:
print(f"{env_variable}='{env_variables[env_variable]}'")

View File

@ -1,452 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Tests for compute_projects.py"""
import unittest
import compute_projects
class TestComputeProjects(unittest.TestCase):
def test_llvm(self):
env_variables = compute_projects.get_env_variables(
["llvm/CMakeLists.txt"], "Linux"
)
self.assertEqual(
env_variables["projects_to_build"],
"bolt;clang;clang-tools-extra;flang;lld;lldb;llvm;mlir;polly",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-bolt check-clang check-clang-tools check-flang check-lld check-lldb check-llvm check-mlir check-polly",
)
self.assertEqual(
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
)
self.assertEqual(
env_variables["runtimes_check_targets"],
"",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"check-cxx check-cxxabi check-unwind",
)
def test_llvm_windows(self):
env_variables = compute_projects.get_env_variables(
["llvm/CMakeLists.txt"], "Windows"
)
self.assertEqual(
env_variables["projects_to_build"],
"clang;clang-tools-extra;lld;llvm;mlir;polly",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-clang check-clang-tools check-lld check-llvm check-mlir check-polly",
)
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(
env_variables["runtimes_check_targets"],
"",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"",
)
def test_llvm_mac(self):
env_variables = compute_projects.get_env_variables(
["llvm/CMakeLists.txt"], "Darwin"
)
self.assertEqual(
env_variables["projects_to_build"],
"clang;clang-tools-extra;lld;llvm;mlir",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-clang check-clang-tools check-lld check-llvm check-mlir",
)
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(
env_variables["runtimes_check_targets"],
"",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"",
)
def test_clang(self):
env_variables = compute_projects.get_env_variables(
["clang/CMakeLists.txt"], "Linux"
)
self.assertEqual(
env_variables["projects_to_build"],
"clang;clang-tools-extra;lld;lldb;llvm",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-clang check-clang-tools check-lldb",
)
self.assertEqual(
env_variables["runtimes_to_build"], "compiler-rt;libcxx;libcxxabi;libunwind"
)
self.assertEqual(
env_variables["runtimes_check_targets"],
"check-compiler-rt",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"check-cxx check-cxxabi check-unwind",
)
self.assertEqual(
env_variables["enable_cir"],
"OFF",
)
def test_clang_windows(self):
env_variables = compute_projects.get_env_variables(
["clang/CMakeLists.txt"], "Windows"
)
self.assertEqual(
env_variables["projects_to_build"], "clang;clang-tools-extra;lld;llvm"
)
self.assertEqual(
env_variables["project_check_targets"], "check-clang check-clang-tools"
)
self.assertEqual(env_variables["runtimes_to_build"], "compiler-rt")
self.assertEqual(
env_variables["runtimes_check_targets"],
"check-compiler-rt",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"",
)
self.assertEqual(env_variables["enable_cir"], "OFF")
def test_compiler_rt(self):
env_variables = compute_projects.get_env_variables(
["compiler-rt/lib/asan/asan_allocator.cpp"], "Linux"
)
self.assertEqual(
env_variables["projects_to_build"],
"clang;lld",
)
self.assertEqual(
env_variables["project_check_targets"],
"",
)
self.assertEqual(env_variables["runtimes_to_build"], "compiler-rt")
self.assertEqual(
env_variables["runtimes_check_targets"],
"check-compiler-rt",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"",
)
self.assertEqual(
env_variables["enable_cir"],
"OFF",
)
def test_cir(self):
env_variables = compute_projects.get_env_variables(
["clang/lib/CIR/CMakeLists.txt"], "Linux"
)
self.assertEqual(
env_variables["projects_to_build"],
"clang;clang-tools-extra;lld;lldb;llvm;mlir",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-clang check-clang-cir check-clang-tools check-lldb",
)
self.assertEqual(
env_variables["runtimes_to_build"], "compiler-rt;libcxx;libcxxabi;libunwind"
)
self.assertEqual(
env_variables["runtimes_check_targets"],
"check-compiler-rt",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"check-cxx check-cxxabi check-unwind",
)
self.assertEqual(env_variables["enable_cir"], "ON")
def test_bolt(self):
env_variables = compute_projects.get_env_variables(
["bolt/CMakeLists.txt"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "bolt;clang;lld;llvm")
self.assertEqual(env_variables["project_check_targets"], "check-bolt")
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_lldb(self):
env_variables = compute_projects.get_env_variables(
["lldb/CMakeLists.txt"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "clang;lldb;llvm")
self.assertEqual(env_variables["project_check_targets"], "check-lldb")
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_mlir(self):
env_variables = compute_projects.get_env_variables(
["mlir/CMakeLists.txt"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "clang;flang;llvm;mlir")
self.assertEqual(
env_variables["project_check_targets"], "check-flang check-mlir"
)
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
self.assertEqual(env_variables["enable_cir"], "OFF")
def test_flang(self):
env_variables = compute_projects.get_env_variables(
["flang/CMakeLists.txt"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "clang;flang;llvm")
self.assertEqual(env_variables["project_check_targets"], "check-flang")
self.assertEqual(env_variables["runtimes_to_build"], "flang-rt")
self.assertEqual(env_variables["runtimes_check_targets"], "check-flang-rt")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
self.assertEqual(env_variables["enable_cir"], "OFF")
def test_invalid_subproject(self):
env_variables = compute_projects.get_env_variables(
["llvm-libgcc/CMakeLists.txt"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "")
self.assertEqual(env_variables["project_check_targets"], "")
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_top_level_file(self):
env_variables = compute_projects.get_env_variables(["README.md"], "Linux")
self.assertEqual(env_variables["projects_to_build"], "")
self.assertEqual(env_variables["project_check_targets"], "")
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_exclude_libcxx_in_projects(self):
env_variables = compute_projects.get_env_variables(
["libcxx/CMakeLists.txt"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "")
self.assertEqual(env_variables["project_check_targets"], "")
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_include_libc_in_runtimes(self):
env_variables = compute_projects.get_env_variables(
["libc/CMakeLists.txt"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "clang;lld")
self.assertEqual(env_variables["project_check_targets"], "")
self.assertEqual(env_variables["runtimes_to_build"], "libc")
self.assertEqual(env_variables["runtimes_check_targets"], "check-libc")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_include_libclc_in_runtimes(self):
env_variables = compute_projects.get_env_variables(
["libclc/CMakeLists.txt"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "clang;llvm")
self.assertEqual(env_variables["project_check_targets"], "")
self.assertEqual(env_variables["runtimes_to_build"], "libclc")
self.assertEqual(env_variables["runtimes_check_targets"], "check-libclc")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_exclude_docs(self):
env_variables = compute_projects.get_env_variables(
["llvm/docs/CIBestPractices.rst"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "")
self.assertEqual(env_variables["project_check_targets"], "")
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_exclude_gn(self):
env_variables = compute_projects.get_env_variables(
["llvm/utils/gn/build/BUILD.gn"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "")
self.assertEqual(env_variables["project_check_targets"], "")
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_ci(self):
env_variables = compute_projects.get_env_variables(
[".ci/compute_projects.py"], "Linux"
)
self.assertEqual(
env_variables["projects_to_build"],
"bolt;clang;clang-tools-extra;flang;lld;lldb;llvm;mlir;polly",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-bolt check-clang check-clang-cir check-clang-tools check-flang check-lld check-lldb check-llvm check-mlir check-polly",
)
self.assertEqual(
env_variables["runtimes_to_build"],
"compiler-rt;flang-rt;libc;libclc;libcxx;libcxxabi;libunwind",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
"check-compiler-rt check-flang-rt check-libc check-libclc",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"check-cxx check-cxxabi check-unwind",
)
def test_windows_ci(self):
env_variables = compute_projects.get_env_variables(
[".ci/compute_projects.py"], "Windows"
)
self.assertEqual(
env_variables["projects_to_build"],
"clang;clang-tools-extra;lld;llvm;mlir;polly",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-clang check-clang-cir check-clang-tools check-lld check-llvm check-mlir check-polly",
)
self.assertEqual(
env_variables["runtimes_to_build"],
"compiler-rt;libclc",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
"check-compiler-rt check-libclc",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"",
)
def test_lldb(self):
env_variables = compute_projects.get_env_variables(
["lldb/CMakeLists.txt"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "clang;lld;lldb;llvm")
self.assertEqual(env_variables["project_check_targets"], "check-lldb")
self.assertEqual(
env_variables["runtimes_to_build"], "compiler-rt;libcxx;libcxxabi;libunwind"
)
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_clang_tools_extra(self):
env_variables = compute_projects.get_env_variables(
["clang-tools-extra/CMakeLists.txt"], "Linux"
)
self.assertEqual(
env_variables["projects_to_build"], "clang;clang-tools-extra;lld;llvm"
)
self.assertEqual(env_variables["project_check_targets"], "check-clang-tools")
self.assertEqual(env_variables["runtimes_to_build"], "libc")
self.assertEqual(env_variables["runtimes_check_targets"], "check-libc")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_premerge_workflow(self):
env_variables = compute_projects.get_env_variables(
[".github/workflows/premerge.yaml"], "Linux"
)
self.assertEqual(
env_variables["projects_to_build"],
"bolt;clang;clang-tools-extra;flang;lld;lldb;llvm;mlir;polly",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-bolt check-clang check-clang-cir check-clang-tools check-flang check-lld check-lldb check-llvm check-mlir check-polly",
)
self.assertEqual(
env_variables["runtimes_to_build"],
"compiler-rt;flang-rt;libc;libclc;libcxx;libcxxabi;libunwind",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
"check-compiler-rt check-flang-rt check-libc check-libclc",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"check-cxx check-cxxabi check-unwind",
)
def test_other_github_workflow(self):
env_variables = compute_projects.get_env_variables(
[".github/workflows/docs.yml"], "Linux"
)
self.assertEqual(env_variables["projects_to_build"], "")
self.assertEqual(env_variables["project_check_targets"], "")
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
def test_third_party_benchmark(self):
env_variables = compute_projects.get_env_variables(
["third-party/benchmark/CMakeLists.txt"], "Linux"
)
self.assertEqual(
env_variables["projects_to_build"],
"bolt;clang;clang-tools-extra;flang;lld;lldb;llvm;mlir;polly",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-bolt check-clang check-clang-cir check-clang-tools check-flang check-lld check-lldb check-llvm check-mlir check-polly",
)
self.assertEqual(
env_variables["runtimes_to_build"],
"compiler-rt;flang-rt;libc;libclc;libcxx;libcxxabi;libunwind",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
"check-compiler-rt check-flang-rt check-libc check-libclc",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"check-cxx check-cxxabi check-unwind",
)
def test_lit(self):
env_variables = compute_projects.get_env_variables(
["llvm/utils/lit/CMakeLists.txt"], "Linux"
)
self.assertEqual(
env_variables["projects_to_build"],
"bolt;clang;clang-tools-extra;flang;lld;lldb;llvm;mlir;polly",
)
self.assertEqual(
env_variables["project_check_targets"],
"check-bolt check-clang check-clang-tools check-flang check-lit check-lld check-lldb check-llvm check-mlir check-polly",
)
self.assertEqual(
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
)
self.assertEqual(
env_variables["runtimes_check_targets"],
"",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
"check-cxx check-cxxabi check-unwind",
)
if __name__ == "__main__":
unittest.main()

View File

@ -1,25 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Script to generate a build report for Github."""
import argparse
import generate_test_report_lib
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("return_code", help="The build's return code.", type=int)
parser.add_argument(
"build_test_logs", help="Paths to JUnit report files and ninja logs.", nargs="*"
)
args = parser.parse_args()
report, explained = generate_test_report_lib.generate_report_from_files(
generate_test_report_lib.compute_platform_title(),
args.return_code,
args.build_test_logs,
)
print(report)

View File

@ -1,360 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Library to parse JUnit XML files and return a markdown report."""
from typing import TypedDict
import platform
from junitparser import JUnitXml, Failure
# This data structure should match the definition in llvm-zorg in
# premerge/advisor/advisor_lib.py
class FailureExplanation(TypedDict):
name: str
explained: bool
reason: str | None
SEE_BUILD_FILE_STR = "Download the build's log file to see the details."
UNRELATED_FAILURES_STR = (
"If these failures are unrelated to your changes (for example "
"tests are broken or flaky at HEAD), please open an issue at "
"https://github.com/llvm/llvm-project/issues and add the "
"`infrastructure` label."
)
# The maximum number of lines to pull from a ninja failure.
NINJA_LOG_SIZE_THRESHOLD = 500
def _parse_ninja_log(ninja_log: list[str]) -> list[tuple[str, str]]:
"""Parses an individual ninja log."""
failures = []
index = 0
while index < len(ninja_log):
while index < len(ninja_log) and not ninja_log[index].startswith("FAILED:"):
index += 1
if index == len(ninja_log):
# We hit the end of the log without finding a build failure, go to
# the next log.
return failures
# If we are doing a build with LLVM_ENABLE_RUNTIMES, we can have nested
# ninja invocations. The sub-ninja will print that a subcommand failed,
# and then the outer ninja will list the command that failed. We should
# ignore the outer failure.
if ninja_log[index - 1].startswith("ninja: build stopped:"):
index += 1
continue
# We are trying to parse cases like the following:
#
# [4/5] test/4.stamp
# FAILED: touch test/4.stamp
# touch test/4.stamp
#
# index will point to the line that starts with Failed:. The progress
# indicator is sometimes the line before this ([4/5] test/4.stamp) and
# will contain a pretty printed version of the target being built
# (test/4.stamp) when accurate. We instead parse the failed line rather
# than the progress indicator as the progress indicator may not be
# aligned with the failure.
failing_action = ninja_log[index].split("FAILED: ")[1]
failure_log = []
# Parse the lines above the FAILED: string if the line does not come
# immediately after a progress indicator to ensure that we capture the
# entire failure message.
if not ninja_log[index - 1].startswith("["):
before_index = index - 1
while before_index > 0 and not ninja_log[before_index].startswith("["):
failure_log.append(ninja_log[before_index])
before_index = before_index - 1
failure_log.reverse()
# Parse the failure information, which comes after the FAILED: tag.
while (
index < len(ninja_log)
and not ninja_log[index].startswith("[")
and not ninja_log[index].startswith("ninja: build stopped:")
and len(failure_log) < NINJA_LOG_SIZE_THRESHOLD
):
failure_log.append(ninja_log[index])
index += 1
failures.append((failing_action, "\n".join(failure_log)))
return failures
def find_failure_in_ninja_logs(ninja_logs: list[list[str]]) -> list[tuple[str, str]]:
"""Extracts failure messages from ninja output.
This function takes stdout/stderr from ninja in the form of a list of files
represented as a list of lines. This function then returns tuples containing
the name of the target and the error message.
Args:
ninja_logs: A list of files in the form of a list of lines representing the log
files captured from ninja.
Returns:
A list of tuples. The first string is the name of the target that failed. The
second string is the error message.
"""
failures = []
for ninja_log in ninja_logs:
log_failures = _parse_ninja_log(ninja_log)
failures.extend(log_failures)
return failures
def _format_failures(
failures: list[tuple[str, str]], failure_explanations: dict[str, FailureExplanation]
) -> list[str]:
"""Formats failures into summary views for the report."""
output = []
for build_failure in failures:
failed_action, failure_message = build_failure
failure_explanation = None
if failed_action in failure_explanations:
failure_explanation = failure_explanations[failed_action]
output.append("<details>")
if failure_explanation:
output.extend(
[
f"<summary>{failed_action} (Likely Already Failing)</summary>" "",
failure_explanation["reason"],
"",
]
)
else:
output.extend([f"<summary>{failed_action}</summary>", ""])
output.extend(
[
"```",
failure_message,
"```",
"</details>",
]
)
return output
def get_failures(junit_objects) -> dict[str, list[tuple[str, str]]]:
failures = {}
for results in junit_objects:
for testsuite in results:
for test in testsuite:
if (
not test.is_passed
and test.result
and isinstance(test.result[0], Failure)
):
if failures.get(testsuite.name) is None:
failures[testsuite.name] = []
failures[testsuite.name].append(
(test.classname + "/" + test.name, test.result[0].text)
)
return failures
def are_all_failures_explained(
failures: list[tuple[str, str]], failure_explanations: dict[str, FailureExplanation]
) -> bool:
for failed_action, _ in failures:
if failed_action not in failure_explanations:
return False
else:
assert failure_explanations[failed_action]["explained"]
return True
# Set size_limit to limit the byte size of the report. The default is 1MB as this
# is the most that can be put into an annotation. If the generated report exceeds
# this limit and failures are listed, it will be generated again without failures
# listed. This minimal report will always fit into an annotation.
# If include failures is False, total number of test will be reported but their names
# and output will not be.
def generate_report(
title,
return_code,
junit_objects,
ninja_logs: list[list[str]],
size_limit=1024 * 1024,
list_failures=True,
failure_explanations_list: list[FailureExplanation] = [],
) -> tuple[str, bool]:
failures = get_failures(junit_objects)
tests_run = 0
tests_skipped = 0
tests_failed = 0
failure_explanations: dict[str, FailureExplanation] = {}
for failure_explanation in failure_explanations_list:
if not failure_explanation["explained"]:
continue
failure_explanations[failure_explanation["name"]] = failure_explanation
all_failures_explained = True
if failures:
for _, failures_list in failures.items():
all_failures_explained &= are_all_failures_explained(
failures_list, failure_explanations
)
for results in junit_objects:
for testsuite in results:
tests_run += testsuite.tests
tests_skipped += testsuite.skipped
tests_failed += testsuite.failures
report = [f"# {title}", ""]
if tests_run == 0:
if return_code == 0:
report.extend(
[
":white_check_mark: The build succeeded and no tests ran. "
"This is expected in some build configurations."
]
)
else:
ninja_failures = find_failure_in_ninja_logs(ninja_logs)
all_failures_explained &= are_all_failures_explained(
ninja_failures, failure_explanations
)
if not ninja_failures:
all_failures_explained = False
report.extend(
[
"The build failed before running any tests. Detailed "
"information about the build failure could not be "
"automatically obtained.",
"",
SEE_BUILD_FILE_STR,
"",
UNRELATED_FAILURES_STR,
]
)
else:
report.extend(
[
"The build failed before running any tests. Click on a "
"failure below to see the details.",
"",
]
)
report.extend(_format_failures(ninja_failures, failure_explanations))
report.extend(
[
"",
UNRELATED_FAILURES_STR,
]
)
return ("\n".join(report), all_failures_explained)
tests_passed = tests_run - tests_skipped - tests_failed
def plural(num_tests):
return "test" if num_tests == 1 else "tests"
if tests_passed:
report.append(f"* {tests_passed} {plural(tests_passed)} passed")
if tests_skipped:
report.append(f"* {tests_skipped} {plural(tests_skipped)} skipped")
if tests_failed:
report.append(f"* {tests_failed} {plural(tests_failed)} failed")
if not list_failures:
report.extend(
[
"",
"Failed tests and their output was too large to report. "
+ SEE_BUILD_FILE_STR,
]
)
elif failures:
report.extend(
["", "## Failed Tests", "(click on a test name to see its output)"]
)
for testsuite_name, failures in failures.items():
report.extend(["", f"### {testsuite_name}"])
report.extend(_format_failures(failures, failure_explanations))
elif return_code != 0:
# No tests failed but the build was in a failed state. Bring this to the user's
# attention.
ninja_failures = find_failure_in_ninja_logs(ninja_logs)
if not ninja_failures:
all_failures_explained = False
report.extend(
[
"",
"All executed tests passed, but another part of the build **failed**. "
"Information about the build failure could not be automatically "
"obtained.",
"",
SEE_BUILD_FILE_STR,
]
)
else:
all_failures_explained &= are_all_failures_explained(
ninja_failures, failure_explanations
)
report.extend(
[
"",
"All executed tests passed, but another part of the build **failed**. Click on "
"a failure below to see the details.",
"",
]
)
report.extend(_format_failures(ninja_failures, failure_explanations))
else:
report.extend(
["", ":white_check_mark: The build succeeded and all tests passed."]
)
if failures or return_code != 0:
report.extend(["", UNRELATED_FAILURES_STR])
report = "\n".join(report)
if len(report.encode("utf-8")) > size_limit:
return generate_report(
title,
return_code,
junit_objects,
ninja_logs,
size_limit,
list_failures=False,
)
return (report, all_failures_explained)
def load_info_from_files(build_log_files):
junit_files = [
junit_file for junit_file in build_log_files if junit_file.endswith(".xml")
]
ninja_log_files = [
ninja_log for ninja_log in build_log_files if ninja_log.endswith(".log")
]
ninja_logs = []
for ninja_log_file in ninja_log_files:
with open(ninja_log_file, "r") as ninja_log_file_handle:
ninja_logs.append(
[log_line.strip() for log_line in ninja_log_file_handle.readlines()]
)
return [JUnitXml.fromfile(p) for p in junit_files], ninja_logs
def generate_report_from_files(title, return_code, build_log_files):
junit_objects, ninja_logs = load_info_from_files(build_log_files)
return generate_report(title, return_code, junit_objects, ninja_logs)
def compute_platform_title() -> str:
logo = ":window:" if platform.system() == "Windows" else ":penguin:"
# On Linux the machine value is x86_64 on Windows it is AMD64.
if platform.machine() == "x86_64" or platform.machine() == "AMD64":
arch = "x64"
else:
arch = platform.machine()
return f"{logo} {platform.system()} {arch} Test Results"

View File

@ -1,993 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# To run these tests:
# python -m unittest generate_test_report_lib_test.py
import unittest
from io import StringIO
from textwrap import dedent
import tempfile
import os
from junitparser import JUnitXml
import generate_test_report_lib
def junit_from_xml(xml):
return JUnitXml.fromfile(StringIO(xml))
class TestReports(unittest.TestCase):
def test_find_failure_ninja_logs(self):
failures = generate_test_report_lib.find_failure_in_ninja_logs(
[
[
"[1/5] test/1.stamp",
"[2/5] test/2.stamp",
"[3/5] test/3.stamp",
"[4/5] test/4.stamp",
"FAILED: touch test/4.stamp",
"Wow! This system is really broken!",
"[5/5] test/5.stamp",
],
]
)
self.assertEqual(len(failures), 1)
self.assertEqual(
failures[0],
(
"touch test/4.stamp",
dedent(
"""\
FAILED: touch test/4.stamp
Wow! This system is really broken!"""
),
),
)
def test_no_failure_ninja_log(self):
failures = generate_test_report_lib.find_failure_in_ninja_logs(
[
[
"[1/3] test/1.stamp",
"[2/3] test/2.stamp",
"[3/3] test/3.stamp",
]
]
)
self.assertEqual(failures, [])
def test_ninja_log_end(self):
failures = generate_test_report_lib.find_failure_in_ninja_logs(
[
[
"[1/3] test/1.stamp",
"[2/3] test/2.stamp",
"[3/3] test/3.stamp",
"FAILED: touch test/3.stamp",
"Wow! This system is really broken!",
"ninja: build stopped: subcommand failed.",
]
]
)
self.assertEqual(len(failures), 1)
self.assertEqual(
failures[0],
(
"touch test/3.stamp",
dedent(
"""\
FAILED: touch test/3.stamp
Wow! This system is really broken!"""
),
),
)
def test_ninja_log_multiple_failures(self):
failures = generate_test_report_lib.find_failure_in_ninja_logs(
[
[
"[1/5] test/1.stamp",
"[2/5] test/2.stamp",
"FAILED: touch test/2.stamp",
"Wow! This system is really broken!",
"[3/5] test/3.stamp",
"[4/5] test/4.stamp",
"FAILED: touch test/4.stamp",
"Wow! This system is maybe broken!",
"[5/5] test/5.stamp",
]
]
)
self.assertEqual(len(failures), 2)
self.assertEqual(
failures[0],
(
"touch test/2.stamp",
dedent(
"""\
FAILED: touch test/2.stamp
Wow! This system is really broken!"""
),
),
)
self.assertEqual(
failures[1],
(
"touch test/4.stamp",
dedent(
"""\
FAILED: touch test/4.stamp
Wow! This system is maybe broken!"""
),
),
)
# Test that we can correctly handle the runtimes build. the LLVM runtimes
# build will involve ninja invoking more ninja processes within the
# runtimes directory. This means that we see two failures for a failure in
# the runtimes build: one from the inner ninja containing the actual action
# that failed, and one for the sub ninja invocation that failed.
def test_ninja_log_runtimes_failure(self):
failures = generate_test_report_lib.find_failure_in_ninja_logs(
[
[
"[1/5] test/1.stamp",
"[2/5] test/2.stamp",
"FAILED: touch test/2.stamp",
"Wow! This system is really broken!",
"ninja: build stopped: subcommand failed.",
"FAILED: running check-runtime failed.",
"<some random command>",
"ninja: build stopped: subcommand failed.",
]
]
)
self.assertEqual(len(failures), 1)
self.assertEqual(
failures[0],
(
"touch test/2.stamp",
dedent(
"""\
FAILED: touch test/2.stamp
Wow! This system is really broken!"""
),
),
)
# Test that we correctly handle cases where the FAILED: line does not
# match up with the progress indicator.
def test_ninja_log_mismatched_failed(self):
failures = generate_test_report_lib.find_failure_in_ninja_logs(
[
[
"[1/5] test/1.stamp",
"[2/5] test/2.stamp",
"ModuleNotFoundError: No module named 'mount_langley'",
"FAILED: tools/check-langley",
"Wow! This system is really broken!",
"[5/5] test/5.stamp",
]
]
)
self.assertEqual(len(failures), 1)
self.assertEqual(
failures[0],
(
"tools/check-langley",
dedent(
"""\
ModuleNotFoundError: No module named 'mount_langley'
FAILED: tools/check-langley
Wow! This system is really broken!"""
),
),
)
def test_title_only(self):
self.assertEqual(
generate_test_report_lib.generate_report("Foo", 0, [], []),
(
dedent(
"""\
# Foo
:white_check_mark: The build succeeded and no tests ran. This is expected in some build configurations."""
),
True,
),
)
def test_title_only_failure(self):
self.assertEqual(
generate_test_report_lib.generate_report("Foo", 1, [], []),
(
dedent(
"""\
# Foo
The build failed before running any tests. Detailed information about the build failure could not be automatically obtained.
Download the build's log file to see the details.
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_title_only_failure_ninja_log(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[],
[
[
"[1/5] test/1.stamp",
"[2/5] test/2.stamp",
"[3/5] test/3.stamp",
"[4/5] test/4.stamp",
"FAILED: test/4.stamp",
"touch test/4.stamp",
"Wow! Risk!",
"[5/5] test/5.stamp",
]
],
),
(
dedent(
"""\
# Foo
The build failed before running any tests. Click on a failure below to see the details.
<details>
<summary>test/4.stamp</summary>
```
FAILED: test/4.stamp
touch test/4.stamp
Wow! Risk!
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_no_tests_in_testsuite(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.00">
<testsuite name="Empty" tests="0" failures="0" skipped="0" time="0.00">
</testsuite>
</testsuites>"""
)
)
],
[],
),
(
dedent(
"""\
# Foo
The build failed before running any tests. Detailed information about the build failure could not be automatically obtained.
Download the build's log file to see the details.
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_no_failures(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
0,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.00">
<testsuite name="Passed" tests="1" failures="0" skipped="0" time="0.00">
<testcase classname="Bar/test_1" name="test_1" time="0.00"/>
</testsuite>
</testsuites>"""
)
)
],
[],
),
(
dedent(
"""\
# Foo
* 1 test passed
:white_check_mark: The build succeeded and all tests passed."""
),
True,
),
)
def test_no_failures_build_failed(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.00">
<testsuite name="Passed" tests="1" failures="0" skipped="0" time="0.00">
<testcase classname="Bar/test_1" name="test_1" time="0.00"/>
</testsuite>
</testsuites>"""
)
)
],
[],
),
(
dedent(
"""\
# Foo
* 1 test passed
All executed tests passed, but another part of the build **failed**. Information about the build failure could not be automatically obtained.
Download the build's log file to see the details.
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_no_failures_build_failed_ninja_log(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.00">
<testsuite name="Passed" tests="1" failures="0" skipped="0" time="0.00">
<testcase classname="Bar/test_1" name="test_1" time="0.00"/>
</testsuite>
</testsuites>"""
)
)
],
[
[
"[1/5] test/1.stamp",
"[2/5] test/2.stamp",
"[3/5] test/3.stamp",
"[4/5] test/4.stamp",
"FAILED: test/4.stamp",
"touch test/4.stamp",
"Wow! Close To You!",
"[5/5] test/5.stamp",
]
],
),
(
dedent(
"""\
# Foo
* 1 test passed
All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.
<details>
<summary>test/4.stamp</summary>
```
FAILED: test/4.stamp
touch test/4.stamp
Wow! Close To You!
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_no_failures_multiple_build_failed_ninja_log(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.00">
<testsuite name="Passed" tests="1" failures="0" skipped="0" time="0.00">
<testcase classname="Bar/test_1" name="test_1" time="0.00"/>
</testsuite>
</testsuites>"""
)
)
],
[
[
"[1/5] test/1.stamp",
"[2/5] test/2.stamp",
"FAILED: touch test/2.stamp",
"Wow! Be Kind!",
"[3/5] test/3.stamp",
"[4/5] test/4.stamp",
"FAILED: touch test/4.stamp",
"Wow! I Dare You!",
"[5/5] test/5.stamp",
]
],
),
(
dedent(
"""\
# Foo
* 1 test passed
All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.
<details>
<summary>touch test/2.stamp</summary>
```
FAILED: touch test/2.stamp
Wow! Be Kind!
```
</details>
<details>
<summary>touch test/4.stamp</summary>
```
FAILED: touch test/4.stamp
Wow! I Dare You!
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_report_single_file_single_testsuite(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="8.89">
<testsuite name="Bar" tests="4" failures="2" skipped="1" time="410.63">
<testcase classname="Bar/test_1" name="test_1" time="0.02"/>
<testcase classname="Bar/test_2" name="test_2" time="0.02">
<skipped message="Reason"/>
</testcase>
<testcase classname="Bar/test_3" name="test_3" time="0.02">
<failure><![CDATA[Output goes here]]></failure>
</testcase>
<testcase classname="Bar/test_4" name="test_4" time="0.02">
<failure><![CDATA[Other output goes here]]></failure>
</testcase>
</testsuite>
</testsuites>"""
)
)
],
[],
),
(
dedent(
"""\
# Foo
* 1 test passed
* 1 test skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Bar
<details>
<summary>Bar/test_3/test_3</summary>
```
Output goes here
```
</details>
<details>
<summary>Bar/test_4/test_4</summary>
```
Other output goes here
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
MULTI_SUITE_OUTPUT = dedent(
"""\
# ABC and DEF
* 1 test passed
* 1 test skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### ABC
<details>
<summary>ABC/test_2/test_2</summary>
```
ABC/test_2 output goes here
```
</details>
### DEF
<details>
<summary>DEF/test_2/test_2</summary>
```
DEF/test_2 output goes here
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
)
def test_report_single_file_multiple_testsuites(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"ABC and DEF",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="8.89">
<testsuite name="ABC" tests="2" failures="1" skipped="0" time="410.63">
<testcase classname="ABC/test_1" name="test_1" time="0.02"/>
<testcase classname="ABC/test_2" name="test_2" time="0.02">
<failure><![CDATA[ABC/test_2 output goes here]]></failure>
</testcase>
</testsuite>
<testsuite name="DEF" tests="2" failures="1" skipped="1" time="410.63">
<testcase classname="DEF/test_1" name="test_1" time="0.02">
<skipped message="reason"/>
</testcase>
<testcase classname="DEF/test_2" name="test_2" time="0.02">
<failure><![CDATA[DEF/test_2 output goes here]]></failure>
</testcase>
</testsuite>
</testsuites>"""
)
)
],
[],
),
(self.MULTI_SUITE_OUTPUT, False),
)
def test_report_multiple_files_multiple_testsuites(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"ABC and DEF",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="8.89">
<testsuite name="ABC" tests="2" failures="1" skipped="0" time="410.63">
<testcase classname="ABC/test_1" name="test_1" time="0.02"/>
<testcase classname="ABC/test_2" name="test_2" time="0.02">
<failure><![CDATA[ABC/test_2 output goes here]]></failure>
</testcase>
</testsuite>
</testsuites>"""
)
),
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="8.89">
<testsuite name="DEF" tests="2" failures="1" skipped="1" time="410.63">
<testcase classname="DEF/test_1" name="test_1" time="0.02">
<skipped message="reason"/>
</testcase>
<testcase classname="DEF/test_2" name="test_2" time="0.02">
<failure><![CDATA[DEF/test_2 output goes here]]></failure>
</testcase>
</testsuite>
</testsuites>"""
)
),
],
[],
),
(self.MULTI_SUITE_OUTPUT, False),
)
def test_report_dont_list_failures(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.02">
<testsuite name="Bar" tests="1" failures="1" skipped="0" time="0.02">
<testcase classname="Bar/test_1" name="test_1" time="0.02">
<failure><![CDATA[Output goes here]]></failure>
</testcase>
</testsuite>
</testsuites>"""
)
)
],
[],
list_failures=False,
),
(
dedent(
"""\
# Foo
* 1 test failed
Failed tests and their output was too large to report. Download the build's log file to see the details.
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_report_dont_list_failures_link_to_log(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.02">
<testsuite name="Bar" tests="1" failures="1" skipped="0" time="0.02">
<testcase classname="Bar/test_1" name="test_1" time="0.02">
<failure><![CDATA[Output goes here]]></failure>
</testcase>
</testsuite>
</testsuites>"""
)
)
],
[],
list_failures=False,
),
(
dedent(
"""\
# Foo
* 1 test failed
Failed tests and their output was too large to report. Download the build's log file to see the details.
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_report_size_limit(self):
test_output = "f" * 1000
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.02">
<testsuite name="Bar" tests="1" failures="1" skipped="0" time="0.02">
<testcase classname="Bar/test_1" name="test_1" time="0.02">
<failure><![CDATA[{output}]]></failure>
</testcase>
</testsuite>
</testsuites>""".format(
output=test_output
)
)
)
],
[],
size_limit=512,
),
(
dedent(
"""\
# Foo
* 1 test failed
Failed tests and their output was too large to report. Download the build's log file to see the details.
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_report_ninja_explanation(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[],
[
[
"[1/5] test/1.stamp",
"[2/5] test/2.stamp",
"[3/5] test/3.stamp",
"[4/5] test/4.stamp",
"FAILED: test/4.stamp",
"touch test/4.stamp",
"Half Moon Bay.",
"[5/5] test/5.stamp",
]
],
failure_explanations_list=[
{
"name": "test/4.stamp",
"explained": True,
"reason": "Failing at head",
}
],
),
(
dedent(
"""\
# Foo
The build failed before running any tests. Click on a failure below to see the details.
<details>
<summary>test/4.stamp (Likely Already Failing)</summary>
Failing at head
```
FAILED: test/4.stamp
touch test/4.stamp
Half Moon Bay.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
True,
),
)
def test_report_test_failure_explanation(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="8.89">
<testsuite name="Bar" tests="1" failures="1" skipped="0" time="410.63">
<testcase classname="Bar/test_3" name="test_3" time="0.02">
<failure><![CDATA[Error! Expected Big Sur to be next to the ocean.]]></failure>
</testcase>
</testsuite>
</testsuites>"""
)
)
],
[],
failure_explanations_list=[
{
"name": "Bar/test_3/test_3",
"explained": True,
"reason": "Big Sur is next to the Pacific.",
}
],
),
(
dedent(
"""\
# Foo
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Bar
<details>
<summary>Bar/test_3/test_3 (Likely Already Failing)</summary>
Big Sur is next to the Pacific.
```
Error! Expected Big Sur to be next to the ocean.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
True,
),
)
def test_report_test_failure_have_explanation_explained_false(self):
self.assertEqual(
generate_test_report_lib.generate_report(
"Foo",
1,
[
junit_from_xml(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="8.89">
<testsuite name="Bar" tests="1" failures="1" skipped="0" time="410.63">
<testcase classname="Bar/test_3" name="test_3" time="0.02">
<failure><![CDATA[Error! Expected Mt. Shasta to be next in the Eastern Sierras.]]></failure>
</testcase>
</testsuite>
</testsuites>"""
)
)
],
[],
failure_explanations_list=[
{
"name": "Bar/test_3/test_3",
"explained": False,
"reason": "Mt. Shasta is in the Cascades",
}
],
),
(
dedent(
"""\
# Foo
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Bar
<details>
<summary>Bar/test_3/test_3</summary>
```
Error! Expected Mt. Shasta to be next in the Eastern Sierras.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)
def test_generate_report_end_to_end(self):
with tempfile.TemporaryDirectory() as temp_dir:
junit_xml_file = os.path.join(temp_dir, "junit.xml")
with open(junit_xml_file, "w") as junit_xml_handle:
junit_xml_handle.write(
dedent(
"""\
<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.00">
<testsuite name="Passed" tests="1" failures="0" skipped="0" time="0.00">
<testcase classname="Bar/test_1" name="test_1" time="0.00"/>
</testsuite>
</testsuites>"""
)
)
ninja_log_file = os.path.join(temp_dir, "ninja.log")
with open(ninja_log_file, "w") as ninja_log_handle:
ninja_log_handle.write(
dedent(
"""\
[1/5] test/1.stamp
[2/5] test/2.stamp
[3/5] test/3.stamp
[4/5] test/4.stamp
FAILED: test/4.stamp
touch test/4.stamp
Wow! That's so True!
[5/5] test/5.stamp"""
)
)
self.assertEqual(
generate_test_report_lib.generate_report_from_files(
"Foo", 1, [junit_xml_file, ninja_log_file]
),
(
dedent(
"""\
# Foo
* 1 test passed
All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.
<details>
<summary>test/4.stamp</summary>
```
FAILED: test/4.stamp
touch test/4.stamp
Wow! That's so True!
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
),
False,
),
)

View File

@ -1,191 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git"
])
pipeline {
options {
skipDefaultCheckout()
}
agent {
node {
label 'macos-trigger'
}
}
parameters {
string(name: 'GOOD_COMMIT', description: 'Known good commit SHA', defaultValue: '')
string(name: 'BAD_COMMIT', description: 'Known bad commit SHA', defaultValue: '')
choice(
name: 'TEST_JOB_NAME',
choices: [
'clang-stage1-RA',
'clang-stage1-RA-cmake-incremental',
'clang-stage1-RA-expensive',
'clang-stage1-RA-as',
'clang-san-iossim',
'clang-stage2-cmake-RgSan',
'clang-stage2-cmake-RgTSan',
'clang-stage2-Rthinlto',
],
description: 'Job to execute for testing each commit'
)
choice(
name: 'REPOSITORY',
choices: ['llvm-project'],
description: 'Repository to bisect'
)
booleanParam(name: 'RUN_TESTS', defaultValue: true, description: 'Run tests as part of bisection. Set to False if bisecting a build failure.')
string(name: 'SESSION_ID', description: 'Session ID to continue (optional)', defaultValue: '')
booleanParam(name: 'DRY_RUN', defaultValue: false, description: 'Dry run mode')
string(name: 'REQUESTOR', description: 'Email address of the requestor', defaultValue: '')
}
stages {
stage('Validate Parameters') {
steps {
script {
if (!params.GOOD_COMMIT || !params.BAD_COMMIT) {
error("Both GOOD_COMMIT and BAD_COMMIT parameters are required")
}
if (!params.TEST_JOB_NAME) {
error("TEST_JOB_NAME parameter is required")
}
}
}
}
stage('Setup Repository') {
steps {
script {
echo "📁 Setting up repository: ${params.REPOSITORY}..."
dir(params.REPOSITORY) {
// Clone or checkout the repository
checkout([$class: 'GitSCM', branches: [
[name: params.GOOD_COMMIT]
], extensions: [
[$class: 'CloneOption',
timeout: 30]
], userRemoteConfigs: [
[url: 'https://github.com/llvm/llvm-project.git']
]])
// Verify commits exist
sh "git cat-file -e ${params.GOOD_COMMIT}"
sh "git cat-file -e ${params.BAD_COMMIT}"
echo "Repository setup complete"
}
}
}
}
stage('Initialize Bisection') {
steps {
script {
bisectionManager.initializeBisection(
params.GOOD_COMMIT,
params.BAD_COMMIT,
params.TEST_JOB_NAME,
params.REPOSITORY,
params.SESSION_ID ?: null
)
}
}
}
stage('Execute Bisection') {
steps {
script {
def stepNumber = 1
def maxSteps = 50
while (stepNumber <= maxSteps) {
// Log step and get info
def stepInfo = bisectionManager.logStepStart(stepNumber, params.REPOSITORY)
if (stepInfo.type == 'complete') {
echo "Bisection complete! Failing commit: ${stepInfo.failing_commit}"
break
}
// Show restart instructions
bisectionManager.showRestartInstructions(stepNumber, params.TEST_JOB_NAME, params.REPOSITORY)
if (params.DRY_RUN) {
def simulatedResult = (stepNumber % 2 == 0) ? "SUCCESS" : "FAILURE"
echo "Simulated result: ${simulatedResult}"
bisectionManager.recordTestResult(stepInfo.commit, simulatedResult, params.REPOSITORY)
} else {
// Execute real job
def startTime = System.currentTimeMillis()
def jobResult = build(
job: "llvm.org/bisect/${params.TEST_JOB_NAME}",
parameters: [
string(name: 'GIT_SHA', value: stepInfo.commit),
string(name: 'BISECT_GOOD', value: stepInfo.bisection_range.current_good),
string(name: 'BISECT_BAD', value: stepInfo.bisection_range.current_bad),
booleanParam(name: 'IS_BISECT_JOB', value: true),
booleanParam(name: 'SKIP_TESTS', value: !params.RUN_TESTS),
booleanParam(name: 'SKIP_TRIGGER', value: true)
],
propagate: false,
wait: true
)
def duration = ((System.currentTimeMillis() - startTime) / 1000.0) as double
// Log the job execution
bisectionManager.logJobExecution(
params.TEST_JOB_NAME,
jobResult.result,
duration,
jobResult.absoluteUrl,
jobResult.number.toString(),
params.REPOSITORY
)
// Record the test result
bisectionManager.recordTestResult(stepInfo.commit, jobResult.result, params.REPOSITORY)
}
stepNumber++
sleep(2)
}
if (stepNumber > maxSteps) {
error("Bisection exceeded maximum steps")
}
}
}
}
stage('Final Report') {
steps {
script {
bisectionManager.generateFinalReport(params.REPOSITORY)
}
}
}
}
post {
always {
script {
bisectionManager.displaySummary(params.REPOSITORY)
archiveArtifacts artifacts: "bisection_state.json,bisection.log,restart_instructions.log,bisection_final_report.txt",
allowEmptyArchive: true
}
}
cleanup {
// Clean up but preserve artifacts
sh 'rm -f bisection_manager.py'
}
}
}

View File

@ -1,73 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
clangPipeline(
jobName: env.JOB_NAME,
zorgBranch: branchName,
buildConfig: [
stage: 1,
build_type: 'cmake',
cmake_type: 'RelWithDebInfo',
assertions: true,
projects: 'clang;clang-tools-extra',
runtimes: 'compiler-rt',
timeout: 120,
incremental: false,
env_vars: [
"MACOSX_DEPLOYMENT_TARGET": "10.14"
]
],
testConfig: [
timeout: 90,
env_vars: [
"SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER": "iPhone 15"
],
custom_script: '''
EXIT_CODE=0
export COMPILER_RT_TEST_DIR="$WORKSPACE/clang-build/runtimes/runtimes-bins/compiler-rt/test"
cd $COMPILER_RT_TEST_DIR/asan && python3 $WORKSPACE/clang-build/./bin/llvm-lit \
--xunit-xml-output=testresults-asan-IOSSimX86_64Config.xunit.xml -v -vv --timeout=600 \
$COMPILER_RT_TEST_DIR/asan/IOSSimX86_64Config/ || EXIT_CODE=1
cd $COMPILER_RT_TEST_DIR/tsan && python3 $WORKSPACE/clang-build/./bin/llvm-lit \
--xunit-xml-output=testresults-tsan-IOSSimX86_64Config.xunit.xml -v -vv --timeout=600 \
$COMPILER_RT_TEST_DIR/tsan/IOSSimX86_64Config/ || EXIT_CODE=1
cd $COMPILER_RT_TEST_DIR/ubsan && python3 $WORKSPACE/clang-build/./bin/llvm-lit \
--xunit-xml-output=testresults-ubsan-AddressSanitizer-iossim-x86_64.xunit.xml -v -vv --timeout=600 \
$COMPILER_RT_TEST_DIR/ubsan/AddressSanitizer-iossim-x86_64/ || EXIT_CODE=1
cd $COMPILER_RT_TEST_DIR/ubsan && python3 $WORKSPACE/clang-build/./bin/llvm-lit \
--xunit-xml-output=testresults-ubsan-Standalone-iossim-x86_64.xunit.xml -v -vv --timeout=600 \
$COMPILER_RT_TEST_DIR/ubsan/Standalone-iossim-x86_64/ || EXIT_CODE=1
cd $COMPILER_RT_TEST_DIR/ubsan && python3 $WORKSPACE/clang-build/./bin/llvm-lit \
--xunit-xml-output=testresults-ubsan-ThreadSanitizer-iossim-x86_64.xunit.xml -v -vv --timeout=600 \
$COMPILER_RT_TEST_DIR/ubsan/ThreadSanitizer-iossim-x86_64/ || EXIT_CODE=1
cd $COMPILER_RT_TEST_DIR/sanitizer_common && python3 $WORKSPACE/clang-build/./bin/llvm-lit \
--xunit-xml-output=testresults-sanitizer_common-asan-iossim-x86_64.xunit.xml -v -vv --timeout=600 \
$COMPILER_RT_TEST_DIR/sanitizer_common/asan-x86_64-iossim/ || EXIT_CODE=1
cd $COMPILER_RT_TEST_DIR/sanitizer_common && python3 $WORKSPACE/clang-build/./bin/llvm-lit \
--xunit-xml-output=testresults-sanitizer_common-tsan-iossim-x86_64.xunit.xml -v -vv --timeout=600 \
$COMPILER_RT_TEST_DIR/sanitizer_common/tsan-x86_64-iossim/ || EXIT_CODE=1
cd $COMPILER_RT_TEST_DIR/sanitizer_common && python3 $WORKSPACE/clang-build/./bin/llvm-lit \
--xunit-xml-output=testresults-sanitizer_common-ubsan-iossim-x86_64.xunit.xml -v -vv --timeout=600 \
$COMPILER_RT_TEST_DIR/sanitizer_common/ubsan-x86_64-iossim/ || EXIT_CODE=1
exit $EXIT_CODE
''',
junit_patterns: [
"clang-build/**/testresults-*.xunit.xml"
]
]
)

View File

@ -1,34 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
clangPipeline(
jobName: env.JOB_NAME,
zorgBranch: branchName,
defaultLabel: 'macos-arm64',
buildConfig: [
stage: 1,
build_type: 'cmake',
cmake_type: 'RelWithDebInfo',
assertions: true,
projects: 'clang;clang-tools-extra',
runtimes: 'compiler-rt',
timeout: 120,
incremental: false,
cmake_flags: [
"-DLLVM_TARGETS_TO_BUILD=AArch64"
]
],
testConfig: [
test_type: 'testlong',
timeout: 120,
junit_patterns: [
"clang-build/**/testresults.xunit.xml"
]
],
)

View File

@ -1,30 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
clangPipeline(
jobName: env.JOB_NAME,
zorgBranch: branchName,
buildConfig: [
stage: 1,
build_type: 'cmake',
cmake_type: 'default',
assertions: true,
projects: 'clang',
timeout: 150,
incremental: true
],
testConfig: [
test_type: 'testlong',
timeout: 150,
junit_patterns: [
"clang-build/**/testresults.xunit.xml"
]
]
)

View File

@ -1,35 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
clangPipeline(
jobName: env.JOB_NAME,
zorgBranch: branchName,
stages: ['checkout', 'build'],
buildConfig: [
stage: 1,
build_type: 'cmake',
build_target: 'all',
cmake_type: 'default',
assertions: true,
timeout: 360,
incremental: false,
cmake_flags: [
"-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON",
"-DLIBCXX_ENABLE_SHARED=OFF",
"-DLIBCXX_ENABLE_STATIC=OFF",
"-DLIBCXX_INCLUDE_TESTS=OFF",
"-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF"
]
],
testConfig: [
junit_patterns: [
"clang-build/**/testresults.xunit.xml"
]
]
)

View File

@ -1,37 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
clangPipeline(
jobName: env.JOB_NAME,
zorgBranch: branchName,
buildConfig: [
stage: 1,
build_type: 'cmake',
cmake_type: 'RelWithDebInfo',
assertions: true,
projects: 'clang;clang-tools-extra',
runtimes: 'compiler-rt',
timeout: 120,
incremental: false,
skipTrigger: env.BRANCH_NAME?.startsWith('release/') ?: false
],
testConfig: [
test_type: 'testlong',
timeout: 120,
junit_patterns: [
"clang-build/**/testresults.xunit.xml"
]
],
triggeredJobs: [
'llvm.org/clang-stage2-cmake-RgSan_relay',
'llvm.org/clang-stage2-Rthinlto_relay',
'llvm.org/relay-lnt-ctmark',
'llvm.org/relay-test-suite-verify-machineinstrs'
]
)

View File

@ -1,35 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
clangPipeline([
jobName: env.JOB_NAME,
zorgBranch: branchName,
buildConfig: [
build_type: "clang",
cmake_type: "RelWithDebInfo",
thinlto: true,
projects: "clang",
runtimes: "libunwind;compiler-rt",
stage: 2,
timeout: 1200,
incremental: false,
stage1Job: 'clang-stage1-RA',
cmake_flags: [
"-DCMAKE_DSYMUTIL=\${WORKSPACE}/host-compiler/bin/dsymutil"
]
],
testConfig: [
test_command: "clang",
test_type: "test",
timeout: 420,
junit_patterns: [
"clang-build/**/testresults.xunit.xml"
]
]
])

View File

@ -1,45 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
clangPipeline(
jobName: env.JOB_NAME,
zorgBranch: branchName,
buildConfig: [
stage: 2,
stage1Job: 'clang-stage1-RA',
build_type: 'cmake',
cmake_type: 'RelWithDebInfo',
projects: 'clang;clang-tools-extra',
test_timeout: 2400, // individual test timeout in seconds
timeout: 1440, // build stage timeout in minutes
incremental: false,
sanitizer: 'Address;Undefined',
cmake_flags: [
"-DLIBCXX_INCLUDE_TESTS=OFF"
],
env_vars: [
"HOST_INC_DIR": "\$WORKSPACE/host-compiler/bin/../include"
]
],
testConfig: [
test_command: 'cmake',
test_type: 'test',
test_targets: [
'check-llvm',
'check-clang'
],
timeout: 1440, // test stage timeout in minutes
env_vars: [
"ASAN_SYMBOLIZER_PATH": "\$WORKSPACE/host-compiler/bin/llvm-symbolizer"
],
junit_patterns: [
"clang-build/**/testresults.xunit.xml"
]
]
)

View File

@ -1,33 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
clangPipeline(
jobName: env.JOB_NAME,
zorgBranch: branchName,
stages: ['checkout', 'fetch', 'build'],
buildConfig: [
stage: 2,
stage1Job: 'clang-stage1-RA',
build_type: 'cmake',
cmake_type: 'RelWithDebInfo',
projects: 'clang;clang-tools-extra',
runtimes: 'libcxx;libcxxabi;compiler-rt',
cmake_build_target: 'LTO',
noinstall: true,
thinlto: true,
sanitizer: 'Thread',
incremental: false,
cmake_flags: [
"-DLLVM_BUILD_RUNTIME=OFF"
],
env_vars: [
"DYLD_LIBRARY_PATH": "\$WORKSPACE/host-compiler/lib/"
]
]
)

View File

@ -1,115 +0,0 @@
pipeline {
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '30'))
skipDefaultCheckout()
}
parameters {
string(name: 'BUILD_TYPE', defaultValue: params.BUILD_TYPE ?: 'Release', description: 'Default CMake build type; one of: Release, Debug, ...')
}
agent {
node {
label env.JOB_NAME.contains('aarch64') ? 'linux-aarch64' : 'linux-x86_64'
}
}
stages {
stage('Setup Docker') {
steps {
withCredentials([string(credentialsId: 'aws_account', variable: 'AWS_ACCOUNT_ID')]) {
script {
env.AWS_DEFAULT_REGION = 'us-west-2'
env.DOCKER_SERVER = "${AWS_ACCOUNT_ID}.dkr.ecr.${env.AWS_DEFAULT_REGION}.amazonaws.com"
def tag = env.JOB_NAME.contains('aarch64')
? 'main-ci-ecr-8ce5c7b:swift-ci-ubuntu2404-aarch64'
: 'main-ci-ecr-8ce5c7b:swift-ci-ubuntu2404'
env.DOCKER_IMAGE = "${env.DOCKER_SERVER}/${tag}"
}
sh "aws ecr get-login-password --region ${env.AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin ${env.DOCKER_SERVER} 2>/dev/null"
sh "docker pull ${env.DOCKER_IMAGE}"
}
}
}
stage('Checkout') {
steps {
timeout(30) {
dir('llvm-project') {
checkout scm
}
}
}
}
stage('Print Machine Info') {
steps {
sh """
docker run --rm \\
${env.DOCKER_IMAGE} \\
bash -c "cmake --version; ninja --version; python3 --version; swig -version"
"""
}
}
stage('Build and Test') {
steps {
timeout(240) {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
writeFile file: 'build.sh', text: '''#!/usr/bin/env bash
set -ex
/usr/bin/cmake -G Ninja \
-S /workspace/llvm-project/llvm \
-B /workspace/llvm-build \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
-DLLDB_ENABLE_CURSES=ON \
-DLLDB_ENABLE_LIBXML2=ON \
-DLLDB_ENABLE_LUA=OFF \
-DLLDB_ENABLE_LZMA=OFF \
-DLLDB_ENABLE_PYTHON=ON \
-DLLDB_ENABLE_SWIG=ON \
-DLLVM_BUILD_TOOLS=TRUE \
-DLLVM_ENABLE_ASSERTIONS:BOOL=TRUE \
-DLLVM_ENABLE_LIBEDIT=FORCE_ON \
-DLLVM_ENABLE_LIBXML2=FORCE_ON \
-DLLVM_BUILD_UTILS=TRUE \
-DLLVM_ENABLE_PROJECTS="clang;lldb;lld" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" \
-DLLVM_OPTIMIZED_TABLEGEN:BOOL=TRUE \
-DLLVM_TARGETS_TO_BUILD=Native \
-DLLVM_USE_SPLIT_DWARF=TRUE \
"-DLLVM_LIT_ARGS=-v --time-tests --param color_output --xunit-xml-output=/workspace/llvm-build/test/results.xml" \
-DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON
ninja -C /workspace/llvm-build check-lldb
'''
sh """
mkdir -p llvm-build/test
chmod -R 777 llvm-build
chmod +x build.sh
docker run --rm \\
--security-opt=no-new-privileges \\
--cap-add=SYS_PTRACE \\
--security-opt seccomp=unconfined \\
-e BUILD_TYPE=${params.BUILD_TYPE} \\
-v "\${WORKSPACE}:/workspace" \\
${env.DOCKER_IMAGE} \\
bash /workspace/build.sh
"""
}
}
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: 'llvm-build/test/results.xml'
}
cleanup {
deleteDir()
}
}
}

View File

@ -1,101 +0,0 @@
pipeline {
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '30'))
skipDefaultCheckout()
}
parameters {
string(name: 'LABEL', defaultValue: params.LABEL ?: 'windows-server-2019', description: 'Node label to run on')
string(name: 'BUILD_TYPE', defaultValue: params.BUILD_TYPE ?: 'Release', description: 'Default CMake build type; one of: Release, Debug, ...')
}
agent {
node {
label params.LABEL
}
}
stages {
stage('Pull Docker Image') {
steps {
bat 'docker pull swiftlang/swift-ci:lldb-windowsservercore-1809'
}
}
stage('Checkout') {
steps {
timeout(30) {
dir('llvm-project') {
checkout scm
}
}
}
}
stage('Print Machine Info') {
steps {
bat '''
docker run --rm ^
swiftlang/swift-ci:lldb-windowsservercore-1809 ^
powershell -Command "cmake --version; ninja --version; python --version; swig -version"
'''
}
}
stage('Build and Test') {
steps {
timeout(240) {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
writeFile file: 'build.bat', text: '''@echo off
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" || exit /b 1
cmake -G Ninja ^
-S llvm ^
-B ..\\llvm-build\\ ^
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
-DCMAKE_INSTALL_PREFIX=..\\llvm-install\\base ^
-DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake ^
-DLLVM_ENABLE_PROJECTS="clang;lldb" ^
-DLLVM_ENABLE_ASSERTIONS=ON ^
-DLLVM_ENABLE_LIBEDIT=OFF ^
-DLLVM_OPTIMIZED_TABLEGEN=ON ^
-DLLVM_BUILD_TOOLS=ON ^
-DLLVM_BUILD_UTILS=ON ^
-DLLVM_ENABLE_LIBXML2=FORCE_ON ^
-DLLDB_ENABLE_SWIG=ON ^
-DLLDB_ENABLE_PYTHON=ON ^
-DLLDB_ENABLE_LUA=OFF ^
-DLLDB_ENABLE_LIBXML2=ON ^
-DLLVM_TARGETS_TO_BUILD=Native ^
-DLLVM_LIT_ARGS="-v --time-tests --xunit-xml-output=C:\\workspace\\llvm-build\\test\\results.xml" ^
-DPython3_EXECUTABLE="C:\\Program Files\\Python313\\python.exe" || exit /b 1
if not exist ..\\llvm-build\\test mkdir ..\\llvm-build\\test
ninja check-lldb -C ..\\llvm-build || exit /b 1
'''
bat '''
docker run --rm ^
-e BUILD_TYPE=%BUILD_TYPE% ^
-v "%CD%:C:\\workspace" ^
-w "C:\\workspace\\llvm-project" ^
swiftlang/swift-ci:lldb-windowsservercore-1809 ^
cmd /C C:\\workspace\\build.bat
'''
}
}
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: 'llvm-build/test/results.xml'
}
cleanup {
deleteDir()
}
}
}

View File

@ -1,18 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
timeout(30) {
sh """
LNT_FLAGS+=" -C config/tasks/cmake/caches/target-arm64-iphoneos.cmake"
LNT_FLAGS+=" -C config/tasks/cmake/caches/opt-O0-g.cmake"
config/tasks/task jenkinsrun config/tasks/lnt-ctmark.sh -a compiler="${params.ARTIFACT}" -D LNT_FLAGS="\${LNT_FLAGS}"
"""
}
}

View File

@ -1,18 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
timeout(30) {
sh """
LNT_FLAGS+=" -C config/tasks/cmake/caches/target-arm64-iphoneos.cmake"
LNT_FLAGS+=" -C config/tasks/cmake/caches/opt-O3-flto.cmake"
config/tasks/task jenkinsrun config/tasks/lnt-ctmark.sh -a compiler="${params.ARTIFACT}" -D LNT_FLAGS="\${LNT_FLAGS}"
"""
}
}

View File

@ -1,18 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
timeout(30) {
sh """
LNT_FLAGS+=" -C config/tasks/cmake/caches/target-arm64-iphoneos.cmake"
LNT_FLAGS+=" -C config/tasks/cmake/caches/opt-Os.cmake"
config/tasks/task jenkinsrun config/tasks/lnt-ctmark.sh -a compiler="${params.ARTIFACT}" -D LNT_FLAGS="\${LNT_FLAGS}"
"""
}
}

View File

@ -1,18 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
timeout(30) {
sh """
LNT_FLAGS+=" -C config/tasks/cmake/caches/target-arm64-iphoneos.cmake"
LNT_FLAGS+=" -C config/tasks/cmake/caches/opt-Oz.cmake"
config/tasks/task jenkinsrun config/tasks/lnt-ctmark.sh -a compiler="${params.ARTIFACT}" -D LNT_FLAGS="\${LNT_FLAGS}"
"""
}
}

View File

@ -1,17 +0,0 @@
branchName = 'main'
properties([
disableConcurrentBuilds()
])
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
relay.pipeline([
"llvm.org/clang-stage2-cmake-RgSan",
"llvm.org/clang-stage2-cmake-RgTSan"
])

View File

@ -1,16 +0,0 @@
branchName = 'main'
properties([
disableConcurrentBuilds()
])
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
relay.pipeline([
"llvm.org/clang-stage2-Rthinlto"
])

View File

@ -1,19 +0,0 @@
branchName = 'main'
properties([
disableConcurrentBuilds()
])
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
relay.pipeline([
"llvm.org/lnt-ctmark-aarch64-O0-g",
"llvm.org/lnt-ctmark-aarch64-O3-flto",
"llvm.org/lnt-ctmark-aarch64-Os",
"llvm.org/lnt-ctmark-aarch64-Oz"
])

View File

@ -1,23 +0,0 @@
branchName = 'main'
properties([
disableConcurrentBuilds()
])
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
jobs = [
"llvm.org/test-suite-verify-machineinstrs-x86_64-O0-g",
"llvm.org/test-suite-verify-machineinstrs-x86_64-O3",
"llvm.org/test-suite-verify-machineinstrs-x86_64h-O3",
"llvm.org/test-suite-verify-machineinstrs-aarch64-globalisel-O0-g",
"llvm.org/test-suite-verify-machineinstrs-aarch64-O0-g",
"llvm.org/test-suite-verify-machineinstrs-aarch64-O3"
]
relay.pipeline jobs

View File

@ -1,16 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
sh """
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/target-arm64-iphoneos.cmake"
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/opt-O0-g.cmake"
config/tasks/task jenkinsrun config/tasks/test-suite-verify-machineinstrs.sh -a compiler="${params.ARTIFACT}" -D CMAKE_FLAGS="\${CMAKE_FLAGS}"
"""
}

View File

@ -1,16 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
sh """
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/target-arm64-iphoneos.cmake"
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/opt-O3.cmake"
config/tasks/task jenkinsrun config/tasks/test-suite-verify-machineinstrs.sh -a compiler="${params.ARTIFACT}" -D CMAKE_FLAGS="\${CMAKE_FLAGS}"
"""
}

View File

@ -1,17 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
sh """
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/target-arm64-iphoneos.cmake"
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/opt-O0-g.cmake"
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/global-isel.cmake"
config/tasks/task jenkinsrun config/tasks/test-suite-verify-machineinstrs.sh -a compiler="${params.ARTIFACT}" -D CMAKE_FLAGS="\${CMAKE_FLAGS}"
"""
}

View File

@ -1,16 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
sh """
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/target-x86_64-macos.cmake"
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/opt-O0-g.cmake"
config/tasks/task jenkinsrun config/tasks/test-suite-verify-machineinstrs.sh -a compiler="${params.ARTIFACT}" -D CMAKE_FLAGS="\${CMAKE_FLAGS}"
"""
}

View File

@ -1,16 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
sh """
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/target-x86_64-macos.cmake"
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/opt-O3.cmake"
config/tasks/task jenkinsrun config/tasks/test-suite-verify-machineinstrs.sh -a compiler="${params.ARTIFACT}" -D CMAKE_FLAGS="\${CMAKE_FLAGS}"
"""
}

View File

@ -1,16 +0,0 @@
branchName = 'main'
library identifier: "zorg-shared-lib@${branchName}",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://github.com/llvm/llvm-zorg.git",
credentialsId: scm.userRemoteConfigs[0].credentialsId
])
common.testsuite_pipeline(label: 'macos-x86_64') {
sh """
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/target-x86_64h-macos.cmake"
CMAKE_FLAGS+=" -C ../config/tasks/cmake/caches/opt-O3.cmake"
config/tasks/task jenkinsrun config/tasks/test-suite-verify-machineinstrs.sh -a compiler="${params.ARTIFACT}" -D CMAKE_FLAGS="\${CMAKE_FLAGS}"
"""
}

View File

@ -1,7 +0,0 @@
FROM docker.io/python:3.12
COPY requirements.lock.txt ./
RUN pip3 install --no-cache-dir -r requirements.lock.txt
COPY metrics.py ./
CMD ["python3", "metrics.py"]

View File

@ -1,545 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Collects Github metrics and uploads them to Grafana.
This script contains machinery that will pull metrics periodically from Github
about workflow runs. It will upload the collected metrics to the specified
Grafana instance.
"""
import collections
import datetime
import github
import logging
import os
import requests
import time
from dataclasses import dataclass
from github import Auth
from github import Github
GRAFANA_URL = (
"https://influx-prod-13-prod-us-east-0.grafana.net/api/v1/push/influx/write"
)
SCRAPE_INTERVAL_SECONDS = 5 * 60
# Lists the Github workflows we want to track. Maps the Github job name to
# the metric name prefix in grafana.
# This metric name is also used as a key in the job->name map.
GITHUB_WORKFLOW_TO_TRACK = {
"CI Checks": "github_llvm_premerge_checks",
"Build and Test libc++": "github_libcxx_premerge_checks",
}
# Lists the Github jobs to track for a given workflow. The key is the stable
# name (metric name) of the workflow (see GITHUB_WORKFLOW_TO_TRACK).
# Each value is a map to link the github job name to the corresponding metric
# name.
GITHUB_JOB_TO_TRACK = {
"github_llvm_premerge_checks": {
"Build and Test Linux": "premerge_linux",
"Build and Test Linux AArch64": "premerge_linux_aarch64",
"Build and Test Windows": "premerge_windows",
},
"github_libcxx_premerge_checks": {
"stage1": "premerge_libcxx_stage1",
"stage2": "premerge_libcxx_stage2",
"stage3": "premerge_libcxx_stage3",
},
}
# The number of workflows to pull when sampling Github workflows.
# - Github API filtering is broken: we cannot apply any filtering:
# - See https://github.com/orgs/community/discussions/86766
# - A workflow can complete before another workflow, even when starting later.
# - We don't want to sample the same workflow twice.
#
# This means we essentially have a list of workflows sorted by creation date,
# and that's all we can deduce from it. So for each iteration, we'll blindly
# process the last N workflows.
GITHUB_WORKFLOWS_MAX_PROCESS_COUNT = 2000
# Second reason for the cut: reaching a workflow older than X.
# This means we will miss long-tails (exceptional jobs running for more than
# X hours), but that's also the case with the count cutoff above.
# Only solution to avoid missing any workflow would be to process the complete
# list, which is not possible.
GITHUB_WORKFLOW_MAX_CREATED_AGE_HOURS = 8
# Grafana will fail to insert any metric older than ~2 hours (value determined
# by trial and error).
GRAFANA_METRIC_MAX_AGE_MN = 120
@dataclass
class JobMetrics:
job_name: str
queue_time: int
run_time: int
status: int
created_at_ns: int
started_at_ns: int
completed_at_ns: int
workflow_id: int
workflow_name: str
@dataclass
class GaugeMetric:
name: str
value: int
time_ns: int
@dataclass
class AggregateMetric:
aggregate_name: str
aggregate_queue_time: int
aggregate_run_time: int
aggregate_status: int
completed_at_ns: int
workflow_id: int
def _construct_aggregate(ag_name: str, job_list: list[JobMetrics]) -> AggregateMetric:
"""Create a libc++ AggregateMetric from a list of libc++ JobMetrics
How aggregates are computed:
queue time: Time from when first job in group is created until last job in
group has started.
run time: Time from when first job in group starts running until last job
in group finishes running.
status: logical 'and' of all the job statuses in the group.
Args:
ag_name: The name for this particular AggregateMetric
job_list: This list of JobMetrics to be combined into the AggregateMetric.
The input list should contain all (and only!) the libc++ JobMetrics
for a particular stage and a particular workflow_id.
Returns:
Returns the AggregateMetric constructed from the inputs.
"""
# Initialize the aggregate values
earliest_create = job_list[0].created_at_ns
earliest_start = job_list[0].started_at_ns
earliest_complete = job_list[0].completed_at_ns
latest_start = job_list[0].started_at_ns
latest_complete = job_list[0].completed_at_ns
ag_status = job_list[0].status
ag_workflow_id = job_list[0].workflow_id
# Go through rest of jobs for this workflow id, if any, updating stats
for job in job_list[1:]:
# Update the status
ag_status = ag_status and job.status
# Get the earliest & latest times
if job.created_at_ns < earliest_create:
earliest_create = job.created_at_ns
if job.completed_at_ns < earliest_complete:
earliest_complete = job.completed_at_ns
if job.started_at_ns > latest_start:
latest_start = job.started_at_ns
if job.started_at_ns < earliest_start:
earliest_start = job.started_at_ns
if job.completed_at_ns > latest_complete:
latest_complete = job.completed_at_ns
# Compute aggregate run time (in seconds, not ns)
ag_run_time = (latest_complete - earliest_start) / 1000000000
# Compute aggregate queue time (in seconds, not ns)
ag_queue_time = (latest_start - earliest_create) / 1000000000
# Append the aggregate metrics to the workflow metrics list.
return AggregateMetric(
ag_name, ag_queue_time, ag_run_time, ag_status, latest_complete, ag_workflow_id
)
def create_and_append_libcxx_aggregates(workflow_metrics: list[JobMetrics]):
"""Find libc++ JobMetric entries and create aggregate metrics for them.
Sort the libc++ JobMetric entries by workflow id, and for each workflow
id group them by stages. Call _construct_aggregate to reate an aggregate
metric for each stage for each unique workflow id. Append each aggregate
metric to the input workflow_metrics list.
Args:
workflow_metrics: A list of JobMetrics entries collected so far.
"""
# Separate the jobs by workflow_id. Only look at JobMetrics entries.
aggregate_data = dict()
for job in workflow_metrics:
# Only want to look at JobMetrics
if not isinstance(job, JobMetrics):
continue
# Only want libc++ jobs.
if job.workflow_name != "Build and Test libc++":
continue
if job.workflow_id not in aggregate_data.keys():
aggregate_data[job.workflow_id] = [job]
else:
aggregate_data[job.workflow_id].append(job)
# Go through each aggregate_data list (workflow id) and find all the
# needed data
for ag_workflow_id in aggregate_data:
job_list = aggregate_data[ag_workflow_id]
stage1_jobs = list()
stage2_jobs = list()
stage3_jobs = list()
# sort jobs into stage1, stage2, & stage3.
for job in job_list:
if job.job_name.find("stage1") > 0:
stage1_jobs.append(job)
elif job.job_name.find("stage2") > 0:
stage2_jobs.append(job)
elif job.job_name.find("stage3") > 0:
stage3_jobs.append(job)
if len(stage1_jobs) > 0:
aggregate = _construct_aggregate(
"github_libcxx_premerge_checks_stage1_aggregate", stage1_jobs
)
workflow_metrics.append(aggregate)
if len(stage2_jobs) > 0:
aggregate = _construct_aggregate(
"github_libcxx_premerge_checks_stage2_aggregate", stage2_jobs
)
workflow_metrics.append(aggregate)
if len(stage3_jobs) > 0:
aggregate = _construct_aggregate(
"github_libcxx_premerge_checks_stage3_aggregate", stage3_jobs
)
workflow_metrics.append(aggregate)
def clean_up_libcxx_job_name(old_name: str) -> str:
"""Convert libcxx job names to generically legal strings.
Args:
old_name: A string with the full name of the libc++ test that was run.
Returns:
Returns the input string with characters that might not be acceptable
in some indentifier strings replaced with safer characters.
Take a name like 'stage1 (generic-cxx03, clang-22, clang++-22)'
and convert it to 'stage1_generic_cxx03__clang_22__clangxx_22'.
(Remove parentheses; replace commas, hyphens and spaces with
underscores; replace '+' with 'x'.)
"""
# Names should have exactly one set of parentheses, so break on that. If
# they don't have any parentheses, then don't update them at all.
if old_name.find("(") == -1:
return old_name
stage, remainder = old_name.split("(")
stage = stage.strip()
if remainder[-1] == ")":
remainder = remainder[:-1]
remainder = remainder.replace("-", "_")
remainder = remainder.replace(",", "_")
remainder = remainder.replace(" ", "_")
remainder = remainder.replace("+", "x")
new_name = stage + "_" + remainder
return new_name
def github_get_metrics(
github_repo: github.Repository, last_workflows_seen_as_completed: set[int]
) -> tuple[list[JobMetrics], int]:
"""Gets the metrics for specified Github workflows.
This function takes in a list of workflows to track, and optionally the
workflow ID of the last tracked invocation. It grabs the relevant data
from Github, returning it to the caller.
If the last_seen_workflow parameter is None, this returns no metrics, but
returns the id of the most recent workflow.
Args:
github_repo: A github repo object to use to query the relevant information.
last_seen_workflow: the last workflow this function processed.
Returns:
Returns a tuple with 2 elements:
- a list of JobMetrics objects, one per processed job.
- the ID of the most recent processed workflow run.
"""
workflow_metrics = []
queued_count = collections.Counter()
running_count = collections.Counter()
# Initialize all the counters to 0 so we report 0 when no job is queued
# or running.
for wf_name, wf_metric_name in GITHUB_WORKFLOW_TO_TRACK.items():
for job_name, job_metric_name in GITHUB_JOB_TO_TRACK[wf_metric_name].items():
queued_count[wf_metric_name + "_" + job_metric_name] = 0
running_count[wf_metric_name + "_" + job_metric_name] = 0
# The list of workflows this iteration will process.
# MaxSize = GITHUB_WORKFLOWS_MAX_PROCESS_COUNT
workflow_seen_as_completed = set()
# Since we process a fixed count of workflows, we want to know when
# the depth is too small and if we miss workflows.
# E.g.: is there was more than N workflows int last 2 hours.
# To monitor this, we'll log the age of the oldest workflow processed,
# and setup alterting in Grafana to help us adjust this depth.
oldest_seen_workflow_age_mn = None
# Do not apply any filters to this query.
# See https://github.com/orgs/community/discussions/86766
# Applying filters like `status=completed` will break pagination, and
# return a non-sorted and incomplete list of workflows.
i = 0
for task in iter(github_repo.get_workflow_runs()):
# Max depth reached, stopping.
if i >= GITHUB_WORKFLOWS_MAX_PROCESS_COUNT:
break
i += 1
workflow_age_mn = (
datetime.datetime.now(datetime.timezone.utc) - task.created_at
).total_seconds() / 60
oldest_seen_workflow_age_mn = workflow_age_mn
# If we reach a workflow older than X, stop.
if workflow_age_mn > GITHUB_WORKFLOW_MAX_CREATED_AGE_HOURS * 60:
break
# This workflow is not interesting to us.
if task.name not in GITHUB_WORKFLOW_TO_TRACK:
continue
libcxx_testing = False
if task.name == "Build and Test libc++":
libcxx_testing = True
if task.status == "completed":
workflow_seen_as_completed.add(task.id)
# This workflow has already been seen completed in the previous run.
if task.id in last_workflows_seen_as_completed:
continue
name_prefix = GITHUB_WORKFLOW_TO_TRACK[task.name]
for job in task.jobs():
if libcxx_testing:
# We're not running macos or windows libc++ tests on our
# infrastructure.
if job.name.find("macos") != -1 or job.name.find("windows") != -1:
continue
# This job is not interesting to us.
elif job.name not in GITHUB_JOB_TO_TRACK[name_prefix]:
continue
if libcxx_testing:
name_suffix = clean_up_libcxx_job_name(job.name)
else:
name_suffix = GITHUB_JOB_TO_TRACK[name_prefix][job.name]
metric_name = name_prefix + "_" + name_suffix
ag_metric_name = None
if libcxx_testing:
job_key = None
if job.name.find("stage1") != -1:
job_key = "stage1"
elif job.name.find("stage2") != -1:
job_key = "stage2"
elif job.name.find("stage3") != -1:
job_key = "stage3"
if job_key:
ag_name = (
name_prefix + "_" + GITHUB_JOB_TO_TRACK[name_prefix][job_key]
)
if task.status != "completed":
if job.status == "queued":
queued_count[metric_name] += 1
if libcxx_testing:
queued_count[ag_name] += 1
elif job.status == "in_progress":
running_count[metric_name] += 1
if libcxx_testing:
running_count[ag_name] += 1
continue
job_result = int(job.conclusion == "success" or job.conclusion == "skipped")
created_at = job.created_at
started_at = job.started_at
completed_at = job.completed_at
if completed_at is None:
logging.info(
f"Workflow {task.id} is marked completed but has a job without a "
"completion timestamp."
)
continue
# GitHub API can return results where the started_at is slightly
# later then the created_at (or completed earlier than started).
# This would cause a -23h59mn delta, which will show up as +24h
# queue/run time on grafana.
if started_at < created_at:
logging.info(
"Workflow {} started before being created.".format(task.id)
)
queue_time = datetime.timedelta(seconds=0)
else:
queue_time = started_at - created_at
if completed_at < started_at:
logging.info("Workflow {} finished before starting.".format(task.id))
run_time = datetime.timedelta(seconds=0)
else:
run_time = completed_at - started_at
if run_time.seconds == 0:
continue
# Grafana will refuse to ingest metrics older than ~2 hours, so we
# should avoid sending historical data.
metric_age_mn = (
datetime.datetime.now(datetime.timezone.utc) - completed_at
).total_seconds() / 60
if metric_age_mn > GRAFANA_METRIC_MAX_AGE_MN:
logging.warning(
f"Job {job.id} from workflow {task.id} dropped due"
+ f" to staleness: {metric_age_mn}mn old."
)
continue
logging.info(f"Adding a job metric for job {job.id} in workflow {task.id}")
# The completed_at_ns timestamp associated with the event is
# expected by Grafana to be in nanoseconds. Because we do math using
# all three times (when creating libc++ aggregates), we need them
# all to be in nanoseconds, even though created_at and started_at
# are not returned to Grafana.
created_at_ns = int(created_at.timestamp()) * 10**9
started_at_ns = int(started_at.timestamp()) * 10**9
completed_at_ns = int(completed_at.timestamp()) * 10**9
workflow_metrics.append(
JobMetrics(
metric_name,
queue_time.seconds,
run_time.seconds,
job_result,
created_at_ns,
started_at_ns,
completed_at_ns,
task.id,
task.name,
)
)
# Finished collecting the JobMetrics for all jobs; now create the
# aggregates for any libc++ jobs.
create_and_append_libcxx_aggregates(workflow_metrics)
for name, value in queued_count.items():
workflow_metrics.append(
GaugeMetric(f"workflow_queue_size_{name}", value, time.time_ns())
)
for name, value in running_count.items():
workflow_metrics.append(
GaugeMetric(f"running_workflow_count_{name}", value, time.time_ns())
)
# Always send a hearbeat metric so we can monitor is this container is still able to log to Grafana.
workflow_metrics.append(
GaugeMetric("metrics_container_heartbeat", 1, time.time_ns())
)
# Log the oldest workflow we saw, allowing us to monitor if the processing
# depth is correctly set-up.
if oldest_seen_workflow_age_mn is not None:
workflow_metrics.append(
GaugeMetric(
"github_oldest_processed_workflow_mn",
oldest_seen_workflow_age_mn,
time.time_ns(),
)
)
return workflow_metrics, workflow_seen_as_completed
def upload_metrics(workflow_metrics, metrics_userid, api_key):
"""Upload metrics to Grafana.
Takes in a list of workflow metrics and then uploads them to Grafana
through a REST request.
Args:
workflow_metrics: A list of metrics to upload to Grafana.
metrics_userid: The userid to use for the upload.
api_key: The API key to use for the upload.
"""
if len(workflow_metrics) == 0:
logging.info("No metrics found to upload.")
return
metrics_batch = []
for workflow_metric in workflow_metrics:
if isinstance(workflow_metric, GaugeMetric):
name = workflow_metric.name.lower().replace(" ", "_")
metrics_batch.append(
f"{name} value={workflow_metric.value} {workflow_metric.time_ns}"
)
elif isinstance(workflow_metric, JobMetrics):
name = workflow_metric.job_name.lower().replace(" ", "_")
metrics_batch.append(
f"{name} queue_time={workflow_metric.queue_time},run_time={workflow_metric.run_time},status={workflow_metric.status} {workflow_metric.completed_at_ns}"
)
elif isinstance(workflow_metric, AggregateMetric):
name = workflow_metric.aggregate_name.lower().replace(" ", "_")
metrics_batch.append(
f"{name} queue_time={workflow_metric.aggregate_queue_time},run_time={workflow_metric.aggregate_run_time},status={workflow_metric.aggregate_status} {workflow_metric.completed_at_ns}"
)
else:
raise ValueError(
f"Unsupported object type {type(workflow_metric)}: {str(workflow_metric)}"
)
request_data = "\n".join(metrics_batch)
response = requests.post(
GRAFANA_URL,
headers={"Content-Type": "text/plain"},
data=request_data,
auth=(metrics_userid, api_key),
)
if response.status_code < 200 or response.status_code >= 300:
logging.info(f"Failed to submit data to Grafana: {response.status_code}")
def main():
# Authenticate with Github
github_auth = Auth.Token(os.environ["GITHUB_TOKEN"])
grafana_api_key = os.environ["GRAFANA_API_KEY"]
grafana_metrics_userid = os.environ["GRAFANA_METRICS_USERID"]
# The last workflow this script processed.
# Because the Github queries are broken, we'll simply log a 'processed'
# bit for the last COUNT_TO_PROCESS workflows.
gh_last_workflows_seen_as_completed = set()
# Enter the main loop. Every five minutes we wake up and dump metrics for
# the relevant jobs.
while True:
github_object = Github(auth=github_auth)
github_repo = github_object.get_repo("llvm/llvm-project")
gh_metrics, gh_last_workflows_seen_as_completed = github_get_metrics(
github_repo, gh_last_workflows_seen_as_completed
)
upload_metrics(gh_metrics, grafana_metrics_userid, grafana_api_key)
logging.info(f"Uploaded {len(gh_metrics)} metrics")
time.sleep(SCRAPE_INTERVAL_SECONDS)
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
main()

View File

@ -1,414 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Tests for metrics.py"""
from dataclasses import dataclass
import requests
import unittest
import unittest.mock
import metrics
class TestMetrics(unittest.TestCase):
def test_upload_gauge_metric(self):
"""Test that we can upload a gauge metric correctly.
Also verify that we pass around parameters like API keys and user IDs
correctly to the HTTP POST request.
"""
test_metrics = [metrics.GaugeMetric("gauge_test", 5, 1000)]
return_value = requests.Response()
return_value.status_code = 204
with unittest.mock.patch(
"requests.post", return_value=return_value
) as post_mock:
metrics.upload_metrics(test_metrics, "test_userid", "test_api_key")
self.assertSequenceEqual(post_mock.call_args.args, [metrics.GRAFANA_URL])
self.assertEqual(
post_mock.call_args.kwargs["data"], "gauge_test value=5 1000"
)
self.assertEqual(
post_mock.call_args.kwargs["auth"], ("test_userid", "test_api_key")
)
def test_upload_job_metric(self):
"""Test that we can upload a job metric correctly."""
test_metrics = [
metrics.JobMetrics(
"test_job", 5, 10, 1, 1000, 1000, 1000, 7, "test_workflow"
)
]
return_value = requests.Response()
return_value.status_code = 204
with unittest.mock.patch(
"requests.post", return_value=return_value
) as post_mock:
metrics.upload_metrics(test_metrics, "test_userid", "test_aoi_key")
self.assertEqual(
post_mock.call_args.kwargs["data"],
"test_job queue_time=5,run_time=10,status=1 1000",
)
def test_upload_aggregate_metric(self):
"""Test that we can upload an aggregate metric correctly."""
test_metrics = [
metrics.AggregateMetric("stage1_aggregate", 211, 1124, 1, 1200, 9)
]
return_value = requests.Response()
return_value.status_code = 204
with unittest.mock.patch(
"requests.post", return_value=return_value
) as post_mock:
metrics.upload_metrics(test_metrics, "test_userid", "test_aoi_key")
self.assertEqual(
post_mock.call_args.kwargs["data"],
"stage1_aggregate queue_time=211,run_time=1124,status=1 1200",
)
def test_upload_unknown_metric(self):
"""Test we report an error if we encounter an unknown metric type."""
@dataclass
class FakeMetric:
fake_data: str
test_metrics = [FakeMetric("test")]
with self.assertRaises(ValueError):
metrics.upload_metrics(test_metrics, "test_userid", "test_api_key")
def test_bad_response_code(self):
"""Test that we gracefully handle HTTP response errors."""
test_metrics = [metrics.GaugeMetric("gauge_test", 5, 1000)]
return_value = requests.Response()
return_value.status_code = 403
# Just assert that we continue running here and do not raise anything.
with unittest.mock.patch("requests.post", return_value=return_value) as _:
metrics.upload_metrics(test_metrics, "test_userid", "test_api_key")
def test_create_and_append_aggregate_metric_1_stage(self):
"""Test the creation of a single AggregateMetric"""
test_metrics = [
metrics.JobMetrics(
"libcxx_stage1_test1",
8,
388,
1,
created_at_ns=1755697953000000000,
started_at_ns=1755697961000000000,
completed_at_ns=1755698349000000000,
workflow_id=3,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage1_test2",
107,
357,
1,
created_at_ns=1755697953000000000,
started_at_ns=1755698060000000000,
completed_at_ns=1755698417000000000,
workflow_id=3,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage1_test3",
8,
824,
1,
created_at_ns=1755697953000000000,
started_at_ns=1755697961000000000,
completed_at_ns=1755698785000000000,
workflow_id=3,
workflow_name="Build and Test libc++",
),
]
metrics.create_and_append_libcxx_aggregates(test_metrics)
self.assertEqual(len(test_metrics), 4)
self.assertTrue(isinstance(test_metrics[-1], metrics.AggregateMetric))
aggregate = test_metrics[-1]
self.assertEqual(
aggregate.aggregate_name, "github_libcxx_premerge_checks_stage1_aggregate"
)
self.assertEqual(aggregate.aggregate_queue_time, 107)
self.assertEqual(aggregate.aggregate_run_time, 824)
self.assertEqual(aggregate.aggregate_status, 1)
self.assertEqual(aggregate.completed_at_ns, 1755698785000000000)
self.assertEqual(aggregate.workflow_id, 3)
def test_create_and_append_aggregate_metric_multiple_workflow_ids(self):
"""Test creation of AggregateMetric for same stage with diff workflow ids."""
test_metrics = [
metrics.JobMetrics(
"libcxx_stage1_test1",
8,
388,
1,
created_at_ns=1755697953000000000,
started_at_ns=1755697961000000000,
completed_at_ns=1755698349000000000,
workflow_id=3,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage1_test2",
107,
357,
0,
created_at_ns=1755697953000000000,
started_at_ns=1755698060000000000,
completed_at_ns=1755698417000000000,
workflow_id=3,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage1_test3",
8,
824,
1,
created_at_ns=1755697953000000000,
started_at_ns=1755697961000000000,
completed_at_ns=1755698785000000000,
workflow_id=25,
workflow_name="Build and Test libc++",
),
]
metrics.create_and_append_libcxx_aggregates(test_metrics)
self.assertEqual(len(test_metrics), 5)
self.assertTrue(isinstance(test_metrics[3], metrics.AggregateMetric))
self.assertTrue(isinstance(test_metrics[4], metrics.AggregateMetric))
aggregate = test_metrics[3]
self.assertEqual(
aggregate.aggregate_name, "github_libcxx_premerge_checks_stage1_aggregate"
)
self.assertEqual(aggregate.aggregate_queue_time, 107)
self.assertEqual(aggregate.aggregate_run_time, 456)
self.assertEqual(aggregate.aggregate_status, 0)
self.assertEqual(aggregate.completed_at_ns, 1755698417000000000)
self.assertEqual(aggregate.workflow_id, 3)
aggregate = test_metrics[4]
self.assertEqual(
aggregate.aggregate_name, "github_libcxx_premerge_checks_stage1_aggregate"
)
self.assertEqual(aggregate.aggregate_queue_time, 8)
self.assertEqual(aggregate.aggregate_run_time, 824)
self.assertEqual(aggregate.aggregate_status, 1)
self.assertEqual(aggregate.completed_at_ns, 1755698785000000000)
self.assertEqual(aggregate.workflow_id, 25)
def test_create_and_append_aggregate_metric_3_stages(self):
"""Test the creation of AggregateMetric for each of 3 stages."""
test_metrics = [
metrics.JobMetrics(
"libcxx_stage1_test1",
124,
1454,
1,
created_at_ns=1755696929000000000,
started_at_ns=1755697053000000000,
completed_at_ns=1755698507000000000,
workflow_id=17,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage1_test2",
129,
827,
1,
created_at_ns=1755696929000000000,
started_at_ns=1755697058000000000,
completed_at_ns=1755697885000000000,
workflow_id=17,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage2_test1",
6,
580,
1,
created_at_ns=1755698507000000000,
started_at_ns=1755698513000000000,
completed_at_ns=1755699093000000000,
workflow_id=17,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage2_test2",
7,
473,
1,
created_at_ns=1755698507000000000,
started_at_ns=1755698514000000000,
completed_at_ns=1755698987000000000,
workflow_id=17,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage2_test3",
7,
820,
1,
created_at_ns=1755698507000000000,
started_at_ns=1755698514000000000,
completed_at_ns=1755699334000000000,
workflow_id=17,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage3_test1",
7,
919,
1,
created_at_ns=1755709005000000000,
started_at_ns=1755709012000000000,
completed_at_ns=1755709931000000000,
workflow_id=17,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage3_test2",
141,
834,
1,
created_at_ns=1755709005000000000,
started_at_ns=1755709146000000000,
completed_at_ns=1755709980000000000,
workflow_id=17,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"libcxx_stage3_test3",
131,
370,
1,
created_at_ns=1755709005000000000,
started_at_ns=1755709136000000000,
completed_at_ns=1755709514000000000,
workflow_id=17,
workflow_name="Build and Test libc++",
),
]
metrics.create_and_append_libcxx_aggregates(test_metrics)
self.assertEqual(len(test_metrics), 11)
self.assertTrue(isinstance(test_metrics[8], metrics.AggregateMetric))
self.assertTrue(isinstance(test_metrics[9], metrics.AggregateMetric))
self.assertTrue(isinstance(test_metrics[10], metrics.AggregateMetric))
aggregate = test_metrics[8]
self.assertEqual(
aggregate.aggregate_name, "github_libcxx_premerge_checks_stage1_aggregate"
)
self.assertEqual(aggregate.aggregate_queue_time, 129)
self.assertEqual(aggregate.aggregate_run_time, 1454)
self.assertEqual(aggregate.aggregate_status, 1)
self.assertEqual(aggregate.completed_at_ns, 1755698507000000000)
self.assertEqual(aggregate.workflow_id, 17)
aggregate = test_metrics[9]
self.assertEqual(
aggregate.aggregate_name, "github_libcxx_premerge_checks_stage2_aggregate"
)
self.assertEqual(aggregate.aggregate_queue_time, 7)
self.assertEqual(aggregate.aggregate_run_time, 821)
self.assertEqual(aggregate.aggregate_status, 1)
self.assertEqual(aggregate.completed_at_ns, 1755699334000000000)
self.assertEqual(aggregate.workflow_id, 17)
aggregate = test_metrics[10]
self.assertEqual(
aggregate.aggregate_name, "github_libcxx_premerge_checks_stage3_aggregate"
)
self.assertEqual(aggregate.aggregate_queue_time, 141)
self.assertEqual(aggregate.aggregate_run_time, 968)
self.assertEqual(aggregate.aggregate_status, 1)
self.assertEqual(aggregate.completed_at_ns, 1755709980000000000)
self.assertEqual(aggregate.workflow_id, 17)
def test_create_and_append_aggregate_metric_mixed_job_types(self):
"""Test the creation of AggregateMetric with non-lib++ jobs thrown in."""
test_metrics = [
metrics.JobMetrics(
"ci_test1", 5, 10, 1, 1000, 1200, 1400, 5, "premerge_test"
),
metrics.JobMetrics(
"libcxx_stage1_test1",
8,
388,
1,
created_at_ns=1755697953000000000,
started_at_ns=1755697961000000000,
completed_at_ns=1755698349000000000,
workflow_id=3,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"ci_test2", 3, 20, 1, 2000, 2200, 2400, 37, "premerge_test"
),
metrics.JobMetrics(
"libcxx_stage1_test2",
107,
357,
0,
created_at_ns=1755697953000000000,
started_at_ns=1755698060000000000,
completed_at_ns=1755698417000000000,
workflow_id=3,
workflow_name="Build and Test libc++",
),
metrics.JobMetrics(
"ci_test3", 7, 35, 1, 3000, 3200, 3400, 85, "premerge_test"
),
]
metrics.create_and_append_libcxx_aggregates(test_metrics)
self.assertEqual(len(test_metrics), 6)
self.assertTrue(isinstance(test_metrics[5], metrics.AggregateMetric))
aggregate = test_metrics[5]
self.assertEqual(
aggregate.aggregate_name, "github_libcxx_premerge_checks_stage1_aggregate"
)
self.assertEqual(aggregate.aggregate_queue_time, 107)
self.assertEqual(aggregate.aggregate_run_time, 456)
self.assertEqual(aggregate.aggregate_status, 0)
self.assertEqual(aggregate.completed_at_ns, 1755698417000000000)
self.assertEqual(aggregate.workflow_id, 3)
def test_create_and_append_aggregate_metric_no_libcxx_jobs(self):
"""Test the creation of AggregateMetric with no libc++ jobs.
In this case, no AggregateMetric should be created, but no
errors or complaints should be raised.
"""
test_metrics = [
metrics.JobMetrics(
"ci_test1", 5, 10, 1, 1000, 1200, 1400, 5, "premerge_test"
),
metrics.JobMetrics(
"ci_test2", 3, 20, 1, 2000, 2200, 2400, 37, "premerge_test"
),
metrics.JobMetrics(
"ci_test3", 7, 35, 1, 3000, 3200, 3400, 85, "premerge_test"
),
]
metrics.create_and_append_libcxx_aggregates(test_metrics)
self.assertEqual(len(test_metrics), 3)
def test_clean_up_libcxx_job_name(self):
"""Test that we correctly update (or not) libcxx job names."""
stage1_name = "stage1 (test1, C++-test2, my-c++-test-25)"
stage2_name = "stage2 (generic-cxx26, clang-21, clang++21)"
stage3_name = "stage3 (generic-cxx26, libcxx-next-runners, junk)"
bad_name = "this is a bad name"
out_name1 = metrics.clean_up_libcxx_job_name(stage1_name)
self.assertEqual(out_name1, "stage1_test1__Cxx_test2__my_cxx_test_25")
out_name2 = metrics.clean_up_libcxx_job_name(stage2_name)
self.assertEqual(out_name2, "stage2_generic_cxx26__clang_21__clangxx21")
out_name3 = metrics.clean_up_libcxx_job_name(stage3_name)
self.assertEqual(out_name3, "stage3_generic_cxx26__libcxx_next_runners__junk")
out_name4 = metrics.clean_up_libcxx_job_name(bad_name)
self.assertEqual(out_name4, bad_name)
if __name__ == "__main__":
unittest.main()

View File

@ -1,343 +0,0 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --generate-hashes --output-file=./requirements.lock.txt ./requirements.txt
#
certifi==2024.8.30 \
--hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \
--hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9
# via requests
cffi==1.17.1 \
--hash=sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8 \
--hash=sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2 \
--hash=sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1 \
--hash=sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15 \
--hash=sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36 \
--hash=sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824 \
--hash=sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8 \
--hash=sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36 \
--hash=sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17 \
--hash=sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf \
--hash=sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc \
--hash=sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3 \
--hash=sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed \
--hash=sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702 \
--hash=sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1 \
--hash=sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8 \
--hash=sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903 \
--hash=sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6 \
--hash=sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d \
--hash=sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b \
--hash=sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e \
--hash=sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be \
--hash=sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c \
--hash=sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683 \
--hash=sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9 \
--hash=sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c \
--hash=sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8 \
--hash=sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1 \
--hash=sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4 \
--hash=sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655 \
--hash=sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67 \
--hash=sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595 \
--hash=sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0 \
--hash=sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65 \
--hash=sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41 \
--hash=sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6 \
--hash=sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401 \
--hash=sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6 \
--hash=sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3 \
--hash=sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16 \
--hash=sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93 \
--hash=sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e \
--hash=sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4 \
--hash=sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964 \
--hash=sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c \
--hash=sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576 \
--hash=sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0 \
--hash=sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3 \
--hash=sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662 \
--hash=sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3 \
--hash=sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff \
--hash=sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5 \
--hash=sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd \
--hash=sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f \
--hash=sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5 \
--hash=sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14 \
--hash=sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d \
--hash=sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9 \
--hash=sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7 \
--hash=sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382 \
--hash=sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a \
--hash=sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e \
--hash=sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a \
--hash=sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4 \
--hash=sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99 \
--hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \
--hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b
# via
# cryptography
# pynacl
charset-normalizer==3.4.0 \
--hash=sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621 \
--hash=sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6 \
--hash=sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8 \
--hash=sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912 \
--hash=sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c \
--hash=sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b \
--hash=sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d \
--hash=sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d \
--hash=sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95 \
--hash=sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e \
--hash=sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565 \
--hash=sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64 \
--hash=sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab \
--hash=sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be \
--hash=sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e \
--hash=sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907 \
--hash=sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0 \
--hash=sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2 \
--hash=sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62 \
--hash=sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62 \
--hash=sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23 \
--hash=sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc \
--hash=sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284 \
--hash=sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca \
--hash=sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455 \
--hash=sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858 \
--hash=sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b \
--hash=sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594 \
--hash=sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc \
--hash=sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db \
--hash=sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b \
--hash=sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea \
--hash=sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6 \
--hash=sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920 \
--hash=sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749 \
--hash=sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7 \
--hash=sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd \
--hash=sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99 \
--hash=sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242 \
--hash=sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee \
--hash=sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129 \
--hash=sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2 \
--hash=sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51 \
--hash=sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee \
--hash=sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8 \
--hash=sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b \
--hash=sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613 \
--hash=sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742 \
--hash=sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe \
--hash=sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3 \
--hash=sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5 \
--hash=sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631 \
--hash=sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7 \
--hash=sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15 \
--hash=sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c \
--hash=sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea \
--hash=sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417 \
--hash=sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250 \
--hash=sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88 \
--hash=sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca \
--hash=sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa \
--hash=sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99 \
--hash=sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149 \
--hash=sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41 \
--hash=sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574 \
--hash=sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0 \
--hash=sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f \
--hash=sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d \
--hash=sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654 \
--hash=sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3 \
--hash=sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19 \
--hash=sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90 \
--hash=sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578 \
--hash=sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9 \
--hash=sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1 \
--hash=sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51 \
--hash=sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719 \
--hash=sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236 \
--hash=sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a \
--hash=sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c \
--hash=sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade \
--hash=sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944 \
--hash=sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc \
--hash=sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6 \
--hash=sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6 \
--hash=sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27 \
--hash=sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6 \
--hash=sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2 \
--hash=sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12 \
--hash=sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf \
--hash=sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114 \
--hash=sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7 \
--hash=sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf \
--hash=sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d \
--hash=sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b \
--hash=sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed \
--hash=sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03 \
--hash=sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4 \
--hash=sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67 \
--hash=sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365 \
--hash=sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a \
--hash=sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748 \
--hash=sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b \
--hash=sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079 \
--hash=sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482
# via requests
cryptography==43.0.3 \
--hash=sha256:0c580952eef9bf68c4747774cde7ec1d85a6e61de97281f2dba83c7d2c806362 \
--hash=sha256:0f996e7268af62598f2fc1204afa98a3b5712313a55c4c9d434aef49cadc91d4 \
--hash=sha256:1ec0bcf7e17c0c5669d881b1cd38c4972fade441b27bda1051665faaa89bdcaa \
--hash=sha256:281c945d0e28c92ca5e5930664c1cefd85efe80e5c0d2bc58dd63383fda29f83 \
--hash=sha256:2ce6fae5bdad59577b44e4dfed356944fbf1d925269114c28be377692643b4ff \
--hash=sha256:315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805 \
--hash=sha256:443c4a81bb10daed9a8f334365fe52542771f25aedaf889fd323a853ce7377d6 \
--hash=sha256:4a02ded6cd4f0a5562a8887df8b3bd14e822a90f97ac5e544c162899bc467664 \
--hash=sha256:53a583b6637ab4c4e3591a15bc9db855b8d9dee9a669b550f311480acab6eb08 \
--hash=sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e \
--hash=sha256:74f57f24754fe349223792466a709f8e0c093205ff0dca557af51072ff47ab18 \
--hash=sha256:7e1ce50266f4f70bf41a2c6dc4358afadae90e2a1e5342d3c08883df1675374f \
--hash=sha256:81ef806b1fef6b06dcebad789f988d3b37ccaee225695cf3e07648eee0fc6b73 \
--hash=sha256:846da004a5804145a5f441b8530b4bf35afbf7da70f82409f151695b127213d5 \
--hash=sha256:8ac43ae87929a5982f5948ceda07001ee5e83227fd69cf55b109144938d96984 \
--hash=sha256:9762ea51a8fc2a88b70cf2995e5675b38d93bf36bd67d91721c309df184f49bd \
--hash=sha256:a2a431ee15799d6db9fe80c82b055bae5a752bef645bba795e8e52687c69efe3 \
--hash=sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e \
--hash=sha256:c2e6fc39c4ab499049df3bdf567f768a723a5e8464816e8f009f121a5a9f4405 \
--hash=sha256:cbeb489927bd7af4aa98d4b261af9a5bc025bd87f0e3547e11584be9e9427be2 \
--hash=sha256:d03b5621a135bffecad2c73e9f4deb1a0f977b9a8ffe6f8e002bf6c9d07b918c \
--hash=sha256:d56e96520b1020449bbace2b78b603442e7e378a9b3bd68de65c782db1507995 \
--hash=sha256:df6b6c6d742395dd77a23ea3728ab62f98379eff8fb61be2744d4679ab678f73 \
--hash=sha256:e1be4655c7ef6e1bbe6b5d0403526601323420bcf414598955968c9ef3eb7d16 \
--hash=sha256:f18c716be16bc1fea8e95def49edf46b82fccaa88587a45f8dc0ff6ab5d8e0a7 \
--hash=sha256:f46304d6f0c6ab8e52770addfa2fc41e6629495548862279641972b6215451cd \
--hash=sha256:f7b178f11ed3664fd0e995a47ed2b5ff0a12d893e41dd0494f406d1cf555cab7
# via pyjwt
deprecated==1.2.15 \
--hash=sha256:353bc4a8ac4bfc96800ddab349d89c25dec1079f65fd53acdcc1e0b975b21320 \
--hash=sha256:683e561a90de76239796e6b6feac66b99030d2dd3fcf61ef996330f14bbb9b0d
# via pygithub
idna==3.10 \
--hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \
--hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3
# via requests
pycparser==2.22 \
--hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \
--hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc
# via cffi
pygithub==2.5.0 \
--hash=sha256:b0b635999a658ab8e08720bdd3318893ff20e2275f6446fcf35bf3f44f2c0fd2 \
--hash=sha256:e1613ac508a9be710920d26eb18b1905ebd9926aa49398e88151c1b526aad3cf
# via -r ./requirements.txt
pyjwt[crypto]==2.10.0 \
--hash=sha256:543b77207db656de204372350926bed5a86201c4cbff159f623f79c7bb487a15 \
--hash=sha256:7628a7eb7938959ac1b26e819a1df0fd3259505627b575e4bad6d08f76db695c
# via pygithub
pynacl==1.5.0 \
--hash=sha256:06b8f6fa7f5de8d5d2f7573fe8c863c051225a27b61e6860fd047b1775807858 \
--hash=sha256:0c84947a22519e013607c9be43706dd42513f9e6ae5d39d3613ca1e142fba44d \
--hash=sha256:20f42270d27e1b6a29f54032090b972d97f0a1b0948cc52392041ef7831fee93 \
--hash=sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1 \
--hash=sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92 \
--hash=sha256:61f642bf2378713e2c2e1de73444a3778e5f0a38be6fee0fe532fe30060282ff \
--hash=sha256:8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba \
--hash=sha256:a36d4a9dda1f19ce6e03c9a784a2921a4b726b02e1c736600ca9c22029474394 \
--hash=sha256:a422368fc821589c228f4c49438a368831cb5bbc0eab5ebe1d7fac9dded6567b \
--hash=sha256:e46dae94e34b085175f8abb3b0aaa7da40767865ac82c928eeb9e57e1ea8a543
# via pygithub
python-dateutil==2.9.0.post0 \
--hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \
--hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427
# via -r ./requirements.txt
requests==2.32.3 \
--hash=sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760 \
--hash=sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6
# via pygithub
six==1.17.0 \
--hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \
--hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81
# via python-dateutil
typing-extensions==4.12.2 \
--hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \
--hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8
# via pygithub
urllib3==2.2.3 \
--hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \
--hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9
# via
# pygithub
# requests
wrapt==1.16.0 \
--hash=sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc \
--hash=sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81 \
--hash=sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09 \
--hash=sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e \
--hash=sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca \
--hash=sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0 \
--hash=sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb \
--hash=sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487 \
--hash=sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40 \
--hash=sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c \
--hash=sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060 \
--hash=sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202 \
--hash=sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41 \
--hash=sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9 \
--hash=sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b \
--hash=sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664 \
--hash=sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d \
--hash=sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362 \
--hash=sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00 \
--hash=sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc \
--hash=sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1 \
--hash=sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267 \
--hash=sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956 \
--hash=sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966 \
--hash=sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1 \
--hash=sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228 \
--hash=sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72 \
--hash=sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d \
--hash=sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292 \
--hash=sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0 \
--hash=sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0 \
--hash=sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36 \
--hash=sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c \
--hash=sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5 \
--hash=sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f \
--hash=sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73 \
--hash=sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b \
--hash=sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2 \
--hash=sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593 \
--hash=sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39 \
--hash=sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389 \
--hash=sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf \
--hash=sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf \
--hash=sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89 \
--hash=sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c \
--hash=sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c \
--hash=sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f \
--hash=sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440 \
--hash=sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465 \
--hash=sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136 \
--hash=sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b \
--hash=sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8 \
--hash=sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3 \
--hash=sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8 \
--hash=sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6 \
--hash=sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e \
--hash=sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f \
--hash=sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c \
--hash=sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e \
--hash=sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8 \
--hash=sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2 \
--hash=sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020 \
--hash=sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35 \
--hash=sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d \
--hash=sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3 \
--hash=sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537 \
--hash=sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809 \
--hash=sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d \
--hash=sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a \
--hash=sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4
# via deprecated

View File

@ -1,2 +0,0 @@
pygithub==2.5.0
python-dateutil==2.9.0.post0

View File

@ -1,111 +0,0 @@
#!/usr/bin/env bash
#===----------------------------------------------------------------------===##
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===----------------------------------------------------------------------===##
#
# This script performs a monolithic build of the monorepo and runs the tests of
# most projects on Linux. This should be replaced by per-project scripts that
# run only the relevant tests.
#
source .ci/utils.sh
INSTALL_DIR="${BUILD_DIR}/install"
mkdir -p artifacts/reproducers
# Make sure any clang reproducers will end up as artifacts
export CLANG_CRASH_DIAGNOSTICS_DIR=`realpath artifacts/reproducers`
projects="${1}"
targets="${2}"
runtimes="${3}"
runtime_targets="${4}"
runtime_targets_needs_reconfig="${5}"
enable_cir="${6}"
lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct"
start-group "CMake"
# Set the system llvm-symbolizer as preferred.
export LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer`
[[ ! -f "${LLVM_SYMBOLIZER_PATH}" ]] && echo "llvm-symbolizer not found!"
# Set up all runtimes either way. libcxx is a dependency of LLDB.
# It will not be built unless it is used.
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D LLVM_ENABLE_PROJECTS="${projects}" \
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
-G Ninja \
-D CMAKE_PREFIX_PATH="${HOME}/.local" \
-D CMAKE_BUILD_TYPE=Release \
-D CLANG_ENABLE_CIR=${enable_cir} \
-D LLVM_ENABLE_ASSERTIONS=ON \
-D LLVM_BUILD_EXAMPLES=ON \
-D COMPILER_RT_BUILD_LIBFUZZER=OFF \
-D LLVM_LIT_ARGS="${lit_args}" \
-D LLVM_ENABLE_LLD=ON \
-D CMAKE_CXX_FLAGS=-gmlt \
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
-D CMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
-D LIBCXX_CXX_ABI=libcxxabi \
-D LIBCLC_TARGETS_TO_BUILD="amdgcn-amd-amdhsa-llvm" \
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
-D LLDB_ENABLE_PYTHON=ON \
-D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-D CMAKE_EXE_LINKER_FLAGS="-no-pie" \
-D LLVM_ENABLE_WERROR=ON \
-D LLVM_BINUTILS_INCDIR=/usr
start-group "ninja"
if [[ -n "${targets}" ]]; then
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
fi
if [[ -n "${runtime_targets}" ]]; then
start-group "ninja Runtimes"
ninja -C "${BUILD_DIR}" ${runtime_targets} |& tee ninja_runtimes.log
cp ${BUILD_DIR}/.ninja_log ninja_runtimes.ninja_log
fi
# Compiling runtimes with just-built Clang and running their tests
# as an additional testing for Clang.
if [[ -n "${runtime_targets_needs_reconfig}" ]]; then
start-group "CMake Runtimes C++26"
cmake \
-D LIBCXX_TEST_PARAMS="std=c++26" \
-D LIBCXXABI_TEST_PARAMS="std=c++26" \
"${BUILD_DIR}"
start-group "ninja Runtimes C++26"
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \
|& tee ninja_runtimes_needs_reconfig1.log
cp ${BUILD_DIR}/.ninja_log ninja_runtimes_needs_reconig.ninja_log
start-group "CMake Runtimes Clang Modules"
cmake \
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \
"${BUILD_DIR}"
start-group "ninja Runtimes Clang Modules"
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \
|& tee ninja_runtimes_needs_reconfig2.log
cp ${BUILD_DIR}/.ninja_log ninja_runtimes_needs_reconfig2.ninja_log
fi

View File

@ -1,67 +0,0 @@
#!/usr/bin/env bash
#===----------------------------------------------------------------------===##
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===----------------------------------------------------------------------===##
#
# This script performs a monolithic build of the monorepo and runs the tests of
# most projects on Windows. This should be replaced by per-project scripts that
# run only the relevant tests.
#
source .ci/utils.sh
projects="${1}"
targets="${2}"
runtimes="${3}"
runtimes_targets="${4}"
start-group "CMake"
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
export CC=C:/clang/clang-msvc/bin/clang-cl.exe
export CXX=C:/clang/clang-msvc/bin/clang-cl.exe
export LD=link
# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
# on fixing a build reliability issue on the build server, please
# see https://github.com/llvm/llvm-project/pull/82393 and
# https://discourse.llvm.org/t/rfc-future-of-windows-pre-commit-ci/76840/40
# for further information.
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D LLVM_ENABLE_PROJECTS="${projects}" \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D LLVM_ENABLE_ASSERTIONS=ON \
-D LLVM_BUILD_EXAMPLES=ON \
-D COMPILER_RT_BUILD_LIBFUZZER=OFF \
-D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct" \
-D COMPILER_RT_BUILD_ORC=OFF \
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
-D CMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
-D LIBCLC_TARGETS_TO_BUILD="amdgcn-amd-amdhsa-llvm" \
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
-D LLVM_ENABLE_RUNTIMES="${runtimes}"
start-group "ninja"
if [[ -n "${targets}" ]]; then
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
fi
if [[ -n "${runtimes_targets}" ]]; then
start-group "ninja runtimes"
ninja -C "${BUILD_DIR}" -k 0 ${runtimes_targets} |& tee ninja_runtimes.log
cp ${BUILD_DIR}/.ninja_log ninja_runtimes.ninja_log
fi

View File

@ -1,159 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Script for getting explanations from the premerge advisor."""
import argparse
import platform
import sys
import json
import requests
import github
import github.PullRequest
import generate_test_report_lib
PREMERGE_ADVISOR_URL = (
"http://premerge-advisor.premerge-advisor.svc.cluster.local:5000/explain"
)
COMMENT_TAG = "<!--PREMERGE ADVISOR COMMENT: {platform}-->"
def get_comment_id(platform: str, pr: github.PullRequest.PullRequest) -> int | None:
platform_comment_tag = COMMENT_TAG.format(platform=platform)
for comment in pr.as_issue().get_comments():
if platform_comment_tag in comment.body:
return comment.id
return None
def get_comment(
github_token: str,
pr_number: int,
body: str,
) -> dict[str, str]:
repo = github.Github(auth=github.Auth.Token(github_token)).get_repo(
"llvm/llvm-project"
)
pr = repo.get_issue(pr_number).as_pull_request()
body = COMMENT_TAG.format(platform=platform.system()) + "\n" + body
comment = {"body": body}
comment_id = get_comment_id(platform.system(), pr)
if comment_id:
comment["id"] = comment_id
return comment
def main(
commit_sha: str,
build_log_files: list[str],
github_token: str,
pr_number: int,
return_code: int,
) -> bool:
"""The main entrypoint for the script.
This function parses failures from files, requests information from the
premerge advisor, and may write a Github comment depending upon the output.
There are four different scenarios:
1. There has never been a previous failure and the job passes - We do not
create a comment. We write out an empty file to the comment path so the
issue-write workflow knows not to create anything.
2. There has never been a previous failure and the job fails - We create a
new comment containing the failure information and any possible premerge
advisor findings.
3. There has been a previous failure and the job passes - We update the
existing comment by passing its ID and a passed message to the
issue-write workflow.
4. There has been a previous failure and the job fails - We update the
existing comment in the same manner as above, but generate the comment
as if we have a failure.
Args:
commit_sha: The base commit SHA for this PR run.
build_log_files: The list of JUnit XML files and ninja logs.
github_token: The token to use to access the Github API.
pr_number: The number of the PR associated with this run.
return_code: The numerical return code of ninja/CMake.
"""
junit_objects, ninja_logs = generate_test_report_lib.load_info_from_files(
build_log_files
)
test_failures = generate_test_report_lib.get_failures(junit_objects)
current_platform = f"{platform.system()}-{platform.machine()}".lower()
explanation_request = {
"base_commit_sha": commit_sha,
"platform": current_platform,
"failures": [],
}
if test_failures:
for _, failures in test_failures.items():
for name, failure_messsage in failures:
explanation_request["failures"].append(
{"name": name, "message": failure_messsage}
)
elif return_code != 0:
ninja_failures = generate_test_report_lib.find_failure_in_ninja_logs(ninja_logs)
for name, failure_message in ninja_failures:
explanation_request["failures"].append(
{"name": name, "message": failure_message}
)
comments = []
advisor_explanations = []
if return_code != 0:
advisor_response = requests.get(
PREMERGE_ADVISOR_URL, json=explanation_request, timeout=5
)
if advisor_response.status_code == 200:
print(advisor_response.json())
advisor_explanations = advisor_response.json()
else:
print(advisor_response.reason)
report, failures_explained = generate_test_report_lib.generate_report(
generate_test_report_lib.compute_platform_title(),
return_code,
junit_objects,
ninja_logs,
failure_explanations_list=advisor_explanations,
)
comments.append(get_comment(github_token, pr_number, report))
if return_code == 0 and "id" not in comments[0]:
# If the job succeeds and there is not an existing comment, we
# should not write one to reduce noise.
comments = []
comments_file_name = f"comments-{platform.system()}-{platform.machine()}"
with open(comments_file_name, "w") as comment_file_handle:
json.dump(comments, comment_file_handle)
print(f"Wrote comments to {comments_file_name}")
return failures_explained
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("commit_sha", help="The base commit SHA for the test.")
parser.add_argument("return_code", help="The build's return code", type=int)
parser.add_argument("github_token", help="Github authentication token", type=str)
parser.add_argument("pr_number", help="The PR number", type=int)
parser.add_argument(
"build_log_files", help="Paths to JUnit report files and ninja logs.", nargs="*"
)
args = parser.parse_args()
# Skip looking for results on AArch64 for now because the premerge advisor
# service is not available on AWS currently.
if platform.machine() == "arm64" or platform.machine() == "aarch64":
sys.exit(args.return_code)
failures_explained = main(
args.commit_sha,
args.build_log_files,
args.github_token,
args.pr_number,
args.return_code,
)
if failures_explained:
sys.exit(0)
sys.exit(args.return_code)

View File

@ -1,65 +0,0 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Script for uploading results to the premerge advisor."""
import argparse
import os
import platform
import sys
import requests
import generate_test_report_lib
# These are IP addresses of the two premerge advisor instances. They should
# eventually be updated to domain names.
PREMERGE_ADVISOR_URLS = [
"http://34.82.126.63:5000/upload",
"http://136.114.125.23:5000/upload",
]
def main(commit_sha, workflow_run_number, build_log_files):
junit_objects, ninja_logs = generate_test_report_lib.load_info_from_files(
build_log_files
)
test_failures = generate_test_report_lib.get_failures(junit_objects)
source = "pull_request" if "GITHUB_ACTIONS" in os.environ else "postcommit"
current_platform = f"{platform.system()}-{platform.machine()}".lower()
failure_info = {
"source_type": source,
"base_commit_sha": commit_sha,
"source_id": workflow_run_number,
"failures": [],
"platform": current_platform,
}
if test_failures:
for _, failures in test_failures.items():
for name, failure_message in failures:
failure_info["failures"].append(
{"name": name, "message": failure_message}
)
else:
ninja_failures = generate_test_report_lib.find_failure_in_ninja_logs(ninja_logs)
for name, failure_message in ninja_failures:
failure_info["failures"].append({"name": name, "message": failure_message})
for premerge_advisor_url in PREMERGE_ADVISOR_URLS:
requests.post(premerge_advisor_url, json=failure_info, timeout=5)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("commit_sha", help="The base commit SHA for the test.")
parser.add_argument("workflow_run_number", help="The run number from GHA.")
parser.add_argument(
"build_log_files", help="Paths to JUnit report files and ninja logs.", nargs="*"
)
args = parser.parse_args()
# Skip uploading results on AArch64 for now because the premerge advisor
# service is not available on AWS currently.
if platform.machine() == "arm64" or platform.machine() == "aarch64":
sys.exit(0)
main(args.commit_sha, args.workflow_run_number, args.build_log_files)

View File

@ -1,3 +0,0 @@
junitparser==3.2.0
google-cloud-storage==3.3.0
PyGithub==2.8.1

View File

@ -1,87 +0,0 @@
#!/usr/bin/env bash
#===----------------------------------------------------------------------===##
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===----------------------------------------------------------------------===##
# This script performs some setup and contains some utilities used for in the
# monolithic-linux.sh and monolithic-windows.sh scripts.
set -ex
set -o pipefail
MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
rm -rf "${BUILD_DIR}"
sccache --zero-stats
function at-exit {
retcode=$?
mkdir -p artifacts
sccache --show-stats
sccache --show-stats >> artifacts/sccache_stats.txt
cp "${MONOREPO_ROOT}"/*.ninja_log artifacts/ || :
cp "${MONOREPO_ROOT}"/*.log artifacts/ || :
cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
# If building fails there will be no results files.
shopt -s nullglob
if [[ -n "$GITHUB_ACTIONS" ]]; then
python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py \
$retcode "${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log \
>> $GITHUB_STEP_SUMMARY
if [[ -n "$GITHUB_PR_NUMBER" ]]; then
(python "${MONOREPO_ROOT}"/.ci/premerge_advisor_explain.py \
$(git rev-parse HEAD~1) $retcode "${GITHUB_TOKEN}" \
$GITHUB_PR_NUMBER "${BUILD_DIR}"/test-results.*.xml \
"${MONOREPO_ROOT}"/ninja*.log)
advisor_retcode=$?
else
advisor_retcode=$retcode
fi
fi
if [[ "$retcode" != "0" ]]; then
if [[ -n "$GITHUB_ACTIONS" ]]; then
python "${MONOREPO_ROOT}"/.ci/premerge_advisor_upload.py \
$(git rev-parse HEAD~1) $GITHUB_RUN_NUMBER \
"${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log
else
python "${MONOREPO_ROOT}"/.ci/premerge_advisor_upload.py \
$(git rev-parse HEAD) $BUILDBOT_BUILDNUMBER \
"${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log
fi
fi
if [[ -n "$GITHUB_ACTIONS" ]]; then
exit $advisor_retcode
fi
}
trap at-exit EXIT
function start-group {
groupname=$1
if [[ -n "$GITHUB_ACTIONS" ]]; then
echo "::endgroup"
echo "::group::$groupname"
elif [[ -n "$POSTCOMMIT_CI" ]]; then
echo "@@@$STEP@@@"
else
echo "Starting $groupname"
fi
}
export PIP_BREAK_SYSTEM_PACKAGES=1
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
# The ARM64 builders run on AWS and don't have access to the GCS cache.
if [[ -n "$GITHUB_ACTIONS" ]] && [[ "$RUNNER_ARCH" != "ARM64" ]]; then
python .ci/cache_lit_timing_files.py download
fi

View File

@ -1,2 +0,0 @@
BasedOnStyle: LLVM
LineEnding: LF

View File

View File

@ -1,39 +0,0 @@
HeaderFilterRegex: ''
Checks: >
-*,
clang-diagnostic-*,
llvm-*,
misc-*,
-misc-const-correctness,
-misc-include-cleaner,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-unused-parameters,
-misc-use-anonymous-namespace,
readability-identifier-naming
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
# Exclude from scanning as this is an exported symbol used for fuzzing
# throughout the code base.
- key: readability-identifier-naming.FunctionIgnoredRegexp
value: "LLVMFuzzerTestOneInput"
- key: readability-identifier-naming.MemberCase
value: CamelCase
- key: readability-identifier-naming.ParameterCase
value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: CamelCase
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 1
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
value: 1
- key: modernize-use-default-member-init.UseAssignment
value: 1

View File

@ -1,154 +0,0 @@
# Since version 2.23 (released in August 2019), git-blame has a feature
# to ignore or bypass certain commits.
#
# This file contains a list of commits that are not likely what you
# are looking for in a blame, such as mass reformatting or renaming.
# You can set this file as a default ignore file for blame by running
# the following command.
#
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
# r365730: [Coding style change][lld] Rename variables for non-ELF ports
136d27ab4de0c1d5dedfecc32a9857be78fa0648
# r365595: [Coding style change] Rename variables so that they start with a lowercase letter
3837f4273fcc40cc519035479aefe78e5cbd3055
# r280751: [Coding style change][lldb] Moved LLDB code base to use LLVM style
b9c1b51e45b845debb76d8658edabca70ca56079
# r302421: That change incorrectly changed line endings in some libc++ files
9669df28d4fd3c52d09f451186bd217cdc3322c0
# r302496: That is the revert of r302421
ff63090b0e1072bd398b8efef8ae2291613a6ec9
# Fix more line endings changed in r320089. NFC.
d8f0e6caa91e230a486c948ab643174e40bdf215
# Correct line endings that got mixed up in r320089; NFC.
29dc5ded45447915d96ef7ca3f02acf2232282e0
# Remove line-endings added by r320089. NFC.
100a0eedc00b2bf48bcdc6c209c000745a4a0e48
# Cleanup __config indention. NFC.
2b772b930e097ed6f06d698a51e291c7fd318baa
# Fixing whitespace problems
94b2dd0998230c758abd92c99d3700c971f7a31a
# Wiped out some non-ascii characters that snuck into the copyright.
5b08a8a43254ed30bd953e869b0fd9fc1e8b82d0
# Use C++11 default member initializers in LLDB. NFC.
9494c510af56d9c8593ab69017dcaa232210b235
# [libc++][NFC] clang-format <__config>
ac251726f84d5b7e6533a2e3712920184435b61b
# Python black reformatting, by subdir. NFC
b71edfaa4ec3c998aadb35255ce2f60bba2940b0
f84bac329ba6c9f0c022bcf77237e912362e247a
dd3c26a045c081620375a878159f536758baba6e
7bfaa0f09d0564f315ea778023b34b8a113ec740
f98ee40f4b5d7474fc67e82824bf6abbaedb7b1c
2238dcc39358353cac21df75c3c3286ab20b8f53
f9008e6366c2496b1ca1785b891d5578174ad63e
# [libc++][NFC] Apply clang-format on large parts of the code base
5aa03b648b827128d439f705cd7d57d59673741d
# [clang][NFC] Remove trailing whitespaces and enforce it in lib, include and docs
f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81
# [libc++][NFC] clang-format <shared_mutex>
2d7eb9c9ea1a146412a83603d5c0c6339a5d8284
# [libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI
4c198542226223f6a5c5511a1f89b37d15ee10b9
# [libc++] Replace uses of _VSTD:: by std:: (#74331)
77a00c0d546cd4aa8311b5b9031ae9ea8cdb050c
# [libc++] Format the code base (#74334)
9783f28cbb155e4a8d49c12e1c60ce14dcfaf0c7
# [RFC] compiler-rt builtins cleanup and refactoring
082b89b25faae3e45a023caf51b65ca0f02f377f
0ba22f51d128bee9d69756c56c4678097270e10b
84da0e1bb75f8666cf222d2f600f37bebb9ea389
# [NFC] clang-format utils/TableGen (#80973)
b9079baaddfed5e604fbfaa1d81a7a1c38e78c26
# [libc++][NFC] Run clang-format on libcxx/include again (#95874)
e2c2ffbe7a1b5d9e32a2ce64279475b50c4cba5b
# [lldb][nfc] Deindent ProcessGDBRemote::SetThreadStopInfo by two levels
b32931c5b32eb0d2cf37d688b34f8548c9674c19
# [libc++] Various consistency fixes to the CSV files that we use for tracking Standards Conformance
64946fdaf9864d8279da1c30e4d7214fe13d1427
b6262880b34629e9d7a72b5a42f315a3c9ed8139
39c7dc7207e76e72da21cf4fedda21b5311bf62d
e80bc777749331e9519575f416c342f7626dd14d
7e5cd8f1b6c5263ed5e2cc03d60c8779a8d3e9f7
# NFC: clang-format test_demangle.pass.cpp but keep test "lines"
d33bf2e9df578ff7e44fd22504d6ad5a122b7ee6
# [lldb][NFC] clang-format MainLoopPosix.cpp
66bdbfbaa08fa3d8e64a7fe136a8fb717f5cdbb7
# [clang-tidy][NFC] Run clang-format on "clang-tools-extra/clang-tidy"
65d66625b3e2b8322ed99d82edabecbafcd0885b
ce46adb8b7ce645353eccaedf31ed9765dab77bb
68070f908bb7ac5f0b5fa9722caa504ecf723f6b
5213c57cb1f0d78aad9a253b7f6a2b62ff4c7859
# [mlir] Update create method
9e7834cadf48292b5d127d6d98f9e6d565ed5d9a
284a5c2c0b97edddf255ea210f939203ad3d09f2
c090ed53fb73f59cf221f5610430af8047758117
fcbcfe44cff00101a6a98a73971398eb8dd87710
258daf539583b80e0217d1d87941412d65cf16aa
c610b244937ed847b0275ccb038c0f2d36310b4a
b58ad3650f2195117f484d551ffbada27e7d1e14
258d04c810ab10f101324cbf1fe3c7be65eb1938
a6bf40d1c6cf010b3ad90bf7f410983453f4deb2
dcfc853c51aecf6538182378c016f8e1604e7e97
3f74334c38120bbdefac012d478dfce8e4eb0906
a636b7bfdd1d8304b78e8b42ec900a21736d4afb
75aa7065dcf653de7870758cd502a7c714f4bcd7
2f5312563fd5cb2e355ec49109f3e63875337c7c
967626b842551ecd997c0d10eb68c3015b63a3d7
588845defd09359a8b87db339b563af848cf45a7
b0434925c98c9a8906afea60a1304c870b1f574a
8fff238b2c363b036ce9e7bf7abab3acafc87ab2
38976a03cd367b27437e0d1e81c0ccaee2777b47
eaa67a3cf041009ae33a45159d0465262c3af5dc
b0312be6aa664e4cb9abec6d080e971493093d05
2736fbd8324bf21a130c8abd4bd0e7d3aa840ac1
4ae9fdca8af095afd91705f8dd143e93b304b6fb
f904cdd6c3049e605d24ed17680e80e7133908a0
972ac59c9af4ad47af0b3542ae936b3470727e5f
7b787965431e666858fdf66db25ee5a129833927
c3823af156b517d926a56e3d0d585e2a15720e96
dce6679cf5cbbdaffb9c2b51dc762c5c6689ea78
9844ba6d9740206129b52633c555f767eaa45581
5547c6cd03ddddd405a09e51624e1f19955a85b1
a3a007ad5fa20abc90ead4e1030b481bf109b4cf
46f6df0848ea04449c6179ecdedc404ee5b5cf11
b7e332d3f59f567b1999fbcc660d7837cba8e406
6056f942abe83b05406df8b04e95ec37a3d160b5
906295b8a31c8dac5aa845864c0bca9f02f86184
# [clang-tidy][NFC] Remove trailing whitespaces in documentation
8f2b167de4a1268160c06512d08863a9e8f43290
# [clang-tidy][NFC] Enforce 80 characters limit in docs
5edf70c41c5d69f3751b4199f642f4585599dade
c73870dbe89a8219130e21a0b3f13df76d299352
74c40293c309dbd142bf1f0ebfbfde6be8d30655
a7ba8dcad76476478100c228a31d9c48391b1e03

144
.gitattributes vendored
View File

@ -1,144 +0,0 @@
clang/bindings/python/.git_archival.txt export-subst
libcxx/src/**/*.cpp merge=libcxx-reformat
libcxx/include/**/*.h merge=libcxx-reformat
# Explicitly handle files with no extension
libcxx/include/__availability merge=libcxx-reformat
libcxx/include/__bit_reference merge=libcxx-reformat
libcxx/include/__config merge=libcxx-reformat
libcxx/include/__hash_table merge=libcxx-reformat
libcxx/include/__locale merge=libcxx-reformat
libcxx/include/__node_handle merge=libcxx-reformat
libcxx/include/__split_buffer merge=libcxx-reformat
libcxx/include/__std_clang_module merge=libcxx-reformat
libcxx/include/__threading_support merge=libcxx-reformat
libcxx/include/__tree merge=libcxx-reformat
libcxx/include/__verbose_abort merge=libcxx-reformat
libcxx/include/algorithm merge=libcxx-reformat
libcxx/include/any merge=libcxx-reformat
libcxx/include/array merge=libcxx-reformat
libcxx/include/atomic merge=libcxx-reformat
libcxx/include/barrier merge=libcxx-reformat
libcxx/include/bit merge=libcxx-reformat
libcxx/include/bitset merge=libcxx-reformat
libcxx/include/cassert merge=libcxx-reformat
libcxx/include/ccomplex merge=libcxx-reformat
libcxx/include/cctype merge=libcxx-reformat
libcxx/include/cerrno merge=libcxx-reformat
libcxx/include/cfenv merge=libcxx-reformat
libcxx/include/cfloat merge=libcxx-reformat
libcxx/include/charconv merge=libcxx-reformat
libcxx/include/chrono merge=libcxx-reformat
libcxx/include/cinttypes merge=libcxx-reformat
libcxx/include/ciso646 merge=libcxx-reformat
libcxx/include/climits merge=libcxx-reformat
libcxx/include/clocale merge=libcxx-reformat
libcxx/include/cmath merge=libcxx-reformat
libcxx/include/codecvt merge=libcxx-reformat
libcxx/include/compare merge=libcxx-reformat
libcxx/include/complex merge=libcxx-reformat
libcxx/include/concepts merge=libcxx-reformat
libcxx/include/condition_variable merge=libcxx-reformat
libcxx/include/coroutine merge=libcxx-reformat
libcxx/include/csetjmp merge=libcxx-reformat
libcxx/include/csignal merge=libcxx-reformat
libcxx/include/cstdarg merge=libcxx-reformat
libcxx/include/cstdbool merge=libcxx-reformat
libcxx/include/cstddef merge=libcxx-reformat
libcxx/include/cstdint merge=libcxx-reformat
libcxx/include/cstdio merge=libcxx-reformat
libcxx/include/cstdlib merge=libcxx-reformat
libcxx/include/cstring merge=libcxx-reformat
libcxx/include/ctgmath merge=libcxx-reformat
libcxx/include/ctime merge=libcxx-reformat
libcxx/include/cuchar merge=libcxx-reformat
libcxx/include/cwchar merge=libcxx-reformat
libcxx/include/cwctype merge=libcxx-reformat
libcxx/include/deque merge=libcxx-reformat
libcxx/include/exception merge=libcxx-reformat
libcxx/include/execution merge=libcxx-reformat
libcxx/include/expected merge=libcxx-reformat
libcxx/include/experimental/__config merge=libcxx-reformat
libcxx/include/experimental/__memory merge=libcxx-reformat
libcxx/include/experimental/deque merge=libcxx-reformat
libcxx/include/experimental/forward_list merge=libcxx-reformat
libcxx/include/experimental/iterator merge=libcxx-reformat
libcxx/include/experimental/list merge=libcxx-reformat
libcxx/include/experimental/map merge=libcxx-reformat
libcxx/include/experimental/memory merge=libcxx-reformat
libcxx/include/experimental/memory_resource merge=libcxx-reformat
libcxx/include/experimental/propagate_const merge=libcxx-reformat
libcxx/include/experimental/regex merge=libcxx-reformat
libcxx/include/experimental/set merge=libcxx-reformat
libcxx/include/experimental/simd merge=libcxx-reformat
libcxx/include/experimental/string merge=libcxx-reformat
libcxx/include/experimental/type_traits merge=libcxx-reformat
libcxx/include/experimental/unordered_map merge=libcxx-reformat
libcxx/include/experimental/unordered_set merge=libcxx-reformat
libcxx/include/experimental/utility merge=libcxx-reformat
libcxx/include/experimental/vector merge=libcxx-reformat
libcxx/include/ext/__hash merge=libcxx-reformat
libcxx/include/ext/hash_map merge=libcxx-reformat
libcxx/include/ext/hash_set merge=libcxx-reformat
libcxx/include/filesystem merge=libcxx-reformat
libcxx/include/format merge=libcxx-reformat
libcxx/include/forward_list merge=libcxx-reformat
libcxx/include/fstream merge=libcxx-reformat
libcxx/include/functional merge=libcxx-reformat
libcxx/include/future merge=libcxx-reformat
libcxx/include/initializer_list merge=libcxx-reformat
libcxx/include/iomanip merge=libcxx-reformat
libcxx/include/ios merge=libcxx-reformat
libcxx/include/iosfwd merge=libcxx-reformat
libcxx/include/iostream merge=libcxx-reformat
libcxx/include/istream merge=libcxx-reformat
libcxx/include/iterator merge=libcxx-reformat
libcxx/include/latch merge=libcxx-reformat
libcxx/include/limits merge=libcxx-reformat
libcxx/include/list merge=libcxx-reformat
libcxx/include/locale merge=libcxx-reformat
libcxx/include/map merge=libcxx-reformat
libcxx/include/mdspan merge=libcxx-reformat
libcxx/include/memory merge=libcxx-reformat
libcxx/include/memory_resource merge=libcxx-reformat
libcxx/include/mutex merge=libcxx-reformat
libcxx/include/new merge=libcxx-reformat
libcxx/include/numbers merge=libcxx-reformat
libcxx/include/numeric merge=libcxx-reformat
libcxx/include/optional merge=libcxx-reformat
libcxx/include/ostream merge=libcxx-reformat
libcxx/include/print merge=libcxx-reformat
libcxx/include/queue merge=libcxx-reformat
libcxx/include/random merge=libcxx-reformat
libcxx/include/ranges merge=libcxx-reformat
libcxx/include/ratio merge=libcxx-reformat
libcxx/include/regex merge=libcxx-reformat
libcxx/include/scoped_allocator merge=libcxx-reformat
libcxx/include/semaphore merge=libcxx-reformat
libcxx/include/set merge=libcxx-reformat
libcxx/include/shared_mutex merge=libcxx-reformat
libcxx/include/source_location merge=libcxx-reformat
libcxx/include/span merge=libcxx-reformat
libcxx/include/sstream merge=libcxx-reformat
libcxx/include/stack merge=libcxx-reformat
libcxx/include/stdexcept merge=libcxx-reformat
libcxx/include/stop_token merge=libcxx-reformat
libcxx/include/streambuf merge=libcxx-reformat
libcxx/include/string merge=libcxx-reformat
libcxx/include/string_view merge=libcxx-reformat
libcxx/include/strstream merge=libcxx-reformat
libcxx/include/syncstream merge=libcxx-reformat
libcxx/include/system_error merge=libcxx-reformat
libcxx/include/thread merge=libcxx-reformat
libcxx/include/tuple merge=libcxx-reformat
libcxx/include/type_traits merge=libcxx-reformat
libcxx/include/typeindex merge=libcxx-reformat
libcxx/include/typeinfo merge=libcxx-reformat
libcxx/include/unordered_map merge=libcxx-reformat
libcxx/include/unordered_set merge=libcxx-reformat
libcxx/include/utility merge=libcxx-reformat
libcxx/include/valarray merge=libcxx-reformat
libcxx/include/variant merge=libcxx-reformat
libcxx/include/vector merge=libcxx-reformat
libcxx/include/version merge=libcxx-reformat

204
.github/CODEOWNERS vendored
View File

@ -1,204 +0,0 @@
# This file lists reviewers that are auto-assigned when a pull request modifies
# certain files or directories. If you add yourself to this file, you commit to
# reviewing a large fraction of pull requests in the relevant area.
#
# The GitHub "code owners" mechanism is used exclusively to auto-assign
# reviewers and does not carry significance beyond that. It is not necessary
# to receive an approval from a "code owner" in particular -- any LLVM project
# member can approve pull requests.
#
# This is independent of LLVM's own "maintainer" concept.
# See https://llvm.org/docs/DeveloperPolicy.html#maintainers as well as the
# Maintainers.* files in the the respective subproject directories.
/libcxx/ @llvm/reviewers-libcxx
/libcxxabi/ @llvm/reviewers-libcxxabi
/libunwind/ @llvm/reviewers-libunwind
/runtimes/ @llvm/reviewers-libcxx
/llvm/lib/Analysis/BasicAliasAnalysis.cpp @nikic
/llvm/lib/Analysis/HashRecognize.cpp @artagnon @pfusik
/llvm/lib/Analysis/InstructionSimplify.cpp @nikic
/llvm/lib/Analysis/LazyValueInfo.cpp @nikic
/llvm/lib/Analysis/ScalarEvolution.cpp @nikic
/llvm/lib/Analysis/ValueTracking.cpp @nikic
/llvm/lib/IR/ConstantRange.cpp @nikic
/llvm/lib/IR/Core.cpp @nikic
/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp @nikic
/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp @nikic
/llvm/lib/Transforms/InstCombine/ @nikic
# AMDGPU buffer pointer lowerings
/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp @krzysz00
/clang/test/CXX/drs/ @Endilll
/clang/www/cxx_dr_status.html @Endilll
/clang/www/make_cxx_dr_status @Endilll
/clang/include/clang/CIR @lanza @bcardosolopes @xlauko @andykaylor
/clang/lib/CIR @lanza @bcardosolopes @xlauko @andykaylor
/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp @lanza @bcardosolopes @xlauko @andykaylor @banach-space
/clang/tools/cir-* @lanza @bcardosolopes @xlauko @andykaylor
/lldb/ @JDevlieghere
/lldb/**/*FreeBSD* @mchoo7
# MLIR Interfaces.
/mlir/include/mlir/Interfaces/TilingInterface.* @MaheshRavishankar @nicolasvasilache
/mlir/lib/Interfaces/TilingInterface.* @MaheshRavishankar @nicolasvasilache
/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.* @matthias-springer
/mlir/lib/Interfaces/ValueBoundsOpInterface.* @matthias-springer
/mlir/**/ValueBoundsOpInterfaceImpl.* @matthias-springer
/mlir/include/mlir/Interfaces/RuntimeVerifiableOpInterface.* @matthias-springer
/mlir/lib/Interfaces/RuntimeVerifiableOpInterface.* @matthias-springer
/mlir/**/RuntimeVerifiableOpInterfaceImpl.* @matthias-springer
/mlir/include/mlir/Interfaces/SubsetOpInterface.* @matthias-springer
/mlir/lib/Interfaces/SubsetOpInterface.* @matthias-springer
/mlir/**/SubsetOpInterfaceImpl.* @matthias-springer
/mlir/include/mlir/Interfaces/DestinationStyleOpInterface.* @matthias-springer
/mlir/lib/Interfaces/DestinationStyleOpInterface.* @matthias-springer
/mlir/**/Interfaces/ControlFlowInterfaces.* @matthias-springer
# AMDGPU and ROCDL dialects in MLIR.
/mlir/include/mlir/Dialect/AMDGPU @krzysz00 @kuhar
/mlir/lib/Dialect/AMDGPU @krzysz00 @kuhar
/mlir/lib/Conversion/*AMDGPU* @krzysz00 @kuhar
/mlir/lib/Conversion/*ToROCDL @krzysz00 @kuhar
/mlir/include/mlir/Dialect/LLVMIR/ROCDL* @krzysz00 @kuhar
# Arith dialect in MLIR.
/mlir/include/mlir/Dialect/Arith @kuhar
/mlir/lib/Dialect/Arith @kuhar
/mlir/lib/Conversion/ArithTo* @kuhar
# XeGPU and XeVM dialects in MLIR.
/mlir/include/mlir/Dialect/XeGPU @charithaintc @Jianhui-Li
/mlir/lib/Dialect/XeGPU @charithaintc @Jianhui-Li
/mlir/lib/Conversion/*XeGPU* @charithaintc @Jianhui-Li
/mlir/include/mlir/Dialect/XeGPU/Transforms @charithaintc @Jianhui-Li
/mlir/lib/Dialect/XeGPU/Transforms @charithaintc @Jianhui-Li
/mlir/include/mlir/Dialect/XeGPU/TransformOps @charithaintc @Jianhui-Li @tkarna
/mlir/lib/Dialect/XeGPU/TransformOps @charithaintc @Jianhui-Li @tkarna
/mlir/include/mlir/Dialect/LLVMIR/XeVM* @silee2
/mlir/lib/Dialect/LLVMIR/IR/XeVM @silee2
/mlir/lib/Conversion/*XeVM* @silee2
# Bufferization Dialect in MLIR.
/mlir/include/mlir/Dialect/Bufferization @matthias-springer
/mlir/lib/Dialect/Bufferization @matthias-springer
/mlir/**/BufferizableOpInterfaceImpl.* @matthias-springer
/mlir/Dialect/*/Transforms/Bufferize.cpp @matthias-springer
# DLTI Dialect in MLIR
/mlir/**/Dialect/DLTI @rolfmorel
/mlir/**/DataLayoutInterfaces.* @rolfmorel
# Linalg Dialect in MLIR.
/mlir/include/mlir/Dialect/Linalg @dcaballe @nicolasvasilache @rengolin
/mlir/lib/Dialect/Linalg @dcaballe @nicolasvasilache @rengolin
/mlir/lib/Dialect/Linalg/Transforms/DecomposeLinalgOps.cpp @MaheshRavishankar @nicolasvasilache
/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp @dcaballe @MaheshRavishankar @nicolasvasilache
/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp @MaheshRavishankar @nicolasvasilache
/mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp @nicolasvasilache
/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp @dcaballe @nicolasvasilache
/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp @banach-space @dcaballe @nicolasvasilache @Groverkss
# MemRef Dialect in MLIR.
/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp @MaheshRavishankar @nicolasvasilache
# Vector Dialect in MLIR.
/mlir/**/*AMX* @aartbik @dcaballe
/mlir/**/*Neon* @banach-space @dcaballe @nicolasvasilache
/mlir/**/*SME* @banach-space @dcaballe @nicolasvasilache
/mlir/**/*SVE* @banach-space @dcaballe @nicolasvasilache
/mlir/**/*VectorInterfaces* @dcaballe @nicolasvasilache
/mlir/**/*VectorToSCF* @banach-space @dcaballe @matthias-springer @nicolasvasilache
/mlir/**/*VectorToLLVM* @banach-space @dcaballe @nicolasvasilache
/mlir/**/*X86Vector* @aartbik @dcaballe @nicolasvasilache
/mlir/include/mlir/Dialect/Vector @banach-space @dcaballe @nicolasvasilache @Groverkss
/mlir/include/mlir/Dialect/Vector/IR @kuhar
/mlir/lib/Dialect/Vector @banach-space @dcaballe @nicolasvasilache @Groverkss
/mlir/lib/Dialect/Vector/Transforms/* @banach-space @dcaballe @nicolasvasilache
/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp @banach-space @dcaballe @MaheshRavishankar @nicolasvasilache
/mlir/**/*EmulateNarrowType* @dcaballe
# Presburger library in MLIR
/mlir/**/*Presburger* @Groverkss @Superty
# Tensor Dialect in MLIR.
/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp @nicolasvasilache
/mlir/lib/Dialect/Tensor/Transforms/* @nicolasvasilache
# Transform Dialect in MLIR.
/mlir/include/mlir/Dialect/Transform/* @ftynse @nicolasvasilache @rolfmorel
/mlir/lib/Dialect/Transform/* @ftynse @nicolasvasilache @rolfmorel
/mlir/**/*TransformOps* @ftynse @nicolasvasilache @rolfmorel
# SPIR-V Dialect in MLIR.
/mlir/**/SPIRV/ @antiagainst @kuhar @IgWod
/mlir/**/SPIRVTo*/ @antiagainst @kuhar @IgWod
/mlir/**/*ToSPIRV/ @antiagainst @kuhar @IgWod
/mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp @antiagainst @kuhar @IgWod
# MLIR Sparsifier.
/mlir/**/*SparseTensor*/ @aartbik @PeimingLiu @yinying-lisa-li @matthias-springer
# MLIR NVGPU Dialect
/mlir/**/NVGPU*/ @grypp
/mlir/test/**/CUDA/ @grypp
# MLIR GPU Dialect
/mlir/**/GPU*/ @fabianmcg
# MLIR NVVM Dialect in MLIR
/mlir/**/LLVMIR/**/BasicPtxBuilderInterface* @grypp
/mlir/**/NVVM* @grypp
# MLIR Index Dialect
/mlir/**/Index* @mogball
# MLIR Python Bindings
/mlir/test/python/ @ftynse @makslevental @stellaraccident @rolfmorel
/mlir/python/ @ftynse @makslevental @stellaraccident @rolfmorel
/mlir/lib/Bindings/Python @makslevental @rolfmorel
/mlir/include/Bindings/Python @makslevental @rolfmorel
# MLIR Mem2Reg/SROA
/mlir/**/Transforms/Mem2Reg.* @moxinilian
/mlir/**/Transforms/SROA.* @moxinilian
# MLIR IRDL-related
/mlir/**/*IRDL* @moxinilian
# BOLT
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @yota9 @paschalis-mpeis @yozhu @yavtuk
# Bazel build system.
/utils/bazel/ @rupprecht @keith @aaronmondal
# InstallAPI and TextAPI
/llvm/**/TextAPI/ @cyndyishida
/clang/**/InstallAPI/ @cyndyishida
/clang/tools/clang-installapi/ @cyndyishida
# ExtractAPI
/clang/**/ExtractAPI @QuietMisdreavus @snprajwal
# DWARFLinker, dwarfutil, dsymutil
/llvm/**/DWARFLinker/ @JDevlieghere
/llvm/**/dsymutil/ @JDevlieghere
/llvm/**/llvm-dwarfutil/ @JDevlieghere
# libclang/Python bindings
/clang/bindings/python @DeinAlptraum
# AMDGPU assembler and disassembler
/llvm-project/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp @jwanggit86
/llvm-project/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp @jwanggit86
# Clang Driver
/clang/lib/Driver/ToolChains/AMDGPU.cpp @lamb-j
/clang/lib/Driver/OffloadBundler.cpp @lamb-j @david-salinas
# GlobalIsel
/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalize* @vangthao95

View File

@ -1,95 +0,0 @@
name: Build Container
description: >-
Build and test a container using the standard llvm naming scheme for containers.
inputs:
tag:
description: >-
The tag to use for this container.
required: false
container-name:
description: >-
The name for the container.
required: true
dockerfile:
description: >-
Path to docker file.
required: false
target:
description: >-
The container target to build 'passed to podman via ---target option'
required: false
context:
description: >-
Path to context for the container build.
required: false
test-command:
description: >-
Test command to run to ensure the container is working correctly.
required: false
runs:
using: "composite"
steps:
# podman is not installed by default on the ARM64 images.
- name: Install Podman
if: runner.arch == 'ARM64'
shell: bash
run: |
sudo apt-get install podman
- name: Build Container
shell: bash
env:
INPUT_TAG: ${{inputs.tag }}
INPUT_CONTAINER_NAME: ${{ inputs.container-name }}
INPUT_TARGET: ${{ inputs.target }}
INPUT_DOCKERFILE: ${{ inputs.dockerfile }}
INPUT_CONTEXT: ${{ inputs.context }}
id: build
run: |
env
tag="${INPUT_TAG:-$(git rev-parse --short=12 HEAD)}"
case "$RUNNER_ARCH" in
ARM64)
container_arch="arm64v8"
;;
*)
container_arch="amd64"
;;
esac
container_name="ghcr.io/$GITHUB_REPOSITORY_OWNER/$container_arch/$INPUT_CONTAINER_NAME:$tag"
container_filename="$(echo $container_name | sed -e 's/\//-/g' -e 's/:/-/g').tar"
if [ -n "$INPUT_TARGET" ]; then
podman_options="$podman_options --target $INPUT_TARGET"
fi
if [ -n "$INPUT_DOCKERFILE" ]; then
podman_options="$podman_options -f $INPUT_DOCKERFILE"
fi
podman_options="$podman_options ${INPUT_CONTEXT:-.}"
echo "Podman Options: $podman_options"
podman build -t $container_name $podman_options
podman save $container_name > $container_filename
echo "container-full-name=$container_name" >> $GITHUB_OUTPUT
- name: Create container artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ inputs.container-name }}-${{ runner.arch }}
path: "*.tar"
retention-days: 14
- name: Test container
shell: bash
if: inputs.test-command
env:
INPUT_TEST_COMMAND: ${{ inputs.test-command }}
CONTAINER_FULL_NAME: ${{ steps.build.outputs.container-full-name }}
run: |
podman run --pull=never --rm -it $CONTAINER_FULL_NAME /usr/bin/bash -x -c "$INPUT_TEST_COMMAND"

View File

@ -1,44 +0,0 @@
name: Push Container
description: >-
Download all container artifacts for this job and push them to the GitHub registry.
inputs:
token:
description: >-
Token to use to authenticate with the container registry.
required: true
runs:
using: "composite"
steps:
- name: Download container
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- name: Push Container
env:
GITHUB_TOKEN: ${{ inputs.token }}
shell: bash
run: |
function push_container {
image_name=$1
latest_name=$(echo $image_name | sed 's/:[a-f0-9]\+$/:latest/g')
podman tag $image_name $latest_name
echo "Pushing $image_name ..."
podman push --compression-format=zstd $image_name
echo "Pushing $latest_name ..."
podman push --compression-format=zstd $latest_name
}
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
for f in $(find . -iname '*.tar'); do
image_name=$(podman load -q -i $f | sed 's/Loaded image: //g')
push_container $image_name
if echo $image_name | grep '/amd64/'; then
# For amd64, create an alias with the arch component removed.
# This matches the convention used on dockerhub.
default_image_name=$(echo $(dirname $(dirname $image_name))/$(basename $image_name))
podman tag $image_name $default_image_name
push_container $default_image_name
fi
done

View File

@ -1,79 +0,0 @@
---
applyTo: lldb/**/*
---
When reviewing code, focus on:
## Language, Libraries & Standards
- Target C++17 and avoid vendor-specific extensions.
- For Python scripts, follow PEP8.
- Prefer standard library or LLVM support libraries instead of reinventing data structures.
## Comments & Documentation
- Each source file should include the standard LLVM file header.
- Header files must have proper header guards.
- Non-trivial classes and public methods should have Doxygen documentation.
- Use `//` or `///` comments normally; avoid block comments unless necessary.
- Non-trivial code should have comments explaining what it does and why. Avoid comments that explain how it does it at a micro level.
## Language & Compiler Issues
- Write portable code; wrap non-portable code in interfaces.
- Do not use RTTI or exceptions.
- Prefer C++-style casts over C-style casts.
- Do not use static constructors.
- Use `class` or `struct` consistently; `struct` only for all-public data.
- When then same class is declared or defined multiple times, make sure it's consistently done using either `class` or `struct`.
## Headers & Library Layering
- Include order: module header → local/private headers → project headers → system headers.
- Headers must compile standalone (include all dependencies).
- Maintain proper library layering; avoid circular dependencies.
- Include minimally; use forward declarations where possible.
- Keep internal headers private to modules.
- Use full namespace qualifiers for out-of-line definitions.
## Control Flow & Structure
- Prefer early exits over deep nesting.
- Do not use `else` after `return`, `continue`, `break`, or `goto`.
- Encapsulate loops that compute predicates into helper functions.
## Naming
- LLDB's code style differs from LLVM's coding style.
- Variables are `snake_case`.
- Functions and methods are `UpperCamelCase`.
- Static, global and member variables have `s_`, `g_` and `m_` prefixes respectively.
## General Guidelines
- Use `assert` liberally; prefer `llvm_unreachable` for unreachable states.
- Do not use `using namespace std;` in headers.
- Provide a virtual method anchor for classes defined in headers.
- Do not use default labels in fully covered switches over enumerations.
- Use range-based for loops wherever possible.
- Capture `end()` outside loops if not using range-based iteration.
- Including `<iostream>` is forbidded. Use LLVMs `raw_ostream` instead.
- Dont use `inline` when defining a function in a class definition.
## Microscopic Details
- Preserve existing style in modified code.
- Prefer pre-increment (`++i`) when value is unused.
- Use `private`, `protected`, or `public` keyword as appropriate to restrict class member visibility.
- Omit braces for single-statement `if`, `else`, `while`, `for` unless needed.
## Review Style
- Be specific and actionable in feedback.
- Explain the "why" behind recommendations.
- Link back to the LLVM Coding Standards: https://llvm.org/docs/CodingStandards.html.
- Ask clarifying questions when code intent is unclear.
Ignore formatting and assume that's handled by external tools like `clang-format` and `black`.
Remember that these standards are **guidelines**.
Always prioritize consistency with the style that is already being used by the surrounding code.

View File

@ -1,8 +0,0 @@
---
applyTo: llvm/**/*
---
When performing a code review, pay close attention to code modifying a function's
control flow. Could the change result in the corruption of performance profile
data? Could the change result in invalid debug information, in particular for
branches and calls?

View File

@ -1,38 +0,0 @@
'clang':
- '/\bclang(?!\-)\b/i'
'clang-format':
- '/\bclang-format/i'
'clang-tidy':
- '/\bclang-tidy/i'
'libc++':
- '/libc[+x]{2}(?!\-)/i'
'libc++abi':
- '/libc[+x]{2}-?abi/i'
'libc':
- '/\blibc(?![-+])\b/i'
'flang':
- '/\bflang(?!\-)\b/i'
'lld':
- '/\blld(?!\-)\b/i'
'mlir':
- '/\bmlir(?!\-)\b/i'
'bolt':
- '/\bbolt(?!\-)\b/i'
'infra:commit-access-request':
- '/Request Commit Access/'
'false-positive':
- '\bfalse[- ]positive\b'
'false-negative':
- '\bfalse[- ]negative\b'

File diff suppressed because it is too large Load Diff

25
.github/renovate.json vendored
View File

@ -1,25 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"includePaths": [".github/**"],
"schedule": "* 0 * * 1",
"minimumReleaseAge": "3 days",
"assignees": ["boomanaiden154"],
"ignorePaths": [".github/workflows/containers/**"],
"groupName": "[Github] Update GHA Dependencies",
"packageRules": [
{
"matchPackageNames": ["windows", "macos"],
"matchManagers": ["github-actions"],
"enabled": false
},
{
"matchPackageNames": ["python"],
"matchManagers": ["github-actions"],
"matchFileNames": ["release-binaries.yml"],
"enabled": false
}
]
}

View File

@ -1 +0,0 @@
Github action workflows should be stored in this directory.

View File

@ -1,74 +0,0 @@
name: Bazel Checks
permissions:
contents: read
on:
push:
paths:
- '.github/workflows/bazel-checks.yml'
- 'utils/bazel/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/bazel-checks.yml'
- 'utils/bazel/**'
jobs:
buildifier:
name: "Buildifier"
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Setup Buildifier
run: |
sudo curl -L https://github.com/bazelbuild/buildtools/releases/download/v8.2.1/buildifier-linux-amd64 -o /usr/bin/buildifier --fail
sudo chmod +x /usr/bin/buildifier
- name: Run Buildifier
run: |
BZL_FILES=$(find ./utils/bazel -name *BUILD* -o -name '*bzl' -o -name '*.bazel')
if ! buildifier --mode=check $BZL_FILES; then
echo "::error::Buildifier formatting issues found."
echo "::group::Buildifier Diff"
buildifier --mode=diff $BZL_FILES
echo "::endgroup::"
exit 1
else
echo "All files are formatted correctly."
fi
bazel-build:
name: "Bazel Build/Test"
# Only run on US Central workers so we only have to keep one cache warm as
# the cache buckets are per cluster.
runs-on:
group: llvm-premerge-cluster-us-central
labels: llvm-premerge-linux-runners
if: github.repository == 'llvm/llvm-project'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
# TODO(boomanaiden154): We should use a purpose built container for this. Move
# over when we have fixed the issues with using custom containers with Github
# ARC in GKE.
- name: Setup System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libmpfr-dev libpfm4-dev m4 libedit-dev
sudo curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-amd64.deb --fail > /tmp/bazelisk.deb
sudo apt-get install -y /tmp/bazelisk.deb
rm /tmp/bazelisk.deb
- name: Build/Test
working-directory: utils/bazel
run: |
bazelisk test --config=ci --sandbox_base="" \
--remote_cache=https://storage.googleapis.com/$CACHE_GCS_BUCKET-bazel \
--google_default_credentials \
@llvm-project//... //...

View File

@ -1,79 +0,0 @@
name: Build CI Tooling Containers
permissions:
contents: read
on:
push:
branches:
- main
paths:
- .github/workflows/build-ci-container-tooling.yml
- '.github/workflows/containers/github-action-ci-tooling/**'
- llvm/utils/git/requirements_formatting.txt
- llvm/utils/git/requirements_linting.txt
- '.github/actions/build-container/**'
- '.github/actions/push-container/**'
pull_request:
paths:
- .github/workflows/build-ci-container-tooling.yml
- '.github/workflows/containers/github-action-ci-tooling/**'
- llvm/utils/git/requirements_formatting.txt
- llvm/utils/git/requirements_linting.txt
- '.github/actions/build-container/**'
- '.github/actions/push-container/**'
jobs:
build-ci-container-tooling:
name: Build Container ${{ matrix.container-name }}
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- container-name: format
test-command: 'cd $HOME && clang-format --version | grep version && git-clang-format -h | grep usage && black --version | grep black'
- container-name: lint
test-command: 'cd $HOME && clang-tidy --version | grep version && clang-tidy-diff.py -h | grep usage'
- container-name: abi-tests
test-command: 'cd $HOME && abi-compliance-checker --help'
target: abi-tests
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/workflows/containers/github-action-ci-tooling/
llvm/utils/git/requirements_formatting.txt
llvm/utils/git/requirements_linting.txt
clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py
.github/actions/build-container
- name: Build Container
uses: ./.github/actions/build-container
with:
container-name: ci-ubuntu-24.04-${{ matrix.container-name }}
dockerfile: .github/workflows/containers/github-action-ci-tooling/Dockerfile
target: ci-container-${{ matrix.target || format('code-{0}', matrix.container-name) }}
test-command: ${{ matrix.test-command }}
push-ci-container:
if: github.event_name == 'push'
needs:
- build-ci-container-tooling
permissions:
packages: write
runs-on: ubuntu-24.04
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/actions/push-container
- uses: ./.github/actions/push-container
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,78 +0,0 @@
name: Build Windows CI Container
permissions:
contents: read
on:
push:
branches:
- main
paths:
- .github/workflows/build-ci-container-windows.yml
- '.github/workflows/containers/github-action-ci-windows/**'
pull_request:
paths:
- .github/workflows/build-ci-container-windows.yml
- '.github/workflows/containers/github-action-ci-windows/**'
jobs:
build-ci-container-windows:
if: github.repository_owner == 'llvm'
runs-on: windows-2022
outputs:
container-name: ${{ steps.vars.outputs.container-name }}
container-name-tag: ${{ steps.vars.outputs.container-name-tag }}
container-filename: ${{ steps.vars.outputs.container-filename }}
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: .github/workflows/containers/github-action-ci-windows
- name: Write Variables
id: vars
run: |
$tag = [int64](Get-Date -UFormat %s)
$container_name="ghcr.io/$env:GITHUB_REPOSITORY_OWNER/ci-windows-2022"
echo "container-name=${container_name}" >> $env:GITHUB_OUTPUT
echo "container-name-tag=${container_name}:${tag}" >> $env:GITHUB_OUTPUT
echo "container-filename=ci-windows-${tag}.tar" >> $env:GITHUB_OUTPUT
- name: Build Container
working-directory: .github/workflows/containers/github-action-ci-windows
run: |
docker build -t ${{ steps.vars.outputs.container-name-tag }} .
- name: Save container image
run: |
docker save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
- name: Upload container image
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: container
path: ${{ steps.vars.outputs.container-filename }}
retention-days: 14
push-ci-container:
if: github.event_name == 'push'
needs:
- build-ci-container-windows
permissions:
packages: write
runs-on: ubuntu-24.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Download container
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: container
- name: Push Container
run: |
sudo apt-get update
sudo apt-get install -y skopeo
skopeo login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
skopeo copy docker-archive:${{ needs.build-ci-container-windows.outputs.container-filename }} \
--dest-compress-format zstd \
docker://${{ needs.build-ci-container-windows.outputs.container-name-tag }}
skopeo copy docker-archive:${{ needs.build-ci-container-windows.outputs.container-filename }} \
--dest-compress-format zstd \
docker://${{ needs.build-ci-container-windows.outputs.container-name }}:latest

View File

@ -1,74 +0,0 @@
name: Build CI Container
permissions:
contents: read
on:
push:
branches:
- main
paths:
- .github/workflows/build-ci-container.yml
- '.github/workflows/containers/github-action-ci/**'
- '.github/actions/build-container/**'
- '.github/actions/push-container/**'
pull_request:
paths:
- .github/workflows/build-ci-container.yml
- '.github/workflows/containers/github-action-ci/**'
- '.github/actions/build-container/**'
- '.github/actions/push-container/**'
jobs:
build-ci-container:
name: Build Container ${{ matrix.container-name }} ${{ (contains(matrix.runs-on, 'arm') && 'ARM64') || 'X64' }}
if: github.repository_owner == 'llvm'
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
runs-on:
- depot-ubuntu-24.04-16
- depot-ubuntu-24.04-arm-16
container-name:
- ''
- agent
test-command:
- cd $HOME && printf '#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }' | clang++ -x c++ - && ./a.out | grep Hello
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/workflows/containers/github-action-ci/
.github/actions/build-container
- name: Build Container
uses: ./.github/actions/build-container
with:
container-name: ci-ubuntu-24.04${{ matrix.container-name && format('-{0}', matrix.container-name)}}
context: .github/workflows/containers/github-action-ci/
dockerfile: .github/workflows/containers/github-action-ci/Dockerfile
target: ci-container${{ matrix.container-name && format('-{0}', matrix.container-name) }}
test-command: ${{ matrix.test-command }}
push-ci-container:
if: github.event_name == 'push'
needs:
- build-ci-container
permissions:
packages: write
runs-on: ubuntu-24.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/actions/push-container
- uses: ./.github/actions/push-container
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,60 +0,0 @@
name: Build libc Container
permissions:
contents: read
on:
push:
branches:
- main
paths:
- .github/workflows/build-libc-container.yml
- '.github/workflows/containers/libc/**'
pull_request:
paths:
- .github/workflows/build-libc-container.yml
- '.github/workflows/containers/libc/**'
jobs:
build-libc-container:
name: Build libc container
if: github.repository_owner == 'llvm'
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
runs-on:
- ubuntu-24.04
- ubuntu-24.04-arm
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/workflows/containers/libc/
.github/actions/build-container
- name: Build Container
uses: ./.github/actions/build-container
with:
container-name: libc-ubuntu-24.04
dockerfile: .github/workflows/containers/libc/Dockerfile
target: ''
test-command: ${{ matrix.test-command }}
push-libc-container:
if: github.event_name == 'push'
needs:
- build-libc-container
permissions:
packages: write
runs-on: ubuntu-24.04
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/actions/push-container
- uses: ./.github/actions/push-container
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,58 +0,0 @@
name: Build Metrics Container
permissions:
contents: read
on:
push:
branches:
- main
paths:
- .github/workflows/build-metrics-container.yml
- '.ci/metrics/**'
pull_request:
branches:
- main
paths:
- .github/workflows/build-metrics-container.yml
- '.ci/metrics/**'
jobs:
build-metrics-container:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.ci/metrics/
.github/actions/build-container
- name: Build Container
uses: ./.github/actions/build-container
with:
container-name: metrics
context: .ci/metrics
dockerfile: .ci/metrics/Dockerfile
push-metrics-container:
if: github.event_name == 'push'
needs:
- build-metrics-container
permissions:
packages: write
runs-on: ubuntu-24.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/actions/push-container
- uses: ./.github/actions/push-container
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,41 +0,0 @@
name: Check CI Scripts
permissions:
contents: read
on:
push:
branches:
- main
paths:
- '.ci/**'
- '.github/workflows/check-ci.yml'
pull_request:
paths:
- '.ci/**'
- '.github/workflows/check-ci.yml'
jobs:
test-python:
name: "Check Python Tests"
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: .ci
- name: Setup Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.14
cache: 'pip'
- name: Install Python Dependencies
run: |
pip3 install -r .ci/all_requirements.txt
pip3 install -r .ci/metrics/requirements.lock.txt
pip3 install pytest==8.4.1
- name: Run Tests
working-directory: .ci
run: pytest

View File

@ -1,34 +0,0 @@
import json
import multiprocessing
import os
import re
import subprocess
import sys
def run_analyzer(data):
os.chdir(data["directory"])
command = (
data["command"]
+ f" --analyze --analyzer-output html -o analyzer-results -Xclang -analyzer-config -Xclang max-nodes=75000"
)
print(command)
subprocess.run(command, shell=True, check=True)
def pool_error(e):
print("Error analyzing file:", e)
def main():
db_path = sys.argv[1]
database = json.load(open(db_path))
with multiprocessing.Pool() as pool:
pool.map_async(run_analyzer, [k for k in database], error_callback=pool_error)
pool.close()
pool.join()
if __name__ == "__main__":
main()

View File

@ -1,97 +0,0 @@
name: Post-Commit Static Analyzer
permissions:
contents: read
on:
push:
branches:
- 'release/**'
paths:
- 'clang/**'
- 'llvm/**'
- '.github/workflows/ci-post-commit-analyzer.yml'
pull_request:
types:
- opened
- synchronize
- reopened
- closed
paths:
- '.github/workflows/ci-post-commit-analyzer.yml'
- '.github/workflows/ci-post-commit-analyzer-run.py'
schedule:
- cron: '30 0 * * *'
concurrency:
group: >-
llvm-project-${{ github.workflow }}-${{ github.event_name == 'pull_request' &&
( github.event.pull_request.number || github.ref) }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
post-commit-analyzer:
if: >-
github.repository_owner == 'llvm' &&
github.event.action != 'closed'
runs-on: ubuntu-24.04
container:
image: 'ghcr.io/llvm/ci-ubuntu-24.04:latest'
env:
LLVM_VERSION: 18
steps:
- name: Checkout Source
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Setup ccache
uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20
with:
# A full build of llvm, clang, lld, and lldb takes about 250MB
# of ccache space. There's not much reason to have more than this,
# because we usually won't need to save cache entries from older
# builds. Also, there is an overall 10GB cache limit, and each
# run creates a new cache entry so we want to ensure that we have
# enough cache space for all the tests to run at once and still
# fit under the 10 GB limit.
# Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
max-size: 2G
key: post-commit-analyzer
variant: sccache
- name: Configure
run: |
cmake -B build -S llvm -G Ninja \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_PROJECTS=clang \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DLLVM_INCLUDE_TESTS=OFF \
-DCLANG_INCLUDE_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
# FIXME: We need to build all the generated header files in order to be able to run
# the analyzer on every file. Building libLLVM and libclang is probably overkill for
# this, but it's better than building every target.
ninja -v -C build libLLVM.so libclang.so
# Run the analyzer.
python3 .github/workflows/ci-post-commit-analyzer-run.py build/compile_commands.json
scan-build --generate-index-only build/analyzer-results
- name: Upload Results
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: analyzer-results
path: 'build/analyzer-results/*'

View File

@ -1,41 +0,0 @@
name: Commit Access Greeter
on:
issues:
types:
- labeled
permissions:
contents: read
jobs:
commit-access-greeter:
permissions:
issues: write
pull-requests: read
if: >-
github.repository_owner == 'llvm' &&
github.event.label.name == 'infra:commit-access-request'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: llvm/utils/git/
- name: Setup Automation Script
working-directory: ./llvm/utils/git/
run: |
pip install --require-hashes -r requirements.txt
- name: Add comments to issue
working-directory: ./llvm/utils/git/
env:
LABEL_NAME: ${{ github.event.label.name }}
GITHUB_TOKEN: ${{ github.token }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
python3 ./github-automation.py \
--token $GITHUB_TOKEN \
commit-request-greeter \
--issue-number $ISSUE_NUMBER

View File

@ -1,340 +0,0 @@
#!/usr/bin/env python3
# ===-- commit-access-review.py --------------------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ===------------------------------------------------------------------------===#
#
# ===------------------------------------------------------------------------===#
import concurrent.futures
import datetime
import github
import re
import requests
import time
import sys
import re
class User:
THRESHOLD = 5
def __init__(self, name, triage_list):
self.name = name
self.authored = 0
self.merged = 0
self.reviewed = 0
self.triage_list = triage_list
def add_authored(self, val=1):
self.authored += val
if self.meets_threshold():
print(self.name, "meets the threshold with authored commits")
del self.triage_list[self.name]
def set_authored(self, val):
self.authored = 0
self.add_authored(val)
def add_merged(self, val=1):
self.merged += val
if self.meets_threshold():
print(self.name, "meets the threshold with merged commits")
del self.triage_list[self.name]
def add_reviewed(self, val=1):
self.reviewed += val
if self.meets_threshold():
print(self.name, "meets the threshold with reviewed commits")
del self.triage_list[self.name]
def get_total(self):
return self.authored + self.merged + self.reviewed
def meets_threshold(self):
return self.get_total() >= self.THRESHOLD
def __repr__(self):
return "{} : a: {} m: {} r: {}".format(
self.name, self.authored, self.merged, self.reviewed
)
def check_manual_requests(
gh: github.Github, start_date: datetime.datetime
) -> list[str]:
"""
Return a list of users who have been asked since ``start_date`` if they
want to keep their commit access or if they have applied for commit
access since ``start_date``
"""
query = """
query ($query: String!, $after: String) {
search(query: $query, type: ISSUE, first: 100, after: $after) {
nodes {
... on Issue {
author {
login
}
body
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
"""
formatted_start_date = start_date.strftime("%Y-%m-%dT%H:%M:%S")
variables = {
"query": f"type:issue created:>{formatted_start_date} org:llvm repo:llvm-project label:infra:commit-access,infra:commit-access-request"
}
has_next_page = True
users = []
while has_next_page:
res_header, res_data = gh._Github__requester.graphql_query(
query=query, variables=variables
)
data = res_data["data"]
for issue in data["search"]["nodes"]:
users.extend([user[1:] for user in re.findall("@[^ ,\n]+", issue["body"])])
if issue["author"]:
users.append(issue["author"]["login"])
has_next_page = data["search"]["pageInfo"]["hasNextPage"]
if has_next_page:
variables["after"] = data["search"]["pageInfo"]["endCursor"]
return users
def get_num_commits(gh: github.Github, user: str, start_date: datetime.datetime) -> int:
"""
Get number of commits that ``user`` has been made since ``start_date`.
"""
variables = {
"owner": "llvm",
"user": user,
"start_date": start_date.strftime("%Y-%m-%dT%H:%M:%S"),
}
user_query = """
query ($user: String!) {
user(login: $user) {
id
}
}
"""
res_header, res_data = gh._Github__requester.graphql_query(
query=user_query, variables=variables
)
data = res_data["data"]
variables["user_id"] = data["user"]["id"]
query = """
query ($owner: String!, $user_id: ID!, $start_date: GitTimestamp!){
organization(login: $owner) {
teams(query: "llvm-committers" first:1) {
nodes {
repositories {
nodes {
ref(qualifiedName: "main") {
target {
... on Commit {
history(since: $start_date, author: {id: $user_id }) {
totalCount
}
}
}
}
}
}
}
}
}
}
"""
count = 0
res_header, res_data = gh._Github__requester.graphql_query(
query=query, variables=variables
)
data = res_data["data"]
for repo in data["organization"]["teams"]["nodes"][0]["repositories"]["nodes"]:
count += int(repo["ref"]["target"]["history"]["totalCount"])
if count >= User.THRESHOLD:
break
return count
def get_review_count(
gh: github.Github, user: str, start_date: datetime.datetime
) -> int:
"""
Return the number of reviews that ``user`` has done since ``start_date``.
"""
query = """
query ($query: String!) {
search(query: $query, type: ISSUE, first: 5) {
issueCount
}
}
"""
formatted_start_date = start_date.strftime("%Y-%m-%dT%H:%M:%S")
variables = {
"owner": "llvm",
"repo": "llvm-project",
"user": user,
"query": f"type:pr commenter:{user} -author:{user} merged:>{formatted_start_date} org:llvm",
}
res_header, res_data = gh._Github__requester.graphql_query(
query=query, variables=variables
)
data = res_data["data"]
return int(data["search"]["issueCount"])
def count_prs(gh: github.Github, triage_list: dict, start_date: datetime.datetime):
"""
Fetch all the merged PRs for the project since ``start_date`` and update
``triage_list`` with the number of PRs merged for each user.
"""
query = """
query ($query: String!, $after: String) {
search(query: $query, type: ISSUE, first: 100, after: $after) {
issueCount,
nodes {
... on PullRequest {
author {
login
}
mergedBy {
login
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
"""
date_begin = start_date
date_end = None
while date_begin < datetime.datetime.now():
date_end = date_begin + datetime.timedelta(days=7)
formatted_date_begin = date_begin.strftime("%Y-%m-%dT%H:%M:%S")
formatted_date_end = date_end.strftime("%Y-%m-%dT%H:%M:%S")
variables = {
"query": f"type:pr is:merged merged:{formatted_date_begin}..{formatted_date_end} org:llvm",
}
has_next_page = True
while has_next_page:
print(variables)
res_header, res_data = gh._Github__requester.graphql_query(
query=query, variables=variables
)
data = res_data["data"]
for pr in data["search"]["nodes"]:
# Users can be None if the user has been deleted.
if not pr["author"]:
continue
author = pr["author"]["login"]
if author in triage_list:
triage_list[author].add_authored()
if not pr["mergedBy"]:
continue
merger = pr["mergedBy"]["login"]
if author == merger:
continue
if merger not in triage_list:
continue
triage_list[merger].add_merged()
has_next_page = data["search"]["pageInfo"]["hasNextPage"]
if has_next_page:
variables["after"] = data["search"]["pageInfo"]["endCursor"]
date_begin = date_end
# 4 because that's how many cores the default github runners have. Also, if we
# make this too high, we risk hitting some of GitHub's secondary rate limits.
THREAD_POOL_MAX_WORKERS = 4
def main():
token = sys.argv[1]
gh = github.Github(auth=github.Auth.Token(token))
org = gh.get_organization("llvm")
repo = org.get_repo("llvm-project")
one_year_ago = datetime.datetime.now() - datetime.timedelta(days=365)
triage_list = {}
for collaborator in repo.get_collaborators(permission="push"):
triage_list[collaborator.login] = User(collaborator.login, triage_list)
print("Start:", len(triage_list), "triagers")
# Step 0 Check if users have requested commit access in the last year.
for user in check_manual_requests(gh, one_year_ago):
if user in triage_list:
print(user, "requested commit access in the last year.")
del triage_list[user]
print("After Request Check:", len(triage_list), "triagers")
# Step 1 count all PRs authored or merged
count_prs(gh, triage_list, one_year_ago)
print("After PRs:", len(triage_list), "triagers")
if len(triage_list) == 0:
sys.exit(0)
# Step 2 check for reviews
with concurrent.futures.ThreadPoolExecutor(
max_workers=THREAD_POOL_MAX_WORKERS
) as executor:
executor.map(
lambda user: triage_list[user].add_reviewed(
get_review_count(gh, user, one_year_ago)
),
list(triage_list.keys()),
)
print("After Reviews:", len(triage_list), "triagers")
if len(triage_list) == 0:
sys.exit(0)
# Step 3 check for number of commits
with concurrent.futures.ThreadPoolExecutor(
max_workers=THREAD_POOL_MAX_WORKERS
) as executor:
# Override the total number of commits to not double count commits and
# authored PRs.
executor.map(
lambda user: triage_list[user].set_authored(
get_num_commits(gh, user, one_year_ago)
),
list(triage_list.keys()),
)
print("After Commits:", len(triage_list), "triagers")
print("Complete:", len(triage_list), "triagers")
with open("triagers.log", "w") as triagers_log:
for user in triage_list:
print(triage_list[user].__repr__())
triagers_log.write(user + "\n")
if __name__ == "__main__":
main()

View File

@ -1,55 +0,0 @@
name: Commit Access Review
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 7 1 * *'
permissions:
contents: read
issues: write
jobs:
commit-access-review:
if: github.repository_owner == 'llvm'
environment: main-branch-only
runs-on: ubuntu-24.04
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Install dependencies
run: |
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
- id: app-token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf #v2.2.1
with:
app-id: ${{ secrets.LLVM_TOKEN_GENERATOR_CLIENT_ID }}
private-key: ${{ secrets.LLVM_TOKEN_GENERATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
permission-members: read
permission-contents: read
- name: Run Script
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
python3 .github/workflows/commit-access-review.py $GITHUB_TOKEN
- name: Upload Triage List
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: triagers
path: triagers.log
- name: Create the issue
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
# There is a limit to the number of mentions you can have in one comment, so
# we need to limit the number of users we mention.
cat triagers.log | head -n 25 | python3 .github/workflows/commit-create-issue.py $GITHUB_TOKEN

View File

@ -1,42 +0,0 @@
import github
import sys
token = sys.argv[1]
gh = github.Github(auth=github.Auth.Token(token))
repo = gh.get_repo("llvm/llvm-project")
length = "4 weeks"
names = " ".join(["@" + name.rstrip() for name in sys.stdin])
body = f"""### TLDR: If you want to retain your commit access, please comment on this issue. Otherwise, you can unsubscribe from this issue and ignore it. Commit access is not required to contribute to the project. You can still create Pull Requests without commit access.
{names}
LLVM has a policy of downgrading write access to its repositories for accounts with long term inactivity. This is done because inactive accounts with high levels of access tend to be at increased risk of compromise and this is one tactic that the project employs to guard itself from malicious actors. Note that write access is not required to contribute to the project. You can still submit pull requests and have someone else merge them.
Our project policy is to ping anyone with less than five 'interactions' with the repositories over a 12 month period to see if they still need commit access. An 'interaction' and be any one of:
* Pushing a commit.
* Merging a pull request (either their own or someone elses).
* Commenting on a PR.
If you want to retain your commit access, please post a comment on this issue. If you do not want to keep your commit access, you can just ignore this issue. If you have not responded in {length}, then you will move moved from the 'write' role within the project to the 'triage' role. The 'triage' role is still a privileged role and will allow you to do the following:
* Review Pull Requests.
* Comment on issues.
* Apply/dismiss labels.
* Close, reopen, and assign all issues and pull requests.
* Apply milestones.
* Mark duplicate issues and pull requests.
* Request pull request reviews.
* Hide anyones comments.
In the future, if you want to re-apply for commit access, you can follow the instructions
[here](https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access).
"""
issue = repo.create_issue(
title="Do you still need commit access?", body=body, labels=["infra:commit-access"]
)
print(issue.html_url)

View File

@ -1,115 +0,0 @@
ARG LLVM_VERSION=22.1.0
# FIXME: Use "${LLVM_VERSION%%.*}" instead of "LLVM_VERSION_MAJOR" once we update runners to Ubuntu-26.04 with Buildah >= 1.37
ARG LLVM_VERSION_MAJOR=22
FROM docker.io/library/ubuntu:24.04 AS llvm-downloader
ARG LLVM_VERSION
ARG LLVM_VERSION_MAJOR
RUN apt-get update && \
apt-get install -y wget xz-utils && \
wget -O llvm.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/LLVM-${LLVM_VERSION}-Linux-X64.tar.xz && \
mkdir -p /llvm-extract && \
tar -xvJf llvm.tar.xz -C /llvm-extract \
# Only unpack these tools to save space on Github runner.
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-${LLVM_VERSION_MAJOR} \
LLVM-${LLVM_VERSION}-Linux-X64/lib/clang/${LLVM_VERSION_MAJOR}/include \
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy \
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \
LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format && \
rm llvm.tar.xz
FROM docker.io/library/ubuntu:24.04 AS base
ENV LLVM_SYSROOT=/opt/llvm
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
# Need nodejs for some of the GitHub actions.
# Need git for git-clang-format.
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
nodejs \
sudo \
# These are needed by the premerge pipeline.
# Pip is used to install dependent python packages.
python3-pip \
python-is-python3 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create a new user with id 1001 as that is the user id that
# Github Actions uses to perform the checkout action.
RUN useradd gha -u 1001 -m -s /bin/bash
RUN adduser gha sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Don't set USER gha right away because we still need to install packages
# as root in 'ci-container-code-format' and 'ci-container-code-lint' containers
FROM base AS ci-container-build-tools
ARG LLVM_VERSION
ARG LLVM_VERSION_MAJOR
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-${LLVM_VERSION_MAJOR} \
${LLVM_SYSROOT}/bin/
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/lib/clang/${LLVM_VERSION_MAJOR}/include \
${LLVM_SYSROOT}/lib/clang/${LLVM_VERSION_MAJOR}/include
RUN ln -s ${LLVM_SYSROOT}/bin/clang-${LLVM_VERSION_MAJOR} ${LLVM_SYSROOT}/bin/clang && \
ln -s ${LLVM_SYSROOT}/bin/clang ${LLVM_SYSROOT}/bin/clang++
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
cmake \
ninja-build && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV CC=${LLVM_SYSROOT}/bin/clang
ENV CXX=${LLVM_SYSROOT}/bin/clang++
FROM base AS ci-container-code-format
ARG LLVM_VERSION
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \
/llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format \
${LLVM_SYSROOT}/bin/
# Install dependencies for 'pr-code-format.yml' job
COPY llvm/utils/git/requirements_formatting.txt requirements_formatting.txt
RUN pip install -r requirements_formatting.txt --break-system-packages && \
rm requirements_formatting.txt
USER gha
WORKDIR /home/gha
FROM ci-container-build-tools AS ci-container-code-lint
ARG LLVM_VERSION
ARG LLVM_VERSION_MAJOR
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy \
${LLVM_SYSROOT}/bin/
COPY clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py ${LLVM_SYSROOT}/bin/clang-tidy-diff.py
# Install dependencies for 'pr-code-lint.yml' job
COPY llvm/utils/git/requirements_linting.txt requirements_linting.txt
RUN pip install -r requirements_linting.txt --break-system-packages && \
rm requirements_linting.txt
USER gha
WORKDIR /home/gha
FROM ci-container-build-tools as ci-container-abi-tests
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
abi-compliance-checker \
abi-dumper \
autoconf \
parallel \
pkg-config \
universal-ctags && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

View File

@ -1,144 +0,0 @@
# Agent image for LLVM org cluster.
# .net 4.8 is required by chocolately package manager.
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
# Download the Build Tools bootstrapper.
ADD https://aka.ms/vs/17/release/vs_buildtools.exe /TEMP/vs_buildtools.exe
RUN powershell -Command Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Download channel for fixed install.
ARG CHANNEL_URL=https://aka.ms/vs/17/release/channel
ADD ${CHANNEL_URL} /TEMP/VisualStudio.chman
# Install Build Tools with C++ workload.
# - Documentation for docker installation
# https://docs.microsoft.com/en-us/visualstudio/install/build-tools-container
# - Documentation on workloads
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools
# - Documentation on flags
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio
RUN /TEMP/vs_buildtools.exe --quiet --wait --norestart --nocache \
--channelUri C:\TEMP\VisualStudio.chman \
--installChannelUri C:\TEMP\VisualStudio.chman \
--installPath C:\BuildTools \
--add Microsoft.VisualStudio.Workload.VCTools \
--add Microsoft.VisualStudio.Component.VC.ATL \
--includeRecommended \
|| IF "%ERRORLEVEL%"=="3010" EXIT 0
# Register DIA dll (Debug Interface Access) so it can be used to symbolize
# the stack traces. Register dll for 32 and 64 bit.
# see https://developercommunity.visualstudio.com/content/problem/290674/msdia140dll-is-not-registered-on-vs2017-hosts.html
RUN regsvr32 /S "C:\BuildTools\DIA SDK\bin\amd64\msdia140.dll" & \
regsvr32 /S "C:\BuildTools\DIA SDK\bin\msdia140.dll"
# install tools as described in https://llvm.org/docs/GettingStartedVS.html
# and a few more that were not documented...
# We version pin the other packages as well to ensure the container build is as
# reproducible as possible to prevent issues when upgrading only part of the
# container.
RUN choco install -y ninja --version 1.13.1 && \
choco install -y git --version 2.50.1 && \
choco install -y sccache --version 0.10.0 && \
choco install -y python3 --version 3.12.3
# Testing requires psutil
RUN pip install psutil
# configure Python encoding
ENV PYTHONIOENCODING=UTF-8
# update the path variable
# C:\Program Files\Git\usr\bin contains a usable bash and other unix tools.
# C:\llvm-mingw\bin contains Clang configured for mingw targets and
# corresponding sysroots. Both the 'llvm' package (with Clang defaulting
# to MSVC targets) and this directory contains executables named
# 'clang.exe' - add this last to let the other one have precedence.
# To use these compilers, use the triple prefixed form, e.g.
# x86_64-w64-mingw32-clang.
# C:\buildtools and SDK paths are ones that are set by c:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=amd64 -host_arch=amd64
RUN powershell -Command \
[System.Environment]::SetEnvironmentVariable('PATH', \
[System.Environment]::GetEnvironmentVariable('PATH', 'machine') + ';C:\Program Files\Git\usr\bin;C:\llvm-mingw\bin' \
+ ';C:\BuildTools\Common7\IDE\' \
+ ';C:\BuildTools\Common7\IDE\CommonExt ensions\Microsoft\TeamFoundation\Team Explorer' \
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin' \
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja' \
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer' \
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow' \
+ ';C:\BuildTools\Common7\IDE\VC\VCPackages' \
+ ';C:\BuildTools\Common7\Tools\' \
+ ';C:\BuildTools\Common7\Tools\devinit' \
+ ';C:\BuildTools\MSBuild\Current\Bin' \
+ ';C:\BuildTools\MSBuild\Current\bin\Roslyn' \
+ ';C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64' \
+ ';C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\' \
+ ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64' \
+ ';C:\Program Files (x86)\Windows Kits\10\bin\x64' \
+ ';C:\Windows\Microsoft.NET\Framework64\v4.0.30319' \
,'machine')
# support long file names during git checkout
RUN git config --system core.longpaths true & \
git config --global core.autocrlf false
# Enable long paths so that ninja can work with paths longer than 260 characters.
RUN powershell -Command \
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" \
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
ARG RUNNER_VERSION=2.332.0
ENV RUNNER_VERSION=$RUNNER_VERSION
RUN powershell -Command \
Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v${env:RUNNER_VERSION}/actions-runner-win-x64-${env:RUNNER_VERSION}.zip -OutFile actions-runner-win.zip ; \
Add-Type -AssemblyName System.IO.Compression.FileSystem ; \
[System.IO.Compression.ZipFile]::ExtractToDirectory('actions-runner-win.zip', $PWD) ;\
rm actions-runner-win.zip
# Set the LLVM_VERSION environment variable
ENV LLVM_VERSION=22.1.0
# Download and extract Clang compiler.
# Create directories, download, extract, and clean up all in one layer
RUN powershell -Command \
# --- Setup directories --- \
Write-Host "Creating directories..."; \
New-Item -Path "C:\temp-download" -ItemType "Directory" -Force ; \
New-Item -Path "C:\xz-utils" -ItemType "Directory" -Force ; \
New-Item -Path "C:\clang" -ItemType "Directory" -Force ; \
# --- 1. Download and extract xz --- \
Set-Location C:\temp-download ; \
Invoke-WebRequest -Uri "http://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1-windows.zip" -OutFile "xz.zip"; \
(Get-FileHash -Path "C:\temp-download\xz.zip" -Algorithm MD5).Hash -eq 'c3c69fdce3e825cc0b76123b36b0bcc2' ; \
Add-Type -AssemblyName "System.IO.Compression.FileSystem"; \
[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\temp-download\xz.zip', 'C:\xz-utils'); \
# --- 2. Download and decompress Clang --- \
Invoke-WebRequest -Uri "http://github.com/llvm/llvm-project/releases/download/llvmorg-${env:LLVM_VERSION}/clang+llvm-${env:LLVM_VERSION}-x86_64-pc-windows-msvc.tar.xz" -OutFile "clang+llvm-${env:LLVM_VERSION}-x86_64-pc-windows-msvc.tar.xz" ; \
(Get-FileHash -Path "C:\temp-download\clang+llvm-${env:LLVM_VERSION}-x86_64-pc-windows-msvc.tar.xz" -Algorithm MD5).Hash -eq '0ae1d3effd9ab9d323f7fa595777f0a2' ; \
C:\xz-utils\bin_x86-64\xz.exe -d -qq clang+llvm-${env:LLVM_VERSION}-x86_64-pc-windows-msvc.tar.xz ; \
# --- 3. Extract clang --- \
C:\Windows\System32\tar.exe -xf clang+llvm-${env:LLVM_VERSION}-x86_64-pc-windows-msvc.tar -C C:\clang ; \
# --- 4. Clean up --- \
Set-Location C:\ ; \
Remove-Item C:\temp-download -Recurse -Force; \
Remove-Item C:\xz-utils -Recurse -Force; \
# -- 5. Shorten path to clang files & remove unnecessary files -- \
Set-Location C:\clang ; \
Rename-Item -Path "C:\clang\clang+llvm-${env:LLVM_VERSION}-x86_64-pc-windows-msvc" -NewName "C:\clang\clang-msvc" ; \
Set-Location C:\clang\clang-msvc ; \
Remove-Item -Path C:\clang\clang-msvc\libexec -Recurse -Force ; \
Remove-Item -Path C:\clang\clang-msvc\share -Recurse -Force ; \
Rename-Item -Path "C:\clang\clang-msvc\bin" -NewName "C:\clang\clang-msvc\bin-full" ; \
New-Item -Path "C:\clang\clang-msvc\bin" -ItemType Directory -Force ; \
Set-Location C:\clang\clang-msvc\bin ; \
Copy-Item -Path C:\clang\clang-msvc\bin-full\*.dll -Destination C:\clang\clang-msvc\bin\. ; \
Copy-Item -Path C:\clang\clang-msvc\bin-full\clang-cl.exe -Destination C:\clang\clang-msvc\bin\. ; \
Copy-Item -Path C:\clang\clang-msvc\bin-full\lld-link.exe -Destination C:\clang\clang-msvc\bin\. ; \
Set-Location C:\clang\clang-msvc ; \
Remove-Item -Path C:\clang\clang-msvc\bin-full -Recurse -Force ;

View File

@ -1,110 +0,0 @@
FROM docker.io/library/ubuntu:24.04 AS base
ENV LLVM_SYSROOT=/opt/llvm
FROM base AS stage1-toolchain
ENV LLVM_VERSION=22.1.0
RUN apt-get update && \
apt-get install -y \
wget \
gcc \
g++ \
cmake \
ninja-build \
python3 \
git \
curl \
zlib1g-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN curl -O -L https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-$LLVM_VERSION.tar.gz && \
tar -xf llvmorg-$LLVM_VERSION.tar.gz && \
rm -f llvmorg-$LLVM_VERSION.tar.gz
WORKDIR /llvm-project-llvmorg-$LLVM_VERSION
RUN cmake -B ./build -G Ninja ./llvm \
-C ./clang/cmake/caches/BOLT-PGO.cmake \
-DBOOTSTRAP_LLVM_ENABLE_LLD=ON \
-DBOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LLD=ON \
-DPGO_INSTRUMENT_LTO=Thin \
-DLLVM_ENABLE_RUNTIMES="compiler-rt" \
-DCMAKE_INSTALL_PREFIX="$LLVM_SYSROOT" \
-DLLVM_ENABLE_PROJECTS="bolt;clang;lld;clang-tools-extra" \
-DLLVM_DISTRIBUTION_COMPONENTS="lld;compiler-rt;clang-format;scan-build;llvm-symbolizer" \
-DCLANG_DEFAULT_LINKER="lld"
RUN ninja -C ./build stage2-clang-bolt stage2-install-distribution && ninja -C ./build install-distribution
FROM base AS ci-container
COPY --from=stage1-toolchain $LLVM_SYSROOT $LLVM_SYSROOT
# Need to install curl for hendrikmuhs/ccache-action
# Need nodejs for some of the GitHub actions.
# Need perl-modules for clang analyzer tests.
# Need git for SPIRV-Tools tests.
# Need binutils-dev instead of binutils to build the linker LTO plugin.
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
binutils-dev \
cmake \
curl \
git \
libstdc++-11-dev \
ninja-build \
nodejs \
perl-modules \
python3-psutil \
sudo \
# These are needed by the premerge pipeline. Pip is used to install
# dependent python packages. File and tzdata are used for tests.
# Having a symlink from python to python3 enables code sharing between
# the Linux and Windows pipelines.
python3-pip \
file \
tzdata \
python-is-python3 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# We need sccache for caching. We cannot use the apt repository version because
# it is too old and has bugs related to features we require (particularly GCS
# caching), so we manually install it here.
# TODO(boomanaiden154): We should return to installing this from the apt
# repository once a version containing the necessary bug fixes is available.
RUN curl -L "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-$(arch)-unknown-linux-musl.tar.gz" > /tmp/sccache.tar.gz && \
echo $( [ $(arch) = 'x86_64' ] && echo "1fbb35e135660d04a2d5e42b59c7874d39b3deb17de56330b25b713ec59f849b" || echo "d6a1ce4acd02b937cd61bc675a8be029a60f7bc167594c33d75732bbc0a07400") /tmp/sccache.tar.gz | sha256sum -c && \
tar xzf /tmp/sccache.tar.gz -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \
rm /tmp/sccache.tar.gz && \
chmod +x /usr/local/bin/sccache
ENV LLVM_SYSROOT=$LLVM_SYSROOT
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
ENV CC=clang
ENV CXX=clang++
# Create a new user to avoid test failures related to a lack of expected
# permissions issues in some tests. Set the user id to 1001 as that is the
# user id that Github Actions uses to perform the checkout action.
RUN useradd gha -u 1001 -m -s /bin/bash
# Also add the user to passwordless sudoers so that we can install software
# later on without having to rebuild the container.
RUN adduser gha sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER gha
WORKDIR /home/gha
FROM ci-container AS ci-container-agent
ENV GITHUB_RUNNER_VERSION=2.332.0
RUN mkdir actions-runner && \
cd actions-runner && \
curl -O -L https://github.com/actions/runner/releases/download/v$GITHUB_RUNNER_VERSION/actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz

View File

@ -1,45 +0,0 @@
FROM docker.io/library/ubuntu:24.04
# MPFR is required by some of the mathlib tests.
RUN apt-get update && \
apt-get install -y \
git \
libmpfr-dev \
libgmp-dev \
libmpc-dev \
ninja-build \
sudo \
sccache \
wget \
lsb-release \
software-properties-common \
gnupg \
cmake \
linux-libc-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# TODO(boomanaiden154): Remove the LLVM 21 installation once we are no longer
# using it in the libc fullbuild tests workflow.
RUN wget https://apt.llvm.org/llvm.sh && \
chmod +x llvm.sh && \
sudo ./llvm.sh 23 && \
sudo ./llvm.sh 21 && \
rm llvm.sh
# Debian has a multilib setup, so we need to symlink the asm directory.
# For more information, see https://wiki.debian.org/Multiarch/LibraryPathOverview
RUN ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm
# Create a new user to avoid test failures related to a lack of expected
# permissions issues in some tests. Set the user id to 1001 as that is the
# user id that Github Actions uses to perform the checkout action.
RUN useradd gha -u 1001 -m -s /bin/bash
# Also add the user to passwordless sudoers so that we can install software
# later on without having to rebuild the container.
RUN adduser gha sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER gha
WORKDIR /home/gha

View File

@ -1,216 +0,0 @@
# LLVM Documentation CI
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: "Test documentation build"
permissions:
contents: read
on:
push:
branches:
- 'main'
paths:
- 'llvm/docs/**'
- 'clang/docs/**'
- 'clang/include/clang/Basic/AttrDocs.td'
- 'clang/include/clang/Driver/ClangOptionDocs.td'
- 'clang/include/clang/Basic/DiagnosticDocs.td'
- 'clang-tools-extra/docs/**'
- 'lldb/docs/**'
- 'libunwind/docs/**'
- 'libcxx/docs/**'
- 'libc/docs/**'
- 'lld/docs/**'
- 'openmp/docs/**'
- 'polly/docs/**'
- 'flang/docs/**'
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
- '.github/workflows/docs.yml'
pull_request:
paths:
- 'llvm/docs/**'
- 'clang/docs/**'
- 'clang/include/clang/Basic/AttrDocs.td'
- 'clang/include/clang/Driver/ClangOptionDocs.td'
- 'clang/include/clang/Basic/DiagnosticDocs.td'
- 'clang-tools-extra/docs/**'
- 'lldb/docs/**'
- 'libunwind/docs/**'
- 'libcxx/docs/**'
- 'libc/docs/**'
- 'lld/docs/**'
- 'openmp/docs/**'
- 'polly/docs/**'
- 'flang/docs/**'
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
- '.github/workflows/docs.yml'
jobs:
check-docs-build:
name: "Test documentation build"
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
fetch-depth: 2
- name: Get subprojects that have doc changes
id: docs-changed-subprojects
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1
with:
skip_initial_fetch: true
base_sha: 'HEAD~1'
sha: 'HEAD'
files_yaml: |
llvm:
- 'llvm/docs/**'
clang:
- 'clang/docs/**'
- 'clang/include/clang/Basic/AttrDocs.td'
- 'clang/include/clang/Driver/ClangOptionDocs.td'
- 'clang/include/clang/Basic/DiagnosticDocs.td'
clang-tools-extra:
- 'clang-tools-extra/docs/**'
lldb:
- 'lldb/docs/**'
libunwind:
- 'libunwind/docs/**'
libcxx:
- 'libcxx/docs/**'
libc:
- 'libc/docs/**'
lld:
- 'lld/docs/**'
openmp:
- 'openmp/docs/**'
polly:
- 'polly/docs/**'
flang:
- 'flang/docs/**'
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
workflow:
- '.github/workflows/docs.yml'
- name: Setup Python env
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.14'
cache: 'pip'
cache-dependency-path: 'llvm/docs/requirements-hashed.txt'
- name: Install python dependencies
run: pip install -r llvm/docs/requirements-hashed.txt
- name: Install system dependencies
run: |
sudo apt-get update
# swig and graphviz are lldb specific dependencies
sudo apt-get install -y cmake ninja-build swig graphviz
- name: Setup output folder
run: mkdir built-docs
- name: Build LLVM docs
if: |
steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B llvm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON ./llvm
TZ=UTC ninja -C llvm-build docs-llvm-html docs-llvm-man
mkdir built-docs/llvm
cp -r llvm-build/docs/* built-docs/llvm/
- name: Build Clang docs
if: |
steps.docs-changed-subprojects.outputs.clang_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B clang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_SPHINX=ON ./llvm
TZ=UTC ninja -C clang-build docs-clang-html docs-clang-man
mkdir built-docs/clang
cp -r clang-build/docs/* built-docs/clang/
- name: Build clang-tools-extra docs
if: |
steps.docs-changed-subprojects.outputs.clang-tools-extra_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B clang-tools-extra-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_ENABLE_SPHINX=ON ./llvm
TZ=UTC ninja -C clang-tools-extra-build docs-clang-tools-html docs-clang-tools-man
mkdir built-docs/clang-tools-extra
cp -r clang-tools-extra-build/docs/* built-docs/clang-tools-extra/
- name: Build LLDB docs
if: |
steps.docs-changed-subprojects.outputs.lldb_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B lldb-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_ENABLE_SPHINX=ON ./llvm
TZ=UTC ninja -C lldb-build docs-lldb-html docs-lldb-man
mkdir built-docs/lldb
cp -r lldb-build/docs/* built-docs/lldb/
- name: Build libunwind docs
if: |
steps.docs-changed-subprojects.outputs.libunwind_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B libunwind-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
TZ=UTC ninja -C libunwind-build docs-libunwind-html
mkdir built-docs/libunwind
cp -r libunwind-build/libunwind/docs/* built-docs/libunwind
- name: Build libcxx docs
if: |
steps.docs-changed-subprojects.outputs.libcxx_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B libcxx-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx;libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
TZ=UTC ninja -C libcxx-build docs-libcxx-html
mkdir built-docs/libcxx
cp -r libcxx-build/libcxx/docs/* built-docs/libcxx/
- name: Build libc docs
if: |
steps.docs-changed-subprojects.outputs.libc_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B libc-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libc" -DLLVM_ENABLE_SPHINX=ON ./runtimes
TZ=UTC ninja -C libc-build docs-libc-html
mkdir built-docs/libc
cp -r libc-build/libc/docs/* built-docs/libc/
- name: Build LLD docs
if: |
steps.docs-changed-subprojects.outputs.lld_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B lld-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="lld" -DLLVM_ENABLE_SPHINX=ON ./llvm
TZ=UTC ninja -C lld-build docs-lld-html
mkdir built-docs/lld
cp -r lld-build/docs/* built-docs/lld/
- name: Build OpenMP docs
if: |
steps.docs-changed-subprojects.outputs.openmp_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B openmp-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="openmp" -DLLVM_ENABLE_SPHINX=ON -DLLVM_INCLUDE_TESTS=OFF ./runtimes
TZ=UTC ninja -C openmp-build docs-openmp-html
mkdir built-docs/openmp
cp -r openmp-build/openmp/docs/* built-docs/openmp/
- name: Build Polly docs
if: |
steps.docs-changed-subprojects.outputs.polly_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B polly-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="polly" -DLLVM_ENABLE_SPHINX=ON ./llvm
TZ=UTC ninja -C polly-build docs-polly-html docs-polly-man
mkdir built-docs/polly
cp -r polly-build/docs/* built-docs/polly/
- name: Build Flang docs
if: |
steps.docs-changed-subprojects.outputs.flang_any_changed == 'true' ||
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
run: |
cmake -B flang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;mlir;flang" -DLLVM_ENABLE_SPHINX=ON ./llvm
TZ=UTC ninja -C flang-build docs-flang-html docs-flang-man
mkdir built-docs/flang
cp -r flang-build/docs/* built-docs/flang/
- name: Upload docs
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: docs-output
path: built-docs/

View File

@ -1,48 +0,0 @@
name: "Check for private emails used in PRs"
on:
pull_request:
types:
- opened
permissions:
contents: read
jobs:
validate_email:
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Extract author email
id: author
run: |
git log -1
echo "EMAIL=$(git show -s --format='%ae' HEAD~0)" >> $GITHUB_OUTPUT
# Create empty comment file
echo "[]" > comments
- name: Validate author email
if: ${{ endsWith(steps.author.outputs.EMAIL, 'noreply.github.com') }}
env:
COMMENT: >-
⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.<br/>
Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account.<br/>
See [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html#email-addresses) and
[LLVM Discourse](https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it) for more information.
run: |
cat << EOF > comments
[{"body" : "$COMMENT"}]
EOF
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: workflow-args
path: |
comments

View File

@ -1,32 +0,0 @@
name: Get LLVM Version
description: >-
Get the LLVM version from the llvm-project source tree. This action assumes
the llvm-project sources have already been checked out into GITHUB_WORKSPACE.
outputs:
major:
description: LLVM major version
value: ${{ steps.version.outputs.major }}
minor:
description: LLVM minor version
value: ${{ steps.version.outputs.minor }}
patch:
description: LLVM patch version
value: ${{ steps.version.outputs.patch }}
full-no-suffix:
description: |
The full LLVM vesion without any suffixes like `-rc` or `git`. This will be `$major.$minor.$patch`
value: ${{ steps.version.outputs.full-no-suffix }}
runs:
using: "composite"
steps:
- name: Get Version
shell: bash
id: version
run: |
for v in major minor patch; do
echo "$v=`llvm/utils/release/get-llvm-version.sh --$v`" >> $GITHUB_OUTPUT
done
echo "full-no-suffix=$(llvm/utils/release/get-llvm-version.sh)" >> $GITHUB_OUTPUT

View File

@ -1,38 +0,0 @@
name: Github Actions CodeQL
permissions:
contents: read
on:
pull_request:
branches:
- main
paths:
- '.github/**'
schedule:
- cron: '30 0 * * *'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
codeql:
name: 'Github Actions CodeQL'
runs-on: ubuntu-24.04
permissions:
security-events: write
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/
- name: Initialize CodeQL
uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
with:
languages: actions
queries: security-extended
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9

View File

@ -1,30 +0,0 @@
name: HLSL Tests
permissions:
contents: read
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- llvm/**/DirectX/**
- .github/workflows/hlsl*
- clang/*HLSL*/**/*
- clang/**/*HLSL*
- llvm/**/Frontend/HLSL/**/*
jobs:
HLSL-Tests:
strategy:
fail-fast: false
matrix:
runs-on:
- hlsl-macos
uses: ./.github/workflows/hlsl-test-all.yaml
with:
SKU: hlsl-macos
TestTarget: check-hlsl-clang-mtl # TODO: This target changes based on SKU
LLVM-ref: ${{ github.ref }}

View File

@ -1,86 +0,0 @@
name: HLSL Test
permissions:
contents: read
on:
workflow_call:
inputs:
OffloadTest-branch:
description: 'Test Suite Branch'
required: false
default: 'main'
type: string
LLVM-ref:
description: 'LLVM Branch'
required: false
default: 'main'
type: string
SKU:
required: true
type: string
TestTarget:
required: false
default: 'check-hlsl'
type: string
jobs:
build:
runs-on: ${{ inputs.SKU }}
steps:
- name: Checkout DXC
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
repository: Microsoft/DirectXShaderCompiler
ref: main
path: DXC
submodules: true
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
ref: ${{ inputs.LLVM-branch }}
path: llvm-project
- name: Checkout OffloadTest
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
repository: llvm/offload-test-suite
ref: main
path: OffloadTest
- name: Checkout Golden Images
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
repository: llvm/offload-golden-images
ref: main
path: golden-images
- name: Build DXC
run: |
cd DXC
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -C ${{ github.workspace }}/DXC/cmake/caches/PredefinedParams.cmake -C ${{ github.workspace }}/OffloadTest/cmake/caches/sccache.cmake -DHLSL_DISABLE_SOURCE_GENERATION=On ${{ github.workspace }}/DXC/
ninja dxv llvm-dis
- name: Build LLVM
run: |
cd llvm-project
mkdir build
cd build
cmake -G Ninja -DDXIL_DIS=${{ github.workspace }}/DXC/build/bin/llvm-dis -DLLVM_INCLUDE_DXIL_TESTS=On -DCMAKE_BUILD_TYPE=Release -C ${{ github.workspace }}/llvm-project/clang/cmake/caches/HLSL.cmake -C ${{ github.workspace }}/OffloadTest/cmake/caches/sccache.cmake -DDXC_DIR=${{ github.workspace }}/DXC/build/bin -DLLVM_EXTERNAL_OFFLOADTEST_SOURCE_DIR=${{ github.workspace }}/OffloadTest -DLLVM_EXTERNAL_PROJECTS="OffloadTest" -DLLVM_LIT_ARGS="--xunit-xml-output=testresults.xunit.xml -v" -DGOLDENIMAGE_DIR=${{ github.workspace }}/golden-images ${{ github.workspace }}/llvm-project/llvm/
ninja hlsl-test-depends llvm-test-depends clang-test-depends
- name: Run HLSL Tests
run: |
cd llvm-project
cd build
ninja check-llvm
ninja check-clang
ninja check-hlsl-unit
ninja ${{ inputs.TestTarget }}
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/macos@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0
if: always() && runner.os == 'macOS'
with:
comment_mode: off
files: llvm-project/build/**/testresults.xunit.xml

View File

@ -1,107 +0,0 @@
name: "Check LLVM ABI annotations"
# TODO(https://github.com/llvm/llvm-project/issues/109483): Re-enable on pull
# requests once the workflow is less diruptive.
on:
# pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build:
if: github.repository_owner == 'llvm'
name: Check LLVM_ABI annotations with ids
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
repository: compnerd/ids
path: ${{ github.workspace }}/ids
ref: b3bf35dd13d7ff244a6a6d106fe58d0eedb5743e # main
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
path: ${{ github.workspace }}/llvm-project
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
with:
path: "./llvm-project"
separator: ","
skip_initial_fetch: true
base_sha: 'HEAD~1'
sha: 'HEAD'
- name: Install dependencies
run: |
sudo apt install -y clang-19 ninja-build libclang-19-dev
pip install --require-hashes -r ${{ github.workspace }}/llvm-project/llvm/utils/git/requirements.txt
- name: Configure and build minimal LLVM for use by ids
run: |
cmake -B ${{ github.workspace }}/llvm-project/build/ \
-S ${{ github.workspace }}/llvm-project/llvm/ \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER=clang \
-D CMAKE_CXX_COMPILER=clang++ \
-D LLVM_ENABLE_PROJECTS=clang \
-D LLVM_TARGETS_TO_BUILD="host" \
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON \
-G Ninja
cd ${{ github.workspace }}/llvm-project/build/
ninja -t targets all | grep "CommonTableGen: phony$" | grep -v "/" | sed 's/:.*//'
- name: Configure ids
run: |
cmake -B ${{ github.workspace }}/ids/build/ \
-S ${{ github.workspace }}/ids/ \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER=clang \
-D CMAKE_CXX_COMPILER=clang++ \
-D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-D LLVM_DIR=/usr/lib/llvm-19/lib/cmake/llvm/ \
-D Clang_DIR=/usr/lib/llvm-19/lib/cmake/clang/ \
-D FILECHECK_EXECUTABLE=$(which FileCheck-19) \
-D LIT_EXECUTABLE=$(which lit) \
-G Ninja
# TODO: Use an image with a prebuilt idt.
- name: Build ids
run: |
ninja -C ${{ github.workspace }}/ids/build/ all
- name: Run ids check
env:
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
working-directory: ${{ github.workspace }}/llvm-project
run: |
echo "[]" > comments &&
python llvm/utils/git/ids-check-helper.py \
--token ${{ secrets.GITHUB_TOKEN }} \
--issue-number $GITHUB_PR_NUMBER \
--idt-path ${{ github.workspace }}/ids/build/bin/idt \
--compile-commands ${{ github.workspace }}/llvm-project/build/compile_commands.json \
--start-rev HEAD~1 \
--end-rev HEAD \
--changed-files "$CHANGED_FILES"
- name: Upload results
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: workflow-args
path: |
llvm-project/comments

View File

@ -1,70 +0,0 @@
# This contains the workflow definitions that allow users to test backports
# to the release branch using comments on issues.
#
# /cherry-pick <commit> <...>
#
# This comment will attempt to cherry-pick the given commits to the latest
# release branch (release/Y.x) and if successful, push the result to a branch
# on github.
#
# /branch <owner>/<repo>/<branch>
#
# This comment will create a pull request from <branch> to the latest release
# branch.
name: Issue Release Workflow
permissions:
contents: read
on:
issue_comment:
types:
- created
- edited
issues:
types:
- opened
env:
COMMENT_BODY: ${{ github.event.action == 'opened' && github.event.issue.body || github.event.comment.body }}
jobs:
backport-commits:
name: Backport Commits
runs-on: ubuntu-24.04
environment: main-branch-only
permissions:
issues: write
pull-requests: write
if: >-
(github.repository == 'llvm/llvm-project') &&
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick')
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: llvm/llvm-project
# GitHub stores the token used for checkout and uses it for pushes
# too, but we want to use a different token for pushing, so we need
# to disable persist-credentials here.
persist-credentials: false
fetch-depth: 0
- name: Setup Environment
run: |
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
./llvm/utils/git/github-automation.py --token ${{ github.token }} setup-llvmbot-git
- name: Backport Commits
run: |
printf "%s" "$COMMENT_BODY" |
./llvm/utils/git/github-automation.py \
--repo "$GITHUB_REPOSITORY" \
--token "${{ secrets.RELEASE_WORKFLOW_PR_CREATE }}" \
release-workflow \
--branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
--issue-number ${{ github.event.issue.number }} \
--requested-by ${{ (github.event.action == 'opened' && github.event.issue.user.login) || github.event.comment.user.login }} \
auto

View File

@ -1,38 +0,0 @@
name: Issue Subscriber
on:
issues:
types:
- labeled
permissions:
contents: read
jobs:
auto-subscribe:
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
steps:
- name: Checkout Automation Script
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: llvm/utils/git/
ref: main
- name: Setup Automation Script
working-directory: ./llvm/utils/git/
run: |
pip install --require-hashes -r requirements.txt
- name: Update watchers
working-directory: ./llvm/utils/git/
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
env:
LABEL_NAME: ${{ github.event.label.name }}
run: |
python3 ./github-automation.py \
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
issue-subscriber \
--issue-number '${{ github.event.issue.number }}' \
--label-name "$LABEL_NAME"

View File

@ -1,167 +0,0 @@
name: Comment on an issue
on:
workflow_run:
workflows:
- "Check code formatting"
- "Check for private emails used in PRs"
- "PR Request Release Note"
- "Code lint"
- "CI Checks"
- "Test Issue Write"
- "Check LLVM ABI annotations"
types:
- completed
permissions:
contents: read
jobs:
pr-comment:
runs-on: ubuntu-24.04
permissions:
pull-requests: write
if: >
github.event.workflow_run.event == 'pull_request' &&
(
github.event.workflow_run.conclusion == 'success' ||
github.event.workflow_run.conclusion == 'failure'
)
steps:
- name: Fetch Sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/workflows/unprivileged-download-artifact/action.yml
sparse-checkout-cone-mode: false
- name: 'Download artifact'
uses: ./.github/workflows/unprivileged-download-artifact
id: download-artifact
with:
run-id: ${{ github.event.workflow_run.id }}
artifact-name: workflow-args
- name: 'Comment on PR'
if: steps.download-artifact.outputs.artifact-ids != ''
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
var comments = []
for (local_file of fs.readdirSync('.')) {
if (local_file.startsWith("comments")) {
comments.push(...JSON.parse(fs.readFileSync(local_file)))
}
}
if (!comments || comments.length == 0) {
return;
}
let runInfo = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id
});
console.log(runInfo);
// Query to find the number of the pull request that triggered this job.
// The associated pull requests are based off of the branch name, so if
// you create a pull request for a branch, close it, and then create
// another pull request with the same branch, then this query will return
// two associated pull requests. This is why we have to fetch all the
// associated pull requests and then iterate through them to find the
// one that is open.
const gql_query = `
query($repo_owner : String!, $repo_name : String!, $branch: String!) {
repository(owner: $repo_owner, name: $repo_name) {
ref (qualifiedName: $branch) {
associatedPullRequests(first: 100) {
nodes {
baseRepository {
owner {
login
}
}
number
state
}
}
}
}
}
`
const gql_variables = {
repo_owner: runInfo.data.head_repository.owner.login,
repo_name: runInfo.data.head_repository.name,
branch: runInfo.data.head_branch
}
const gql_result = await github.graphql(gql_query, gql_variables);
console.log(gql_result);
// If the branch for the PR was deleted before this job has a chance
// to run, then the ref will be null. This can happen if someone:
// 1. Rebase the PR, which triggers some workflow.
// 2. Immediately merges the PR and deletes the branch.
// 3. The workflow finishes and triggers this job.
if (!gql_result.repository.ref) {
console.log("Ref has been deleted");
return;
}
console.log(gql_result.repository.ref.associatedPullRequests.nodes);
var pr_number = 0;
gql_result.repository.ref.associatedPullRequests.nodes.forEach((pr) => {
// The largest PR number is the one we care about. The only way
// to have more than one associated pull requests is if all the
// old pull requests are in the closed state.
if (pr.baseRepository.owner.login = context.repo.owner && pr.number > pr_number) {
pr_number = pr.number;
}
});
if (pr_number == 0) {
console.log("Error retrieving pull request number");
return;
}
await comments.forEach(function (comment) {
if (comment.id) {
// Security check: Ensure that this comment was created by
// the github-actions bot, so a malicious input won't overwrite
// a user's comment.
github.rest.issues.getComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id
}).then((old_comment) => {
console.log(old_comment);
if (old_comment.data.user.login != "github-actions[bot]") {
console.log("Invalid comment id: " + comment.id);
return;
}
github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
comment_id: comment.id,
body: comment.body
});
});
} else {
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
body: comment.body
});
}
});
- name: Dump comments file
if: >-
always() &&
steps.download-artifact.outputs.artifact-ids != ''
run: cat comments*

View File

@ -1,199 +0,0 @@
# This workflow is for pre-commit testing of the LLVM-libc project.
name: LLVM-libc Pre-commit Fullbuild Tests
permissions:
contents: read
on:
pull_request:
branches: [ "main" ]
paths:
- 'libc/**'
- '.github/workflows/libc-fullbuild-tests.yml'
jobs:
build:
runs-on: ${{ matrix.os }}
container:
image: ${{ (startsWith(matrix.os, 'ubuntu-24.04-arm') && 'ghcr.io/llvm/arm64v8/libc-ubuntu-24.04') || 'ghcr.io/llvm/libc-ubuntu-24.04'}}
# We need to enable privileged containers so that certain libc tests
# have the necessary permissions (like SYS_TIME). There are no security
# implications as we are already running in an isolated VM.
options: >-
--privileged
strategy:
fail-fast: false
matrix:
# Build basic linux configuration with Debug/Release/MinSizeRel and all
# other configurations in Debug only.
include:
- os: ubuntu-24.04
build_type: Debug
c_compiler: clang-23
cpp_compiler: clang++-23
target: x86_64-unknown-linux-llvm
include_scudo: ON
build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: Release
c_compiler: clang-23
cpp_compiler: clang++-23
target: x86_64-unknown-linux-llvm
include_scudo: ON
build_fuzzing_tests: ON
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-23
cpp_compiler: clang++-23
target: x86_64-unknown-linux-llvm
include_scudo: ON
build_fuzzing_tests: OFF
- os: ubuntu-24.04-arm
build_type: Debug
c_compiler: clang-23
cpp_compiler: clang++-23
target: aarch64-unknown-linux-llvm
include_scudo: ON
build_fuzzing_tests: ON
- os: ubuntu-24.04
build_type: Debug
c_compiler: clang-23
cpp_compiler: clang++-23
target: x86_64-unknown-uefi-llvm
include_scudo: OFF
build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-23
cpp_compiler: clang++-23
target: armv6m-none-eabi
include_scudo: OFF
build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-23
cpp_compiler: clang++-23
target: armv7m-none-eabi
include_scudo: OFF
build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-23
cpp_compiler: clang++-23
target: armv7em-none-eabi
include_scudo: OFF
build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-23
cpp_compiler: clang++-23
target: armv8m.main-none-eabi
include_scudo: OFF
build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-23
cpp_compiler: clang++-23
target: armv8.1m.main-none-eabi
include_scudo: OFF
build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-23
cpp_compiler: clang++-23
target: riscv32-unknown-elf
include_scudo: OFF
build_fuzzing_tests: OFF
# TODO: add back gcc build when it is fixed
# - c_compiler: gcc
# cpp_compiler: g++
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
# Libc's build is relatively small comparing with other components of LLVM.
# A fresh fullbuild takes about 190MiB of uncompressed disk space, which can
# be compressed into ~40MiB. Limiting the cache size to 1G should be enough.
# Prefer sccache as it is more modern.
# Do not use direct GHAC access even though it is supported by sccache. GHAC rejects
# frequent small object writes.
- name: Setup ccache
uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20
with:
max-size: 1G
key: libc_fullbuild_${{ matrix.c_compiler }}
variant: sccache
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=/__w/llvm-project/llvm-project/build" >> "$GITHUB_OUTPUT"
echo "build-install-dir=/__w/llvm-project/llvm-project/install" >> "$GITHUB_OUTPUT"
# Configure libc fullbuild with scudo.
- name: Configure CMake
run: |
export RUNTIMES="libc"
export CMAKE_FLAGS="
-G Ninja
-S /__w/llvm-project/llvm-project/runtimes
-B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_ASM_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}"
if [[ "${{ matrix.include_scudo }}" == "ON" || "${{ matrix.build_fuzzing_tests }}" == "ON" ]]; then
export RUNTIMES="$RUNTIMES;compiler-rt"
fi
if [[ "${{ matrix.include_scudo }}" == "ON" ]]; then
export CMAKE_FLAGS="$CMAKE_FLAGS
-DLLVM_LIBC_INCLUDE_SCUDO=ON
-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON
-DCOMPILER_RT_BUILD_GWP_ASAN=OFF
-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF"
fi
case "${{ matrix.target }}" in
*-none-eabi|riscv32-unknown-elf)
cmake $CMAKE_FLAGS \
-C /__w/llvm-project/llvm-project/libc/cmake/caches/${{ matrix.target }}.cmake
;;
*)
cmake -DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
-DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \
-DLLVM_LIBC_FULL_BUILD=ON \
$CMAKE_FLAGS
;;
esac
- name: Build
shell: bash
run: |
TARGETS="install"
if [[ "${{ matrix.build_fuzzing_tests }}" == "ON" ]]; then
TARGETS="$TARGETS libc-fuzzer"
fi
cmake \
--build ${{ steps.strings.outputs.build-output-dir }} \
--parallel \
--target $TARGETS
- name: Test
# Skip UEFI and baremetal tests until we have testing set up.
if: ${{
!endsWith(matrix.target, '-uefi-llvm') &&
!endsWith(matrix.target, '-none-eabi') &&
matrix.target != 'riscv32-unknown-elf'
}}
run: >
cmake
--build ${{ steps.strings.outputs.build-output-dir }}
--parallel
--target check-libc

View File

@ -1,116 +0,0 @@
# This workflow is for pre-commit testing of the LLVM-libc project.
name: LLVM-libc Pre-commit Overlay Tests
permissions:
contents: read
on:
pull_request:
branches: [ "main" ]
paths:
- 'libc/**'
- '.github/workflows/libc-overlay-tests.yml'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2022, windows-2025, macos-15]
include:
# TODO: add linux gcc when it is fixed
- os: ubuntu-24.04
compiler:
c_compiler: clang
cpp_compiler: clang++
- os: ubuntu-24.04-arm
compiler:
c_compiler: clang
cpp_compiler: clang++
- os: windows-2022
compiler:
c_compiler: clang-cl
cpp_compiler: clang-cl
- os: windows-2025
compiler:
c_compiler: clang-cl
cpp_compiler: clang-cl
- os: macos-15
compiler:
c_compiler: clang
cpp_compiler: clang++
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
# Libc's build is relatively small comparing with other components of LLVM.
# A fresh linux overlay takes about 180MiB of uncompressed disk space, which can
# be compressed into ~40MiB. MacOS and Windows overlay builds are less than 10MiB
# after compression. Limiting the cache size to 1G should be enough.
# Prefer sccache as it is modern and it has a guarantee to work with MSVC.
# Do not use direct GHAC access even though it is supported by sccache. GHAC rejects
# frequent small object writes.
- name: Setup ccache
uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20
with:
max-size: 1G
key: libc_overlay_build_${{ matrix.os }}_${{ matrix.compiler.c_compiler }}
variant: sccache
# MPFR is required by some of the mathlib tests.
- name: Prepare dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build
# Chocolatey is shipped with Windows runners. Windows Server 2025 recommends WinGet.
# Consider migrating to WinGet when Windows Server 2025 is available.
- name: Prepare dependencies (Windows)
if: runner.os == 'Windows'
run: |
choco install ninja
- name: Prepare dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install ninja
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
# Use MinSizeRel to reduce the size of the build.
# Notice that CMP0141=NEW and MSVC_DEBUG_INFORMATION_FORMAT=Embedded are required
# by the sccache tool.
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }}
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
-DLLVM_ENABLE_RUNTIMES=libc
-G Ninja
-S ${{ github.workspace }}/runtimes
- name: Build
run: >
cmake
--build ${{ steps.strings.outputs.build-output-dir }}
--parallel
--target libc
- name: Test
run: >
cmake
--build ${{ steps.strings.outputs.build-output-dir }}
--parallel
--target check-libc

View File

@ -1,97 +0,0 @@
name: libc Precommit CI - shared tests
permissions:
contents: read
on:
pull_request:
paths:
- 'libc/**'
- '.github/workflows/libc-shared-tests.yml'
jobs:
windows-msvc-shared:
name: libc-shared-test with MSVC (${{ matrix.arch }})
strategy:
fail-fast: false # If one arch fails, let the other finish
matrix:
include:
- arch: amd64
os: windows-2022
- arch: amd64_x86
os: windows-2022
- arch: arm64
os: windows-11-arm
runs-on: ${{ matrix.os }}
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Setup MSVC Dev Environment
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
arch: ${{ matrix.arch }}
- name: Configure CMake
run: |
cmake -B build -S runtimes -G Ninja `
-DLLVM_ENABLE_RUNTIMES=libc `
-DCMAKE_C_COMPILER=cl `
-DCMAKE_CXX_COMPILER=cl `
-DCMAKE_BUILD_TYPE=Release
- name: Build and Test
run: cmake --build build --target libc-shared-tests
linux-cross-arch-shared:
name: libc-shared-tests on (${{ matrix.arch }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false # If one arch fails, let the other finish
matrix:
include:
- arch: aarch64
libc: libc6-dev-arm64-cross
libcpp: libstdc++6-arm64-cross
target_triple: aarch64-linux-gnu
gcc_arch: aarch64-linux-gnu
- arch: riscv64
libc: libc6-dev-riscv64-cross
libcpp: libstdc++6-riscv64-cross
target_triple: riscv64-linux-gnu
gcc_arch: riscv64-linux-gnu
- arch: ppc64le
libc: libc6-dev-ppc64el-cross
libcpp: libstdc++6-ppc64el-cross
target_triple: powerpc64le-linux-gnu
gcc_arch: powerpc64le-linux-gnu
steps:
- name: Checkout LLVM
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Prepare dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y cmake ninja-build clang lld qemu-user-static \
${{ matrix.libc }} ${{ matrix.libcpp }} \
gcc-${{ matrix.target_triple }} g++-${{ matrix.target_triple }}
- name: Configure CMake
run: |
cmake -B build -S runtimes -G Ninja \
-DLLVM_ENABLE_RUNTIMES=libc \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Release \
-DLIBC_TARGET_TRIPLE=${{ matrix.target_triple }}
- name: Build and Run
env:
QEMU_LD_PREFIX: /usr/${{ matrix.target_triple }}
run: |
cmake --build build --target libc-shared-tests

View File

@ -1,160 +0,0 @@
name: libclang ABI Tests
permissions:
contents: read
on:
workflow_dispatch:
push:
branches:
- 'release/**'
paths:
- 'clang/**'
- '.github/workflows/libclang-abi-tests.yml'
pull_request:
branches:
- 'release/**'
paths:
- 'clang/**'
- '.github/workflows/libclang-abi-tests.yml'
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
abi-dump-setup:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
outputs:
BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }}
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
ABI_LIBS: ${{ steps.vars.outputs.ABI_LIBS }}
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.major }}
LLVM_VERSION_MINOR: ${{ steps.version.outputs.minor }}
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
steps:
- name: Checkout source
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
fetch-depth: 250
- name: Get LLVM version
id: version
uses: ./.github/workflows/get-llvm-version
- name: Setup Variables
id: vars
run: |
remote_repo='https://github.com/llvm/llvm-project'
if [ ${{ steps.version.outputs.patch }} -eq 0 ]; then
major_version=$(( ${{ steps.version.outputs.major }} - 1))
baseline_ref="llvmorg-$major_version.1.0"
# If there is a minor release, we want to use that as the base line.
minor_ref=$(git ls-remote --refs -t "$remote_repo" llvmorg-"$major_version".[1-9].[0-9] | tail -n1 | grep -o 'llvmorg-.\+' || true)
if [ -n "$minor_ref" ]; then
baseline_ref="$minor_ref"
else
# Check if we have a release candidate
rc_ref=$(git ls-remote --refs -t "$remote_repo" llvmorg-"$major_version".[1-9].[0-9]-rc* | tail -n1 | grep -o 'llvmorg-.\+' || true)
if [ -n "$rc_ref" ]; then
baseline_ref="$rc_ref"
fi
fi
{
echo "BASELINE_VERSION_MAJOR=$major_version"
echo "BASELINE_REF=$baseline_ref"
echo "ABI_HEADERS=clang-c"
echo "ABI_LIBS=libclang.so"
} >> "$GITHUB_OUTPUT"
else
{
echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.major }}"
echo "BASELINE_REF=llvmorg-${{ steps.version.outputs.major }}.1.0"
echo "ABI_HEADERS=."
echo "ABI_LIBS=libclang.so libclang-cpp.so"
} >> "$GITHUB_OUTPUT"
fi
abi-dump:
if: github.repository_owner == 'llvm'
needs: abi-dump-setup
runs-on: ubuntu-24.04
container:
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:ef869c1d087258db22c2b19b93f585d53c0d0e70952aaf02d45866ad26a200a0" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
strategy:
matrix:
name:
- build-baseline
- build-latest
include:
- name: build-baseline
llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}
ref: ${{ needs.abi-dump-setup.outputs.BASELINE_REF }}
repo: llvm/llvm-project
- name: build-latest
llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }}
ref: ${{ github.sha }}
repo: ${{ github.repository }}
steps:
- name: Download source code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
ref: ${{ matrix.ref }}
repository: ${{ matrix.repo }}
- name: Configure
run: |
mkdir install
cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
- name: Build
run: ninja -C build/ ${{ needs.abi-dump-setup.outputs.ABI_LIBS }} install-clang-headers
- name: Dump ABI
run: |
parallel abi-dumper -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o {}-${{ matrix.ref }}.abi ./build/lib/{} ::: ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
# Remove symbol versioning from dumps, so we can compare across major versions.
sed -i 's/LLVM_[0-9]\+/LLVM_NOVERSION/' $lib-${{ matrix.ref }}.abi
done
- name: Upload ABI file
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
with:
name: ${{ matrix.name }}
path: '*${{ matrix.ref }}.abi'
abi-compare:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
container:
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:ef869c1d087258db22c2b19b93f585d53c0d0e70952aaf02d45866ad26a200a0" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
needs:
- abi-dump-setup
- abi-dump
steps:
- name: Download baseline
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-baseline
path: build-baseline
- name: Download latest
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-latest
path: build-latest
- name: Compare ABI
run: |
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
abi-compliance-checker -lib $lib -old build-baseline/$lib*.abi -new build-latest/$lib*.abi
done
- name: Upload ABI Comparison
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
with:
name: compat-report-${{ github.sha }}
path: compat_reports/

View File

@ -1,58 +0,0 @@
name: Libclang Python Binding Tests
permissions:
contents: read
on:
push:
branches:
- 'main'
paths:
- 'clang/bindings/python/**'
- 'clang/tools/libclang/**'
- 'clang/CMakeList.txt'
- '.github/workflows/libclang-python-tests.yml'
pull_request:
paths:
- 'clang/bindings/python/**'
- 'clang/tools/libclang/**'
- 'clang/CMakeList.txt'
- '.github/workflows/libclang-python-tests.yml'
jobs:
check-clang-python:
# Build libclang and then run the libclang Python binding's unit tests.
# There is an issue running on "windows-2019".
# See https://github.com/llvm/llvm-project/issues/76601#issuecomment-1873049082.
name: Build and run Python unit tests
if: github.repository == 'llvm/llvm-project'
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.13"]
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
persist-credentials: false
python-version: ${{ matrix.python-version }}
- name: Setup ccache
uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20
with:
max-size: 2G
key: spirv-ubuntu-24.04
variant: sccache
- name: Build and Test
run: |
mkdir build
cmake -GNinja \
-S llvm \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DLLVM_ENABLE_PROJECTS=clang
ninja -C build check-clang-python

View File

@ -1,296 +0,0 @@
# This file defines pre-commit CI for libc++, libc++abi, and libunwind (on Github).
#
# We split the configurations in multiple stages with the intent of saving compute time
# when a job fails early in the pipeline. This is why the jobs are marked as `continue-on-error: false`.
# We try to run the CI configurations with the most signal in the first stage.
#
# Stages 1 & 2 are meant to be "smoke tests", and are meant to catch most build/test failures quickly and without using
# too many resources.
# Stage 3 is "everything else", and is meant to catch breakages on more niche or unique configurations.
#
# Therefore, we "fail-fast" for any failures during stages 1 & 2, meaning any job failing cancels all other running jobs,
# under the assumption that if the "smoke tests" fail, then the other configurations will likely fail in the same way.
# However, stage 3 does not fail fast, as it's more likely that any one job failing is a flake or a configuration-specific
#
name: Build and Test libc++
on:
pull_request:
paths:
- 'libcxx/**'
- 'libcxxabi/**'
- 'libunwind/**'
- 'runtimes/**'
- 'cmake/**'
- '.github/workflows/libcxx-build-and-test.yaml'
schedule:
# Run nightly at 08:00 UTC (aka 00:00 Pacific, aka 03:00 Eastern)
- cron: '0 8 * * *'
permissions:
contents: read # Default everything to read-only
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
stage1:
if: github.repository_owner == 'llvm'
runs-on: llvm-premerge-libcxx-runners
continue-on-error: false
strategy:
fail-fast: false
matrix:
config: [
'frozen-cxx03-headers',
'generic-cxx03',
'generic-cxx26',
'generic-modules'
]
cc: [ 'clang-22' ]
cxx: [ 'clang++-22' ]
include:
- config: 'generic-gcc'
cc: 'gcc-15'
cxx: 'g++-15'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: ${{ matrix.config }}.${{ matrix.cxx }}
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
path: |
**/test-results.xml
**/*.abilist
**/CMakeConfigureLog.yaml
**/CMakeError.log
**/CMakeOutput.log
**/crash_diagnostics/*
stage2:
if: github.repository_owner == 'llvm'
runs-on: llvm-premerge-libcxx-runners
needs: [ stage1 ]
continue-on-error: false
strategy:
fail-fast: false
matrix:
config: [
'generic-cxx11',
'generic-cxx14',
'generic-cxx17',
'generic-cxx20',
'generic-cxx23'
]
cc: [ 'clang-22' ]
cxx: [ 'clang++-22' ]
include:
- config: 'generic-gcc-cxx11'
cc: 'gcc-15'
cxx: 'g++-15'
- config: 'generic-cxx26'
cc: 'clang-21'
cxx: 'clang++-21'
- config: 'generic-cxx26'
cc: 'clang-20'
cxx: 'clang++-20'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: ${{ matrix.config }}
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always() # Upload artifacts even if the build or test suite fails
with:
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
path: |
**/test-results.xml
**/*.abilist
**/CMakeConfigureLog.yaml
**/CMakeError.log
**/CMakeOutput.log
**/crash_diagnostics/*
stage3:
if: github.repository_owner == 'llvm'
runs-on: llvm-premerge-libcxx-runners
needs: [ stage2 ]
continue-on-error: false
strategy:
fail-fast: false
max-parallel: 8
matrix:
config: [
'generic-abi-unstable',
'generic-hardening-mode-debug',
'generic-hardening-mode-extensive',
'generic-hardening-mode-extensive-observe-semantic',
'generic-hardening-mode-fast',
'generic-hardening-mode-fast-with-abi-breaks',
'generic-merged',
'generic-modules-cxx17-lsv',
'generic-no-exceptions',
'generic-no-experimental',
'generic-no-filesystem',
'generic-no-localization',
'generic-no-random_device',
'generic-no-threads',
'generic-no-tzdb',
'generic-no-unicode',
'generic-no-wide-characters',
'generic-no-rtti',
'generic-optimized-speed',
'generic-static',
'generic-asan',
'generic-asan-in-tests-only',
'generic-tsan',
'generic-ubsan',
'generic-msan',
'bootstrapping-build'
]
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: ${{ matrix.config }}
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
CC: clang-22
CXX: clang++-22
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: ${{ matrix.config }}-results
path: |
**/test-results.xml
**/*.abilist
**/CMakeConfigureLog.yaml
**/CMakeError.log
**/CMakeOutput.log
**/crash_diagnostics/*
macos:
needs: [ stage2 ]
strategy:
fail-fast: false
matrix:
include:
- config: generic-cxx03
os: macos-15
- config: generic-cxx23
os: macos-15
- config: generic-modules
os: macos-15
- config: apple-configuration
os: macos-15
# TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an
# older system-provided libc++.dylib). Doing this properly would require building the test suite on a
# recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an
# older mac. We could do that by e.g. sharing artifacts between the two jobs.
#
# However, our Lit configuration currently doesn't provide a good way to do that in a batch, so our only
# alternative is to actually build on the same host that we're going to run on. Sadly, that doesn't work
# since older macOSes don't support newer Xcodes. For now, we run the "backdeployment" jobs on recent
# macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional
# coverage.
- config: apple-system
os: macos-15
- config: apple-system-hardened
os: macos-15
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
xcode-version: '26.0'
- uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
- name: Build and test
run: |
python3 -m venv .venv
source .venv/bin/activate
python -m pip install psutil
xcrun bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
CC: clang
CXX: clang++
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always() # Upload artifacts even if the build or test suite fails
with:
name: macos-${{ matrix.config }}-results
path: |
**/test-results.xml
**/*.abilist
**/CMakeConfigureLog.yaml
**/CMakeError.log
**/CMakeOutput.log
**/crash_diagnostics/*
windows:
needs: [ stage2 ]
strategy:
fail-fast: false
matrix:
include:
- { config: clang-cl-dll, mingw: false, cc: clang-cl, cxx: clang-cl }
- { config: clang-cl-static, mingw: false, cc: clang-cl, cxx: clang-cl }
- { config: clang-cl-no-vcruntime, mingw: false, cc: clang-cl, cxx: clang-cl }
- { config: clang-cl-debug, mingw: false, cc: clang-cl, cxx: clang-cl }
- { config: clang-cl-static-crt, mingw: false, cc: clang-cl, cxx: clang-cl }
- { config: mingw-dll, mingw: true, cc: cc, cxx: c++ }
- { config: mingw-dll, mingw: true, cc: i686-w64-mingw32-clang, cxx: i686-w64-mingw32-clang++ }
- { config: mingw-static, mingw: true, cc: cc, cxx: c++ }
- { config: mingw-incomplete-sysroot, mingw: true, cc: cc, cxx: c++ }
- { config: mingw-static, mingw: true, cc: cc, cxx: c++, runner: windows-11-arm }
runs-on: ${{ matrix.runner != '' && matrix.runner || 'windows-2022' }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Install dependencies
run: |
pip install psutil
- name: Install a current LLVM
if: ${{ matrix.mingw != true }}
run: |
choco install -y llvm --version=20.1.8 --allow-downgrade
- name: Install llvm-mingw
if: ${{ matrix.mingw == true }}
run: |
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250709/llvm-mingw-20250709-ucrt-${{ matrix.runner == 'windows-11-arm' && 'aarch64' || 'x86_64' }}.zip
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
del llvm-mingw*.zip
mv llvm-mingw* c:\llvm-mingw
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: Simulate a from-scratch build of llvm-mingw
if: ${{ matrix.config == 'mingw-incomplete-sysroot' }}
run: |
rm -r c:\llvm-mingw\include\c++
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++*
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind*
- name: Add Git Bash to the path
run: |
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: Set up the MSVC dev environment
if: ${{ matrix.mingw != true }}
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Add the installed Clang at the start of the path
if: ${{ matrix.mingw != true }}
run: |
echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: Build and test
run: bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

View File

@ -1,71 +0,0 @@
# This file defines an action that builds the various Docker images used to run
# libc++ CI whenever modifications to those Docker files are pushed to `main`.
#
# The images are pushed to the LLVM package registry at https://github.com/orgs/llvm/packages
# and tagged appropriately. The selection of which Docker image version is used by the libc++
# CI nodes at any given point is controlled from the workflow files themselves.
name: Build Docker images for libc++ CI
permissions:
contents: read
on:
push:
branches:
- main
paths:
- 'libcxx/utils/ci/docker/**'
- '.github/workflows/libcxx-build-containers.yml'
pull_request:
paths:
- 'libcxx/utils/ci/docker/**'
- '.github/workflows/libcxx-build-containers.yml'
jobs:
build-and-push:
runs-on: ubuntu-24.04
if: github.repository_owner == 'llvm'
permissions:
packages: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
# The default Docker storage location for GitHub Actions doesn't have
# enough disk space, so change it to /mnt, which has more disk space.
- name: Change Docker storage location
run: |
sudo mkdir /mnt/docker
echo '{ "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
- name: Build the base image
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder-base
env:
TAG: ${{ github.sha }}
- name: Build the Linux Github Actions image
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder
env:
TAG: ${{ github.sha }}
- name: Build the Android builder image
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-android-builder
env:
TAG: ${{ github.sha }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push the images
if: github.event_name == 'push'
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml push libcxx-linux-builder-base libcxx-linux-builder libcxx-android-builder
env:
TAG: ${{ github.sha }}

View File

@ -1,30 +0,0 @@
name: "Check libc++ generated files"
on:
pull_request:
paths:
- 'libcxx/**'
permissions:
contents: read
jobs:
check_generated_files:
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Install dependencies
uses: aminya/setup-cpp@9bc9b8cd8a8d678f920e4e1e73f29da8010ced51 # v1.7.2
with:
clangformat: 17.0.1
ninja: true
- name: Check generated files
run: libcxx/utils/ci/run-buildbot check-generated-output
env:
CC: cc
CXX: c++

View File

@ -1,134 +0,0 @@
# This file defines a workflow that runs the libc++ benchmarks when a comment is added to the PR.
#
# The comment is of the form:
#
# /libcxx-bot benchmark <path-to-benchmarks-to-run>
#
# That will cause the specified benchmarks to be run on the PR and on the pull-request target, and
# their results to be compared.
name: Benchmark libc++
permissions:
contents: read
on:
issue_comment:
types:
- created
- edited
env:
CC: clang-22
CXX: clang++-22
jobs:
run-benchmarks:
permissions:
pull-requests: write
if: >-
github.event.issue.pull_request &&
contains(github.event.comment.body, '/libcxx-bot benchmark')
runs-on: llvm-premerge-libcxx-next-runners # TODO: This should run on a dedicated set of machines
steps:
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.14'
- name: Setup virtual environment
run: |
python3 -m venv .venv
source .venv/bin/activate
python -m pip install pygithub==2.8.1
- name: Extract information from the PR
id: vars
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
source .venv/bin/activate
cat <<EOF | python >> ${GITHUB_OUTPUT}
import github
repo = github.Github(auth=github.Auth.Token("${{ github.token }}")).get_repo("${{ github.repository }}")
pr = repo.get_pull(${{ github.event.issue.number }})
print(f"pr_base={pr.base.sha}")
print(f"pr_head={pr.head.sha}")
EOF
BENCHMARKS=$(echo "$COMMENT_BODY" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
echo "benchmarks=${BENCHMARKS}" >> ${GITHUB_OUTPUT}
- name: Update comment with link to the job
run: |
source .venv/bin/activate
cat <<EOF | python
import github
repo = github.Github(auth=github.Auth.Token("${{ github.token }}")).get_repo("${{ github.repository }}")
pr = repo.get_pull(${{ github.event.issue.number }})
comment = pr.get_issue_comment(${{ github.event.comment.id }})
add_text = "> _Running benchmarks in ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}_"
comment.edit('\n\n'.join([comment.body, add_text]))
EOF
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
ref: ${{ steps.vars.outputs.pr_head }}
fetch-depth: 0
fetch-tags: true # This job requires access to all the Git branches so it can diff against (usually) main
path: repo # Avoid nuking the workspace, where we have the Python virtualenv
- name: Build and run baseline
env:
BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
run: |
source .venv/bin/activate && cd repo
python -m pip install -r libcxx/utils/requirements.txt
baseline_commit=$(git merge-base ${{ steps.vars.outputs.pr_base }} ${{ steps.vars.outputs.pr_head }})
./libcxx/utils/build-at-commit --commit ${baseline_commit} --install-dir install/baseline -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
./libcxx/utils/test-at-commit --libcxx-installation install/baseline -B benchmarks/baseline -- -sv -j1 --param optimization=speed "$BENCHMARKS"
./libcxx/utils/consolidate-benchmarks benchmarks/baseline | tee baseline.lnt
- name: Build and run candidate
env:
BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
run: |
source .venv/bin/activate && cd repo
./libcxx/utils/build-at-commit --commit ${{ steps.vars.outputs.pr_head }} --install-dir install/candidate -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
./libcxx/utils/test-at-commit --libcxx-installation install/candidate -B benchmarks/candidate -- -sv -j1 --param optimization=speed "$BENCHMARKS"
./libcxx/utils/consolidate-benchmarks benchmarks/candidate | tee candidate.lnt
- name: Compare baseline and candidate runs
run: |
source .venv/bin/activate && cd repo
./libcxx/utils/compare-benchmarks baseline.lnt candidate.lnt | tee results.txt
- name: Update comment with results
run: |
source .venv/bin/activate && cd repo
cat <<EOF | python
import github
repo = github.Github(auth=github.Auth.Token("${{ github.token }}")).get_repo("${{ github.repository }}")
pr = repo.get_pull(${{ github.event.issue.number }})
comment = pr.get_issue_comment(${{ github.event.comment.id }})
with open('results.txt', 'r') as f:
benchmark_results = f.read()
new_comment_text = f"""
{comment.body}
<details>
<summary>
Benchmark results:
</summary>
\`\`\`
{benchmark_results}
\`\`\`
</details>
"""
comment.edit(new_comment_text)
EOF

View File

@ -1,61 +0,0 @@
name: "LLDB Python Lint"
permissions:
contents: read
on:
pull_request:
paths:
- 'lldb/test/API/**.py'
- '.github/workflows/lldb-pylint-action.yml'
jobs:
code_linter:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
timeout-minutes: 60
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
fetch-depth: 2
- name: Setup python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.14'
- name: Install dependencies
run: |
python3 -m pip install --require-hashes -r ./llvm/utils/git/requirements_pylint.txt
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1
with:
separator: " "
skip_initial_fetch: true
base_sha: 'HEAD~1'
sha: 'HEAD'
files: |
**/*.py
- name: List files
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "Changed files:"
echo "$CHANGED_FILES"
- name: Run Python test-name linter
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
# Only run pylint if we have any changed files at this point.
# Otherwise pylint errors out.
if: ${{ env.CHANGED_FILES != '' }}
run: |
pylint --disable=all --enable=E0102 $CHANGED_FILES

View File

@ -1,174 +0,0 @@
name: LLVM ABI Tests
permissions:
contents: read
on:
workflow_dispatch:
push:
branches:
- 'release/**'
paths:
- 'llvm/**'
- '.github/workflows/llvm-abi-tests.yml'
pull_request:
branches:
- 'release/**'
paths:
- 'llvm/**'
- '.github/workflows/llvm-abi-tests.yml'
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
abi-dump-setup:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
outputs:
BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }}
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
BASELINE_VERSION_MINOR: ${{ steps.vars.outputs.BASELINE_VERSION_MINOR }}
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.major }}
LLVM_VERSION_MINOR: ${{ steps.version.outputs.minor }}
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
steps:
- name: Checkout source
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
fetch-depth: 250
- name: Get LLVM version
id: version
uses: ./.github/workflows/get-llvm-version
- name: Setup Variables
id: vars
run: |
# C++ ABI:
# 18.1.0 we aren't doing ABI checks.
# 18.1.1 We want to check 18.1.0.
# C ABI:
# 18.1.0 We want to check 17.0.x
# 18.1.1 We want to check 18.1.0
echo "BASELINE_VERSION_MINOR=1" >> "$GITHUB_OUTPUT"
if [ ${{ steps.version.outputs.patch }} -eq 0 ]; then
{
echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.major }} - 1))"
echo "ABI_HEADERS=llvm-c"
} >> "$GITHUB_OUTPUT"
else
{
echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.major }}"
echo "ABI_HEADERS=."
} >> "$GITHUB_OUTPUT"
fi
abi-dump:
if: github.repository_owner == 'llvm'
needs: abi-dump-setup
runs-on: ubuntu-24.04
container:
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:ef869c1d087258db22c2b19b93f585d53c0d0e70952aaf02d45866ad26a200a0" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:bb0bd382ab2b"
strategy:
matrix:
name:
- build-baseline
- build-latest
include:
- name: build-baseline
llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MINOR }}.0
repo: llvm/llvm-project
- name: build-latest
llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }}
ref: ${{ github.sha }}
repo: ${{ github.repository }}
steps:
- name: Download source code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
ref: ${{ matrix.ref }}
repository: ${{ matrix.repo }}
- name: Configure
run: |
mkdir install
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
- name: Build
# Need to run install-LLVM twice to ensure the symlink is installed (this is a bug).
run: |
ninja -C build install-LLVM
ninja -C build install-LLVM
ninja -C build install-llvm-headers
- name: Dump ABI
run: |
if [ "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c" ]; then
nm ./install/lib/libLLVM.so | awk "/T _LLVM/ || /T LLVM/ { print $3 }" | sort -u | sed -e "s/^_//g" | cut -d ' ' -f 3 > llvm.symbols
# Even though the -symbols-list option doesn't seem to filter out the symbols, I believe it speeds up processing, so I'm leaving it in.
export EXTRA_ARGS="-symbols-list llvm.symbols"
else
touch llvm.symbols
fi
abi-dumper $EXTRA_ARGS -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o ${{ matrix.ref }}.abi ./install/lib/libLLVM.so
# Remove symbol versioning from dumps, so we can compare across major versions.
sed -i 's/LLVM_${{ matrix.llvm_version_major }}/LLVM_NOVERSION/' ${{ matrix.ref }}.abi
- name: Upload ABI file
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
with:
name: ${{ matrix.name }}
path: ${{ matrix.ref }}.abi
- name: Upload symbol list file
if: matrix.name == 'build-baseline'
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
with:
name: symbol-list
path: llvm.symbols
abi-compare:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
container:
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:ef869c1d087258db22c2b19b93f585d53c0d0e70952aaf02d45866ad26a200a0" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:bb0bd382ab2b
needs:
- abi-dump-setup
- abi-dump
steps:
- name: Download baseline
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-baseline
path: build-baseline
- name: Download latest
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-latest
path: build-latest
- name: Download symbol list
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: symbol-list
path: symbol-list
- name: Compare ABI
run: |
if [ -s symbol-list/llvm.symbols ]; then
# This option doesn't seem to work with the ABI dumper, so passing it here.
export EXTRA_ARGS="-symbols-list symbol-list/llvm.symbols"
fi
# FIXME: Reading of gzip'd abi files on the GitHub runners stop
# working some time in March of 2021, likely due to a change in the
# runner's environment.
abi-compliance-checker $EXTRA_ARGS -l libLLVM.so -old build-baseline/*.abi -new build-latest/*.abi || test "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c"
- name: Upload ABI Comparison
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
with:
name: compat-report-${{ github.sha }}
path: compat_reports/

View File

@ -1,69 +0,0 @@
name: LLVM Bugs notifier
permissions:
contents: read
issues: read
on:
issues:
types:
- opened
jobs:
auto-subscribe:
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
steps:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 24
check-latest: true
- run: npm install mailgun.js form-data
- name: Send notification
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
MAILGUN_API_KEY: ${{ secrets.LLVM_BUGS_KEY }}
with:
script: |
const Mailgun = require('mailgun.js');
const formData = require('form-data');
const mailgun = new Mailgun(formData);
const DOMAIN = 'email.llvm.org';
const mg = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY });
github.rest.issues.get({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo
})
.then((issue) => {
var maybeTruncatedBody = issue.data.body;
if (maybeTruncatedBody.length > 15000) {
maybeTruncatedBody = maybeTruncatedBody.substring(0,
15000) +
"<truncated>Please see the issue for the entire body."
}
const payload = {
author : issue.data.user.login,
issue : issue.data.number,
title : issue.data.title,
url : issue.data.html_url,
labels : issue.data.labels.map((label) => label.name),
assignee : issue.data.assignees.map((assignee) => assignee.login),
body : maybeTruncatedBody
};
const data = {
from: 'LLVM Bugs <llvm-bugs@email.llvm.org>',
to: 'llvm-bugs@lists.llvm.org',
subject: `[Bug ${issue.data.number}] ${issue.data.title}`,
template: 'new-github-issue',
'o:tracking-clicks': 'no',
'h:X-Mailgun-Variables': JSON.stringify(payload)
};
return mg.messages.create(DOMAIN, data);
})
.then((msg) => console.log(msg));

View File

@ -1,42 +0,0 @@
name: "Add buildbot information to first PRs from new contributors"
permissions:
contents: read
on:
# It's safe to use pull_request_target here, because we aren't checking out
# code from the pull request branch.
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
pull_request_target:
types:
- closed
jobs:
buildbot_comment:
runs-on: ubuntu-24.04
permissions:
pull-requests: write
if: >-
(github.repository == 'llvm/llvm-project') &&
(github.event.pull_request.merged == true)
steps:
- name: Checkout Automation Script
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
sparse-checkout: llvm/utils/git/
ref: main
- name: Setup Automation Script
working-directory: ./llvm/utils/git/
run: |
pip install --require-hashes -r requirements.txt
- name: Add Buildbot information comment
working-directory: ./llvm/utils/git/
run: |
python3 ./github-automation.py \
--token '${{ secrets.GITHUB_TOKEN }}' \
pr-buildbot-information \
--issue-number "${{ github.event.pull_request.number }}" \
--author "${{ github.event.pull_request.user.login }}"

View File

@ -1,53 +0,0 @@
name: MLIR SPIR-V Tests
permissions:
contents: read
on:
workflow_dispatch:
pull_request:
paths:
- 'mlir/include/mlir/Dialect/SPIRV/**'
- 'mlir/lib/Dialect/SPIRV/**'
- 'mlir/include/mlir/Target/SPIRV/**'
- 'mlir/lib/Target/SPIRV/**'
- 'mlir/test/Target/SPIRV/**'
- '.github/workflows/mlir-spirv-tests.yml'
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
check_spirv:
if: github.repository_owner == 'llvm'
name: Test MLIR SPIR-V
runs-on: ubuntu-24.04
container:
image: ghcr.io/llvm/ci-ubuntu-24.04:latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Setup ccache
uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20
with:
max-size: 2G
key: spirv-mlir-ubuntu-24.04
variant: sccache
- name: Build and Test
run: |
mkdir build
cmake -GNinja \
-S llvm \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DLLVM_TARGETS_TO_BUILD="host" \
-DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON \
-DLLVM_ENABLE_PROJECTS=mlir
ninja -C build check-mlir

Some files were not shown because too many files have changed in this diff Show More