Skip to content

Commit

Permalink
remove buildbuddy api key from .bazelrc (#16)
Browse files Browse the repository at this point in the history
Change-Id: I796025440f6e599ba9cbcbd17442ab3c88a8d7aa
  • Loading branch information
oliverlee authored Jan 12, 2024
1 parent a081a98 commit 9c9202a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 34 deletions.
1 change: 0 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ build --bes_backend=grpcs://oliverlee.buildbuddy.io
build --remote_cache=grpcs://oliverlee.buildbuddy.io
build --remote_download_toplevel # Helps remove network bottleneck if caching is enabled
build --remote_timeout=3600
build --remote_header=x-buildbuddy-api-key=d2muxpY7kiZEFsS3wzCo
build --experimental_remote_cache_compression
build --remote_build_event_upload=minimal
build --noslim_profile
Expand Down
14 changes: 3 additions & 11 deletions .github/actions/ci-env-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
name: "ci environment setup"
description: |
* set up color diagnostics for clang
* mount bazel cache
* set home bazelrc
inputs:
bazel-cache-key:
required: true
bazel-cache-path:
buildbuddy_api_key:
required: false
default: "~/.cache/bazel"

runs:
using: "composite"
Expand All @@ -23,13 +19,9 @@ runs:
run: |
sudo ln -s /lib/x86_64-linux-gnu/libtinfo.so.6 /lib/x86_64-linux-gnu/libtinfo.so.5
- name: mount bazel cache
uses: actions/cache@v3
with:
path: ${{ inputs.bazel-cache-path }}
key: ${{ inputs.bazel-cache-key }}

- name: setup ci bazelrc
shell: bash
run: |
cp .github/workflows/ci.bazelrc ~/.bazelrc
echo 'build --remote_header=x-buildbuddy-api-key=${{ inputs.buildbuddy_api_key }}' >> ~/.bazelrc
29 changes: 7 additions & 22 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/ci-env-setup
with:
bazel-cache-key: bazel-test-${{ matrix.toolchain }}-${{ matrix.feature }}

buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel \
test \
Expand All @@ -33,15 +31,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/ci-env-setup
with:
bazel-cache-key: bazel-coverage

buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel \
run \
//tools:lcov_list
bazel run //tools:lcov_list
- uses: codecov/codecov-action@v3
with:
Expand All @@ -64,27 +58,18 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/ci-env-setup
with:
bazel-cache-key: bazel-build-${{ matrix.flag }}

buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel \
build \
${{ matrix.flag }} \
//...
bazel build ${{ matrix.flag }} //...
buildifier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/ci-env-setup
with:
bazel-cache-key: bazel-buildifier

buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel \
run \
//tools:buildifier.check
bazel run //tools:buildifier.check

0 comments on commit 9c9202a

Please sign in to comment.