Skip to content

Commit 0e4f36b

Browse files
committed
ci: enable cache in bazel build job
1 parent 60ab759 commit 0e4f36b

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/bazel_build.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,21 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v3
16+
- name: Cache bazel
17+
uses: actions/cache@v2
18+
env:
19+
cache-name: bazel-cache
20+
with:
21+
path: |
22+
~/.cache/bazelisk
23+
~/.cache/bazel
24+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
25+
restore-keys: |
26+
${{ runner.os }}-${{ env.cache-name }}-development
1827
19-
- name: Run Bazel build
20-
run: |
21-
bazel build //...
28+
- name: Checkout code
29+
uses: actions/checkout@v3
30+
31+
- name: Run Bazel build
32+
run: |
33+
bazel build //...

0 commit comments

Comments
 (0)