Skip to content

Commit

Permalink
Merge branch 'main' into dev/Jason/mergeToMain
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer authored Dec 17, 2024
2 parents 9226941 + e5fc5f0 commit bdde954
Show file tree
Hide file tree
Showing 11 changed files with 329 additions and 326 deletions.
356 changes: 178 additions & 178 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

142 changes: 71 additions & 71 deletions eng/Versions.props

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
${{ if ne(parameters.container.image, '') }}:
container:
image: ${{ parameters.container.image }}
options: --privileged
options: $(defaultContainerOptions)

# Currently, CodeQL slows the build down too much
# https://github.com/dotnet/source-build/issues/4276
Expand Down
3 changes: 3 additions & 0 deletions eng/pipelines/templates/variables/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ variables:
- name: VmrBranch
value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}

- name: defaultContainerOptions
value: --privileged

- name: almaLinuxContainerName
value: almaLinuxContainer
- name: almaLinuxContainerImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ protected List<WorkloadSetRecord> GetWorkloadSetRecords()
"Microsoft.NET.Workload.Emscripten.Current",
"Microsoft.NET.Workload.Emscripten.net6",
"Microsoft.NET.Workload.Emscripten.net7",
"Microsoft.NET.Workload.Emscripten.net8",
"Microsoft.NET.Workload.Emscripten.net9",
"Microsoft.NET.Workload.Mono.ToolChain.Current",
"Microsoft.NET.Workload.Mono.ToolChain.net6",
"Microsoft.NET.Workload.Mono.ToolChain.net7",
"Microsoft.NET.Workload.Mono.ToolChain.net8",
"Microsoft.NET.Workload.Mono.ToolChain.net9",
];

private static readonly IReadOnlyDictionary<string, string> ManifestIdCasing = CasedManifestIds.ToDictionary(id => id.ToLowerInvariant()).AsReadOnly();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
<BundledManifests Include="Microsoft.NET.Workload.Emscripten.net6" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Emscripten.net7" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Emscripten.net8" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Emscripten.net9" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain.net6" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain.net7" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain.net8" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain.net9" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Sdk.Aspire" FeatureBand="$(AspireFeatureBand)" Version="$(MicrosoftNETSdkAspireManifest80100PackageVersion)" />
</ItemGroup>

Expand Down Expand Up @@ -60,7 +62,7 @@
<ItemGroup>
<!-- Don't try to validate signing for workload manifests that will be signed as part of post-build signing -->
<BundledManifestsToValidateSigning Include="@(BundledManifests)"
Exclude="Microsoft.NET.Workload.Mono.ToolChain.Current;Microsoft.NET.Workload.Mono.ToolChain.net6;Microsoft.NET.Workload.Mono.ToolChain.net7;Microsoft.NET.Workload.Mono.ToolChain.net8;Microsoft.NET.Workload.Emscripten.Current;Microsoft.NET.Workload.Emscripten.net6;Microsoft.NET.Workload.Emscripten.net7;Microsoft.NET.Workload.Emscripten.net8;Microsoft.NET.Sdk.Aspire">
Exclude="Microsoft.NET.Workload.Mono.ToolChain.Current;Microsoft.NET.Workload.Mono.ToolChain.net6;Microsoft.NET.Workload.Mono.ToolChain.net7;Microsoft.NET.Workload.Mono.ToolChain.net8;Microsoft.NET.Workload.Mono.ToolChain.net9;Microsoft.NET.Workload.Emscripten.Current;Microsoft.NET.Workload.Emscripten.net6;Microsoft.NET.Workload.Emscripten.net7;Microsoft.NET.Workload.Emscripten.net8;Microsoft.NET.Workload.Emscripten.net9;Microsoft.NET.Sdk.Aspire">
<RestoredMsiPathInNupkg>$([MSBuild]::NormalizePath($([System.IO.Directory]::GetFiles('%(RestoredMsiNupkgContentPath)/data/', '*$(MsiArchitectureForWorkloadManifests).msi'))))</RestoredMsiPathInNupkg>
</BundledManifestsToValidateSigning>

Expand Down
11 changes: 5 additions & 6 deletions src/Layout/redist/targets/OverlaySdkOnLKG.targets
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,19 @@

<!-- If the stage 0 SDK doesn't have KnownWorkloadManifests.txt, then write a default version -->
<WriteLinesToFile File="$(SdkOutputDirectory)\KnownWorkloadManifests.txt"
Lines="microsoft.net.sdk.android;microsoft.net.sdk.aspire;microsoft.net.sdk.ios;microsoft.net.sdk.maccatalyst;microsoft.net.sdk.macos;microsoft.net.sdk.maui;microsoft.net.sdk.tvos;microsoft.net.workload.mono.toolchain.current;microsoft.net.workload.emscripten.current;microsoft.net.workload.emscripten.net6;microsoft.net.workload.emscripten.net7;microsoft.net.workload.emscripten.net8;microsoft.net.workload.mono.toolchain.net6;microsoft.net.workload.mono.toolchain.net7;microsoft.net.workload.mono.toolchain.net8"/>
Lines="microsoft.net.sdk.android;microsoft.net.sdk.aspire;microsoft.net.sdk.ios;microsoft.net.sdk.maccatalyst;microsoft.net.sdk.macos;microsoft.net.sdk.maui;microsoft.net.sdk.tvos;microsoft.net.workload.mono.toolchain.current;microsoft.net.workload.emscripten.current;microsoft.net.workload.emscripten.net6;microsoft.net.workload.emscripten.net7;microsoft.net.workload.emscripten.net8;microsoft.net.workload.emscripten.net9;microsoft.net.workload.mono.toolchain.net6;microsoft.net.workload.mono.toolchain.net7;microsoft.net.workload.mono.toolchain.net8;microsoft.net.workload.mono.toolchain.net9"/>

