Skip to content

Commit

Permalink
ci: Enable buildbuddy's cache
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlinden committed Dec 17, 2024
1 parent 1c830b2 commit ac8d06f
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ jobs:
with:
path: ~/.cache/bazel
key: ${{ matrix.name }}-${{ hashFiles('.bazelversion', 'WORKSPACE', 'third_party/**') }}
- run: echo "build --config=buildbuddy-bes" >.bazelrc.local
- run: echo "build --config=buildbuddy-cache-upload --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}" >.bazelrc.local
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
- name: Test
run: bazel test //... ${{ matrix.bazel }}
- name: Run
Expand Down Expand Up @@ -128,7 +130,9 @@ jobs:
echo "CC=clang-19" >> $GITHUB_ENV
echo "CXX=clang++-19" >> $GITHUB_ENV
- run: sudo apt-get install libx11-dev libxi-dev
- run: echo "build --config=buildbuddy-bes" >.bazelrc.local
- run: echo "build --config=buildbuddy-cache-upload --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}" >.bazelrc.local
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
- name: Coverage
run: bazel coverage ... ${{ matrix.bazel }}
# clang 19 coverage has a lot of problems w/ boringssl:
Expand Down Expand Up @@ -159,7 +163,9 @@ jobs:
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends qemu-user-static binfmt-support
- run: sudo update-binfmts --enable qemu-aarch64
- run: echo "build --config=linux-aarch64-musl" >.bazelrc.local
- run: echo "build --config=buildbuddy-bes" >>.bazelrc.local
- run: echo "build --config=buildbuddy-cache-upload --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}" >>.bazelrc.local
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: bazel test ...
- name: Run tui
run: |
Expand All @@ -184,7 +190,9 @@ jobs:
# Register wasmtime as the wasm binary format handler.
- run: echo -n ":wasm32-wasi:M::\x00asm:\xff\xff\xff\xff:$(pwd)/${WASMTIME_NAME}/wasmtime:" | sudo tee /proc/sys/fs/binfmt_misc/register
- run: echo "build --config=wasi-wasm" >.bazelrc.local
- run: echo "build --config=buildbuddy-bes" >>.bazelrc.local
- run: echo "build --config=buildbuddy-cache-upload --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}" >>.bazelrc.local
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: bazel test ...

macos:
Expand All @@ -197,7 +205,9 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- run: echo "build --config=buildbuddy-bes" >.bazelrc.local
- run: echo "build --config=buildbuddy-cache-upload --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}" >.bazelrc.local
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: bazelisk test //...
- name: Run tui
run: |
Expand All @@ -218,7 +228,9 @@ jobs:
path: ~/.cache/bazel
key: windows_msvc-${{ hashFiles('.bazelversion', 'WORKSPACE', 'third_party/**') }}
- run: echo "build --disk_cache ~/.cache/bazel" >.bazelrc.local
- run: echo "build --config=buildbuddy-bes" >>.bazelrc.local
- run: echo "build --config=buildbuddy-cache-upload --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}" >>.bazelrc.local
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
- name: Test
run: bazel test ... -c dbg
- name: Run tui
Expand All @@ -243,7 +255,9 @@ jobs:
key: windows_clang_cl-${{ hashFiles('.bazelversion', 'WORKSPACE', 'third_party/**') }}
- run: echo "build --config clang-cl" >.bazelrc.local
- run: echo "build --disk_cache ~/.cache/bazel" >>.bazelrc.local
- run: echo "build --config=buildbuddy-bes" >>.bazelrc.local
- run: echo "build --config=buildbuddy-cache-upload --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}" >>.bazelrc.local
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: bazel test ...
- name: Run tui
run: |
Expand Down Expand Up @@ -292,7 +306,9 @@ jobs:
sudo update-alternatives --set clang-tidy /usr/bin/clang-tidy-19
update-alternatives --query clang-tidy
clang-tidy --version
- run: bazel build ... --config libc++ --config clang-tidy --config buildbuddy-bes --keep_going
- run: bazel build ... --config libc++ --config clang-tidy --config buildbuddy-cache-upload --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY} --keep_going
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}

buildifier:
runs-on: ubuntu-24.04
Expand Down

0 comments on commit ac8d06f

Please sign in to comment.