Skip to content

Commit

Permalink
create separate repo for distributing renode sources to build rules
Browse files Browse the repository at this point in the history
Internal-tag: [#49833]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
  • Loading branch information
lpawelcz committed Oct 25, 2023
1 parent 0076eed commit 8e0cec8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion dependency_support/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)

8 changes: 4 additions & 4 deletions dependency_support/pip_requirements_lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package(default_visibility = ["//visibility:public"])

filegroup(
name = "platforms",
srcs = glob(["platforms/**/*"]),
Expand Down Expand Up @@ -496,7 +498,6 @@ filegroup(
filegroup(
name = "pip_requirements",
srcs = ["tests/requirements.txt"],
visibility = ["//visibility:public"],
)

#filegroup(
Expand Down
6 changes: 3 additions & 3 deletions toolchain_renode/defs.bzl → renode_sources/load_renode.bzl
Original file line number Diff line number Diff line change
@@ -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",
)

4 changes: 2 additions & 2 deletions toolchain_renode/Xwt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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 = [
Expand Down

0 comments on commit 8e0cec8

Please sign in to comment.