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

chore: Switch to buildbuddy for RBE #507

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,8 @@ build:rbe --genrule_strategy=remote
build:rbe --host_platform=@aspect_bazel_lib//platforms:x86_64_linux_remote
build:rbe --jobs=32

# EngFlow remote cache
build:rbe --bes_backend=grpcs://tourmaline.cluster.engflow.com
build:rbe --bes_results_url=https://tourmaline.cluster.engflow.com/invocation/
build:rbe --remote_cache=grpcs://tourmaline.cluster.engflow.com

# EngFlow remote build execution
build:rbe --remote_executor=grpcs://tourmaline.cluster.engflow.com

# TODO: remove workaround for failure
build:rbe --modify_execution_info=GoCompilePkg=+no-remote-exec

# These files are written during CI setup, using secrets registered with the CI platforms
build:rbe --tls_client_certificate=engflow.crt --tls_client_key=engflow.key
# BuildBuddy remote exec
build:rbe --bes_results_url=https://app.buildbuddy.io/invocation/
build:rbe --bes_backend=grpcs://remote.buildbuddy.io
build:rbe --remote_timeout=3600
build:rbe --remote_executor=grpcs://remote.buildbuddy.io
18 changes: 8 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
# Prepares the 'config' axis of the test matrix
runs-on: ubuntu-latest
env:
ENGFLOW_PRIVATE_KEY: ${{ secrets.ENGFLOW_PRIVATE_KEY }}
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
steps:
- id: local
run: echo "config=local" >> $GITHUB_OUTPUT
- id: rbe
run: echo "config=rbe" >> $GITHUB_OUTPUT
# Don't run RBE if there are no EngFlow creds which is the case on forks
if: ${{ env.ENGFLOW_PRIVATE_KEY != '' }}
# Don't run RBE if there is no API key which is the case on forks
if: ${{ env.BUILDBUDDY_API_KEY != '' }}
outputs:
# Will look like '["local", "rbe"]'
configs: ${{ toJSON(steps.*.outputs.config) }}
Expand Down Expand Up @@ -177,17 +177,15 @@ jobs:
if: matrix.bzlmodEnabled
run: echo "bzlmod_flag=--enable_bzlmod" >> $GITHUB_OUTPUT

- name: Write engflow credentials
- name: Write rbe credentials
if: ${{ matrix.config == 'rbe' }}
working-directory: ${{ matrix.folder }}
run: |
touch engflow.crt engflow.key
chmod 0600 engflow.crt engflow.key
echo "$ENGFLOW_CLIENT_CRT" > engflow.crt
echo "$ENGFLOW_PRIVATE_KEY" > engflow.key
touch $HOME/.bazelrc
chmod 0600 $HOME/.bazelrc
echo "build --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY" > $HOME/.bazelrc
env:
ENGFLOW_CLIENT_CRT: ${{ secrets.ENGFLOW_CLIENT_CRT }}
ENGFLOW_PRIVATE_KEY: ${{ secrets.ENGFLOW_PRIVATE_KEY }}
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}

- name: bazel test //...
if: ${{ matrix.os != 'windows-latest' }}
Expand Down