Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# This allows Bazel to automatically pick up the `windows` config on Windows.
common --enable_platform_specific_config

# Prevent rules_android (pulled in transitively) from attempting to configure an Android SDK repository
# using the preinstalled Android SDK on CI machines (e.g. Kokoro Windows), which fails build tools version checks.
common --repo_env=ANDROID_HOME=

# Disable automatic creation of `__init__.py` files, which prevent multiple
# workspaces from providing files with the same package prefix (e.g., "cel").
# See https://github.com/bazelbuild/rules_python/issues/330.
Expand Down
8 changes: 4 additions & 4 deletions release/kokoro/presubmit_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ for %%V in (%PYTHON_VERSIONS%) do (
:fetch_loop
set /a ATTEMPTS+=1
echo Fetch attempt !ATTEMPTS! of !FETCH_RETRIES!...
bazel %STARTUP_FLAGS% fetch //... > fetch.log 2>&1
bazel !STARTUP_FLAGS! fetch //... > fetch.log 2>&1
set FETCH_STATUS=!ERRORLEVEL!
type fetch.log
if !FETCH_STATUS! NEQ 0 (
Expand All @@ -78,7 +78,7 @@ for %%V in (%PYTHON_VERSIONS%) do (
if exist fetch.log del fetch.log

echo --- Getting Output Base ---
for /f "tokens=*" %%i in ('bazel %STARTUP_FLAGS% info output_base') do set "OUTPUT_BASE=%%i"
for /f "tokens=*" %%i in ('bazel !STARTUP_FLAGS! info output_base') do set "OUTPUT_BASE=%%i"
set "OUTPUT_BASE=!OUTPUT_BASE:/=\!"
echo Output Base: !OUTPUT_BASE!

Expand All @@ -99,15 +99,15 @@ for %%V in (%PYTHON_VERSIONS%) do (
)

echo --- Bazel Build ---
bazel %STARTUP_FLAGS% build %LINK_FLAGS% //...
bazel !STARTUP_FLAGS! build !LINK_FLAGS! //...
if !ERRORLEVEL! NEQ 0 (
echo Build failed!
set "PRESUBMIT_STATUS=1"
goto cleanup
)

echo --- Bazel Test Python %%V ---
bazel %STARTUP_FLAGS% test %LINK_FLAGS% --test_output=errors //...
bazel !STARTUP_FLAGS! test !LINK_FLAGS! --test_output=errors //...
if !ERRORLEVEL! NEQ 0 (
echo Tests failed for Python %%V!
set "PRESUBMIT_STATUS=1"
Expand Down
Loading