build: fix ci build caching (#25)

This commit is contained in:
Derek Cormier 2022-01-21 08:48:43 -08:00 committed by GitHub
parent 1b28271ebc
commit 81eaa054b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 10 deletions

View File

@ -2,6 +2,6 @@
# Included with a --bazelrc option in the call to bazel
build --announce_rc
test --test_output=errors
build --disk_cache=$HOME/.cache/bazel
build --repository_cache=$HOME/.cache/bazel-repo
build --disk_cache=~/.cache/bazel
build --repository_cache=~/.cache/bazel-repo
test --test_env=XDG_CACHE_HOME

View File

@ -21,16 +21,14 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: bazelbuild/setup-bazelisk@v1
- name: Mount bazel action cache
- name: Mount bazel caches
uses: actions/cache@v2
with:
path: "~/.cache/bazel"
key: bazel
- name: Mount bazel repo cache
uses: actions/cache@v2
with:
path: "~/.cache/bazel-repo"
key: bazel-repo
path: |
"~/.cache/bazel"
"~/.cache/bazel-repo"
key: bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE') }}
restore-keys: bazel-cache-
- name: bazel test //...
env:
# Bazelisk will download bazel to here

View File

@ -14,6 +14,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Mount bazel caches
uses: actions/cache@v2
with:
path: |
"~/.cache/bazel"
"~/.cache/bazel-repo"
key: bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE') }}
restore-keys: bazel-cache-
- name: bazel test //...
env:
# Bazelisk will download bazel to here