diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2020-12-30 12:12:17 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-30 12:12:17 -0800 |
| commit | 6772fdd145f2b69da18cdf14a5f93bc935aaf7e9 (patch) | |
| tree | cccc445d310b1da351fbd9e2c398d1b223e8675d /scripts | |
| parent | f55a5d91d965ec3aa7c5ce63872fcd5d90cc635e (diff) | |
| download | vcpkg-6772fdd145f2b69da18cdf14a5f93bc935aaf7e9.tar.gz vcpkg-6772fdd145f2b69da18cdf14a5f93bc935aaf7e9.zip | |
[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
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 | 18 |
1 files changed, 18 insertions, 0 deletions
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"
|