<ItemGroup>
<WasmWorkloads Include="microsoft.net.workload.mono.toolchain.current" Version="$(MonoWorkloadManifestVersion)/$(MonoWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.mono.toolchain.net6" Version="$(MonoWorkloadManifestVersion)/$(MonoWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.mono.toolchain.net7" Version="$(MonoWorkloadManifestVersion)/$(MonoWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.mono.toolchain.net8" Version="$(MonoWorkloadManifestVersion)/$(MonoWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.mono.toolchain.net9" Version="$(MonoWorkloadManifestVersion)/$(MonoWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.emscripten.current" Version="$(EmscriptenWorkloadManifestVersion)/$(EmscriptenWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.emscripten.net6" Version="$(EmscriptenWorkloadManifestVersion)/$(EmscriptenWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.emscripten.net7" Version="$(EmscriptenWorkloadManifestVersion)/$(EmscriptenWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.emscripten.net6" Version="$(EmscriptenWorkloadManifestVersion)/$(EmscriptenWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.emscripten.net7" Version="$(EmscriptenWorkloadManifestVersion)/$(EmscriptenWorkloadFeatureBand)"/>
<WasmWorkloads Include="microsoft.net.workload.emscripten.net8" Version="$(EmscriptenWorkloadManifestVersion)/$(EmscriptenWorkloadFeatureBand)"/>

<WasmRuntimePackVersion Include="_RuntimePackInWorkloadVersion6" Version="$(_RuntimePackInWorkloadVersion6)" />
<WasmRuntimePackVersion Include="_RuntimePackInWorkloadVersion7" Version="$(_RuntimePackInWorkloadVersion7)" />
<WasmWorkloads Include="microsoft.net.workload.emscripten.net9" Version="$(EmscriptenWorkloadManifestVersion)/$(EmscriptenWorkloadFeatureBand)"/>
</ItemGroup>

<!-- Create a rollback file for installing workloads during the build -->
Expand Down
103 changes: 52 additions & 51 deletions src/SourceBuild/content/eng/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ variables:
value: ${{ eq(variables['Build.Reason'], 'PullRequest') }}

- template: /eng/common/templates-official/variables/pool-providers.yml@self
- template: /src/sdk/eng/pipelines/templates/variables/vmr-build.yml@self

resources:
repositories:
Expand Down Expand Up @@ -78,57 +79,57 @@ extends:
baselineFile: $(Build.SourcesDirectory)\.config\guardian\.gdnbaselines

