Hi there!
We have been using Bazel for a while and I recently moved us into Circle CI. We are running Android builds with a significant C++ native codebase inside a Docker container.
Because Circle creates a new Docker environment for each build, I implemented Bazel Remote Cache so that we weren't doing a full clean build every time. So we now have an added benefit of using a remote cache, but a drawback of increased network bandwidth.
- The net benefit has been about zero – our build times in Circle CI before remote cache were ~13 minutes and afterwards about the same.
- When I ran this the first time the build time was ~37 minutes, which was expected as Bazel filled the remote cache.
- Total actions for a clean build is about 1750, and our remote cache has roughly 5000 objects in it, all dated from the first run.
Am I doing something wrong here? How can I optimize our remote cache to actually see some benefit?
Thanks in advance,
Steve
My .bazelrc file:
build --spawn_strategy=remote --genrule_strategy=remote
build --strategy=Javac=remote --strategy=Closure=remote
build --google_credentials=${HOME}/gcloud-service-key.json
my tools/bazel.rc file:
build --copt=-Wall --copt=-Wextra --cxxopt=-std=c++11
build --copt=-Wno-sign-compare --copt=-Wno-unused-parameter
build --spawn_strategy=standalone
build --android_crosstool_top=@androidndk//:toolchain-libcpp
build --fat_apk_cpu=armeabi,armeabi-v7a