diff options
| author | Billy O'Neal <bion@microsoft.com> | 2020-06-25 16:36:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-25 16:36:28 -0700 |
| commit | 0d37525d753801a8429e13069b7ba82865541a09 (patch) | |
| tree | 9492987907010597e2fc56707cc6c5511d78512b /toolsrc/src | |
| parent | 1f0db1f06a77be25ddc9185cca23230d2e60aecb (diff) | |
| download | vcpkg-0d37525d753801a8429e13069b7ba82865541a09.tar.gz vcpkg-0d37525d753801a8429e13069b7ba82865541a09.zip | |
[vcpkg] Commonize pipelines build powershell and don't use binary caching in CI (rather than PR) builds (#12082)
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/commands.ci.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 76f823795..af9611931 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -391,8 +391,14 @@ namespace vcpkg::Commands::CI System::print2(System::Color::warning, "Warning: Running ci without binary caching!\n"); } - auto binaryprovider = - create_binary_provider_from_configs(paths, args.binarysources).value_or_exit(VCPKG_LINE_INFO); + std::unique_ptr<IBinaryProvider> binaryproviderStorage; + if (args.binary_caching_enabled()) + { + binaryproviderStorage = + create_binary_provider_from_configs(paths, args.binarysources).value_or_exit(VCPKG_LINE_INFO); + } + + IBinaryProvider& binaryprovider = binaryproviderStorage ? *binaryproviderStorage : null_binary_provider(); const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); @@ -458,14 +464,13 @@ namespace vcpkg::Commands::CI return FullPackageSpec{spec, std::move(default_features)}; }); - auto split_specs = - find_unknown_ports_for_ci(paths, - exclusions_set, - provider, - var_provider, - all_default_full_specs, - purge_tombstones, - args.binary_caching_enabled() ? *binaryprovider : null_binary_provider()); + auto split_specs = find_unknown_ports_for_ci(paths, + exclusions_set, + provider, + var_provider, + all_default_full_specs, + purge_tombstones, + binaryprovider); PortFileProvider::MapPortFileProvider new_default_provider(split_specs->default_feature_provider); Dependencies::CreateInstallPlanOptions serialize_options; @@ -510,7 +515,7 @@ namespace vcpkg::Commands::CI { auto collection_timer = Chrono::ElapsedTimer::create_started(); auto summary = Install::perform( - action_plan, Install::KeepGoing::YES, paths, status_db, *binaryprovider, var_provider); + action_plan, Install::KeepGoing::YES, paths, status_db, binaryprovider, var_provider); auto collection_time_elapsed = collection_timer.elapsed(); // Adding results for ports that were built or pulled from an archive |
