aboutsummaryrefslogtreecommitdiff
path: root/zenserver/upstream/upstreamapply.cpp
diff options
context:
space:
mode:
authorJoe Kirchoff <[email protected]>2021-11-15 15:25:17 -0800
committerJoe Kirchoff <[email protected]>2021-11-15 15:25:17 -0800
commit20874d3801c4ed142dfd5246a850452f24043512 (patch)
treee67ee13eededfd5dd9754704e3b037a6be4b981a /zenserver/upstream/upstreamapply.cpp
parentHorde Apply: Pass through (diff)
downloadzen-20874d3801c4ed142dfd5246a850452f24043512.tar.xz
zen-20874d3801c4ed142dfd5246a850452f24043512.zip
Use upstream apply with Horde
Diffstat (limited to 'zenserver/upstream/upstreamapply.cpp')
-rw-r--r--zenserver/upstream/upstreamapply.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/zenserver/upstream/upstreamapply.cpp b/zenserver/upstream/upstreamapply.cpp
index a9b0e7fd0..038353683 100644
--- a/zenserver/upstream/upstreamapply.cpp
+++ b/zenserver/upstream/upstreamapply.cpp
@@ -439,8 +439,7 @@ namespace detail {
return {.Error{.ErrorCode = -1,
.Reason = "Task {}: {}"_format(ComputeTaskOutcomeToString(Outcome), std::string(Detail))}};
}
- return {
- .Error{.ErrorCode = -1, .Reason = "Task {}"_format(ComputeTaskOutcomeToString(Outcome))}};
+ return {.Error{.ErrorCode = -1, .Reason = "Task {}"_format(ComputeTaskOutcomeToString(Outcome))}};
}
const IoHash TaskId = TaskStatus["h"sv].AsObjectAttachment();
@@ -796,29 +795,23 @@ namespace detail {
const IoHash SandboxHash = Sandbox.GetHash();
Data.Objects[SandboxHash] = std::move(Sandbox);
-
- std::string_view HostPlatform = ApplyRecord.WorkerDescriptor["host"sv].AsString();
- CbObject Requirements;
- if (HostPlatform == "Win64"sv)
- {
- Requirements = BuildRequirements("OSFamily == 'Windows'"sv, {}, false);
- }
- else
{
- Log().warn("process apply upstream FAILED, unsupported Host Platform '{}'", HostPlatform);
- return false;
+ using namespace fmt::literals;
+ std::string_view HostPlatform = ApplyRecord.WorkerDescriptor["host"sv].AsString();
+ // TODO: Enable when Horde accepts the UE style Host Platforms (Win64, Linux, Mac)
+ //CbObject Requirements = BuildRequirements("OSFamily == '{}'"_format(HostPlatform), {}, false);
+ CbObject Requirements = BuildRequirements("OSFamily == 'Windows'", {}, false);
+ const IoHash RequirementsId = Requirements.GetHash();
+ Data.Objects[RequirementsId] = std::move(Requirements);
+ Data.RequirementsId = RequirementsId;
}
- const IoHash RequirementsId = Requirements.GetHash();
- Data.Objects[RequirementsId] = std::move(Requirements);
- Data.RequirementsId = RequirementsId;
-
CbObject Task = BuildTask(ExecutablePath,
{"-Build=build.action"},
Environment,
{},
SandboxHash,
- RequirementsId,
+ Data.RequirementsId,
{"Build.output", "Outputs"});
const IoHash TaskId = Task.GetHash();