-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RunAllTests] Fix #3510: Set up Android SDK hermetically in GitHub Actions to workaround #3024 #3513
Conversation
This attempts to move all common build environment setup bits to a common local action using GitHub composite actions per https://github.saobby.my.eu.orgmunity/t/path-to-action-in-the-same-repository-as-workflow/16952/2, https://github.blog/changelog/2020-08-07-github-actions-composite-run-steps/, and https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action. This does not include any actual changes to the CI environment yet other than temporarily disabling the other expensive checks as part of testing these changes.
OpenJDK can use "9.0" as the version string instead of "1.9".
This integrates the new action with Bazel tests in addition to the build. While the tests work fine with the current build tools, we should be consistent in how the environment is set up for CI workflows.
The new name specifically clarifies why this action isn't needed for the Bazel-only script runs (since they don't require the Android SDK bits).
@seanlip PTAL for codeowners change. I'm looking for someone from the Android team to perform a full review, as well. |
@anandwana001 mentioned that he's available to review this--updating assignments. |
Sg, thanks. @anandwana001 please reassign me once you've reviewed! |
Sure, waiting for CI to pass. |
@anandwana001 CI is passing now--PTAL when you get a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As CI is passing, LGTM
Thanks! |
Unassigning @anandwana001 since they have already approved the PR. |
Fix #3510
Fix part of #2692
Explanation
This PR introduces sufficient CI arrangement to hermetically set up the Android SDK for all Bazel-related workflows. This fixes #3510 by mitigating #3024 by forcing workflows to use an older build tools instead of the latest that's included in the GitHub CI environment. While the hermeticity is nice, it introduces about an extra minute to each Bazel workflow. We may want to consider moving back to GitHub's automatically updating environment longer term once Bazel is sufficiently stable. I've noted this in #1861.
The new setup is being used for both Bazel app builds & tests. Technically, this isn't needed for tests since they don't require dexing, but keeping a consistent and hermetic environment seems ideal for all Bazel-related workflows. Note that we're intentionally not using the new workflow for the script runs since they don't require the Android SDK. That being said, this does result in a CI behavioral change for all related Bazel workflows: it's forcing using SDK 28 instead of 30 or newer.
Note that this also fixes part of #2692 by introducing our first shareable local action & by isolating the common Bazel setup code to it. Note that local actions can only contain shell commands and not reference other actions, so we'll be a bit limited in how much we can share.
Finally, this can be validated by seeing the passing CI checks (particularly, the passing build test). I've also run all the test workflows since they've been changed here, but they're expected to stay passing.
Checklist