-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Bazel remote cache #878
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #878 +/- ##
=======================================
Coverage 78.80% 78.80%
=======================================
Files 336 336
Lines 30128 30128
=======================================
Hits 23742 23742
Misses 6386 6386 |
.circleci/bazelrc
Outdated
# TODO: update url and figure out user/pw loading from env vars. | ||
build --remote_cache=http://user:pass@143.198.55.252:8080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some possibly useful snippits.
BAZEL_CACHE_USER: github
BAZEL_CACHE_PWD: ${{ secrets.BAZEL_CACHE_PWD }}
BAZEL_CACHE_URL: pins-bazel-cache.onf.dev:9090
BAZEL_OPTS="--repository_cache=/tmp/repo-cache"
[ ! -z "$BAZEL_CACHE_USER" ] && [ ! -z "$BAZEL_CACHE_PWD" ] && \
AUTH="${BAZEL_CACHE_USER}:${BAZEL_CACHE_PWD}@"
BAZEL_OPTS+=" --remote_cache=https://${AUTH}${BAZEL_CACHE_URL}"
BAZEL_OPTS+=" --remote_download_minimal"
bazel build ${BAZEL_OPTS} //...
bazel test ${BAZEL_OPTS} //...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since bazelrc files do not support env var interpolation, we probably can use this workaround: bazelbuild/bazel#10904 (comment)
b8049a7
to
27356df
Compare
No description provided.