build: fix ci build caching (#25)
This commit is contained in:
parent
1b28271ebc
commit
81eaa054b7
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue