Merge pull request #24157 from lidizheng/better-win-py-build

Improve Win CI script with better exception propagation
pull/24174/head
Lidi Zheng 4 years ago committed by GitHub
commit bbf3e3d2c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/csharp/install_dotnet_sdk.ps1
  2. 6
      tools/internal_ci/helper_scripts/install_python38.ps1
  3. 13
      tools/internal_ci/helper_scripts/prepare_build_windows.bat
  4. 2
      tools/internal_ci/windows/grpc_build_artifacts.bat
  5. 2
      tools/internal_ci/windows/grpc_build_packages.bat
  6. 2
      tools/internal_ci/windows/grpc_distribtests.bat
  7. 2
      tools/internal_ci/windows/grpc_distribtests_standalone.bat
  8. 2
      tools/internal_ci/windows/grpc_run_tests_matrix.bat

@ -4,6 +4,12 @@
Set-StrictMode -Version 2
$ErrorActionPreference = 'Stop'
trap {
$ErrorActionPreference = "Continue"
Write-Error $_
exit 1
}
# avoid "Unknown error on a send" in Invoke-WebRequest
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

@ -4,6 +4,12 @@
Set-StrictMode -Version 2
$ErrorActionPreference = 'Stop'
trap {
$ErrorActionPreference = "Continue"
Write-Error $_
exit 1
}
# Avoid "Could not create SSL/TLS secure channel"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

@ -29,20 +29,25 @@ 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 Needed for big_query_utils
python -m pip install google-api-python-client
python -m pip install google-api-python-client || goto :error
@rem C# prerequisites: Install dotnet SDK
powershell -File src\csharp\install_dotnet_sdk.ps1
powershell -File src\csharp\install_dotnet_sdk.ps1 || goto :error
set PATH=%LOCALAPPDATA%\Microsoft\dotnet;%PATH%
@rem Install Python 3.8.0
@rem NOTE(lidiz): Python installer process may live longer than expected, and
@rem has other side effects. It needs to be installed last to reduce impact.
powershell -File tools\internal_ci\helper_scripts\install_python38.ps1
powershell -File tools\internal_ci\helper_scripts\install_python38.ps1 || goto :error
@rem Disable some unwanted dotnet options
set NUGET_XMLDOC_MODE=skip
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
set DOTNET_CLI_TELEMETRY_OPTOUT=true
git submodule update --init
git submodule update --init || goto :error
goto :EOF
:error
exit /b 1

@ -19,7 +19,7 @@ choco install nasm -y --limit-output
@rem enter repo root
cd /d %~dp0\..\..\..
call tools/internal_ci/helper_scripts/prepare_build_windows.bat
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
python tools/run_tests/task_runner.py -f artifact windows -j 4
set RUNTESTS_EXITCODE=%errorlevel%

@ -15,7 +15,7 @@
@rem enter repo root
cd /d %~dp0\..\..\..
call tools/internal_ci/helper_scripts/prepare_build_windows.bat
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
@rem Move artifacts generated by the previous step in the build chain.
powershell -Command "mv %KOKORO_GFILE_DIR%\github\grpc\artifacts input_artifacts"

@ -15,7 +15,7 @@
@rem enter repo root
cd /d %~dp0\..\..\..
call tools/internal_ci/helper_scripts/prepare_build_windows.bat
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.
powershell -Command "mv %KOKORO_GFILE_DIR%\github\grpc\artifacts input_artifacts"

@ -15,7 +15,7 @@
@rem enter repo root
cd /d %~dp0\..\..\..
call tools/internal_ci/helper_scripts/prepare_build_windows.bat
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
python tools/run_tests/task_runner.py -f distribtest windows cpp -j 4
set RUNTESTS_EXITCODE=%errorlevel%

@ -15,7 +15,7 @@
@rem enter repo root
cd /d %~dp0\..\..\..
call tools/internal_ci/helper_scripts/prepare_build_windows.bat
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
python tools/run_tests/run_tests_matrix.py %RUN_TESTS_FLAGS%
set RUNTESTS_EXITCODE=%errorlevel%

Loading…
Cancel
Save