From c35af7e280acdd5719b279520a034c707e091686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Pr=C3=B6schel?= Date: Thu, 14 Jan 2021 11:32:03 +0100 Subject: [PATCH] [#651] Use GCS as a Bazel cache --- .bazelrc | 3 +-- .github/workflows/main.yml | 12 ++++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.bazelrc b/.bazelrc index 8a0914b74d..f0560a4de3 100644 --- a/.bazelrc +++ b/.bazelrc @@ -21,7 +21,6 @@ build:ci --test_env=ROOT_LOG_LEVEL=ERROR build:ci --noshow_progress build:ci --verbose_failures -build:ci --disk_cache=~/.cache/bazel -build:ci --repository_cache==~/.cache/bazel_external +build:ci --remote_cache=https://storage.googleapis.com/airy-ci-cache test:ci --flaky_test_attempts=2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 397893c171..fccf21bf3a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,14 +15,6 @@ jobs: java-version: '11' architecture: 'x64' - - name: Mount bazel cache - uses: actions/cache@v2 - with: - path: | - /home/runner/.cache/bazel - /home/runner/.cache/bazel_external - key: bazel - - name: Install bazelisk run: | curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64" @@ -32,9 +24,13 @@ jobs: - name: Enable CI settings run: | + touch key.json && echo "$GCS_SA_KEY" > key.json && echo "$(head key.json)" cat <>.bazelrc common --config=ci + build:ci --google_credentials=/home/runner/work/airy/airy/key.json EOF + env: + GCS_SA_KEY: ${{secrets.GCS_SA_KEY}} - name: Lint run: |