From 8e0cec892eece3d9c842bb13a0a944bf6cfdf668 Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Wed, 25 Oct 2023 13:43:20 +0200 Subject: [PATCH] create separate repo for distributing renode sources to build rules Internal-tag: [#49833] Signed-off-by: Pawel Czarnecki --- WORKSPACE | 4 ++-- dependency_support/BUILD | 2 +- dependency_support/pip_requirements_lock.txt | 8 ++++---- .../BUILD.renode_sources => renode_sources/BUILD | 3 ++- .../defs.bzl => renode_sources/load_renode.bzl | 6 +++--- toolchain_renode/Xwt/BUILD | 4 ++-- 6 files changed, 14 insertions(+), 13 deletions(-) rename toolchain_renode/BUILD.renode_sources => renode_sources/BUILD (99%) rename toolchain_renode/defs.bzl => renode_sources/load_renode.bzl (80%) diff --git a/WORKSPACE b/WORKSPACE index 1fe11b2..c756508 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,7 +1,7 @@ workspace(name = "com_antmicro_renode") -load("//toolchain_renode:defs.bzl", "fetch_renode_sources") -fetch_renode_sources() +load("//renode_sources:load_renode.bzl", "load_renode_sources") +load_renode_sources() load("//dependency_support:load_external.bzl", "load_external_repositories") load_external_repositories() diff --git a/dependency_support/BUILD b/dependency_support/BUILD index f653ecd..c2835ea 100644 --- a/dependency_support/BUILD +++ b/dependency_support/BUILD @@ -2,7 +2,7 @@ load("@rules_python//python:pip.bzl", "compile_pip_requirements") compile_pip_requirements( name = "pip_requirements", - requirements_in = "@toolchain_renode//:pip_requirements", + requirements_in = "@renode_sources//:pip_requirements", requirements_txt = "pip_requirements_lock.txt", ) diff --git a/dependency_support/pip_requirements_lock.txt b/dependency_support/pip_requirements_lock.txt index 7d0cfb4..746a862 100644 --- a/dependency_support/pip_requirements_lock.txt +++ b/dependency_support/pip_requirements_lock.txt @@ -53,7 +53,7 @@ psutil==5.9.3 \ --hash=sha256:f57d63a2b5beaf797b87024d018772439f9d3103a395627b77d17a8d72009543 \ --hash=sha256:fa5e32c7d9b60b2528108ade2929b115167fe98d59f89555574715054f50fa31 \ --hash=sha256:fe79b4ad4836e3da6c4650cb85a663b3a51aef22e1a829c384e18fae87e5e727 - # via -r /data/.cache/bazel/_bazel_pczarnecki/287449e3f84de5dd26c0f100879d7b8b/external/toolchain_renode/tests/requirements.txt + # via -r /data/.cache/bazel/_bazel_pczarnecki/287449e3f84de5dd26c0f100879d7b8b/external/renode_sources/tests/requirements.txt pyyaml==6.0 \ --hash=sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf \ --hash=sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293 \ @@ -95,15 +95,15 @@ pyyaml==6.0 \ --hash=sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f \ --hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \ --hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5 - # via -r /data/.cache/bazel/_bazel_pczarnecki/287449e3f84de5dd26c0f100879d7b8b/external/toolchain_renode/tests/requirements.txt + # via -r /data/.cache/bazel/_bazel_pczarnecki/287449e3f84de5dd26c0f100879d7b8b/external/renode_sources/tests/requirements.txt requests==2.27.1 \ --hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \ --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d - # via -r /data/.cache/bazel/_bazel_pczarnecki/287449e3f84de5dd26c0f100879d7b8b/external/toolchain_renode/tests/requirements.txt + # via -r /data/.cache/bazel/_bazel_pczarnecki/287449e3f84de5dd26c0f100879d7b8b/external/renode_sources/tests/requirements.txt robotframework==6.0.2 \ --hash=sha256:634cd6f9fdc21142eadd9aacdddbfe7d3e2a757532b71d866dbb404cd0e66dac \ --hash=sha256:6a9c06deb220099990f190c6e4e772675f625e4d5d84640fca6f0ad46ff538d0 - # via -r /data/.cache/bazel/_bazel_pczarnecki/287449e3f84de5dd26c0f100879d7b8b/external/toolchain_renode/tests/requirements.txt + # via -r /data/.cache/bazel/_bazel_pczarnecki/287449e3f84de5dd26c0f100879d7b8b/external/renode_sources/tests/requirements.txt urllib3==1.26.18 \ --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 diff --git a/toolchain_renode/BUILD.renode_sources b/renode_sources/BUILD similarity index 99% rename from toolchain_renode/BUILD.renode_sources rename to renode_sources/BUILD index 56ddaaa..a9c14d2 100644 --- a/toolchain_renode/BUILD.renode_sources +++ b/renode_sources/BUILD @@ -1,3 +1,5 @@ +package(default_visibility = ["//visibility:public"]) + filegroup( name = "platforms", srcs = glob(["platforms/**/*"]), @@ -496,7 +498,6 @@ filegroup( filegroup( name = "pip_requirements", srcs = ["tests/requirements.txt"], - visibility = ["//visibility:public"], ) #filegroup( diff --git a/toolchain_renode/defs.bzl b/renode_sources/load_renode.bzl similarity index 80% rename from toolchain_renode/defs.bzl rename to renode_sources/load_renode.bzl index 1d1a24f..8cb6c4e 100644 --- a/toolchain_renode/defs.bzl +++ b/renode_sources/load_renode.bzl @@ -1,16 +1,16 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -def fetch_renode_sources(): +def load_renode_sources(): renode_version = "1.14.0" archive_sha256 = "0de44db355a26d49ff66665765b97d2346daa1233a59f0468bc6e117c750036e" maybe( http_archive, - name = "toolchain_renode", + name = "renode_sources", url = "https://github.com/renode/renode/releases/download/v%s/renode_%s_source.tar.xz" % (renode_version, renode_version), sha256 = archive_sha256, strip_prefix = "renode_%s_source" % renode_version, - build_file = "//toolchain_renode:BUILD.renode_sources", + build_file = "//renode_sources:BUILD", ) diff --git a/toolchain_renode/Xwt/BUILD b/toolchain_renode/Xwt/BUILD index 401b0a4..7b38287 100644 --- a/toolchain_renode/Xwt/BUILD +++ b/toolchain_renode/Xwt/BUILD @@ -7,7 +7,7 @@ package(default_visibility = ["//visibility:public"]) csharp_library( name = "Xwt", - srcs = ["@toolchain_tenode//:Xwt"], + srcs = ["@renode_sources//:Xwt"], internals_visible_to = ["lib_xwt"], target_frameworks = ["net6.0"], targeting_packs = [ @@ -19,7 +19,7 @@ csharp_library( csharp_library( name = "XwtGtk", - srcs = ["@toolchain_tenode//:XwtGtk"], + srcs = ["@renode_sources//:XwtGtk"], internals_visible_to = ["lib_xwtgtk"], target_frameworks = ["net6.0"], targeting_packs = [