# Copyright 2026 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_DOCKER_ENABLE=1
if [[ "$TFCI_GITHUB_ACTIONS" == "true" ]]; then
  TFCI_DOCKER_ENABLE=0
fi
TFCI_DOCKER_PULL_ENABLE=1
TFCI_DOCKER_IMAGE="us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build-windows@sha256:023fa901fda70be8890b05689d0a667287692c1f59d0abe4add7208ec5a12707"
TFCI_BAZEL_BAZELRC_ARGS="--output_user_root=C:/x"
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --repo_env=USE_PYWRAP_RULES=True --config=windows_x86_cpu_2022"

# For RBE, we explicitly set invalid paths to force the auto-configuration to fail.
TFCI_BAZEL_VC="C:/RBE_ISOLATED_INVALID_PATH"
TFCI_BAZEL_LLVM="C:/RBE_ISOLATED_INVALID_PATH"
TFCI_BAZEL_SH="C:/tools/msys64/usr/bin/bash.exe"
TFCI_USE_CLANG_CL=0

# Map TFCI_BAZEL_* to BAZEL_* so cc_configure can find them in the environment.
# We use the shell's default value substitution to ensure that if these are
# already set (e.g. poisoned for RBE), we don't overwrite them with empty values
# before setup.sh has a chance to restore the TFCI_ variables.
export BAZEL_VC="${TFCI_BAZEL_VC:-$BAZEL_VC}"
export BAZEL_LLVM="${TFCI_BAZEL_LLVM:-$BAZEL_LLVM}"
export BAZEL_SH="${TFCI_BAZEL_SH:-$BAZEL_SH}"
export USE_CLANG_CL="${TFCI_USE_CLANG_CL:-$USE_CLANG_CL}"
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=windows_x86_ml_actions
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tensorflow"
TFCI_OUTPUT_DIR=build_output
TFCI_FIND_BIN=C:/tools/msys64/usr/bin/find.exe
TFCI_LIB_SUFFIX="-cpu-windows-x86_64"
# auditwheel is not supported for Windows
TFCI_WHL_AUDIT_ENABLE=0
TFCI_WHL_AUDIT_PLAT=0
# Tests are extremely slow at the moment
TFCI_WHL_BAZEL_TEST_ENABLE=0
TFCI_WHL_SIZE_LIMIT=450M
TFCI_WHL_SIZE_LIMIT_ENABLE=1
TFCI_WHL_IMPORT_TEST_ENABLE=1
TFCI_PYTHON_VERIFY_PIP_INSTALL_ARGS=""
