Merge pull request #2351 from PhilipOakley/vcpkg-tip

Vcpkg Install: detect lack of working Git, and note possible vcpkg time outs
This commit is contained in:
Johannes Schindelin
2019-10-07 12:06:14 +02:00
committed by Git for Windows Build Agent
2 changed files with 16 additions and 1 deletions

View File

@@ -196,7 +196,9 @@ jobs:
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON
- name: MSBuild
run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
run: |
$sln = if (Test-Path git.slnx) { 'git.slnx' } else { 'git.sln' }
msbuild $sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4
- name: bundle artifact tar
shell: bash
env:

View File

@@ -36,6 +36,13 @@ REM ================================================================
dir vcpkg\vcpkg.exe >nul 2>nul && GOTO :install_libraries
git.exe version 2>nul
IF ERRORLEVEL 1 (
echo "***"
echo "Git not found. Please adjust your CMD path or Git install option."
echo "***"
EXIT /B 1 )
echo Fetching vcpkg in %cwd%vcpkg
git.exe clone https://github.com/Microsoft/vcpkg vcpkg
IF ERRORLEVEL 1 ( EXIT /B 1 )
@@ -73,6 +80,12 @@ REM ================================================================
:sub__install_one
echo Installing package %1...
REM vcpkg may not be reliable on slow, intermittent or proxy
REM connections, see e.g.
REM https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4a8f7be5-5e15-4213-a7bb-ddf424a954e6/winhttpsendrequest-ends-with-12002-errorhttptimeout-after-21-seconds-no-matter-what-timeout?forum=windowssdk
REM which explains the hidden 21 second timeout
REM (last post by Dave : Microsoft - Windows Networking team)
.\vcpkg.exe install %1:%arch%
IF ERRORLEVEL 1 ( EXIT /B 1 )