Commit graph

6 commits

Author SHA1 Message Date
Esun Kim
807c35d6a9
Bazel Module (#3364)
* Work

* Review update

* Enabled tests

* Bazel: Suppress warnings from external repositories

* Fixed whl_test

* Formatted

* More format
2026-02-11 14:11:47 -08:00
Esun Kim
ba753cef3e
[CI] Fix build (#3194)
- Upgraded the Bazel BuildTool to the latest version (8.2.1).
- Updated the `tflm-ci` Docker image and pushed the new tag (0.6.1) to the `ghcr.io/tflm-bot/tflm-ci registry`.
- Updated the WORKSPACE to load `rules_cc` and `rules_shell` explicitly
- Ran `buildifier` to ensure all BUILD files to have all the fixes.

BUG=Clean-up
2025-09-19 20:48:22 +00:00
Ryan Kuester
124db9607e
ci(bazel): simplify scripts and configuration in advance of additions (#2918)
* ci(bazel): simplify scripts and configuration in advance of additions

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

* refactor: clarify intention to run at top and test entire project

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.
2024-11-21 10:38:16 -08:00
Ryan Kuester
52c9568156
build(bazel): use --std=c++17 by default (#2060)
Make all bazel builds use --std=c++17 by default.

BUG=fixes #2058
2023-06-15 20:22:54 +00:00
Ryan Kuester
10924c4403
build: upgrade C++ std used in py/cc_deps_link_test (#1967)
In preparation for upgrading the Tensorflow Python package dependency, upgrade
the C++ standard used when compiling //python/tests:cc_deps_link_test from
C++14 to C++17. cc_deps_link_test tests linking against the Tensorflow Python
package's extension module.

Bug=#1966.
2023-05-12 16:47:20 +00:00
Ryan Kuester
17aae9e35d
build: add means of linking with C libs in Py packages (#1668)
Extend the Python repository_rule used to create external repositories, adding targets for C-language binary libraries shipped inside Python packages; e.g., that shipped in package tensorflow-gpu.

These targets are to be used as dependencies by C-language targets.

Note: when debugging the build, it can be helpful to examine the repository directory and BUILD file this repository_rule generates in the bazel cache.

Begin using a python/ directory at the root of the project for code that is specific to Python.

Upgrade to the latest version of rules_python first. Note that the unit test to keep requirements.in and requirements.txt is disabled (specifically with 
ec6bdc5d4443285d28a44076f06c203d9582e4a1)

Add a unit test for this feature.

BUG=see description
2023-03-05 06:25:58 +00:00