bazel是否支持不同平台上的远程执行?

2024-03-03

具体来说,我想从 Mac 主机对 Windows 工作线程运行测试。

评论在不同的机器上运行 bazel 远程执行器测试 https://stackoverflow.com/questions/44354378/running-bazel-remote-executor-test-on-separate-machines表明这是 Bazel 团队正在研究的事情,但想要确认。


尝试一下吧!

在 Windows 10 计算机上构建并运行本地远程执行工作线程:

git clone https://github.com/bazelbuild/bazel.git
cd bazel
bazel build src/tools/remote:worker
bazel-bin/src/tools/remote/worker --work_path=/tmp/test --listen_port=8080
bazel-out/x64_windows-fastbuild/bin/src/tools/remote/worker.exe --listen_port=8080 --work_path=C:\tmp\lre --debug

Note:如果它抱怨缺少某些命令,例如zip打开 MSYS shell 并运行实例pacman -Syu zip unzip

设置您的.bazelrc使用远程执行:

# Remote Build Execution requires a strong hash function, such as SHA256.
startup --host_jvm_args=-Dbazel.DigestFunction=SHA256

# Depending on how many machines are in the remote execution instance, setting
# this higher can make builds faster by allowing more jobs to run in parallel.
# Setting it too high can result in jobs that timeout, however, while waiting
# for a remote machine to execute them.
build:remote --jobs=8


# Set various strategies so that all actions execute remotely. Mixing remote
# and local execution will lead to errors unless the toolchain and remote
# machine exactly match the host machine.
build:remote --spawn_strategy=remote
build:remote --strategy=Javac=remote
build:remote --strategy=Closure=remote
build:remote --genrule_strategy=remote
build:remote --define=EXECUTOR=remote

# Enable the remote cache so action results can be shared across machines,
# developers, and workspaces.
build:remote --remote_cache=localhost:8080

# Enable remote execution so actions are performed on the remote systems.
build:remote --remote_executor=localhost:8080

# Enable encryption.
#build:remote --tls_enabled=true

# Enforce stricter environment rules, which eliminates some non-hermetic
# behavior and therefore improves both the remote cache hit rate and the
# correctness and repeatability of the build.
build:remote --experimental_strict_action_env=true

# Set a higher timeout value, just in case.
build:remote --remote_timeout=3600

build:remote --auth_enabled=false

# Since we're testing remote execution, let's make sure it always actually
# happens.
build:remote --remote_accept_cached=false
test --cache_test_results=false

test --test_output=errors

# TODO(b/77217487): Needed for C++ builds until fix to
# https://github.com/bazelbuild/bazel/issues/4883 is available.
build --nocheck_visibility

build:debug --verbose_failures
build:debug --explain=explain.txt
build:debug --verbose_explanations
build:debug --toolchain_resolution_debug
build:debug --subcommands

现在从 Mac 进行远程构建(当然 localhost:8080 应更改为 Windows 10 计算机的 IP):

bazel build --config=remote //:HelloWorld

现在进行远程执行

bazel run --config=remote //:HelloWorld

Note: 无耻地盗取https://github.com/bazelbuild/bazel/issues/4962 https://github.com/bazelbuild/bazel/issues/4962

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

bazel是否支持不同平台上的远程执行? 的相关文章

随机推荐

  • 包从flutter智能手表接收心率数据

    我正在寻找一款可以让我轻松地在三星手表或苹果手表等智能手表之间同步的包 我想从他们那里获取心率数据 有人知道这样一个与手表通信的包或想法吗 目前 所有的wear tizen和watch操作系统都有不同的机制来本地获取这些数据 所有这些都需要
  • .NET 会话不工作

    这是一个奇怪的问题 但希望有人能给我一个想法 我将一些值放入会话中Session Start of the Global asax在我的应用程序中 紧接着Session Start我的基本页OnInit接到电话并尝试使用其中之一Sessio
  • jQuery Datepicker BeforeShowDay 第二个参数

    jQuery datepicker 允许您使用 BeforeShowDay 回调突出显示日期 是否可以向该方法传递第二个参数 selector datepicker beforeShowDay selectedDay function se
  • Rails 3:如何根据Controller的方法创建命名范围?

    In my ApplicationController我有demo mode 方法 返回true当当前登录的用户类型为 demo 时 Post模型有publisher id字段 它指的是Users table User有user type字
  • 对象 # 没有方法“done”

    我试图实现简单的ajax GET 请求 在回调部分我想调用一些函数 代码如下 ajax url ajax pages ajx getcard php id obj value context document body done funct
  • 启动 Rails 服务器 Sidekiq 时出错

    当我尝试启动我的服务器时 rails s 给我以下错误 管理员 rvm gems ruby 1 9 3 p392 gems bundler 1 11 2 lib bundler runtime rb 81 in rescue in bloc
  • java中私有变量的序列化

    我有一个关于序列化的问题 如果我的类有私有变量并且没有 getter 和 setter 那么序列化 API 将如何读取这些变量的值 首先 访问权限是编译时功能 访问在运行时不受控制 这可能会让您感到困惑 但请尝试执行以下操作 创建 A 类的
  • 制作等长向量的列表

    在一个关于SO的问题中 LINK https stackoverflow com questions 10661295 apply a function over groups of columns 一个海报问了一个问题 我给出了一个有效的
  • jQuery .toggle() 显示和隐藏子菜单

    我正在使用这个问题的代码来进行显示 隐藏切换 jQuery toggle 显示和隐藏子菜单 https stackoverflow com questions 9469807 jquery toggle to show and hide a
  • OSX 惯性滚动导致 mousewheel.js 通过最轻微的滚动运动注册多个鼠标滚轮事件

    我正在开发一个非常标准的 Flexslider 实例 柔性滑块 http flexslider woothemes com 与jquery mousewheel js https github com brandonaaron jquery
  • 使用 subversion 将更改提交到与当前签出分支不同的分支

    我一直在处理从开发线检出的代码 发现所做的更改可能是破坏性更改 需要在提交到主开发树之前移动到实验分支 但是 我没有签出实验分支 并且我不想丢失已经进行的更改 有没有办法将工作文件夹中的更改提交到与最初签出的分支不同的分支 您应该从已知的分
  • Three.js中是否有一个容器类型对象来转换一组孩子?

    Three js 中是否有一个容器或节点对象 可以将多个网格添加为子对象 以便它们可以一起转换 一个不可见的容器 允许对组中的所有子对象执行转换 thanks Example http mrdoob github com three js
  • 在单个查询中将行插入到多个表中,从涉及的表中进行选择

    我有两个以下形式的表 即 每个 foo 都链接到一个栏 CREATE TABLE foo id INTEGER PRIMARY KEY x INTEGER NOT NULL y INTEGER NOT NULL bar id INTEGER
  • 如何用下划线模板显示JS对象?

    我想使用下划线模板显示 JS 数据对象 我似乎无法弄清楚如何钻取对象以获取国家 地区名称或其他日期 例如 tarrifType 并使用我的模板显示它 该物体看起来像这样 var items country China tarrifType
  • 如何在 AngularJS 中使用 Web Worker?

    我在用着AngularJS 种子 https github com angular angular seed我想看看 Web Worker 的有效实现 我想让一个简单的 Web Worker 工作以便理解它 但我遇到了功能问题 我的 Web
  • 如何以编程方式从后台恢复 Android Activity

    情况 假设我当前正在启动应用程序 Activity A 一段时间后 我按下 主页 按钮 应用程序 A 进入后台 此时 我开始使用另一个应用程序 B 例如 youtube 等 当前最小化到后台的应用程序 A 中发生了一些事情 在这种情况下发生
  • 如何在 Google 搜索 iframe 上设置自定义宽度?

    我正在尝试使用谷歌搜索我的网站 http www houseofhawkins com search php http www houseofhawkins com search php 它在某些屏幕分辨率下表现不佳 这是谷歌给出的代码 d
  • 编排微服务

    编排微服务的标准模式是什么 如果一个微服务只知道自己的领域 但有一个数据流需要多个服务以某种方式交互 那么该怎么做呢 假设我们有这样的东西 开具发票 Shipment 为了便于论证 我们假设订单发货后 就应该创建发票 在某个地方 有人按下了
  • VBA Excel 的比率条件要求

    我有一个财务数据 表明项目的健康状况 并根据差异填充颜色和字母来指示健康状况 例如 如果方差小于 5 则用字母 G 填充绿色 大于 5 但小于 20 则填充 Y 大于 20 R 我已经使用 if 语句来实现这一点 但是我需要填充整个项目的颜
  • bazel是否支持不同平台上的远程执行?

    具体来说 我想从 Mac 主机对 Windows 工作线程运行测试 评论在不同的机器上运行 bazel 远程执行器测试 https stackoverflow com questions 44354378 running bazel rem