containers:
almaLinuxContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-source-build
options: --privileged
alpineLatestContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-amd64
options: --privileged
alpinePreviousContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-withnode
options: --privileged
centOSStreamContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
options: --privileged
fedoraContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-41
options: --privileged
ubuntuContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-24.04
options: --privileged
ubuntuArmContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-24.04-arm64
options: --privileged
azurelinuxX64CrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64
options: --privileged
azurelinuxArmCrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm
options: --privileged
azurelinuxArm64CrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm64
options: --privileged
azurelinuxX64AlpineCrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64-alpine
options: --privileged
azurelinuxArmAlpineCrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm-alpine
options: --privileged
azurelinuxArm64AlpineCrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm64-alpine
options: --privileged
androidCrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-android-amd64
options: --privileged
linuxBionicCrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-android-openssl
options: --privileged
browserCrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-webassembly-amd64
options: --privileged
wasiCrossContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-webassembly-amd64
options: --privileged
${{ variables.almaLinuxContainerName }}:
image: ${{ variables.almaLinuxContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.alpineLatestContainerName }}:
image: ${{ variables.alpineLatestContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.alpinePreviousContainerName }}:
image: ${{ variables.alpinePreviousContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.centOSStreamContainerName }}:
image: ${{ variables.centOSStreamContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.fedoraContainerName }}:
image: ${{ variables.fedoraContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.ubuntuContainerName }}:
image: ${{ variables.ubuntuContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.ubuntuArmContainerName }}:
image: ${{ variables.ubuntuArmContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.azurelinuxX64CrossContainerName }}:
image: ${{ variables.azurelinuxX64CrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.azurelinuxArmCrossContainerName }}:
image: ${{ variables.azurelinuxArmCrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.azurelinuxArm64CrossContainerName }}:
image: ${{ variables.azurelinuxArm64CrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.azurelinuxX64AlpineCrossContainerName }}:
image: ${{ variables.azurelinuxX64AlpineCrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.azurelinuxArmAlpineCrossContainerName }}:
image: ${{ variables.azurelinuxArmAlpineCrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.azurelinuxArm64AlpineCrossContainerName }}:
image: ${{ variables.azurelinuxArm64AlpineCrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.androidCrossContainerName }}:
image: ${{ variables.androidCrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.linuxBionicCrossContainerName }}:
image: ${{ variables.linuxBionicCrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.browserCrossContainerName }}:
image: ${{ variables.browserCrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}
${{ variables.wasiCrossContainerName }}:
image: ${{ variables.wasiCrossContainerImage }}
options: ${{ variables.defaultContainerOptions }}

stages:
- ${{ if and(ne(variables.isPRTrigger, 'true'), eq(variables['System.TeamProject'], 'internal')) }}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ShowMissingWorkloads : TaskBase
{ "android", "android-aot", "ios", "maccatalyst", "macos", "maui", "maui-android",
"maui-desktop", "maui-ios", "maui-maccatalyst", "maui-mobile", "maui-windows", "tvos" };
private static readonly HashSet<string> WasmWorkloadIds = new(StringComparer.OrdinalIgnoreCase)
{ "wasm-tools", "wasm-tools-net6", "wasm-tools-net7" };
{ "wasm-tools", "wasm-tools-net6", "wasm-tools-net7", "wasm-tools-net8", "wasm-tools-net9" };

public ITaskItem[] MissingWorkloadPacks { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -855,11 +855,11 @@ static void Main(string[] args)
.Should()
.Pass();

var result = new DotnetCommand(Log, "run")
.WithWorkingDirectory(Path.Combine(testAsset.Path, testProject.Name))
.Execute();
var exePath = Path.Combine(buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName, testProject.Name + ".dll");

var result = new DotnetCommand(Log, "exec", exePath).Execute();
result.Should().Pass();
result.StdOut.StripTerminalLoggerProgressIndicators().Should().BeEquivalentTo(expectedFrameworkDisplayName);
result.StdOut.Should().BeEquivalentTo(expectedFrameworkDisplayName);
}
}
}
20 changes: 7 additions & 13 deletions test/Microsoft.NET.Build.Tests/WorkloadTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ public void It_should_import_aliased_pack()
.BeEquivalentTo("true");
}

[Fact]
[Fact(Skip="https://github.com/dotnet/sdk/issues/45516")]
public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target()
{
var mainProject = new TestProject()
{
Name = "MainProject",
TargetFrameworks = $"net9.0-android",
TargetFrameworks = $"{ToolsetInfo.CurrentTargetFramework}-android",
IsSdkProject = true,
IsExe = true
};
Expand All @@ -259,11 +259,11 @@ public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target()
.BeEquivalentTo("android");
}

[Theory]
[InlineData("net9.0-android;net9.0-ios", "net9.0-android;net9.0-ios", "android;ios")]
[InlineData("net9.0", "net9.0;net9.0-android;net9.0-ios", "android;ios")]
[InlineData("net9.0;net9.0-ios", "net9.0;net9.0-android", "android;ios")]
[InlineData("net9.0", "net9.0", null)]
[Theory(Skip="https://github.com/dotnet/sdk/issues/45516")]
[InlineData($"{ToolsetInfo.CurrentTargetFramework}-android;{ToolsetInfo.CurrentTargetFramework}-ios", $"{ToolsetInfo.CurrentTargetFramework}-android;{ToolsetInfo.CurrentTargetFramework}-ios", "android;ios")]
[InlineData(ToolsetInfo.CurrentTargetFramework, $"{ToolsetInfo.CurrentTargetFramework};{ToolsetInfo.CurrentTargetFramework}-android;{ToolsetInfo.CurrentTargetFramework}-ios", "android;ios")]
[InlineData($"{ToolsetInfo.CurrentTargetFramework};{ToolsetInfo.CurrentTargetFramework}-ios", $"{ToolsetInfo.CurrentTargetFramework};{ToolsetInfo.CurrentTargetFramework}-android", "android;ios")]
[InlineData(ToolsetInfo.CurrentTargetFramework, ToolsetInfo.CurrentTargetFramework, null)]
public void Given_multi_target_It_should_get_suggested_workload_by_GetRequiredWorkloads_target(string mainTfm, string referencingTfm, string expected)
{
// Skip Test if SDK is < 6.0.400
Expand Down Expand Up @@ -312,12 +312,6 @@ public void Given_multi_target_It_should_get_suggested_workload_by_GetRequiredWo
}
else
{
// Conditionally check the OS and modify the expected workloads on Linux
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
expected = "android;wasi-experimental";
}

getValuesCommand.GetValues()
.Should()
.Contain(expected.Split(";")); // there are extra workloads in certain platform, only assert contains
Expand Down

0 comments on commit bdde954

Please sign in to comment.