mvukov / rules_ros2

Build ROS 2 with Bazel
Apache License 2.0
76 stars 42 forks source link

Simplify CI setup #268

Closed lalten closed 2 months ago

lalten commented 5 months ago

Let me know what you think about this one. I think having the actions/cache doesn't really make sense: It doesn't matter if a freshly spun up runner downloads the Bazel output base / Bazel action cache from GitHub's Cache or from BuildBuddy's Cache. In fact the action/cache will just blindly download the entire cache every time, even if the Bazel remote cache has all build and test results fully cached and nothing needs to be downloaded. Same thinking for the Bazelisk caching. Doesn't matter if it's downloaded from the GH cache or from the Bazelisk download URL.

Additionally I cleaned up the CI test setup:

I believe a fully-cached build isn't possible in either case because of the many rules_foreign_cc CMake builds, which don't cache properly.

There is one gotcha: PRs from forks do not have access to the repo secrets, including the Buildbuddy api key. My suggestion is to create a read-only key at https://app.buildbuddy.io/settings/org/api-keys and then add that publicly visible in the .bazelrc (I put a TODO there as a placeholder for now). Builds will then use the read-only key by default. But in rules_ros2 repo GitHub Action runs it will replace the line in the .bazelrc the read/write key.

mvukov commented 4 months ago

So, buildbuddy "bills" their users per amount of downloaded cache. I am not so keen to allow for a readonly token that everyone can use and then drain my free credits :) (and free credits are per user, hence for all my repos) If you want, I can give you write access to this repo such that you don't waste much time waiting for CI.

Besides remote config, what else bothers you about the CI config?