Skip to content

Commit

Permalink
ci: deflake Kokoro+Windows builds (#10948)
Browse files Browse the repository at this point in the history
There is no need to install `bazelisk` during the build, it is already
installed in the base image.  The fewer things we install dynamically,
the fewer things that can fail to download, the fewer flakes we have.
  • Loading branch information
coryan committed Feb 24, 2023
1 parent c56c309 commit c7e9ffe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions ci/kokoro/windows/build-32.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@
@REM See the License for the specific language governing permissions and
@REM limitations under the License.

REM Install Bazelisk.
@echo %date% %time%
@cd github\google-cloud-cpp
@powershell -exec bypass ci\kokoro\windows\lib\install-bazelisk.ps1
@if ERRORLEVEL 1 exit /b 1

REM Change PATH to install the Bazelisk version we just installed
@set "PATH=C:\bin;%ProgramFiles(x86)%\Google\Cloud SDK\google-cloud-sdk\bin;%PATH%"
@REM Change PATH to include the google cloud CLI (formerly SDK)
@set "PATH=%ProgramFiles(x86)%\Google\Cloud SDK\google-cloud-sdk\bin;%PATH%"

REM Configure the environment to use MSVC %MSVC_VERSION% and then switch to PowerShell.
call "%ProgramFiles(x86)%\Microsoft Visual Studio\%MSVC_VERSION%\BuildTools\VC\Auxiliary\Build\vcvars32.bat"
Expand All @@ -28,6 +24,7 @@ set "VCPKG_OVERLAY_TRIPLETS=%cd%\ci\kokoro\windows\triplets"

REM The remaining of the build script is implemented in PowerShell.
@echo %date% %time%
@cd github\google-cloud-cpp
powershell -exec bypass ci\kokoro\windows\build.ps1
@if ERRORLEVEL 1 exit /b 1

Expand Down
9 changes: 3 additions & 6 deletions ci/kokoro/windows/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@
@REM See the License for the specific language governing permissions and
@REM limitations under the License.

REM Install Bazelisk.
@echo %date% %time%
@cd github\google-cloud-cpp
@powershell -exec bypass ci\kokoro\windows\lib\install-bazelisk.ps1
@if ERRORLEVEL 1 exit /b 1

REM Change PATH to install the Bazelisk version we just installed
@set "PATH=C:\bin;%ProgramFiles(x86)%\Google\Cloud SDK\google-cloud-sdk\bin;%PATH%"
@REM Change PATH to include the google cloud CLI (formerly SDK)
@set "PATH=%ProgramFiles(x86)%\Google\Cloud SDK\google-cloud-sdk\bin;%PATH%"

REM Configure the environment to use MSVC %MSVC_VERSION% and then switch to PowerShell.
call "%ProgramFiles(x86)%\Microsoft Visual Studio\%MSVC_VERSION%\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
Expand All @@ -28,6 +24,7 @@ set "VCPKG_OVERLAY_TRIPLETS=%cd%\ci\kokoro\windows\triplets"

REM The remaining of the build script is implemented in PowerShell.
@echo %date% %time%
@cd github\google-cloud-cpp
powershell -exec bypass ci\kokoro\windows\build.ps1
@if ERRORLEVEL 1 exit /b 1

Expand Down

0 comments on commit c7e9ffe

Please sign in to comment.