Skip to content
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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Add Bazel remote cache #878

wants to merge 3 commits into from

Conversation

pudelkoM
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Dec 18, 2021

Codecov Report

Merging #878 (27356df) into main (01e2b6e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #878   +/-   ##
=======================================
  Coverage   78.80%   78.80%           
=======================================
  Files         336      336           
  Lines       30128    30128           
=======================================
  Hits        23742    23742           
  Misses       6386     6386           

Comment on lines 8 to 9
# TODO: update url and figure out user/pw loading from env vars.
build --remote_cache=http://user:pass@143.198.55.252:8080
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix

Copy link
Member

@bocon13 bocon13 Dec 19, 2021

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} //...

Copy link
Member Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants