From a121d9da09a470bc1758a611f32e16b1c434cf40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Tue, 8 Nov 2022 14:48:57 +0000 Subject: [PATCH] Use a remote bazel cache to speed up builds (#153) Combining disk cache and remote cache with R2, this should speed up tests significantly. --- .github/workflows/test.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000000..1d5588211f3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Tests + +on: + pull_request: + paths-ignore: + - 'doc/**' + push: + branches: + - main + +jobs: + test: + strategy: + matrix: + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: bazelbuild/setup-bazelisk@v2 + - name: Cache + id: cache + uses: actions/cache@v2 + with: + path: ~/bazel-disk-cache + key: ${{ runner.os }}-${{ runner.arch }}-bazel-disk-cache + - run: mkdir -p ~/bazel-disk-cache + - name: install dependencies + if: ${{ runner.os == 'Linux' }} + run: | + export DEBIAN_FRONTEND=noninteractive + sudo apt-get install -y build-essential git clang libc++-dev + - name: bazel tests + run: | + bazel test --remote_timeout=5 --disk_cache=~/bazel-disk-cache --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.devprod.workers.dev --verbose_failures --show_timestamps --keep_going --test_output=errors //... +