tensorflow/ci
A. Unique TensorFlower f7dfba3f74 Add Hermetic C++ Toolchains for Linux x86_64 builds.
Hermetic toolchains give us builds that are isolated from the host system, cutting down on unexpected dependencies and side effects.

With these changes, TensorFlow will build for Linux x86_64 architectures (both CPU and CUDA-enabled GPU) using self-contained C++ toolchains. If you need to use a non-hermetic toolchain, you can do so by adding the flag --config=clang_local. For remote builds with a non-hermetic toolchain, simply append _clang_local to your existing RBE flag. For example, if your hermetic RBE build uses --config=rbe_linux_cpu, the non-hermetic version would be --config=rbe_linux_cpu_clang_local.

    Example: Run CPU tests for Linux x86_64

    For hermetic tests, run following command (no env variables like CC, CXX, BAZEL_COMPILER, CLANG_COMPILER_PATH):
	bazel test \
		--config=avx_linux \
		--config=release_linux_base \
		--config=linux_cpu_pycpp_test_filters \
		--repo_env=HERMETIC_PYTHON_VERSION=3.11 \
		//tensorflow/... -- -//tensorflow/compiler/tf2tensorrt/... -//tensorflow/core/tpu/... -//tensorflow/lite/...  -//tensorflow/tools/toolchains/...

    For Linux x86_64 non-hermetic tests use commands with the flag "--config=clang_local" and env variables CC, CXX, BAZEL_COMPILER, CLANG_COMPILER_PATH, etc.:
	bazel test \
		--config=clang_local \
		--config=avx_linux \
		--config=release_linux_base \
		--config=linux_cpu_pycpp_test_filters \
		--repo_env=HERMETIC_PYTHON_VERSION=3.11 \
		--action_env=CLANG_COMPILER_PATH=/usr/lib/llvm-18/bin/clang \
		--host_action_env=CLANG_COMPILER_PATH=/usr/lib/llvm-18/bin/clang \
		--repo_env=CC=/usr/lib/llvm-18/bin/clang \
		--repo_env=CXX=/usr/lib/llvm-18/bin/clang++ \
		--repo_env=BAZEL_COMPILER=/usr/lib/llvm-18/bin/clang \
		//tensorflow/... -- -//tensorflow/compiler/tf2tensorrt/... -//tensorflow/core/tpu/... -//tensorflow/lite/...  -//tensorflow/tools/toolchains/...

PiperOrigin-RevId: 783911228
2025-07-16 15:21:17 -07:00
..
devinfra Add some clarifying comments for Dockerfiles. 2025-01-17 08:35:57 -08:00
official Add Hermetic C++ Toolchains for Linux x86_64 builds. 2025-07-16 15:21:17 -07:00
README.md

TensorFlow continuous integration

Warning This folder is still under construction. It is part of an ongoing effort to improve the structure of CI and build related files within the TensorFlow repo. This warning will be removed when the contents of this directory are stable and appropriate documentation around its usage is in place.

Maintainer: TensorFlow DevInfra


The CI folder contains the configuration files and scripts used to build, test, and deploy TensorFlow. This folder is typically used by continuous integration (CI) tools to build and test TensorFlow whenever there is a change to the code. This folder is broken into subfolders that represent the level of support and ownership of the files contained within.