ICU-20317 Cache the Cygwin Setup/Installer on AppVeyor CI builds to prevent flaky failures.
This commit is contained in:
parent
58786f5cbe
commit
2e86b08fcd
@ -6,16 +6,19 @@ platform: x64
|
|||||||
# Don't clone the entire repo.
|
# Don't clone the entire repo.
|
||||||
clone_depth: 3
|
clone_depth: 3
|
||||||
|
|
||||||
# Cache the Cygwin downloaded setup packages between builds to speed things up.
|
# Cache things between builds to speed things up and save bandwidth.
|
||||||
cache:
|
cache:
|
||||||
- c:\cygwin-setup-cache
|
- c:\icu-ci-cache
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
CYG_URL: https://cygwin.com/setup-x86_64.exe
|
global:
|
||||||
CYG_MIRROR: http://cygwin.mirror.constant.com
|
ICU_CI_CACHE: c:\icu-ci-cache
|
||||||
CYG_PACKAGES: automake,gcc-core,gcc-g++,make,pkg-config,perl,python3-devel
|
CYG_URL: https://cygwin.com/setup-x86_64.exe
|
||||||
CYG_ROOT: c:\cygwin-root
|
CYG_MIRROR: http://cygwin.mirror.constant.com
|
||||||
CYG_CACHE: c:\cygwin-setup-cache
|
CYG_PACKAGES: automake,gcc-core,gcc-g++,make,pkg-config,perl,python3
|
||||||
|
CYG_ROOT: c:\cygwin-root
|
||||||
|
CYG_CACHE: '%ICU_CI_CACHE%\cygwin64'
|
||||||
|
CYG_CACHED_SETUP: '%CYG_CACHE%\setup.exe'
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- BUILDSYSTEM: VS2017
|
- BUILDSYSTEM: VS2017
|
||||||
@ -26,6 +29,7 @@ environment:
|
|||||||
- BUILDSYSTEM: cygwin64-gcc
|
- BUILDSYSTEM: cygwin64-gcc
|
||||||
CC: gcc
|
CC: gcc
|
||||||
CXX: g++
|
CXX: g++
|
||||||
|
APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
||||||
|
|
||||||
for:
|
for:
|
||||||
-
|
-
|
||||||
@ -34,8 +38,15 @@ for:
|
|||||||
- BUILDSYSTEM: cygwin64-gcc
|
- BUILDSYSTEM: cygwin64-gcc
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- ps: Invoke-WebRequest $env:CYG_URL -OutFile c:\cygwin-setup.exe
|
- ps: >-
|
||||||
- c:\cygwin-setup.exe --quiet-mode --no-shortcuts --no-startmenu --no-desktop --upgrade-also --only-site --site "%CYG_MIRROR%" --root "%CYG_ROOT%" --local-package-dir "%CYG_CACHE%" --packages "%CYG_PACKAGES%"
|
if ( !(Test-Path "${env:CYG_CACHED_SETUP}" -NewerThan (Get-Date).AddDays(-7)) )
|
||||||
|
{
|
||||||
|
Write-Host "Cached Cygwin setup does not exist or is older than 7 days, downloading from external site."
|
||||||
|
New-Item -Force -Type Directory $env:CYG_CACHE
|
||||||
|
Invoke-WebRequest $env:CYG_URL -OutFile $env:CYG_CACHED_SETUP
|
||||||
|
}
|
||||||
|
- cmd: >-
|
||||||
|
%CYG_CACHED_SETUP% --quiet-mode --no-shortcuts --no-startmenu --no-desktop --upgrade-also --only-site --site "%CYG_MIRROR%" --root "%CYG_ROOT%" --local-package-dir "%CYG_CACHE%" --packages "%CYG_PACKAGES%"
|
||||||
|
|
||||||
# Check that we have a working Cygwin environment before building.
|
# Check that we have a working Cygwin environment before building.
|
||||||
before_build:
|
before_build:
|
||||||
|
Loading…
Reference in New Issue
Block a user