Replies: 1 comment 1 reply
-
Have you tried building with `--remote_download_minimal` to avoid
downloading remote artifacts into the output tree?
…On Mon, Mar 3, 2025 at 9:27 PM Øyvind Harboe ***@***.***> wrote:
In a github CI action, I want to check that everything builds, so I
started by adding a bazelisk build ..., but this downloads all artifacts
for all rules from our configured remote cache even when all builds are
successful and there is nothing to do.
After thinking about it, I realized that in CI I don't want to build, I
want to verify that everything builds. I can do this by building only the
root rules in the dependency tree.
But how do I enumerate all the root rules that do not have the
tags=["manual"] set?
I have come up with an incantation that does seem to do the trick, but it
is a bit of an eyesore...
bazelisk query 'kind(rule, deps(kind(rule, //...))) except kind(test, //...) except attr(tags, manual, ...)' --output=maxrank | grep "^0 " | cut -f 2 -d' ' | grep -v "^@"
I have a simular situation with bazelisk test ..., it downloads artifacts
that are not needed for targets that have tags=["manual"] set, so I
replaced bazelisk test ... with:
bazelisk test $(bazelisk query 'kind(test, ...) except attr(tags, manual, ...)')
—
Reply to this email directly, view it on GitHub
<#25439>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBK5HOZ3G4N6JIB4GWMHWT2SS3MTAVCNFSM6AAAAABYH4FY5KVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGAZTKMRUHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In a github CI action, I want to check that everything builds, so I started by adding a
bazelisk build ...
, but this downloads all artifacts for all rules from our configured remote cache even when all builds are successful and there is nothing to do.After thinking about it, I realized that in CI I don't want to build, I want to verify that everything builds. I can do this by building only the root rules in the dependency tree.
But how do I enumerate all the root rules that do not have the
tags=["manual"]
set?I have come up with an incantation that does seem to do the trick, but it is a bit of an eyesore...
I have a simular situation with
bazelisk test ...
, it downloads artifacts that are not needed for targets that havetags=["manual"]
set, so I replacedbazelisk test ...
with:Beta Was this translation helpful? Give feedback.
All reactions