xref: /aosp_15_r20/external/grpc-grpc/third_party/toolchains/README.md (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1*cc02d7e2SAndroid Build Coastguard Worker# RBE toolchain configuration (Linux and Windows)
2*cc02d7e2SAndroid Build Coastguard Worker
3*cc02d7e2SAndroid Build Coastguard Worker## Linux
4*cc02d7e2SAndroid Build Coastguard WorkerThe `rbe_ubuntu2004` directory contains the autogenerated toolchain configuration for linux RBE.
5*cc02d7e2SAndroid Build Coastguard WorkerRun `generate_linux_rbe_configs.sh` to regenerate.
6*cc02d7e2SAndroid Build Coastguard Worker
7*cc02d7e2SAndroid Build Coastguard Worker## Windows
8*cc02d7e2SAndroid Build Coastguard Worker
9*cc02d7e2SAndroid Build Coastguard WorkerThe `rbe_windows_bazel_6.3.2_vs2019` directory contains the autogenerated toolchain configuration for windows RBE.
10*cc02d7e2SAndroid Build Coastguard WorkerThe configuration was generated by the `rbe_configs_gen` tool (just as the linux RBE config),
11*cc02d7e2SAndroid Build Coastguard Workerbut since it's a windows configuration, it needs to be run on a windows machine.
12*cc02d7e2SAndroid Build Coastguard Worker
13*cc02d7e2SAndroid Build Coastguard WorkerIn order to regenerate:
14*cc02d7e2SAndroid Build Coastguard Worker- Clone `grpc` repository in a kokoro debug windows VM (see internal documentation for how to create one)
15*cc02d7e2SAndroid Build Coastguard Worker- Run `generate_windows_rbe_configs.sh` to regenerate the configs locally on the VM.
16*cc02d7e2SAndroid Build Coastguard Worker- Copy the generated configs back to your workstation (e.g. via `gcloud compute scp` command)
17*cc02d7e2SAndroid Build Coastguard Worker
18*cc02d7e2SAndroid Build Coastguard WorkerNote that the bazel version denotes the bazel version that was used to generate the toolchain configuration. The configuration
19*cc02d7e2SAndroid Build Coastguard Workercan be use with different bazel versions (as long as it works).
20*cc02d7e2SAndroid Build Coastguard Worker
21*cc02d7e2SAndroid Build Coastguard WorkerAlso see go/rbe-windows-user-guide
22*cc02d7e2SAndroid Build Coastguard Worker
23*cc02d7e2SAndroid Build Coastguard Worker# Windows RBE docker image
24*cc02d7e2SAndroid Build Coastguard Worker
25*cc02d7e2SAndroid Build Coastguard WorkerThe `dockerfile/rbe_windows2019` directory contains the dockerfile to rebuild the docker image we use on RBE windows workers. See go/rbe-windows-user-guide.
26*cc02d7e2SAndroid Build Coastguard Worker
27*cc02d7e2SAndroid Build Coastguard WorkerNote that for linux, we use a docker image under `tools/dockerfile` (since for Linux RBE docker image is simply of the testing docker images
28*cc02d7e2SAndroid Build Coastguard Workerwe maintain)
29*cc02d7e2SAndroid Build Coastguard Worker
30*cc02d7e2SAndroid Build Coastguard Worker## How to rebuild the Windows RBE docker image and use it for Windows RBE
31*cc02d7e2SAndroid Build Coastguard Worker
32*cc02d7e2SAndroid Build Coastguard WorkerOn a kokoro debug windows VM, run the following:
33*cc02d7e2SAndroid Build Coastguard Worker- `docker build -t us-docker.pkg.dev/grpc-testing/testing-images-public/rbe_windows2019 third_party/toolchains/dockerfile/rbe_windows2019`
34*cc02d7e2SAndroid Build Coastguard Worker- To be able to authenticate when pushing the image to GAR, run `gcloud auth configure-docker us-docker.pkg.dev`
35*cc02d7e2SAndroid Build Coastguard Worker- `docker push us-docker.pkg.dev/grpc-testing/testing-images-public/rbe_windows2019`
36*cc02d7e2SAndroid Build Coastguard Worker- Update the `generate_windows_rbe_configs.sh` with the newly built & pushed image's SHA256 digest.
37*cc02d7e2SAndroid Build Coastguard Worker- Regenerate the Windows RBE toolchain with the instructions above.
38