Clean up CI ASAN & .bazelrc#8828
Conversation
|
Can one of the admins verify this patch? |
aca82e8 to
985cadd
Compare
|
@mehrdadn this seems like a collection of unrelated fixes. Any reason these can't be separate PRs? That would be preferable. |
|
@edoakes I've separated them, thanks! |
|
Test PASSed. |
|
Test PASSed. |
| translated_path=~/bazel_cache_credential.json | ||
| if [ "${OSTYPE}" = msys ]; then # On Windows, we need path translation | ||
| translated_path="$(cygpath -m -- "${translated_path}")" | ||
| fi | ||
| cat <<EOF >> "${HOME}/.bazelrc" | ||
| cat <<EOF >> ~/.bazelrc | ||
| build --google_credentials="${translated_path}" | ||
| EOF | ||
| else | ||
| echo "Using remote build cache in read-only mode." 1>&2 | ||
| cat <<EOF >> "${HOME}/.bazelrc" | ||
| cat <<EOF >> ~/.bazelrc |
There was a problem hiding this comment.
what's difference between ${HOME} and ~?
There was a problem hiding this comment.
Nothing of significance here; I just made that change because it's easier to read and gets rid of unnecessary quotes. But in theory, HOME is an environment variable that can be easily modified to point to anything, whereas ~ is guaranteed to expand to the home directory.
|
Test PASSed. |
Why are these changes needed?
ASAN and other Bazel configurations are currently scattered (in some cases, redundantly) across shell scripts and becoming difficult to reason about and maintain; they should all be in
.bazelrcas much as possible.Checks
scripts/format.shto lint the changes in this PR.