Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to generate toolchain config w/o docker #962

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

amkartashov
Copy link

@amkartashov amkartashov commented Jun 2, 2021

Main motivation: generate toolchain configuration for MacOS remote execution (which cannot use docker).

Also can be used on Linux, f.e. when remote workers are VMs and not containers.


Changes:

  • add runner package with Runner interface and 2 implementations: docker runner (almost unchanged code from master) and host runner
  • add option --runner
  • move some code to options package to avoid circular deps
  • add platform options for MacOS
  • when output is a directory, remove WORKSPACE from cc subdir

To make sure that host runner works identically with docker runner, I verified that host runner produces identical toolchain configuration for linux.

In other words, command:

./rbe_configs_gen_linux --runner=host --output_tarball=rbe_default_linux_host.tar --exec_os=linux --target_os=linux --cleanup=false --toolchain_container=l.gcr.io/google/rbe-ubuntu16-04@sha256:f6568d8168b14aafd1b707019927a63c2d37113a03bcee188218f99bd0327ea1

which runs inside container, produces archive with the same md5sum as command:

./rbe_configs_gen --toolchain_container=l.gcr.io/google/rbe-ubuntu16-04@sha256:f6568d8168b14aafd1b707019927a63c2d37113a03bcee188218f99bd0327ea1 --output_tarball=rbe_default_linux_docker.tar --exec_os=linux --target_os=linux

does (here rbe_configs_gen binary is built from current master and runs on the real machine, not container)

@google-cla
Copy link

google-cla bot commented Jun 2, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Jun 2, 2021
@amkartashov amkartashov marked this pull request as draft June 2, 2021 17:10
@amkartashov
Copy link
Author

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Jun 2, 2021
@amkartashov amkartashov marked this pull request as ready for review June 9, 2021 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant