Skip to content

Commit

Permalink
[build] use stable bits in main
Browse files Browse the repository at this point in the history
Context: dotnet#11805
Fixes: dotnet#12762

There are various NuGet feed issues caused by using nightly builds of
.NET SDK and workloads. dotnet#11805 also appears to be blocked by an
unknown problem -- meaning we are using older bits in `main`
currently.

To use stable bits:

* Hardcode the latest stable version numbers of everything.

* Pass `--version 7.0.101` to the `dotnet-install` script.

* Work around the weird, unknown build errors?

Other changes:

* Pass `--skip-sign-check` so that the `tizen` workload can be
  installed with a signed .NET SDK. We already do this on various
  release branches like `release/8.0.1xx-preview1`.

* Build `Microsoft.Maui-mac.slnf` in parallel, this apparently works
  around the unknown issue in dotnet#11805?

* Remove `$(DotNetFeedUrl)`, as it breaks the `dotnet-install` script
  on macOS. This URL changes from time to time.

* Build for a single maccatalyst RID in some projects. This attributed
  to other build errors once `Microsoft.Maui-mac.slnf` built in parallel.
  • Loading branch information
jonathanpeppers committed Feb 9, 2023
1 parent 2218065 commit fdb398b
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 11 deletions.
9 changes: 4 additions & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<!-- Current previous .NET SDK major version's stable release of MAUI packages -->
<MicrosoftMauiPreviousDotNetReleasedVersion>6.0.547</MicrosoftMauiPreviousDotNetReleasedVersion>
<!-- dotnet/installer -->
<MicrosoftDotnetSdkInternalPackageVersion>7.0.100-rtm.22519.39</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>7.0.102</MicrosoftDotnetSdkInternalPackageVersion>
<!-- dotnet/runtime -->
<MicrosoftNETCoreAppRefPackageVersion>7.0.0-rtm.22511.4</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>7.0.2</MicrosoftNETCoreAppRefPackageVersion>
<!-- NOTE: should eventually revert back to $(MicrosoftNETCoreAppRefPackageVersion) in .NET 7 -->
<MicrosoftExtensionsPackageVersion>7.0.0</MicrosoftExtensionsPackageVersion>
<MicrosoftExtensionsServicingPackageVersion>7.0.0</MicrosoftExtensionsServicingPackageVersion>
<SystemCodeDomPackageVersion>7.0.0</SystemCodeDomPackageVersion>
<!-- xamarin/xamarin-android -->
<MicrosoftAndroidSdkWindowsPackageVersion>33.0.4</MicrosoftAndroidSdkWindowsPackageVersion>
<MicrosoftAndroidSdkWindowsPackageVersion>33.0.26</MicrosoftAndroidSdkWindowsPackageVersion>
<!-- xamarin/xamarin-macios -->
<MicrosoftMacCatalystSdkPackageVersion>16.2.1026</MicrosoftMacCatalystSdkPackageVersion>
<MicrosoftmacOSSdkPackageVersion>13.1.1026</MicrosoftmacOSSdkPackageVersion>
Expand All @@ -20,8 +20,7 @@
<!-- Samsung/Tizen.NET -->
<SamsungTizenSdkPackageVersion>7.0.100</SamsungTizenSdkPackageVersion>
<!-- emsdk -->
<MicrosoftNETWorkloadEmscriptennet7Manifest70100PackageVersion>7.0.0-rtm.22504.3</MicrosoftNETWorkloadEmscriptennet7Manifest70100PackageVersion>
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptennet7Manifest70100PackageVersion)</MicrosoftNETWorkloadEmscriptenPackageVersion>
<MicrosoftNETWorkloadEmscriptenPackageVersion>7.0.2</MicrosoftNETWorkloadEmscriptenPackageVersion>
<!-- wasdk -->
<MicrosoftWindowsAppSDKPackageVersion>1.2.230118.102</MicrosoftWindowsAppSDKPackageVersion>
<MicrosoftWindowsSDKBuildToolsPackageVersion>10.0.22621.755</MicrosoftWindowsSDKBuildToolsPackageVersion>
Expand Down
7 changes: 6 additions & 1 deletion eng/cake/dotnet.cake
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,14 @@ Task("dotnet-build")
{
RunMSBuildWithDotNet("./Microsoft.Maui.BuildTasks.slnf");
if (IsRunningOnWindows())
{
RunMSBuildWithDotNet("./Microsoft.Maui.sln", maxCpuCount: 1);
}
else
RunMSBuildWithDotNet("./Microsoft.Maui-mac.slnf", maxCpuCount: 1);
{
// NOTE: intentionally omit maxCpuCount, to avoid an issue with the 7.0.100 .NET SDK
RunMSBuildWithDotNet("./Microsoft.Maui-mac.slnf");
}
});

Task("dotnet-samples")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<RootNamespace>Microsoft.Maui.MauiBlazorWebView.DeviceTests</RootNamespace>
<AssemblyName>Microsoft.Maui.MauiBlazorWebView.DeviceTests</AssemblyName>
<NoWarn>$(NoWarn),CA1416</NoWarn>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<ApplicationVersion>1</ApplicationVersion>
<IsPackable>false</IsPackable>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<OutputType>Exe</OutputType>
<SingleProject>true</SingleProject>
<IsPackable>false</IsPackable>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<AssemblyName>Maui.Controls.Sample</AssemblyName>
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn),CA1416</NoWarn>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<RootNamespace>Microsoft.Maui.DeviceTests</RootNamespace>
<AssemblyName>Microsoft.Maui.Controls.DeviceTests</AssemblyName>
<NoWarn>$(NoWarn),CA1416</NoWarn>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Core/tests/DeviceTests/Core.DeviceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<RootNamespace>Microsoft.Maui.DeviceTests</RootNamespace>
<AssemblyName>Microsoft.Maui.Core.DeviceTests</AssemblyName>
<NoWarn>$(NoWarn),CA1416</NoWarn>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down
7 changes: 2 additions & 5 deletions src/DotNet/DotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
<IsPackable>false</IsPackable>
<InstallWorkloadPacks Condition=" '$(InstallWorkloadPacks)' == '' ">true</InstallWorkloadPacks>
<InternalAzureFeed>https://dotnetbuilds.blob.core.windows.net/internal</InternalAzureFeed>
<DotNetFeedUrl>https://dotnetbuilds.blob.core.windows.net/public</DotNetFeedUrl>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
<DotNetInstallScriptUrl>https://dot.net/v1/dotnet-install.ps1</DotNetInstallScriptUrl>
<DotNetInstallScriptName>dotnet-install.ps1</DotNetInstallScriptName>
<DotNetInstallScriptPath>$(DotNetOutputPath)$(DotNetInstallScriptName)</DotNetInstallScriptPath>
<DotNetInstallCommand>&amp; '$(DotNetInstallScriptPath)' -Version $(MicrosoftDotnetSdkInternalPackageVersion) -InstallDir '$(DotNetDirectory)' -Verbose</DotNetInstallCommand>
<DotNetInstallCommand Condition=" '$(PRIVATE_BUILD)' == 'false' ">$(DotNetInstallCommand) -AzureFeed $(DotNetFeedUrl)</DotNetInstallCommand>
<DotNetInstallCommand Condition=" '$(PRIVATE_BUILD)' == 'true' ">$(DotNetInstallCommand) -AzureFeed $(InternalAzureFeed) -FeedCredential $env:DOTNET_TOKEN</DotNetInstallCommand>
<DotNetInstallCommand>powershell -ExecutionPolicy ByPass -NoProfile -Command &quot;$(DotNetInstallCommand)&quot;</DotNetInstallCommand>
</PropertyGroup>
Expand All @@ -21,7 +19,6 @@
<DotNetInstallScriptPath>$(DotNetOutputPath)$(DotNetInstallScriptName)</DotNetInstallScriptPath>
<DotNetInstallCommand>bash '$(DotNetInstallScriptPath)' --version $(MicrosoftDotnetSdkInternalPackageVersion) --install-dir '$(DotNetDirectory)' --verbose</DotNetInstallCommand>
<DotNetInstallCommand Condition=" '$(PRIVATE_BUILD)' == 'true' ">$(DotNetInstallCommand) --azure-feed $(InternalAzureFeed) --feed-credential $DOTNET_TOKEN</DotNetInstallCommand>
<DotNetInstallCommand Condition=" '$(PRIVATE_BUILD)' != 'true' ">$(DotNetInstallCommand) --azure-feed $(DotNetFeedUrl)</DotNetInstallCommand>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -75,7 +72,7 @@
</ItemGroup>
<Copy SourceFiles="$(MauiRootDirectory)NuGet.config" DestinationFolder="$(DotNetTempDirectory)" />
<Exec Command="dotnet nuget add source &quot;$(PackageOutputPath)&quot; --name artifacts --configfile &quot;$(DotNetTempDirectory)NuGet.config&quot;" />
<Exec Command="&quot;$(MSBuildExtensionsPath)../../dotnet&quot; workload install tizen maui --skip-manifest-update --verbosity diag --temp-dir &quot;$(DotNetTempDirectory)&quot; --configfile &quot;$(DotNetTempDirectory)NuGet.config&quot;" WorkingDirectory="$(MauiRootDirectory)" />
<Exec Command="&quot;$(MSBuildExtensionsPath)../../dotnet&quot; workload install tizen maui --skip-sign-check --skip-manifest-update --verbosity diag --temp-dir &quot;$(DotNetTempDirectory)&quot; --configfile &quot;$(DotNetTempDirectory)NuGet.config&quot;" WorkingDirectory="$(MauiRootDirectory)" />

</Target>

Expand Down Expand Up @@ -168,7 +165,7 @@
Inputs="$(_Inputs)"
Outputs="$(DotNetPacksDirectory).stamp">
<Exec
Command="&quot;$(DotNetToolPath)&quot; workload install %(_WorkloadIds.Identity) --skip-manifest-update --verbosity diag --temp-dir &quot;$(DotNetTempDirectory)&quot; --configfile &quot;$(MauiRootDirectory)NuGet.config&quot;"
Command="&quot;$(DotNetToolPath)&quot; workload install %(_WorkloadIds.Identity) --skip-sign-check --skip-manifest-update --verbosity diag --temp-dir &quot;$(DotNetTempDirectory)&quot; --configfile &quot;$(MauiRootDirectory)NuGet.config&quot;"
WorkingDirectory="$(MauiRootDirectory)"
EnvironmentVariables="DOTNET_MULTILEVEL_LOOKUP=0"
/>
Expand Down
2 changes: 2 additions & 0 deletions src/Essentials/samples/Samples/Essentials.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<SingleProject>true</SingleProject>
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn),CA1416</NoWarn>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Essentials/test/DeviceTests/Essentials.DeviceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<SingleProject>true</SingleProject>
<RootNamespace>Microsoft.Maui.Essentials.DeviceTests</RootNamespace>
<AssemblyName>Microsoft.Maui.Essentials.DeviceTests</AssemblyName>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Graphics/tests/DeviceTests/Graphics.DeviceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<SingleProject>true</SingleProject>
<RootNamespace>Microsoft.Maui.Graphics.DeviceTests</RootNamespace>
<AssemblyName>Microsoft.Maui.Graphics.DeviceTests</AssemblyName>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<SingleProject>true</SingleProject>
<RootNamespace>Microsoft.Maui.TestUtils.DeviceTests.Sample</RootNamespace>
<AssemblyName>Microsoft.Maui.TestUtils.DeviceTests.Sample</AssemblyName>
<!-- Disable multi-RID builds to workaround a parallel build issue -->
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit fdb398b

Please sign in to comment.