2019-03-14 09:01:21 -04:00
|
|
|
# These options are enabled when running on CI
|
|
|
|
# We do this by copying this file to /etc/bazel.bazelrc at the start of the build.
|
|
|
|
# See documentation in /docs/BAZEL.md
|
|
|
|
|
2019-05-17 12:45:45 -04:00
|
|
|
# Save built files and downloaded repositories in a location that can be cached by CodeFresh and
|
|
|
|
# shared between builds. This helps speed up the analysis time significantly with Bazel managed node
|
|
|
|
# dependencies on the CI.
|
2019-03-27 09:17:48 -04:00
|
|
|
# https://codefresh.io/docs/docs/configure-ci-cd-pipeline/introduction-to-codefresh-pipelines/#caching-the-artifacts-of-your-build-system
|
|
|
|
build --repository_cache=C:/codefresh/volume/bazel_repository_cache
|
2019-05-17 12:45:45 -04:00
|
|
|
# Setting the output_base to a Docker volume is currently broken because of a Docker bug on Windows:
|
|
|
|
# https://github.com/moby/moby/issues/37024
|
|
|
|
# This affects Bazel because bazel_output_base\external\bazel_tools is an absolute path junction.
|
|
|
|
# When its fixed we can uncomment this line, and use a different output_base for Ivy tests (they
|
|
|
|
# use a separate compiler and destructively replace the cache).
|
|
|
|
# startup --output_base=C:/codefresh/volume/bazel_output_base
|
2019-03-14 09:01:21 -04:00
|
|
|
|
|
|
|
# Don't be spammy in the logs
|
|
|
|
# TODO(gmagolan): Hide progress again once build performance improves
|
|
|
|
# Presently, CircleCI can timeout during bazel test ... with the following
|
|
|
|
# error: Too long with no output (exceeded 10m0s)
|
2019-03-27 09:17:48 -04:00
|
|
|
build --noshow_progress
|
2019-03-14 09:01:21 -04:00
|
|
|
|
|
|
|
# Print all the options that apply to the build.
|
|
|
|
# This helps us diagnose which options override others
|
|
|
|
# (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
|
|
|
|
build --announce_rc
|
|
|
|
|
|
|
|
# Workaround https://github.com/bazelbuild/bazel/issues/3645
|
|
|
|
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
|
|
|
|
# Limit Bazel to consuming resources that fit in CodeFresh VMs
|
|
|
|
# TODO(filipesilva): determine the correct memory limit
|
2019-05-17 11:24:42 -04:00
|
|
|
build --local_resources=10240,8.0,1.0
|
2019-03-14 09:01:21 -04:00
|
|
|
|
|
|
|
# Retry in the event of flakes, eg. https://circleci.com/gh/angular/angular/31309
|
|
|
|
test --flaky_test_attempts=2
|
|
|
|
|
|
|
|
# More details on failures
|
|
|
|
build --verbose_failures=true
|