From ac8d06f5a579ab3b86f4841e9d8440178974b914 Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Tue, 17 Dec 2024 21:32:22 +0100 Subject: [PATCH] ci: Enable buildbuddy's cache --- .github/workflows/ci.yaml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 016eecf27..db20a487d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 @@ -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: @@ -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: | @@ -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: @@ -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: | @@ -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 @@ -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: | @@ -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