Revert "Cleanup of windows CI .bat scripts (#28396)" (#28446)

This reverts commit 44e7be448d.
pull/28400/head
Craig Tiller 3 years ago committed by GitHub
parent ab6d7b4f02
commit a7dcceb365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      tools/internal_ci/helper_scripts/prepare_build_windows.bat
  2. 13
      tools/internal_ci/windows/bazel_rbe.bat
  3. 3
      tools/internal_ci/windows/grpc_build_artifacts.bat
  4. 37
      tools/internal_ci/windows/grpc_build_packages.bat
  5. 26
      tools/internal_ci/windows/grpc_build_packages.cfg
  6. 1
      tools/internal_ci/windows/grpc_distribtests.bat
  7. 7
      tools/internal_ci/windows/grpc_run_tests_matrix.bat

@ -13,12 +13,12 @@
@rem limitations under the License.
@rem make sure msys binaries are preferred over cygwin binaries
@rem set path to python3.7
@rem set path to python 2.7
@rem set path to CMake
set PATH=C:\tools\msys64\usr\bin;C:\Python37;C:\Program Files\CMake\bin;%PATH%
set PATH=C:\tools\msys64\usr\bin;C:\Python37;C:\Python27;C:\Program Files\CMake\bin;%PATH%
@rem create "python3" link that normally doesn't exist
dir C:\Python37\
mklink C:\Python37\python3.exe C:\Python37\python.exe
python --version
@ -36,19 +36,12 @@ netsh interface ip set dns "Local Area Connection 8" static 169.254.169.254 prim
netsh interface ip add dnsservers "Local Area Connection 8" 8.8.8.8 index=2
netsh interface ip add dnsservers "Local Area Connection 8" 8.8.4.4 index=3
@rem Only install C# dependencies if we are running C# tests
If "%PREPARE_BUILD_INSTALL_DEPS_CSHARP%" == "true" (
@rem C# prerequisites: Install dotnet SDK
powershell -File src\csharp\install_dotnet_sdk.ps1 || goto :error
)
@rem Add dotnet on path and disable some unwanted dotnet
@rem option regardless of PREPARE_BUILD_INSTALL_DEPS_CSHARP value.
@rem Always setting the env vars is fine since its instantaneous,
@rem it can't fail and it avoids possible issues with
@rem "setlocal" and "EnableDelayedExpansion" which would be required if
@rem we wanted to do the same under the IF block.
@rem C# prerequisites: Install dotnet SDK
powershell -File src\csharp\install_dotnet_sdk.ps1 || goto :error
set PATH=%LOCALAPPDATA%\Microsoft\dotnet;%PATH%
@rem Disable some unwanted dotnet options
set NUGET_XMLDOC_MODE=skip
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
set DOTNET_CLI_TELEMETRY_OPTOUT=true
@ -58,7 +51,7 @@ If "%PREPARE_BUILD_INSTALL_DEPS_PYTHON%" == "true" (
powershell -File tools\internal_ci\helper_scripts\install_python_interpreters.ps1 || goto :error
)
@rem Needed for uploading test results to bigquery
@rem Needed for big_query_utils
python -m pip install google-api-python-client || goto :error
git submodule update --init || goto :error

@ -22,13 +22,16 @@ IF "%cd%"=="T:\src" (
)
endlocal
@rem TODO(jtattermusch): make this generate less output
@rem TODO(jtattermusch): use tools/bazel script to keep the versions in sync
choco install bazel -y --version 4.2.1 --limit-output
cd github/grpc
set PATH=C:\tools\msys64\usr\bin;C:\Python37;%PATH%
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
python --version
@rem TODO(jtattermusch): make this generate less output
@rem TODO(jtattermusch): use tools/bazel script to keep the versions in sync
choco install bazel -y --version 4.2.1 --limit-output || exit /b 1
python -m pip install --user google-api-python-client oauth2client six==1.16.0
@rem Generate a random UUID and store in "bazel_invocation_ids" artifact file
powershell -Command "[guid]::NewGuid().ToString()" >%KOKORO_ARTIFACTS_DIR%/bazel_invocation_ids
@ -41,7 +44,7 @@ set BAZEL_EXITCODE=%errorlevel%
if not "%UPLOAD_TEST_RESULTS%"=="" (
@rem Sleep to let ResultStore finish writing results before querying
sleep 60
python3 tools/run_tests/python_utils/upload_rbe_results.py || exit /b 1
python ./tools/run_tests/python_utils/upload_rbe_results.py
)
exit /b %BAZEL_EXITCODE%

@ -24,12 +24,11 @@ endlocal
@rem Boringssl build no longer supports yasm
choco uninstall yasm -y --limit-output
choco install nasm -y --limit-output || exit /b 1
choco install nasm -y --limit-output
@rem enter repo root
cd /d %~dp0\..\..\..
set PREPARE_BUILD_INSTALL_DEPS_CSHARP=true
set PREPARE_BUILD_INSTALL_DEPS_PYTHON=true
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1

@ -0,0 +1,37 @@
@rem Copyright 2017 gRPC authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem Avoid slow finalization after the script has exited.
@rem See the script's prologue for info on the correct invocation pattern.
setlocal EnableDelayedExpansion
IF "%cd%"=="T:\src" (
call %~dp0\..\..\..\tools\internal_ci\helper_scripts\move_src_tree_and_respawn_itself.bat %0
echo respawn script has finished with exitcode !errorlevel!
exit /b !errorlevel!
)
endlocal
@rem enter repo root
cd /d %~dp0\..\..\..
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
rem NOTHING TO DO HERE
rem This script used to run "task_runner.py -f package windows", but
rem currently there are no build_packages tasks that need to be run on windows.
rem The only build_packages task that ever needed to run on windows was C#, but we switched to
rem building C# nugets on linux (as dotnet SDK on linux does a good job)
rem TODO(jtattermusch): remove the infrastructure for running "build_packages" kokoro job on windows.
exit /b %RUNTESTS_EXITCODE%

@ -0,0 +1,26 @@
# Copyright 2017 gRPC authors.
#
# 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.
# Config file for the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/windows/grpc_build_packages.bat"
timeout_mins: 120
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}

