The NativeLink Cloud flake module lets your contributors conveniently reuse
artifacts from your CI builds.
Cache sharing between CI and local development environments requires perfect
reproducibility between the two.
Consider using Local Remote Execution to create
environments that are reproducible across distributions.
Containerized environments that are the same for local development and CI might
work as well.
-
Add the nativelink
flake module to your flake:
-
Add the following to your .bazelrc
:
-
Ignore the generated file:
-
Optionally, customize the endpoint and API key, or gate the configuration
behind a --config=nativelink
Bazel flag:
The nativelink
flake module creates a nativelink.bazel
file. The default
configuration points to NativeLink’s public cache:
With the modifications from the previous section it looks like this: