From eb01f8e991ee6f6c629b265f7e616206a1745777 Mon Sep 17 00:00:00 2001 From: Qijia Yang <2421653893@qq.com> Date: Mon, 20 Apr 2026 09:13:17 +0800 Subject: [PATCH 1/4] update verilator to v5.046.bcr.3 --- .bazelversion | 2 +- .gitignore | 1 + MODULE.bazel | 7 +- MODULE.bazel.lock | 429 ---------------------------------------------- 4 files changed, 5 insertions(+), 434 deletions(-) delete mode 100644 MODULE.bazel.lock diff --git a/.bazelversion b/.bazelversion index 18bb418..acd405b 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.5.0 +8.6.0 diff --git a/.gitignore b/.gitignore index c1dd6aa..6c8e052 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ bazel-* user.bazelrc .metals/ AGENT.md +MODULE.bazel.lock diff --git a/MODULE.bazel b/MODULE.bazel index 84898ff..d91232e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,16 +1,15 @@ module( name = "rules_chisel", version = "0.3.0", - bazel_compatibility = [">=7.5.0"], - compatibility_level = 0, + bazel_compatibility = [">=7.6.0"], ) bazel_dep(name = "bazel_skylib", version = "1.9.0") bazel_dep(name = "rules_jvm_external", version = "6.7") bazel_dep(name = "rules_scala", version = "7.1.5") -bazel_dep(name = "verilator", version = "5.036.bcr.3") +bazel_dep(name = "verilator", version = "5.046.bcr.3") bazel_dep(name = "rules_license", version = "1.0.0") -bazel_dep(name = "rules_shell", version = "0.3.0") +bazel_dep(name = "rules_shell", version = "0.7.1") bazel_dep(name = "rules_java", version = "8.14.0") scala_config = use_extension( diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock deleted file mode 100644 index b2a7138..0000000 --- a/MODULE.bazel.lock +++ /dev/null @@ -1,429 +0,0 @@ -{ - "lockFileVersion": 13, - "registryFileHashes": { - "https://bcr.bazel.build/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497", - "https://bcr.bazel.build/modules/abseil-cpp/20210324.2/MODULE.bazel": "7cd0312e064fde87c8d1cd79ba06c876bd23630c83466e9500321be55c96ace2", - "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/MODULE.bazel": "70390338f7a5106231d20620712f7cccb659cd0e9d073d1991c038eb9fc57589", - "https://bcr.bazel.build/modules/abseil-cpp/20230125.1/MODULE.bazel": "89047429cb0207707b2dface14ba7f8df85273d484c2572755be4bab7ce9c3a0", - "https://bcr.bazel.build/modules/abseil-cpp/20230802.0.bcr.1/MODULE.bazel": "1c8cec495288dccd14fdae6e3f95f772c1c91857047a098fad772034264cc8cb", - "https://bcr.bazel.build/modules/abseil-cpp/20230802.0/MODULE.bazel": "d253ae36a8bd9ee3c5955384096ccb6baf16a1b1e93e858370da0a3b94f77c16", - "https://bcr.bazel.build/modules/abseil-cpp/20230802.1/MODULE.bazel": "fa92e2eb41a04df73cdabeec37107316f7e5272650f81d6cc096418fe647b915", - "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/MODULE.bazel": "37bcdb4440fbb61df6a1c296ae01b327f19e9bb521f9b8e26ec854b6f97309ed", - "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/source.json": "9be551b8d4e3ef76875c0d744b5d6a504a27e3ae67bc6b28f46415fd2d2957da", - "https://bcr.bazel.build/modules/apple_support/1.13.0/MODULE.bazel": "7c8cdea7e031b7f9f67f0b497adf6d2c6a2675e9304ca93a9af6ed84eef5a524", - "https://bcr.bazel.build/modules/apple_support/1.13.0/source.json": "aef5da52fdcfa9173e02c0cb772c85be5b01b9d49f97f9bb0fe3efe738938ba4", - "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel": "50341a62efbc483e8a2a6aec30994a58749bd7b885e18dd96aa8c33031e558ef", - "https://bcr.bazel.build/modules/aspect_bazel_lib/1.31.2/MODULE.bazel": "7bee702b4862612f29333590f4b658a5832d433d6f8e4395f090e8f4e85d442f", - "https://bcr.bazel.build/modules/aspect_bazel_lib/1.38.0/MODULE.bazel": "6307fec451ba9962c1c969eb516ebfe1e46528f7fa92e1c9ac8646bef4cdaa3f", - "https://bcr.bazel.build/modules/aspect_bazel_lib/1.40.3/MODULE.bazel": "668e6bcb4d957fc0e284316dba546b705c8d43c857f87119619ee83c4555b859", - "https://bcr.bazel.build/modules/aspect_rules_js/1.33.1/MODULE.bazel": "db3e7f16e471cf6827059d03af7c21859e7a0d2bc65429a3a11f005d46fc501b", - "https://bcr.bazel.build/modules/aspect_rules_js/1.39.0/MODULE.bazel": "aece421d479e3c31dc3e5f6d49a12acc2700457c03c556650ec7a0ff23fc0d95", - "https://bcr.bazel.build/modules/aspect_rules_lint/0.12.0/MODULE.bazel": "e767c5dbfeb254ec03275a7701b5cfde2c4d2873676804bc7cb27ddff3728fed", - "https://bcr.bazel.build/modules/bazel_features/0.1.0/MODULE.bazel": "47011d645b0f949f42ee67f2e8775188a9cf4a0a1528aa2fa4952f2fd00906fd", - "https://bcr.bazel.build/modules/bazel_features/1.1.1/MODULE.bazel": "27b8c79ef57efe08efccbd9dd6ef70d61b4798320b8d3c134fd571f78963dbcd", - "https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8", - "https://bcr.bazel.build/modules/bazel_features/1.15.0/MODULE.bazel": "d38ff6e517149dc509406aca0db3ad1efdd890a85e049585b7234d04238e2a4d", - "https://bcr.bazel.build/modules/bazel_features/1.17.0/MODULE.bazel": "039de32d21b816b47bd42c778e0454217e9c9caac4a3cf8e15c7231ee3ddee4d", - "https://bcr.bazel.build/modules/bazel_features/1.18.0/MODULE.bazel": "1be0ae2557ab3a72a57aeb31b29be347bcdc5d2b1eb1e70f39e3851a7e97041a", - "https://bcr.bazel.build/modules/bazel_features/1.19.0/MODULE.bazel": "59adcdf28230d220f0067b1f435b8537dd033bfff8db21335ef9217919c7fb58", - "https://bcr.bazel.build/modules/bazel_features/1.21.0/MODULE.bazel": "675642261665d8eea09989aa3b8afb5c37627f1be178382c320d1b46afba5e3b", - "https://bcr.bazel.build/modules/bazel_features/1.28.0/MODULE.bazel": "4b4200e6cbf8fa335b2c3f43e1d6ef3e240319c33d43d60cc0fbd4b87ece299d", - "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87", - "https://bcr.bazel.build/modules/bazel_features/1.30.0/source.json": "b07e17f067fe4f69f90b03b36ef1e08fe0d1f3cac254c1241a1818773e3423bc", - "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", - "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", - "https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8", - "https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e", - "https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686", - "https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a", - "https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5", - "https://bcr.bazel.build/modules/bazel_skylib/1.4.1/MODULE.bazel": "a0dcb779424be33100dcae821e9e27e4f2901d9dfd5333efe5ac6a8d7ab75e1d", - "https://bcr.bazel.build/modules/bazel_skylib/1.4.2/MODULE.bazel": "3bd40978e7a1fac911d5989e6b09d8f64921865a45822d8b09e815eaa726a651", - "https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138", - "https://bcr.bazel.build/modules/bazel_skylib/1.6.0/MODULE.bazel": "f84162c41b86658c8a054584495594a94eae476555d07cc1d17507150e69f706", - "https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917", - "https://bcr.bazel.build/modules/bazel_skylib/1.7.0/MODULE.bazel": "0db596f4563de7938de764cc8deeabec291f55e8ec15299718b93c4423e9796d", - "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b", - "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67", - "https://bcr.bazel.build/modules/bazel_skylib/1.9.0/MODULE.bazel": "72997b29dfd95c3fa0d0c48322d05590418edef451f8db8db5509c57875fb4b7", - "https://bcr.bazel.build/modules/bazel_skylib/1.9.0/source.json": "7ad77c1e8c1b84222d9b3f3cae016a76639435744c19330b0b37c0a3c9da7dc0", - "https://bcr.bazel.build/modules/bazel_worker_api/0.0.6/MODULE.bazel": "fd1f9432ca04c947e91b500df69ce7c5b6dbfe1bc45ab1820338205dae3383a6", - "https://bcr.bazel.build/modules/bazel_worker_api/0.0.6/source.json": "5d68545f224904745a3cabd35aea6bc2b6cc5a78b7f49f3f69660eab2eeeb273", - "https://bcr.bazel.build/modules/buildozer/7.1.2/MODULE.bazel": "2e8dd40ede9c454042645fd8d8d0cd1527966aa5c919de86661e62953cd73d84", - "https://bcr.bazel.build/modules/buildozer/7.1.2/source.json": "c9028a501d2db85793a6996205c8de120944f50a0d570438fcae0457a5f9d1f8", - "https://bcr.bazel.build/modules/gazelle/0.27.0/MODULE.bazel": "3446abd608295de6d90b4a8a118ed64a9ce11dcb3dda2dc3290a22056bd20996", - "https://bcr.bazel.build/modules/gazelle/0.30.0/MODULE.bazel": "f888a1effe338491f35f0e0e85003b47bb9d8295ccba73c37e07702d8d31c65b", - "https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb", - "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4", - "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6", - "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/source.json": "41e9e129f80d8c8bf103a7acc337b76e54fad1214ac0a7084bf24f4cd924b8b4", - "https://bcr.bazel.build/modules/googletest/1.14.0/MODULE.bazel": "cfbcbf3e6eac06ef9d85900f64424708cc08687d1b527f0ef65aa7517af8118f", - "https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075", - "https://bcr.bazel.build/modules/jsoncpp/1.9.5/source.json": "4108ee5085dd2885a341c7fab149429db457b3169b86eb081fa245eadf69169d", - "https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902", - "https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5", - "https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f", - "https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee", - "https://bcr.bazel.build/modules/platforms/0.0.5/MODULE.bazel": "5733b54ea419d5eaf7997054bb55f6a1d0b5ff8aedf0176fef9eea44f3acda37", - "https://bcr.bazel.build/modules/platforms/0.0.6/MODULE.bazel": "ad6eeef431dc52aefd2d77ed20a4b353f8ebf0f4ecdd26a807d2da5aa8cd0615", - "https://bcr.bazel.build/modules/platforms/0.0.7/MODULE.bazel": "72fd4a0ede9ee5c021f6a8dd92b503e089f46c227ba2813ff183b71616034814", - "https://bcr.bazel.build/modules/platforms/0.0.8/MODULE.bazel": "9f142c03e348f6d263719f5074b21ef3adf0b139ee4c5133e2aa35664da9eb2d", - "https://bcr.bazel.build/modules/platforms/0.0.9/MODULE.bazel": "4a87a60c927b56ddd67db50c89acaa62f4ce2a1d2149ccb63ffd871d5ce29ebc", - "https://bcr.bazel.build/modules/platforms/1.0.0/MODULE.bazel": "f05feb42b48f1b3c225e4ccf351f367be0371411a803198ec34a389fb22aa580", - "https://bcr.bazel.build/modules/platforms/1.0.0/source.json": "f4ff1fd412e0246fd38c82328eb209130ead81d62dcd5a9e40910f867f733d96", - "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7", - "https://bcr.bazel.build/modules/protobuf/27.0/MODULE.bazel": "7873b60be88844a0a1d8f80b9d5d20cfbd8495a689b8763e76c6372998d3f64c", - "https://bcr.bazel.build/modules/protobuf/27.2/MODULE.bazel": "32450b50673882e4c8c3d10a83f3bc82161b213ed2f80d17e38bece8f165c295", - "https://bcr.bazel.build/modules/protobuf/28.2/MODULE.bazel": "c0c8e51757df486d0314fa290e174d707bad4a6c2aa5ccb08a4b4abd76a23e90", - "https://bcr.bazel.build/modules/protobuf/29.0-rc2/MODULE.bazel": "6241d35983510143049943fc0d57937937122baf1b287862f9dc8590fc4c37df", - "https://bcr.bazel.build/modules/protobuf/29.0-rc3/MODULE.bazel": "33c2dfa286578573afc55a7acaea3cada4122b9631007c594bf0729f41c8de92", - "https://bcr.bazel.build/modules/protobuf/29.0-rc3/source.json": "c16a6488fb279ef578da7098e605082d72ed85fc8d843eaae81e7d27d0f4625d", - "https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0", - "https://bcr.bazel.build/modules/protobuf/3.19.2/MODULE.bazel": "532ffe5f2186b69fdde039efe6df13ba726ff338c6bc82275ad433013fa10573", - "https://bcr.bazel.build/modules/protobuf/3.19.6/MODULE.bazel": "9233edc5e1f2ee276a60de3eaa47ac4132302ef9643238f23128fea53ea12858", - "https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/MODULE.bazel": "88af1c246226d87e65be78ed49ecd1e6f5e98648558c14ce99176da041dc378e", - "https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/source.json": "be4789e951dd5301282729fe3d4938995dc4c1a81c2ff150afc9f1b0504c6022", - "https://bcr.bazel.build/modules/re2/2023-09-01/MODULE.bazel": "cb3d511531b16cfc78a225a9e2136007a48cf8a677e4264baeab57fe78a80206", - "https://bcr.bazel.build/modules/re2/2023-09-01/source.json": "e044ce89c2883cd957a2969a43e79f7752f9656f6b20050b62f90ede21ec6eb4", - "https://bcr.bazel.build/modules/rules_android/0.1.1/MODULE.bazel": "48809ab0091b07ad0182defb787c4c5328bd3a278938415c00a7b69b50c4d3a8", - "https://bcr.bazel.build/modules/rules_android/0.1.1/source.json": "e6986b41626ee10bdc864937ffb6d6bf275bb5b9c65120e6137d56e6331f089e", - "https://bcr.bazel.build/modules/rules_bison/0.4/MODULE.bazel": "b6e62441d2222194ce444c63bb7d51647d2f1df2ffd9a4a52d680d4e3cf357bd", - "https://bcr.bazel.build/modules/rules_bison/0.4/source.json": "fd7d5e58850e3d233a1a0383f2d174caa9bda5522f5f5b5971bbbb2423223236", - "https://bcr.bazel.build/modules/rules_buf/0.1.1/MODULE.bazel": "6189aec18a4f7caff599ad41b851ab7645d4f1e114aa6431acf9b0666eb92162", - "https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647", - "https://bcr.bazel.build/modules/rules_cc/0.0.10/MODULE.bazel": "ec1705118f7eaedd6e118508d3d26deba2a4e76476ada7e0e3965211be012002", - "https://bcr.bazel.build/modules/rules_cc/0.0.13/MODULE.bazel": "0e8529ed7b323dad0775ff924d2ae5af7640b23553dfcd4d34344c7e7a867191", - "https://bcr.bazel.build/modules/rules_cc/0.0.15/MODULE.bazel": "6704c35f7b4a72502ee81f61bf88706b54f06b3cbe5558ac17e2e14666cd5dcc", - "https://bcr.bazel.build/modules/rules_cc/0.0.16/MODULE.bazel": "7661303b8fc1b4d7f532e54e9d6565771fea666fbdf839e0a86affcd02defe87", - "https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c", - "https://bcr.bazel.build/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f", - "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e", - "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5", - "https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513", - "https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc", - "https://bcr.bazel.build/modules/rules_cc/0.2.4/source.json": "2bd87ef9b41d4753eadf65175745737135cba0e70b479bdc204ef0c67404d0c4", - "https://bcr.bazel.build/modules/rules_flex/0.4/MODULE.bazel": "543edf994d2c044f3d723374e50eaa739ed7ee9d82b8185adb8413bce269dcf3", - "https://bcr.bazel.build/modules/rules_flex/0.4/source.json": "98bc56c2139b6ed6387dbabd06f625e82500bed8ba1689a5f4f3c9e8c3289f82", - "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6", - "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8", - "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/source.json": "c8b1e2c717646f1702290959a3302a178fb639d987ab61d548105019f11e527e", - "https://bcr.bazel.build/modules/rules_go/0.33.0/MODULE.bazel": "a2b11b64cd24bf94f57454f53288a5dacfe6cb86453eee7761b7637728c1910c", - "https://bcr.bazel.build/modules/rules_go/0.38.1/MODULE.bazel": "fb8e73dd3b6fc4ff9d260ceacd830114891d49904f5bda1c16bc147bcc254f71", - "https://bcr.bazel.build/modules/rules_go/0.39.1/MODULE.bazel": "d34fb2a249403a5f4339c754f1e63dc9e5ad70b47c5e97faee1441fc6636cd61", - "https://bcr.bazel.build/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74", - "https://bcr.bazel.build/modules/rules_java/5.3.5/MODULE.bazel": "a4ec4f2db570171e3e5eb753276ee4b389bae16b96207e9d3230895c99644b86", - "https://bcr.bazel.build/modules/rules_java/6.5.2/MODULE.bazel": "1d440d262d0e08453fa0c4d8f699ba81609ed0e9a9a0f02cd10b3e7942e61e31", - "https://bcr.bazel.build/modules/rules_java/7.10.0/MODULE.bazel": "530c3beb3067e870561739f1144329a21c851ff771cd752a49e06e3dc9c2e71a", - "https://bcr.bazel.build/modules/rules_java/7.12.2/MODULE.bazel": "579c505165ee757a4280ef83cda0150eea193eed3bef50b1004ba88b99da6de6", - "https://bcr.bazel.build/modules/rules_java/7.2.0/MODULE.bazel": "06c0334c9be61e6cef2c8c84a7800cef502063269a5af25ceb100b192453d4ab", - "https://bcr.bazel.build/modules/rules_java/7.6.0/MODULE.bazel": "14cd36d05b60aa53c345b5b436c1c4a1f1dec58e82e480ffb9657038e323d330", - "https://bcr.bazel.build/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", - "https://bcr.bazel.build/modules/rules_java/7.6.5/MODULE.bazel": "481164be5e02e4cab6e77a36927683263be56b7e36fef918b458d7a8a1ebadb1", - "https://bcr.bazel.build/modules/rules_java/8.11.0/MODULE.bazel": "c3d280bc5ff1038dcb3bacb95d3f6b83da8dd27bba57820ec89ea4085da767ad", - "https://bcr.bazel.build/modules/rules_java/8.14.0/MODULE.bazel": "717717ed40cc69994596a45aec6ea78135ea434b8402fb91b009b9151dd65615", - "https://bcr.bazel.build/modules/rules_java/8.14.0/source.json": "8a88c4ca9e8759da53cddc88123880565c520503321e2566b4e33d0287a3d4bc", - "https://bcr.bazel.build/modules/rules_java/8.3.2/MODULE.bazel": "7336d5511ad5af0b8615fdc7477535a2e4e723a357b6713af439fe8cf0195017", - "https://bcr.bazel.build/modules/rules_java/8.5.1/MODULE.bazel": "d8a9e38cc5228881f7055a6079f6f7821a073df3744d441978e7a43e20226939", - "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", - "https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909", - "https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036", - "https://bcr.bazel.build/modules/rules_jvm_external/6.3/MODULE.bazel": "c998e060b85f71e00de5ec552019347c8bca255062c990ac02d051bb80a38df0", - "https://bcr.bazel.build/modules/rules_jvm_external/6.7/MODULE.bazel": "e717beabc4d091ecb2c803c2d341b88590e9116b8bf7947915eeb33aab4f96dd", - "https://bcr.bazel.build/modules/rules_jvm_external/6.7/source.json": "5426f412d0a7fc6b611643376c7e4a82dec991491b9ce5cb1cfdd25fe2e92be4", - "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/MODULE.bazel": "d269a01a18ee74d0335450b10f62c9ed81f2321d7958a2934e44272fe82dcef3", - "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/source.json": "2faa4794364282db7c06600b7e5e34867a564ae91bda7cae7c29c64e9466b7d5", - "https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0", - "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d", - "https://bcr.bazel.build/modules/rules_license/0.0.8/MODULE.bazel": "5669c6fe49b5134dbf534db681ad3d67a2d49cfc197e4a95f1ca2fd7f3aebe96", - "https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c", - "https://bcr.bazel.build/modules/rules_license/1.0.0/source.json": "a52c89e54cc311196e478f8382df91c15f7a2bfdf4c6cd0e2675cc2ff0b56efb", - "https://bcr.bazel.build/modules/rules_m4/0.2.5/MODULE.bazel": "95b962956ac1e92f49afe78d7a4f80853b741c4e89af7b43e1e1e3f7a361c033", - "https://bcr.bazel.build/modules/rules_m4/0.3/MODULE.bazel": "8793c3117300f7add1cd757d07eb7d6652e0c9259624379b84d891a6bf6e11e0", - "https://bcr.bazel.build/modules/rules_m4/0.3/source.json": "9db752727b32753fa382a52ac0da80f01559ecb5f3ba8f6799d6e5b4582b45ac", - "https://bcr.bazel.build/modules/rules_nodejs/5.8.2/MODULE.bazel": "6bc03c8f37f69401b888023bf511cb6ee4781433b0cb56236b2e55a21e3a026a", - "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc", - "https://bcr.bazel.build/modules/rules_pkg/1.0.1/MODULE.bazel": "5b1df97dbc29623bccdf2b0dcd0f5cb08e2f2c9050aab1092fd39a41e82686ff", - "https://bcr.bazel.build/modules/rules_pkg/1.0.1/source.json": "bd82e5d7b9ce2d31e380dd9f50c111d678c3bdaca190cb76b0e1c71b05e1ba8a", - "https://bcr.bazel.build/modules/rules_proto/4.0.0/MODULE.bazel": "a7a7b6ce9bee418c1a760b3d84f83a299ad6952f9903c67f19e4edd964894e06", - "https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7", - "https://bcr.bazel.build/modules/rules_proto/6.0.0/MODULE.bazel": "b531d7f09f58dce456cd61b4579ce8c86b38544da75184eadaf0a7cb7966453f", - "https://bcr.bazel.build/modules/rules_proto/6.0.2/MODULE.bazel": "ce916b775a62b90b61888052a416ccdda405212b6aaeb39522f7dc53431a5e73", - "https://bcr.bazel.build/modules/rules_proto/6.0.2/source.json": "17a2e195f56cb28d6bbf763e49973d13890487c6945311ed141e196fb660426d", - "https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f", - "https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel": "26114f0c0b5e93018c0c066d6673f1a2c3737c7e90af95eff30cfee38d0bbac7", - "https://bcr.bazel.build/modules/rules_python/0.23.1/MODULE.bazel": "49ffccf0511cb8414de28321f5fcf2a31312b47c40cc21577144b7447f2bf300", - "https://bcr.bazel.build/modules/rules_python/0.25.0/MODULE.bazel": "72f1506841c920a1afec76975b35312410eea3aa7b63267436bfb1dd91d2d382", - "https://bcr.bazel.build/modules/rules_python/0.28.0/MODULE.bazel": "cba2573d870babc976664a912539b320cbaa7114cd3e8f053c720171cde331ed", - "https://bcr.bazel.build/modules/rules_python/0.31.0/MODULE.bazel": "93a43dc47ee570e6ec9f5779b2e64c1476a6ce921c48cc9a1678a91dd5f8fd58", - "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c", - "https://bcr.bazel.build/modules/rules_python/1.5.1/MODULE.bazel": "acfe65880942d44a69129d4c5c3122d57baaf3edf58ae5a6bd4edea114906bf5", - "https://bcr.bazel.build/modules/rules_python/1.5.1/source.json": "aa903e1bcbdfa1580f2b8e2d55100b7c18bc92d779ebb507fec896c75635f7bd", - "https://bcr.bazel.build/modules/rules_rust/0.45.1/MODULE.bazel": "a69d0db3a958fab2c6520961e1b2287afcc8b36690fd31bbc4f6f7391397150d", - "https://bcr.bazel.build/modules/rules_scala/7.1.5/MODULE.bazel": "72cd1d0ac56c3489b16c90857ac8938903402fc438a49168238ac58068f00741", - "https://bcr.bazel.build/modules/rules_scala/7.1.5/source.json": "cd45f7bf50c69e7c2f621ce2a1b199797502ebee994b181818169683e912c651", - "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c", - "https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b", - "https://bcr.bazel.build/modules/rules_shell/0.3.0/source.json": "c55ed591aa5009401ddf80ded9762ac32c358d2517ee7820be981e2de9756cf3", - "https://bcr.bazel.build/modules/stardoc/0.5.0/MODULE.bazel": "f9f1f46ba8d9c3362648eea571c6f9100680efc44913618811b58cc9c02cd678", - "https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8", - "https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c", - "https://bcr.bazel.build/modules/stardoc/0.5.4/MODULE.bazel": "6569966df04610b8520957cb8e97cf2e9faac2c0309657c537ab51c16c18a2a4", - "https://bcr.bazel.build/modules/stardoc/0.7.0/MODULE.bazel": "05e3d6d30c099b6770e97da986c53bd31844d7f13d41412480ea265ac9e8079c", - "https://bcr.bazel.build/modules/stardoc/0.7.2/MODULE.bazel": "fc152419aa2ea0f51c29583fab1e8c99ddefd5b3778421845606ee628629e0e5", - "https://bcr.bazel.build/modules/stardoc/0.7.2/source.json": "58b029e5e901d6802967754adf0a9056747e8176f017cfe3607c0851f4d42216", - "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", - "https://bcr.bazel.build/modules/verilator/5.036.bcr.3/MODULE.bazel": "19ff7c6a9133f404157b0d499ff8c93bfc7e98e7e8d7569b51e50f79a5a33d1b", - "https://bcr.bazel.build/modules/verilator/5.036.bcr.3/source.json": "d7aa35ef34334e9bf11ffc308c1fa7f44f313b45e4e80c497cbd26deb585bcbf", - "https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", - "https://bcr.bazel.build/modules/zlib/1.2.12/MODULE.bazel": "3b1a8834ada2a883674be8cbd36ede1b6ec481477ada359cd2d3ddc562340b27", - "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.3/MODULE.bazel": "af322bc08976524477c79d1e45e241b6efbeb918c497e8840b8ab116802dda79", - "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/MODULE.bazel": "eec517b5bbe5492629466e11dae908d043364302283de25581e3eb944326c4ca", - "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.7/MODULE.bazel": "26a6764cda2bfa720e5ea6bea9e6aa4282b69f96d3b9cfcfbce1ef596ce30e43", - "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.7/source.json": "086122bc43f9108094fed21aaace4c0affd5abd8364af0520dbacdb76cc0546d", - "https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198" - }, - "selectedYankedVersions": {}, - "moduleExtensions": { - "@@apple_support~//crosstool:setup.bzl%apple_cc_configure_extension": { - "general": { - "bzlTransitiveDigest": "Co35oEwSoYZFy42IHjYfE7VkKR1WykyxhRlbUGSa3XA=", - "usagesDigest": "gVdmmfWVnB6JChQTMnM+gMpss+wokBBM/793mjFRycU=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, - "envVariables": {}, - "generatedRepoSpecs": { - "local_config_apple_cc_toolchains": { - "bzlFile": "@@apple_support~//crosstool:setup.bzl", - "ruleClassName": "_apple_cc_autoconf_toolchains", - "attributes": {} - }, - "local_config_apple_cc": { - "bzlFile": "@@apple_support~//crosstool:setup.bzl", - "ruleClassName": "_apple_cc_autoconf", - "attributes": {} - } - }, - "recordedRepoMappingEntries": [ - [ - "apple_support~", - "bazel_tools", - "bazel_tools" - ] - ] - } - }, - "@@rules_bison~//bison/internal:default_toolchain_ext.bzl%default_toolchain_ext": { - "general": { - "bzlTransitiveDigest": "Vd3jEbJ8YAI/n4FupsISXkB0UZACFAUWLWiflmiPxDI=", - "usagesDigest": "Lz1kWFCTPGNMr++TAVCKbuAK5tsj1zcOR3Hi81InL+A=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, - "envVariables": {}, - "generatedRepoSpecs": { - "bison_v3.3.2": { - "bzlFile": "@@rules_bison~//bison/rules:bison_repository.bzl", - "ruleClassName": "bison_repository", - "attributes": { - "version": "3.3.2" - } - }, - "bison": { - "bzlFile": "@@rules_bison~//bison/rules:bison_toolchain_repository.bzl", - "ruleClassName": "bison_toolchain_repository", - "attributes": { - "bison_repository": "@bison_v3.3.2" - } - } - }, - "moduleExtensionMetadata": { - "explicitRootModuleDirectDeps": [ - "bison" - ], - "explicitRootModuleDirectDevDeps": [], - "useAllRepos": "NO", - "reproducible": false - }, - "recordedRepoMappingEntries": [] - } - }, - "@@rules_flex~//flex/internal:default_toolchain_ext.bzl%default_toolchain_ext": { - "general": { - "bzlTransitiveDigest": "IyvJbFvAYvjVrhYqrB8CJ8qfee94/AdZQhknVQYlFb8=", - "usagesDigest": "qj/1TfykODi3VjDvhDQm5cd/mAM3tVifzg+EyJOdt1M=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, - "envVariables": {}, - "generatedRepoSpecs": { - "flex_v2.6.4": { - "bzlFile": "@@rules_flex~//flex/rules:flex_repository.bzl", - "ruleClassName": "flex_repository", - "attributes": { - "version": "2.6.4" - } - }, - "flex": { - "bzlFile": "@@rules_flex~//flex/rules:flex_toolchain_repository.bzl", - "ruleClassName": "flex_toolchain_repository", - "attributes": { - "flex_repository": "@flex_v2.6.4" - } - } - }, - "moduleExtensionMetadata": { - "explicitRootModuleDirectDeps": [ - "flex" - ], - "explicitRootModuleDirectDevDeps": [], - "useAllRepos": "NO", - "reproducible": false - }, - "recordedRepoMappingEntries": [] - } - }, - "@@rules_kotlin~//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": { - "general": { - "bzlTransitiveDigest": "fus14IFJ/1LGWWGKPH/U18VnJCoMjfDt1ckahqCnM0A=", - "usagesDigest": "aJF6fLy82rR95Ff5CZPAqxNoFgOMLMN5ImfBS0nhnkg=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, - "envVariables": {}, - "generatedRepoSpecs": { - "com_github_jetbrains_kotlin_git": { - "bzlFile": "@@rules_kotlin~//src/main/starlark/core/repositories:compiler.bzl", - "ruleClassName": "kotlin_compiler_git_repository", - "attributes": { - "urls": [ - "https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip" - ], - "sha256": "93137d3aab9afa9b27cb06a824c2324195c6b6f6179d8a8653f440f5bd58be88" - } - }, - "com_github_jetbrains_kotlin": { - "bzlFile": "@@rules_kotlin~//src/main/starlark/core/repositories:compiler.bzl", - "ruleClassName": "kotlin_capabilities_repository", - "attributes": { - "git_repository_name": "com_github_jetbrains_kotlin_git", - "compiler_version": "1.9.23" - } - }, - "com_github_google_ksp": { - "bzlFile": "@@rules_kotlin~//src/main/starlark/core/repositories:ksp.bzl", - "ruleClassName": "ksp_compiler_plugin_repository", - "attributes": { - "urls": [ - "https://github.com/google/ksp/releases/download/1.9.23-1.0.20/artifacts.zip" - ], - "sha256": "ee0618755913ef7fd6511288a232e8fad24838b9af6ea73972a76e81053c8c2d", - "strip_version": "1.9.23-1.0.20" - } - }, - "com_github_pinterest_ktlint": { - "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", - "ruleClassName": "http_file", - "attributes": { - "sha256": "01b2e0ef893383a50dbeb13970fe7fa3be36ca3e83259e01649945b09d736985", - "urls": [ - "https://github.com/pinterest/ktlint/releases/download/1.3.0/ktlint" - ], - "executable": true - } - }, - "rules_android": { - "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", - "ruleClassName": "http_archive", - "attributes": { - "sha256": "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", - "strip_prefix": "rules_android-0.1.1", - "urls": [ - "https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip" - ] - } - } - }, - "recordedRepoMappingEntries": [ - [ - "rules_kotlin~", - "bazel_tools", - "bazel_tools" - ] - ] - } - }, - "@@rules_m4~//m4/internal:default_toolchain_ext.bzl%default_toolchain_ext": { - "general": { - "bzlTransitiveDigest": "tsDFT9pkt4Tt3gpC3ufpCdpFRFHSoWSmGrgkKq1xiPM=", - "usagesDigest": "W4ujs1K8cNaOBk1ik1FZNoxpZ26hUFz5NqVTgvq5mcc=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, - "envVariables": {}, - "generatedRepoSpecs": { - "m4_v1.4.18": { - "bzlFile": "@@rules_m4~//m4/rules:m4_repository.bzl", - "ruleClassName": "m4_repository", - "attributes": { - "version": "1.4.18" - } - }, - "m4": { - "bzlFile": "@@rules_m4~//m4/rules:m4_toolchain_repository.bzl", - "ruleClassName": "m4_toolchain_repository", - "attributes": { - "m4_repository": "@m4_v1.4.18" - } - } - }, - "moduleExtensionMetadata": { - "explicitRootModuleDirectDeps": [ - "m4" - ], - "explicitRootModuleDirectDevDeps": [], - "useAllRepos": "NO", - "reproducible": false - }, - "recordedRepoMappingEntries": [] - } - }, - "@@rules_python~//python/uv:uv.bzl%uv": { - "general": { - "bzlTransitiveDigest": "mxPY/VBQrSC9LvYeRrlxD+0IkDTQ4+36NGMnGWlN/Vw=", - "usagesDigest": "EKe/L0w6kmCPPhTfze0hXgER2q1WqZPMi9RuaCvgxOQ=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, - "envVariables": {}, - "generatedRepoSpecs": { - "uv": { - "bzlFile": "@@rules_python~//python/uv/private:uv_toolchains_repo.bzl", - "ruleClassName": "uv_toolchains_repo", - "attributes": { - "toolchain_type": "'@@rules_python~//python/uv:uv_toolchain_type'", - "toolchain_names": [ - "none" - ], - "toolchain_implementations": { - "none": "'@@rules_python~//python:none'" - }, - "toolchain_compatible_with": { - "none": [ - "@platforms//:incompatible" - ] - }, - "toolchain_target_settings": {} - } - } - }, - "recordedRepoMappingEntries": [ - [ - "rules_python~", - "bazel_tools", - "bazel_tools" - ], - [ - "rules_python~", - "platforms", - "platforms" - ] - ] - } - } - } -} From 96dfdbeb2c0b559b00661971d52bcf2d82035721 Mon Sep 17 00:00:00 2001 From: Qijia Yang <2421653893@qq.com> Date: Mon, 20 Apr 2026 09:25:23 +0800 Subject: [PATCH 2/4] update CI --- .bcr/config.yml | 0 .bcr/metadata.template.json | 20 ++++++ .bcr/presubmit.yml | 17 +++++ .bcr/source.template.json | 5 ++ .bcr/tools/BUILD.bazel | 0 .bcr/tools/bzl_version/BUILD.bazel | 14 +++++ .bcr/tools/bzl_version/version_test.py | 87 ++++++++++++++++++++++++++ .github/release_notes.template | 11 ++++ .github/workflows/bcr-publish.yaml | 44 +++++++++++++ .github/workflows/ci.yml | 29 ++++----- .github/workflows/lint.yml | 9 ++- .github/workflows/release.yaml | 77 +++++++++++++++++++++++ BUILD.bazel | 21 ++----- MODULE.bazel | 2 + version.bzl | 3 + 15 files changed, 308 insertions(+), 31 deletions(-) create mode 100644 .bcr/config.yml create mode 100644 .bcr/metadata.template.json create mode 100644 .bcr/presubmit.yml create mode 100644 .bcr/source.template.json create mode 100644 .bcr/tools/BUILD.bazel create mode 100644 .bcr/tools/bzl_version/BUILD.bazel create mode 100644 .bcr/tools/bzl_version/version_test.py create mode 100644 .github/release_notes.template create mode 100644 .github/workflows/bcr-publish.yaml create mode 100644 .github/workflows/release.yaml create mode 100644 version.bzl diff --git a/.bcr/config.yml b/.bcr/config.yml new file mode 100644 index 0000000..e69de29 diff --git a/.bcr/metadata.template.json b/.bcr/metadata.template.json new file mode 100644 index 0000000..bfa32f3 --- /dev/null +++ b/.bcr/metadata.template.json @@ -0,0 +1,20 @@ +{ + "homepage": "https://github.com/hw-bzl/rules_chisel", + "maintainers": [ + { + "name": "MrAMS", + "email": "25056812+MrAMS@users.noreply.github.com", + "github": "MrAMS", + "github_user_id": 25056812 + }, + { + "name": "UebelAndre", + "email": "26427366+UebelAndre@users.noreply.github.com", + "github": "UebelAndre", + "github_user_id": 26427366 + } + ], + "repository": ["github:hw-bzl/rules_chisel"], + "versions": [], + "yanked_versions": {} +} diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml new file mode 100644 index 0000000..d61c6b2 --- /dev/null +++ b/.bcr/presubmit.yml @@ -0,0 +1,17 @@ +bcr_test_module: + module_path: "" + matrix: + platform: + - debian10 + - ubuntu2004 + - macos + bazel: [7.x, 8.x, 9.x] + tasks: + run_tests: + name: "Run tests" + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - "//..." + test_targets: + - "//..." diff --git a/.bcr/source.template.json b/.bcr/source.template.json new file mode 100644 index 0000000..5837ef9 --- /dev/null +++ b/.bcr/source.template.json @@ -0,0 +1,5 @@ +{ + "integrity": "", + "strip_prefix": "", + "url": "https://github.com/{OWNER}/{REPO}/releases/download/{VERSION}/rules_chisel-{VERSION}.tar.gz" +} diff --git a/.bcr/tools/BUILD.bazel b/.bcr/tools/BUILD.bazel new file mode 100644 index 0000000..e69de29 diff --git a/.bcr/tools/bzl_version/BUILD.bazel b/.bcr/tools/bzl_version/BUILD.bazel new file mode 100644 index 0000000..8bc3e8c --- /dev/null +++ b/.bcr/tools/bzl_version/BUILD.bazel @@ -0,0 +1,14 @@ +load("@rules_python//python:py_test.bzl", "py_test") + +py_test( + name = "version_test", + srcs = ["version_test.py"], + data = [ + "//:MODULE.bazel", + "//:README.md", + "//:version.bzl", + ], + deps = [ + "@rules_python//python/runfiles", + ], +) diff --git a/.bcr/tools/bzl_version/version_test.py b/.bcr/tools/bzl_version/version_test.py new file mode 100644 index 0000000..2b0ed3c --- /dev/null +++ b/.bcr/tools/bzl_version/version_test.py @@ -0,0 +1,87 @@ +"""A suite of tests ensuring version strings are all in sync.""" + +import platform +import re +import unittest +from pathlib import Path + +from python.runfiles import Runfiles + +PKG_NAME = "rules_chisel" + + +def rlocation(runfiles: Runfiles, rlocationpath: str) -> Path: + """Look up a runfile and ensure the file exists + + Args: + runfiles: The runfiles object + rlocationpath: The runfile key + + Returns: + The requested runfile. + """ + # TODO: https://github.com/periareon/rules_venv/issues/37 + source_repo = None + if platform.system() == "Windows": + source_repo = "" + runfile = runfiles.Rlocation(rlocationpath, source_repo) + if not runfile: + raise FileNotFoundError(f"Failed to find runfile: {rlocationpath}") + path = Path(runfile) + if not path.exists(): + raise FileNotFoundError(f"Runfile does not exist: ({rlocationpath}) {path}") + return path + + +class RepoVersionTests(unittest.TestCase): + """Test that the `{PKG_NAME}` versions match in version.bzl, MODULE.bazel, and README.md.""" + + def test_versions(self) -> None: + """Test that the version.bzl and MODULE.bazel versions are synced.""" + runfiles = Runfiles.Create() + if not runfiles: + raise EnvironmentError("Failed to locate runfiles.") + + version_bzl = rlocation(runfiles, f"{PKG_NAME}/version.bzl") + bzl_version = re.findall( + r'VERSION = "([\w\d\.]+)"', + version_bzl.read_text(encoding="utf-8"), + re.MULTILINE, + ) + self.assertTrue(bzl_version, f"Failed to parse version from {version_bzl}") + self.assertTrue( + len(bzl_version) == 1, + (f"Expect len(bzl_version)=1, but got {len(bzl_version)}"), + ) + + bzl_version = bzl_version[0] + + module_bazel = rlocation(runfiles, f"{PKG_NAME}/MODULE.bazel") + module_versions = re.findall( + rf'module\(\n\s+name = "{re.escape(PKG_NAME)}",\n\s+version = "([\d\w\.]+)",\n', + module_bazel.read_text(encoding="utf-8"), + re.MULTILINE, + ) + self.assertTrue(module_versions, f"Failed to parse version from {module_bazel}") + + readme_bazel = rlocation(runfiles, f"{PKG_NAME}/README.md") + readme_versions = re.findall( + rf'bazel_dep\(\s*name\s*=\s*"{re.escape(PKG_NAME)}",\s*version\s*=\s*"([\d\w\.]+)"\s*\)', + readme_bazel.read_text(encoding="utf-8"), + re.MULTILINE, + ) + # allow readme_versions is empty + + self.assertTrue( + all(e == bzl_version for e in module_versions), + ("Version in MODULE.bazel does not match"), + ) + + self.assertTrue( + all(e == bzl_version for e in readme_versions), + ("Version in README.md does not match"), + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/.github/release_notes.template b/.github/release_notes.template new file mode 100644 index 0000000..f068ddc --- /dev/null +++ b/.github/release_notes.template @@ -0,0 +1,11 @@ +# {version} + +To start using this module, make sure you have set up Bzlmod according to the [user guide](https://bazel.build/docs/bzlmod), and add the following to your MODULE.bazel file: + +```python +bazel_dep(name = "rules_chisel", version = "{version}") +``` + +Additional documentation can be found at: https://github.com/hw-bzl/rules_chisel + +SHA256: `{sha256_base64}` diff --git a/.github/workflows/bcr-publish.yaml b/.github/workflows/bcr-publish.yaml new file mode 100644 index 0000000..4848e3d --- /dev/null +++ b/.github/workflows/bcr-publish.yaml @@ -0,0 +1,44 @@ +# See https://github.com/bazel-contrib/publish-to-bcr +name: Publish to BCR + +on: + # Allow the publish workflow to be called from another workflow. + # In this case, we trigger it from the release.yaml workflow. + workflow_call: + inputs: + release_version: + required: true + type: string + secrets: + BCR_PUBLISH_TOKEN: + required: true + # In case of problems, let release engineers retry by manually dispatching + # the workflow from the GitHub UI. + workflow_dispatch: + inputs: + release_version: + required: true + type: string + description: Release version to publish to the Bazel Central Registry + templates_ref: + default: '' + type: string + description: Override the ref to read .bcr templates from +jobs: + publish: + uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.1.0 + with: + attest: false + tag_name: ${{ inputs.release_version }} + author_name: periareon-bot + author_email: 260522848+periareon-bot@users.noreply.github.com + # Tags don't include a "v" prefix + tag_prefix: "" + # GitHub repository which is a fork of the upstream where the Pull Request will be opened. + registry_fork: hw-bzl/bazel-central-registry + templates_ref: ${{ inputs.templates_ref || inputs.release_version }} + draft: false + permissions: + contents: write + secrets: + publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bd1750..a9a54f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,32 +2,33 @@ name: CI on: push: - paths-ignore: - - "**.md" - - "LICENSE" + branches: + - main + - master pull_request: jobs: test: - name: Build and Test - runs-on: ubuntu-latest + name: ${{ matrix.os }} / Bazel ${{ matrix.bazel-version }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + bazel-version: ["7.*", "8.*", "9.*"] steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Bazel - uses: bazel-contrib/setup-bazel@0.15.0 + uses: bazel-contrib/setup-bazel@0.9.0 with: - bazelisk-version: "1.x" bazelisk-cache: true repository-cache: true + disk-cache: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.bazel-version }} - - name: Build all targets - run: bazel build //... - - - name: Run tests + - name: Run all tests + env: + USE_BAZEL_VERSION: ${{ matrix.bazel-version }} run: bazel test //... --test_output=errors - - - name: Run Chisel version compatibility checks - run: tests/version_compat/check_chisel_versions.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 983e386..d4f7f24 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,6 +2,9 @@ name: Lint on: push: + branches: + - main + - master pull_request: jobs: @@ -13,8 +16,10 @@ jobs: steps: - uses: actions/checkout@v4 - - run: | + - name: Install buildifier + run: | sudo wget https://github.com/bazelbuild/buildtools/releases/download/${{ env.BUILDIFIER_VERSION }}/buildifier-linux-amd64 -O /usr/local/bin/buildifier sudo chmod +x /usr/local/bin/buildifier - - run: buildifier -lint=warn -mode=check -warnings=all -r . + - name: Check formatting + run: buildifier -lint=warn -mode=check -warnings=all -r . diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3166559 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,77 @@ +--- +name: Release +on: + workflow_dispatch: + push: + branches: + - main + paths: + # Only trigger for new releases + - "version.bzl" + +defaults: + run: + shell: bash + +jobs: + release: + if: ${{ github.repository_owner == 'hw-bzl' }} + permissions: + contents: write + actions: write + attestations: write + outputs: + release_version: ${{ steps.version.outputs.release_version }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: main + - name: Detect the current version + id: version + run: | + version="$(grep 'VERSION =' ./version.bzl | sed 's/VERSION = "//' | sed 's/"//')" + echo "RELEASE_VERSION=${version}" >> $GITHUB_ENV + echo "release_version=${version}" >> $GITHUB_OUTPUT + + - name: Create release artifact + id: artifact + run: | + tar -czf ${{ github.workspace }}/.github/rules_chisel.tar.gz --exclude=".git" --exclude=".github" -C ${{ github.workspace }} . + sha256_base64="$(shasum --algorithm 256 ${{ github.workspace }}/.github/rules_chisel.tar.gz | awk '{ print $1 }' | xxd -r -p | base64)" + echo "ARCHIVE_SHA256_BASE64=${sha256_base64}" >> $GITHUB_ENV + echo "sha256=${sha256_base64}" >> $GITHUB_OUTPUT + + - name: Generate release notes + run: | + sed "s/{version}/$RELEASE_VERSION/g" ${{ github.workspace }}/.github/release_notes.template \ + | sed "s#{sha256_base64}#$ARCHIVE_SHA256_BASE64#g" \ + > ${{ github.workspace }}/.github/release_notes.txt + + - name: "Prepare and Upload Release" + run: | + mv ${{ github.workspace }}/.github/rules_chisel.tar.gz \ + ${{ github.workspace }}/.github/rules_chisel-$RELEASE_VERSION.tar.gz + + - name: "Release and Upload Assets" + uses: softprops/action-gh-release@v2 + id: rules_release + with: + tag_name: ${{ steps.version.outputs.release_version }} + target_commitish: ${{ github.sha }} + body_path: ${{ github.workspace }}/.github/release_notes.txt + generate_release_notes: true + files: | + ${{ github.workspace }}/.github/rules_chisel-${{ steps.version.outputs.release_version }}.tar.gz + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + bcr-publish: + needs: [release] + permissions: + contents: write + uses: ./.github/workflows/bcr-publish.yaml + with: + release_version: ${{ needs.release.outputs.release_version }} + secrets: + BCR_PUBLISH_TOKEN: ${{ secrets.BCR_PUBLISH_TOKEN }} diff --git a/BUILD.bazel b/BUILD.bazel index 1fcfcfb..fa5f01d 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,17 +1,3 @@ -# Copyright 2026 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - load("@rules_license//rules:license.bzl", "license") package( @@ -26,4 +12,9 @@ license( licenses(["notice"]) -exports_files(["LICENSE"]) +exports_files([ + "LICENSE", + "MODULE.bazel", + "version.bzl", + "README.md", +]) diff --git a/MODULE.bazel b/MODULE.bazel index d91232e..4d4bb19 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -39,3 +39,5 @@ use_repo( chisel, "chisel_maven", ) + +bazel_dep(name = "rules_python", version = "1.7.0", dev_dependency = True) diff --git a/version.bzl b/version.bzl new file mode 100644 index 0000000..55b061d --- /dev/null +++ b/version.bzl @@ -0,0 +1,3 @@ +"""package version""" + +VERSION = "0.3.0" From d1d67871502c1739a62ed714a6ddd59769180987 Mon Sep 17 00:00:00 2001 From: Qijia Yang <2421653893@qq.com> Date: Mon, 20 Apr 2026 10:03:14 +0800 Subject: [PATCH 3/4] CI: fix macOS fail due to readlink --- .codex | 0 tests/launcher/launcher_runfiles_test.sh | 14 ++++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .codex diff --git a/.codex b/.codex new file mode 100644 index 0000000..e69de29 diff --git a/tests/launcher/launcher_runfiles_test.sh b/tests/launcher/launcher_runfiles_test.sh index afae125..7141f56 100755 --- a/tests/launcher/launcher_runfiles_test.sh +++ b/tests/launcher/launcher_runfiles_test.sh @@ -9,6 +9,10 @@ # It intentionally does not invoke real Chisel/Verilator so it runs in <1s. set -euo pipefail +realpath_portable() { + python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$1" +} + DEFS_BZL="${TEST_SRCDIR:-}/_main/chisel/defs.bzl" if [[ ! -f "$DEFS_BZL" ]]; then DEFS_BZL="$(pwd)/chisel/defs.bzl" @@ -98,8 +102,9 @@ chmod +x "$LAUNCHER" # Precondition: the symlink does resolve to the external source tree before the # launcher runs. If this ever breaks, the fixture itself is wrong. -pre_real="$(readlink -f "$VROOT/bin/verilator_perl_stub")" -if [[ "$pre_real" != "$EXT_SRC/verilator_perl_stub" ]]; then +pre_real="$(realpath_portable "$VROOT/bin/verilator_perl_stub")" +expected_pre_real="$(realpath_portable "$EXT_SRC/verilator_perl_stub")" +if [[ "$pre_real" != "$expected_pre_real" ]]; then echo "FAIL: test fixture broken — symlink does not point at external source" >&2 exit 1 fi @@ -125,8 +130,9 @@ fi # inside VERILATOR_ROOT. This is exactly what Perl's $RealBin computes. Before # the fix it resolved back into $EXT_SRC, triggering verilator's # "VERILATOR_ROOT is set to inconsistent path" error. -realbin_dir="$(dirname "$(readlink -f "$VROOT/bin/verilator_perl_stub")")" -if [[ "$realbin_dir" != "$VROOT/bin" ]]; then +realbin_dir="$(dirname "$(realpath_portable "$VROOT/bin/verilator_perl_stub")")" +expected_realbin_dir="$(realpath_portable "$VROOT/bin")" +if [[ "$realbin_dir" != "$expected_realbin_dir" ]]; then echo "FAIL: \$RealBin resolves to $realbin_dir, expected $VROOT/bin" >&2 echo " (this reproduces the VERILATOR_ROOT inconsistent-path bug)" >&2 fail=1 From da826868ce7fd8cf09dfc45afb3d774aea0ee349 Mon Sep 17 00:00:00 2001 From: Qijia Yang <2421653893@qq.com> Date: Mon, 20 Apr 2026 10:15:10 +0800 Subject: [PATCH 4/4] bump to v0.3.1 --- MODULE.bazel | 2 +- README.md | 4 +--- version.bzl | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 4d4bb19..c84f4dc 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,6 +1,6 @@ module( name = "rules_chisel", - version = "0.3.0", + version = "0.3.1", bazel_compatibility = [">=7.6.0"], ) diff --git a/README.md b/README.md index fd42b51..fe356ea 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This repository packages the following helpers as a BCR-friendly module: Add this to your `MODULE.bazel`: ```starlark -bazel_dep(name = "rules_chisel", version = "0.3.0") +bazel_dep(name = "rules_chisel", version = "0.3.1") # rules_chisel uses rules_scala underneath. bazel_dep(name = "rules_scala", version = "7.1.5") @@ -38,8 +38,6 @@ scala_deps = use_extension("@rules_scala//scala/extensions:deps.bzl", "scala_dep scala_deps.scala() scala_deps.scalatest() # only needed if you use chisel_test -bazel_dep(name = "verilator", version = "5.044") # only needed if you use chisel_test - # Chisel dependencies (creates @chisel_maven) chisel = use_extension("@rules_chisel//chisel:extensions.bzl", "chisel") chisel.toolchain( diff --git a/version.bzl b/version.bzl index 55b061d..b4b37a9 100644 --- a/version.bzl +++ b/version.bzl @@ -1,3 +1,3 @@ """package version""" -VERSION = "0.3.0" +VERSION = "0.3.1"