@ -25,7 +25,6 @@ endlocal
@rem enter repo root
cd /d %~dp0\..\..\..
set PREPARE_BUILD_INSTALL_DEPS_CSHARP=true
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
@rem Move packages generated by the previous step in the build chain.

@ -25,11 +25,6 @@ endlocal
@rem enter repo root
cd /d %~dp0\..\..\..
@rem if RUN_TESTS_FLAGS contains the string "csharp", make sure C# deps are installed.
If Not "%RUN_TESTS_FLAGS%"=="%RUN_TESTS_FLAGS:csharp=%" (
set PREPARE_BUILD_INSTALL_DEPS_CSHARP=true
)
@rem if RUN_TESTS_FLAGS contains the string "python", make sure python deps are installed.
If Not "%RUN_TESTS_FLAGS%"=="%RUN_TESTS_FLAGS:python=%" (
set PREPARE_BUILD_INSTALL_DEPS_PYTHON=true
)
@ -38,7 +33,7 @@ call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
@rem TODO(https://github.com/grpc/grpc/issues/28011): Remove once Windows Kokoro workers'
@rem Python installs have been upgraded. Currently, removing this line will cause
@rem run_tests.py to fail to spawn test subprocesses.
python3 tools/run_tests/start_port_server.py || exit /b 1
python3 tools/run_tests/start_port_server.py
python3 tools/run_tests/run_tests_matrix.py %RUN_TESTS_FLAGS%
set RUNTESTS_EXITCODE=%errorlevel%

Loading…
Cancel
Save