Skip to content
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

ci(bazel): simplify scripts and configuration in advance of additions #2918

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

rkuester
Copy link
Contributor

Simplify the Bazel-related CI scripts and BUILD configuration in
preparation for adding several more for the compression feature.

  • Move CC=clang to .bazelrc

  • Define CXX in case it's already defined in the environment, in
    which case it overrides deferring to CC

  • Replace --repo_env, which doesn't affect build, with --action_env

  • Move commented-out ubsan invocation to its own CI job. Since
    ubsan was commented out, Bazel invocations have moved to their
    own jobs so they can run in parallel.

  • Consistently test all targets, ..., since TFLM is no longer
    confined to the tensorflow/lite/micro directory. Filter out
    inappropriate new targets with no.san tags.

  • Don't run bazel build ... before bazel test ...; the latter
    already builds all non-test targets.

  • Remove obsolete filter for no_oss, there were no more
    no_oss tags in the tree.

  • Stop using readable_run: it has diverged from its original
    meaning and now only redirects stderr to stdout. This is not
    needed.

BUG=see description

Simplify the Bazel-related CI scripts and BUILD configuration in
preparation for adding several more for the compression feature.

- Move CC=clang to .bazelrc

- Define CXX in case it's already defined in the environment, in
  which case it overrides deferring to CC

- Replace --repo_env, which doesn't affect build, with --action_env

- Move commented-out ubsan invocation to its own CI job. Since
  ubsan was commented out, Bazel invocations have moved to their
  own jobs so they can run in parallel.

- Consistently test all targets, `...`, since TFLM is no longer
  confined to the tensorflow/lite/micro directory. Filter out
  inappropriate new targets with no.san tags.

- Don't run `bazel build ...` before `bazel test ...`; the latter
  already builds all non-test targets.

- Remove obsolete filter for `no_oss`, there were no more
  `no_oss` tags in the tree.

- Stop using readable_run: it has diverged from its original
  meaning and now only redirects stderr to stdout. This is not
  needed.

BUG=see description
@rkuester rkuester marked this pull request as ready for review November 20, 2024 23:18
Clarify that the scripts run from the root directory of the
project by restoring the change of directory at the top of the
script, even though CI runs from the root directory of the
project.

Also clarify the intention that all tests in the project be run
by specifying `//...`, rather than `...`, which means all targets
at or below the working directory.
@suleshahid suleshahid merged commit 124db96 into tensorflow:main Nov 21, 2024
83 of 85 checks passed
@rkuester rkuester deleted the feat-ci-cleanup branch November 26, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants