Skip to content

Commit

Permalink
Allow overriding HOME variable in dotnet remote builds (#15171)
Browse files Browse the repository at this point in the history
With remote builds, a dedicated dotnet location is being used so the right versioning can be used and managed from VS in Windows. This dedicated dotnet location requires a custom .home location so the donet and nuget caches doesn't conflict with the global installation.

We need to consider and use this custom .home location when running dotnet commands remotely so the right caches are used

This should fix Bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1543495
  • Loading branch information
mauroa authored Jun 3, 2022
1 parent e303d4b commit ac97efd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions msbuild/Messaging/Xamarin.Messaging.Build/TaskRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ internal TaskRunner (ITaskSerializer serializer)
{
this.serializer = serializer;

var dotnetPath = Path.Combine (MessagingContext.GetXmaPath (), "SDKs", "dotnet", "dotnet");
var sdkRootPath = Path.Combine (MessagingContext.GetXmaPath (), "SDKs");
var dotnetPath = Path.Combine (sdkRootPath, "dotnet", "dotnet");

//In case the XMA dotnet has not been installed yet
if (!File.Exists (dotnetPath)) {
if (File.Exists (dotnetPath)) {
Environment.SetEnvironmentVariable ("HOME", Path.Combine (sdkRootPath, ".home"));
} else {
//In case the XMA dotnet has not been installed yet
dotnetPath = "/usr/local/share/dotnet/dotnet";
}

// TODO: Needed by the ILLinkTask, we need to add support for doing this from Windows
Environment.SetEnvironmentVariable ("DOTNET_HOST_PATH", dotnetPath);
}

Expand Down

12 comments on commit ac97efd

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: ac97efd3953d3433a7eb17c6f94810d64702aeab

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: ac97efd3953d3433a7eb17c6f94810d64702aeab

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 [CI Build] API Diff 📋

API diff (for current PR)

ℹ️ API Diff (from PR only) (please review changes)

API diff: vsdrops gist

Xamarin
.NET
Xamarin vs .NET
iOS vs Mac Catalyst (.NET)

API diff (vs stable)

✅ API Diff from stable

API diff: vsdrops gist

Xamarin
.NET
Xamarin vs .NET
iOS vs Mac Catalyst (.NET)

Generator diff

Generator Diff (no change)

Pipeline on Agent XAMMINI-061.Monterey'
Hash: ac97efd3953d3433a7eb17c6f94810d64702aeab

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-062.Monterey
Hash: ac97efd3953d3433a7eb17c6f94810d64702aeab

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests failed on VSTS: simulator tests iOS ❌

Tests failed on VSTS: simulator tests iOS.

Test results

8 tests failed, 226 tests passed.

Failed tests

  • [NUnit] Mono SystemCoreTests/watchOS 32-bits - simulator/Debug: Crashed
  • [NUnit] Mono SystemXmlTests/watchOS 32-bits - simulator/Debug: Crashed
  • [NUnit] Mono SystemTests/watchOS 32-bits - simulator/Debug: Crashed
  • [NUnit] Mono SystemWebServicesTests/watchOS 32-bits - simulator/Debug: Crashed
  • [xUnit] Mono SystemXmlXunit/watchOS 32-bits - simulator/Debug: Crashed
  • [xUnit] Mono MicrosoftCSharpXunit/watchOS 32-bits - simulator/Debug: Crashed
  • mscorlib Part 2/watchOS 32-bits - simulator/Debug: Crashed
  • [xUnit] Mono SystemCoreXunit Part 1/watchOS 32-bits - simulator/Debug: Crashed

Pipeline on Agent XAMBOT-1044.Monterey'
Allow overriding HOME variable in dotnet remote builds (#15171)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Status for 'xamarin-macios - sample testing (build)': failure.

  • ❌ Debug_iPhone_AF: Failed
  • ❌ Debug_iPhone_GR: Failed
  • ❌ Debug_iPhone_SZ: Failed
  • ❌ Debug_iPhoneSimulator: Failed
  • ❌ Release_iPhone_AF: Failed
  • ❌ Release_iPhone_GR: Failed
  • ❌ Release_iPhone_SZ: Failed
  • ❌ Release_iPhoneSimulator: Failed
  • ❌ Debug_Mac: Failed
  • ❌ Release_Mac: Failed
  • ❌ PublishPerformanceData: Failed

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests iOS32b (no summary found). 🔥

Result file D:\a\1\s\Reports\TestSummary-iOS32b\TestSummary.md not found.

Pipeline on Agent
Allow overriding HOME variable in dotnet remote builds (#15171)

With remote builds, a dedicated dotnet location is being used so the right versioning can be used and managed from VS in Windows. This dedicated dotnet location requires a custom .home location so the donet and nuget caches doesn't conflict with the global installation.

We need to consider and use this custom .home location when running dotnet commands remotely so the right caches are used

This should fix Bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1543495

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: ac97efd3953d3433a7eb17c6f94810d64702aeab

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 [CI Build] API Diff 📋

API diff (for current PR)

ℹ️ API Diff (from PR only) (please review changes)

API diff: vsdrops gist

Xamarin
.NET
Xamarin vs .NET
iOS vs Mac Catalyst (.NET)

API diff (vs stable)

✅ API Diff from stable

API diff: vsdrops gist

Xamarin
.NET
Xamarin vs .NET
iOS vs Mac Catalyst (.NET)

Generator diff

Generator Diff (no change)

Pipeline on Agent XAMMINI-062.Monterey'
Hash: ac97efd3953d3433a7eb17c6f94810d64702aeab

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • xammac_tests
  • monotouch-test

Pipeline on Agent
Hash: ac97efd3953d3433a7eb17c6f94810d64702aeab

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-061.Monterey'
Hash: ac97efd3953d3433a7eb17c6f94810d64702aeab

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests failed on VSTS: simulator tests iOS ❌

Tests failed on VSTS: simulator tests iOS.

Test results

5 tests failed, 140 tests passed.

Failed tests

  • fsharp/watchOS 32-bits - simulator/Debug: Crashed
  • interdependent-binding-projects/watchOS 32-bits - simulator/Debug: Crashed
  • introspection/watchOS 32-bits - simulator/Debug: Crashed
  • dont link/watchOS 32-bits - simulator/Debug: Crashed
  • mono-native-compat/watchOS 32-bits - simulator/Debug: Crashed

Pipeline on Agent XAMBOT-1042.Monterey'
Allow overriding HOME variable in dotnet remote builds (#15171)

With remote builds, a dedicated dotnet location is being used so the right versioning can be used and managed from VS in Windows. This dedicated dotnet location requires a custom .home location so the donet and nuget caches doesn't conflict with the global installation.

We need to consider and use this custom .home location when running dotnet commands remotely so the right caches are used

This should fix Bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1543495

Please sign in to comment.