# Limit resources since Travis Trusty GCE VMs have 2 cores and 7.5 GB RAM. build --local_resources=4000,2,1.0 build --worker_max_instances=2 # Ensure sandboxing is on to increase hermeticity. build --spawn_strategy=sandboxed build --worker_sandboxing # Ensure the PATH env var from our virtualenv propagates into tests, which is # no longer on by default in Bazel 0.21.0 and possibly again in the future. # We set this flag for "build" since "test" inherits it, but if we don't set # it for build too, this causes a rebuild at test time, and if we set it for # both we hit https://github.com/bazelbuild/bazel/issues/8237. # # See also: # https://github.com/bazelbuild/bazel/issues/7095 (protobuf PATH sensitivity) # https://github.com/bazelbuild/bazel/issues/7026 (future of action_env) build --action_env=PATH # Set up caching on local disk so incremental builds are faster. # See https://bazel.build/designs/2016/09/30/repository-cache.html build --repository_cache=~/.cache/tb-bazel-repo fetch --repository_cache=~/.cache/tb-bazel-repo query --repository_cache=~/.cache/tb-bazel-repo # See https://docs.bazel.build/versions/master/remote-caching.html#disk-cache build --disk_cache=~/.cache/tb-bazel-disk # Log more information to help with debugging, and disable curses output which # just adds more clutter to the log. (Travis spoofs an interactive terminal.) common --curses=no build --verbose_failures build --worker_verbose test --test_output=errors test --test_verbose_timeout_warnings