From e8692cf2c151d2abc206ca699e04ae05d4c31dcd Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 20 Oct 2021 22:04:50 +0300 Subject: [PATCH] ci: Improve vcpkg binary cache settings This change comes with two improvements: 1) using the VCPKG_DEFAULT_BINARY_CACHE variable drops dependency on vcpkg default cached archives location, and improves readability 2) two obvious cases when binary cache is invalidated are defined, that guaranties it won't grow boundlessly when, for example, vcpkg has being updated. --- .cirrus.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 4dbc2f5f3a6..1f32dd52311 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -86,6 +86,7 @@ task: PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%' PYTHONUTF8: 1 CI_VCPKG_TAG: '2021.05.12' + VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives' QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.12/5.12.11/single/qt-everywhere-src-5.12.11.zip' QT_LOCAL_PATH: 'C:\qt-everywhere-src-5.12.11.zip' QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.12.11' @@ -121,7 +122,13 @@ task: - jom - jom install vcpkg_binary_cache: - folder: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives' + folder: '%VCPKG_DEFAULT_BINARY_CACHE%' + reupload_on_changes: true + fingerprint_script: + - echo %CI_VCPKG_TAG% + - msbuild -version + populate_script: + - mkdir %VCPKG_DEFAULT_BINARY_CACHE% install_python_script: - choco install --yes --no-progress python3 --version=3.9.6 - pip install zmq