Skip to content

Commit

Permalink
Add bazel CI caching
Browse files Browse the repository at this point in the history
  • Loading branch information
johanbrandhorst committed May 9, 2020
1 parent 32b8fbc commit 28a41cd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,15 @@ jobs:
working_directory: /src/grpc-gateway
steps:
- checkout
- restore_cache:
keys:
- v2-bazel-cache-{{ checksum "repositories.bzl" }}
- v2-bazel-cache-
- run:
name: Create Bazel config file (.bazelrc)
command: |
cat > .bazelrc << EOF
startup --output_base $HOME/.cache/_grpc_gateway_bazel
startup --output_base /root/.cache/_grpc_gateway_bazel
build --test_output errors
build --features race
# Workaround https://github.com/bazelbuild/bazel/issues/3645
Expand All @@ -120,6 +124,10 @@ jobs:
command: 'bazel run //:buildifier_check ||
(echo "ERROR: Bazel files not formatted, please run \`bazel run :buildifier\`" >&2; exit 1)'
when: always
- save_cache:
key: v2-bazel-cache-{{ checksum "repositories.bzl" }}
paths:
- /root/.cache/_grpc_gateway_bazel
gorelease:
environment:
## Split key to avoid github revoking it
Expand Down

0 comments on commit 28a41cd

Please sign in to comment.