From 6772fdd145f2b69da18cdf14a5f93bc935aaf7e9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 30 Dec 2020 12:12:17 -0800 Subject: [vcpkg] Teach `vcpkg install` `--no-build-missing` (#15139) * [vcpkg] Teach `vcpkg install` `--no-build-missing` This switch causes failure to restore from cache to abort the build instead of performing a just-in-time build. This is useful in complex CI systems where the build was expected to have been performed previously, such as via another pipeline. * [vcpkg] Rename flag to require binary caching --- .../end-to-end-tests-dir/build-missing.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 (limited to 'scripts') diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 new file mode 100644 index 000000000..5f318e6af --- /dev/null +++ b/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 @@ -0,0 +1,18 @@ +. $PSScriptRoot/../end-to-end-tests-prelude.ps1 + +$CurrentTest = "Build Missing tests" + +Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read")) +Throw-IfNotFailed +Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" + +# Create the rapidjson archive +Remove-Item -Recurse -Force $installRoot +Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson","--x-binarysource=clear;files,$ArchiveRoot,write")) +Throw-IfFailed +Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" + +Remove-Item -Recurse -Force $installRoot +Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read")) +Throw-IfFailed +Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" -- cgit v1.2.3