From 880073bcb0c7281992867e9f19203b4360a0e32e Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 16:30:44 -0400 Subject: [PATCH 01/24] [wasm] Emcc.props -> emcc-props.json .. and use that instead of importing the props file. This allows reading the file on demand, and can be delayed till we have the runtime pack path. --- Directory.Build.props | 2 ++ eng/liveBuilds.targets | 2 +- eng/testing/linker/project.csproj.template | 1 + eng/testing/linker/trimmingTests.targets | 2 ++ .../Directory.Build.props | 2 +- src/libraries/sendtohelixhelp.proj | 1 + src/mono/wasm/Makefile | 4 +-- src/mono/wasm/build/WasmApp.LocalBuild.props | 3 ++ .../wasm/build/WasmApp.LocalBuild.targets | 1 + src/mono/wasm/build/WasmApp.Native.targets | 25 +++++++++------ src/mono/wasm/wasm.proj | 32 ++++++++++--------- src/tests/Common/Directory.Build.targets | 4 +++ .../wasm-test-runner/WasmTestRunner.proj | 1 + src/tests/Directory.Build.targets | 4 +++ 14 files changed, 55 insertions(+), 29 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 541ad0417e40d5..21e6b52fd02304 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -75,6 +75,7 @@ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'RuntimeConfigParser', 'Debug', '$(NetCoreAppToolCurrent)')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'JsonToItemsTaskFactory', 'Debug', '$(NetCoreAppToolCurrent)')) $([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'installer.tasks', 'Debug', '$(NetCoreAppToolCurrent)', 'installer.tasks.dll')) $([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'installer.tasks', 'Debug', 'net461', 'installer.tasks.dll')) @@ -86,6 +87,7 @@ $([MSBuild]::NormalizePath('$(WasmBuildTasksDir)', 'WasmBuildTasks.dll')) $([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll')) $([MSBuild]::NormalizePath('$(RuntimeConfigParserDir)', 'RuntimeConfigParser.dll')) + $([MSBuild]::NormalizePath('$(JsonToItemsTaskFactoryDir)', 'JsonToItemsTaskFactory.dll')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'coreclr', '$(TargetOS).$(TargetArchitecture).$(Configuration)')) diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index fb05c25a395a16..7710f9d5e2f3f9 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -178,7 +178,7 @@ $(LibrariesNativeArtifactsPath)src\*.c; $(LibrariesNativeArtifactsPath)src\*.js; $(LibrariesNativeArtifactsPath)src\emcc-default.rsp; - $(LibrariesNativeArtifactsPath)src\Emcc.props;" + $(LibrariesNativeArtifactsPath)src\emcc-props.json;" NativeSubDirectory="src" IsNative="true" /> {MonoProjectRoot} {MonoAOTCompilerTasksAssemblyPath} {WasmAppBuilderTasksAssemblyPath} + {JsonToItemsTaskFactoryTasksAssemblyPath} {MicrosoftNetCoreAppRuntimePackRidDir} {RepositoryEngineeringDir} {TestTargetFramework} diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index 6f084b6ddb41ef..649ad3e25bf2d9 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -82,8 +82,10 @@ .Replace('{AdditionalProjectReferences}', '$(_additionalProjectReferencesString)') .Replace('{RepositoryEngineeringDir}', '$(RepositoryEngineeringDir)') .Replace('{MonoAOTCompilerDir}', '$(MonoAOTCompilerDir)') + .Replace('{JsonToItemsTaskFactoryDir}', '$(JsonToItemsTaskFactoryDir)') .Replace('{MonoProjectRoot}', '$(MonoProjectRoot)') .Replace('{MonoAOTCompilerTasksAssemblyPath}', '$(MonoAOTCompilerTasksAssemblyPath)') + .Replace('{JsonToItemsTaskFactoryTasksAssemblyPath}', '$(JsonToItemsTaskFactoryTasksAssemblyPath)') .Replace('{WasmAppBuilderTasksAssemblyPath}', '$(WasmAppBuilderTasksAssemblyPath)') .Replace('{MicrosoftNetCoreAppRuntimePackRidDir}', '$(MicrosoftNetCoreAppRuntimePackRidDir)'))" Overwrite="true" /> diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props index 171be1106ee288..79af7fd8c908fe 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props @@ -224,7 +224,7 @@ - + diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index b5f603cee4f313..b6d32e59138264 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -309,6 +309,7 @@ + diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile index 8455ce69a39d86..52e5de9e30227e 100644 --- a/src/mono/wasm/Makefile +++ b/src/mono/wasm/Makefile @@ -119,10 +119,10 @@ $(BUILDS_OBJ_DIR)/corebindings.o: runtime/corebindings.c $(EMCC_DEFAULT_RSP) | $ $(EMCC_DEFAULT_RSP): $(CURDIR)/wasm.proj | $(NATIVE_BIN_DIR)/src Makefile $(DOTNET) build $(CURDIR)/wasm.proj /p:Configuration=$(CONFIG) /t:GenerateEmccPropsAndRspFiles -$(NATIVE_BIN_DIR)/src/Emcc.props: $(EMSDK_PATH)/upstream/.emsdk_version | $(NATIVE_BIN_DIR)/src +$(NATIVE_BIN_DIR)/src/emcc-props.json: $(EMSDK_PATH)/upstream/.emsdk_version | $(NATIVE_BIN_DIR)/src $(DOTNET) build $(CURDIR)/wasm.proj /p:Configuration=$(CONFIG) /t:GenerateEmccPropsAndRspFiles -build-native: $(NATIVE_BIN_DIR)/dotnet.js $(NATIVE_BIN_DIR)/src/emcc-default.rsp $(NATIVE_BIN_DIR)/src/Emcc.props +build-native: $(NATIVE_BIN_DIR)/dotnet.js $(NATIVE_BIN_DIR)/src/emcc-default.rsp $(NATIVE_BIN_DIR)/src/emcc-props.json endef diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.props b/src/mono/wasm/build/WasmApp.LocalBuild.props index 69a719a0e6d1e1..d7201757b52e4c 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.props +++ b/src/mono/wasm/build/WasmApp.LocalBuild.props @@ -37,6 +37,7 @@ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'JsonToItemsTaskFactory', 'Debug', '$(_NetCoreAppToolCurrent)')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'mono', '$(TargetOS).$(TargetArchitecture).$(RuntimeConfig)')) <_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(MonoArtifactsPath), 'cross', '$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())', 'mono-aot-cross')) @@ -48,6 +49,7 @@ $([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'microsoft.netcore.app.runtime.browser-wasm')) $([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'MonoAOTCompiler')) + $([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'JsonToItemsTaskFactory')) $([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'WasmAppBuilder')) $([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'WasmBuildTasks')) @@ -64,6 +66,7 @@ $([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll')) $([MSBuild]::NormalizePath('$(WasmBuildTasksDir)', 'WasmBuildTasks.dll')) $([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll')) + $([MSBuild]::NormalizePath('$(JsonToItemsTaskFactoryDir)', 'JsonToItemsTaskFactory.dll')) diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.targets b/src/mono/wasm/build/WasmApp.LocalBuild.targets index fac5252a4ef34a..73f2b200d8d52d 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.targets +++ b/src/mono/wasm/build/WasmApp.LocalBuild.targets @@ -63,6 +63,7 @@ $([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll')) $([MSBuild]::NormalizePath('$(WasmBuildTasksDir)', 'WasmBuildTasks.dll')) $([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll')) + $([MSBuild]::NormalizePath('$(JsonToItemsTaskFactoryDir)', 'JsonToItemsTaskFactory.dll')) .exe true - - <_WasmRuntimePackIncludeDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include')) - <_WasmRuntimePackSrcDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'src')) - <_EmccPropsPath>$(_WasmRuntimePackSrcDir)Emcc.props - - - @@ -324,6 +314,14 @@ EMSCRIPTEN_KEEPALIVE void mono_wasm_load_profiler_aot (const char *desc) { mono_ + + + + + + + + @@ -468,4 +466,11 @@ EMSCRIPTEN_KEEPALIVE void mono_wasm_load_profiler_aot (const char *desc) { mono_ + + + + + + diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index 45640378ac3cc4..6520c36a5c6eec 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -90,7 +90,7 @@ WriteOnlyWhenDifferent="true" Overwrite="true" /> - + <_EmccVersionRaw>%(_ReversedVersionLines.Identity) - <_EmccVersionRegexPattern>^ *emcc \([^\)]+\) *([^ \(]+) *\(([^\)]+)\)$ + <_EmccVersionRegexPattern>^ *emcc \([^\)]+\) *([0-9\.]+).*\(([^\)]+)\)$ <_EmccVersion>$([System.Text.RegularExpressions.Regex]::Match($(_EmccVersionRaw), $(_EmccVersionRegexPattern)).Groups[1].Value) <_EmccVersionHash>$([System.Text.RegularExpressions.Regex]::Match($(_EmccVersionRaw), $(_EmccVersionRegexPattern)).Groups[2].Value) - <_EmccPropsContent> + <_EmccPropsJson> - - $(_EmccVersionRaw) - $(_EmccVersion) - $(_EmccVersionHash) - - +{ + "items": { + "EmccProperties": [ + { "identity": "RuntimeEmccVersion", "value": "$(_EmccVersion)" }, + { "identity": "RuntimeEmccVersionRaw", "value": "$(_EmccVersionRaw)" }, + { "identity": "RuntimeEmccVersionHash", "value": "$(_EmccVersionHash)" } + ] + } +} ]]> - + - @@ -147,7 +149,7 @@ + $(NativeBinDir)src\emcc-props.json" /> @@ -260,7 +262,7 @@ + $(NativeBinDir)src\emcc-props.json" /> diff --git a/src/tests/Common/Directory.Build.targets b/src/tests/Common/Directory.Build.targets index 31e55c12ccfc07..ed56d4d011b722 100644 --- a/src/tests/Common/Directory.Build.targets +++ b/src/tests/Common/Directory.Build.targets @@ -146,6 +146,10 @@ Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**" TargetDir="WasmAppBuilder/"/> + + diff --git a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj index c28b704c4f3bed..80d4ef9dcd5fc7 100644 --- a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj +++ b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj @@ -12,6 +12,7 @@ $(CORE_ROOT)\WasmAppBuilder\WasmAppBuilder.dll $(CORE_ROOT)\MonoAOTCompiler\MonoAOTCompiler.dll + $(CORE_ROOT)\JsonToItemsTaskFactory\JsonToItemsTaskFactory.dll diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 71494ce1d6aaf0..6a361c68483e74 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -377,6 +377,10 @@ Include="$(ArtifactsBinDir)\MonoAOTCompiler\Debug\$(NetCoreAppToolCurrent)\**" TargetDir="MonoAOTCompiler/"/> + + From c8c6cee818207079f8f23fb6ac234f9c209d947c Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 16:42:01 -0400 Subject: [PATCH 02/24] [wasm] Build samples, functional tests, and Wasm.Build.Tests only when .. needed. - Don't build samples, functional tests, and Wasm.Build.Tests on EAT, AOT lanes - And build the samples in parallel --- src/libraries/tests.proj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index b1f20442aac7ec..4884a9416d9fe9 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -347,9 +347,11 @@ Condition="'$(TestTrimming)' == 'true'" AdditionalProperties="%(AdditionalProperties);SkipTrimmingProjectsRestore=true" /> + + @@ -376,10 +378,11 @@ BuildInParallel="false" /> - + + + BuildInParallel="true" /> From f04daf206a37ea1006ba31fff339c553b5e8df4e Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 16:50:48 -0400 Subject: [PATCH 03/24] [wasm] Use %(ResolvedRuntimePack.PackageDirectory) to get the runtime .. pack, instead of constructing it manually from nuget package path. --- .../Sdk/Sdk.props | 4 ++++ src/mono/wasm/build/WasmApp.LocalBuild.props | 3 ++- .../wasm/build/WasmApp.LocalBuild.targets | 3 ++- src/mono/wasm/build/WasmApp.targets | 20 +++++++++++++------ .../data/Blazor.Directory.Build.targets | 6 +++--- .../data/Local.Directory.Build.targets | 2 +- .../wasm-test-runner/WasmTestRunner.proj | 1 + 7 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props index d292fe15f274a2..a8050972730f95 100644 --- a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props +++ b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props @@ -1,4 +1,8 @@ + + true + + diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.props b/src/mono/wasm/build/WasmApp.LocalBuild.props index d7201757b52e4c..df76040d2c72b2 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.props +++ b/src/mono/wasm/build/WasmApp.LocalBuild.props @@ -62,7 +62,8 @@ - $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse), 'runtimes', 'browser-wasm')) + $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse))) + $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackDir), 'runtimes', 'browser-wasm')) $([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll')) $([MSBuild]::NormalizePath('$(WasmBuildTasksDir)', 'WasmBuildTasks.dll')) $([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll')) diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.targets b/src/mono/wasm/build/WasmApp.LocalBuild.targets index 73f2b200d8d52d..954d6d88e37d8c 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.targets +++ b/src/mono/wasm/build/WasmApp.LocalBuild.targets @@ -59,7 +59,8 @@ Text="%24(RuntimeSrcDir) is set, but %24(RuntimeConfig) is not" /> - $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse), 'runtimes', 'browser-wasm')) + $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse))) + $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackDir), 'runtimes', 'browser-wasm')) $([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll')) $([MSBuild]::NormalizePath('$(WasmBuildTasksDir)', 'WasmBuildTasks.dll')) $([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll')) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 034287436892bf..10bd9ac7973c5e 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -80,12 +80,6 @@ false - - $([MSBuild]::NormalizeDirectory($(NuGetPackageRoot), 'microsoft.netcore.app.runtime.mono.browser-wasm', '$(BundledNETCoreAppPackageVersion)')) - $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackDir), 'runtimes', 'browser-wasm')) - $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir))) - $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir), 'native')) - <_BeforeWasmBuildAppDependsOn /> @@ -97,6 +91,20 @@ + + + + %(ResolvedRuntimePack.PackageDirectory) + $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackDir), 'runtimes', 'browser-wasm')) + $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir))) + $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir), 'native')) + + + <_WasmRuntimePackIncludeDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include')) + <_WasmRuntimePackSrcDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'src')) + + diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Directory.Build.targets b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Directory.Build.targets index 1ae8c2cd6ff9fa..b0384d714e3450 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Directory.Build.targets +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Directory.Build.targets @@ -5,7 +5,7 @@ - + @@ -33,7 +33,7 @@ FrameworkName="Microsoft.NETCore.App" NuGetPackageId="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" NuGetPackageVersion="$(RuntimePackInWorkloadVersion)" - PackageDirectory="$(WorkloadPacksDir)\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\$(RuntimePackInWorkloadVersion)" + PackageDirectory="$(NetCoreTargetingPackRoot)\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\$(RuntimePackInWorkloadVersion)" RuntimeIdentifier="browser-wasm" /> diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Local.Directory.Build.targets b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Local.Directory.Build.targets index 8c0b1e7e46ee71..65f76e4fc8582c 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Local.Directory.Build.targets +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Local.Directory.Build.targets @@ -23,7 +23,7 @@ - + diff --git a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj index 80d4ef9dcd5fc7..f9479f96746235 100644 --- a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj +++ b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj @@ -4,6 +4,7 @@ false + $(CORE_ROOT)\runtimepack-non-existant $(CORE_ROOT)\runtimepack $(NetCoreAppCurrent) $(MSBuildThisFileDirectory)\obj\$(Configuration)\wasm From 1e23ebac24fe94e2c8ab4cd9602aa2ec1858706c Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 16:55:53 -0400 Subject: [PATCH 04/24] [wasm] Wasm.Build.Tests cleanup .. and add per-test timeout. --- .../Wasm.Build.Tests/BlazorWasmTests.cs | 10 ++-- .../Wasm.Build.Tests/BuildEnvironment.cs | 24 +++++----- .../Wasm.Build.Tests/BuildTestBase.cs | 46 +++++++++++++------ .../Wasm.Build.Tests/DotNetCommand.cs | 8 +++- .../Wasm.Build.Tests/NativeBuildTests.cs | 2 - .../Wasm.Build.Tests/WorkloadTests.cs | 12 ++++- 6 files changed, 68 insertions(+), 34 deletions(-) diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BlazorWasmTests.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BlazorWasmTests.cs index c58c4b55f3da92..dacf67ff4f3951 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BlazorWasmTests.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BlazorWasmTests.cs @@ -19,7 +19,8 @@ public BlazorWasmTests(ITestOutputHelper output, SharedBuildPerTestClassFixture [ConditionalFact(typeof(BuildTestBase), nameof(IsUsingWorkloads))] public void PublishTemplateProject() { - InitPaths("id"); + string id = "blazorwasm"; + InitPaths(id); if (Directory.Exists(_projectDir)) Directory.Delete(_projectDir, recursive: true); Directory.CreateDirectory(_projectDir); @@ -29,14 +30,17 @@ public void PublishTemplateProject() File.Copy(Path.Combine(BuildEnvironment.TestDataPath, "Blazor.Directory.Build.props"), Path.Combine(_projectDir, "Directory.Build.props")); File.Copy(Path.Combine(BuildEnvironment.TestDataPath, "Blazor.Directory.Build.targets"), Path.Combine(_projectDir, "Directory.Build.targets")); - new DotNetCommand(s_buildEnv) + string logPath = Path.Combine(s_buildEnv.LogRootPath, id); + + new DotNetCommand(s_buildEnv, useDefaultArgs: false) .WithWorkingDirectory(_projectDir) .ExecuteWithCapturedOutput("new blazorwasm") .EnsureSuccessful(); + string publishLogPath = Path.Combine(logPath, $"{id}.publish.binlog"); new DotNetCommand(s_buildEnv) .WithWorkingDirectory(_projectDir) - .ExecuteWithCapturedOutput("publish -bl -p:RunAOTCompilation=true") + .ExecuteWithCapturedOutput("publish", $"-bl:{publishLogPath}", "-p:RunAOTCompilation=true") .EnsureSuccessful(); //TODO: validate the build somehow? diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs index 231b215f88b588..51ad61a76e7997 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Runtime.InteropServices; namespace Wasm.Build.Tests { @@ -24,7 +25,6 @@ public class BuildEnvironment public static readonly string TestDataPath = Path.Combine(AppContext.BaseDirectory, "data"); private static string s_runtimeConfig = "Release"; - private const string s_testLogPathEnvVar = "TEST_LOG_PATH"; public BuildEnvironment() { @@ -39,12 +39,11 @@ public BuildEnvironment() solutionRoot = solutionRoot.Parent; } - string? sdkForWorkloadPath = Environment.GetEnvironmentVariable("SDK_FOR_WORKLOAD_TESTING_PATH"); + string? sdkForWorkloadPath = EnvironmentVariables.SdkForWorkloadTestingPath; if (!string.IsNullOrEmpty(sdkForWorkloadPath)) { - DotNet = Path.Combine(sdkForWorkloadPath, "dotnet"); - var workloadPacksVersion = Environment.GetEnvironmentVariable("WORKLOAD_PACKS_VER"); + var workloadPacksVersion = EnvironmentVariables.WorkloadPacksVersion; if (string.IsNullOrEmpty(workloadPacksVersion)) throw new Exception($"Cannot test with workloads without WORKLOAD_PACKS_VER environment variable being set"); @@ -63,7 +62,7 @@ public BuildEnvironment() ["PATH"] = $"{sdkForWorkloadPath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}" }; - var appRefDir = Environment.GetEnvironmentVariable("AppRefDir"); + var appRefDir = EnvironmentVariables.AppRefDir; if (string.IsNullOrEmpty(appRefDir)) throw new Exception($"Cannot test with workloads without AppRefDir environment variable being set"); @@ -75,8 +74,7 @@ public BuildEnvironment() string emsdkPath; if (solutionRoot == null) { - string? buildDir = Environment.GetEnvironmentVariable("WasmBuildSupportDir"); - + string? buildDir = EnvironmentVariables.WasmBuildSupportDir; if (buildDir == null || !Directory.Exists(buildDir)) throw new Exception($"Could not find the solution root, or a build dir: {buildDir}"); @@ -89,11 +87,10 @@ public BuildEnvironment() string artifactsBinDir = Path.Combine(solutionRoot.FullName, "artifacts", "bin"); RuntimePackDir = Path.Combine(artifactsBinDir, "microsoft.netcore.app.runtime.browser-wasm", s_runtimeConfig); - string? emsdkEnvValue = Environment.GetEnvironmentVariable("EMSDK_PATH"); - if (string.IsNullOrEmpty(emsdkEnvValue)) + if (string.IsNullOrEmpty(EnvironmentVariables.EMSDK_PATH)) emsdkPath = Path.Combine(solutionRoot.FullName, "src", "mono", "wasm", "emsdk"); else - emsdkPath = emsdkEnvValue; + emsdkPath = EnvironmentVariables.EMSDK_PATH; DefaultBuildArgs = $" /p:RuntimeSrcDir={solutionRoot.FullName} /p:RuntimeConfig={s_runtimeConfig} /p:EMSDK_PATH={emsdkPath} "; } @@ -110,11 +107,12 @@ public BuildEnvironment() } RuntimeNativeDir = Path.Combine(RuntimePackDir, "runtimes", "browser-wasm", "native"); + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + DotNet += ".exe"; - string? logPathEnvVar = Environment.GetEnvironmentVariable(s_testLogPathEnvVar); - if (!string.IsNullOrEmpty(logPathEnvVar)) + if (!string.IsNullOrEmpty(EnvironmentVariables.TestLogPath)) { - LogRootPath = logPathEnvVar; + LogRootPath = EnvironmentVariables.TestLogPath; if (!Directory.Exists(LogRootPath)) { Directory.CreateDirectory(LogRootPath); diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs index 021ce531b17b32..d740c626888f88 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs @@ -8,7 +8,7 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; -using System.Reflection; +using System.Runtime.InteropServices; using System.Text; using System.Text.RegularExpressions; using Xunit; @@ -17,12 +17,12 @@ #nullable enable +// [assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)] + namespace Wasm.Build.Tests { public abstract class BuildTestBase : IClassFixture, IDisposable { - protected const string SkipProjectCleanupEnvVar = "SKIP_PROJECT_CLEANUP"; - protected const string XHarnessRunnerCommandEnvVar = "XHARNESS_CLI_PATH"; protected const string s_targetFramework = "net6.0"; protected static readonly bool s_skipProjectCleanup; protected static readonly string s_xharnessRunnerCommand; @@ -32,6 +32,8 @@ public abstract class BuildTestBase : IClassFixturetrue\nfalse\n"; + { + extraProperties = $"{extraProperties}\ntrue"; + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + extraProperties += $"\nfalse\n"; + else + extraProperties += $"\ntrue\n"; + } string projectContents = projectTemplate .Replace("##EXTRA_PROPERTIES##", extraProperties) @@ -310,7 +321,8 @@ protected static BuildArgs ExpandBuildArgs(BuildArgs buildArgs, string extraProp _testOutput.WriteLine($"-------- Building ---------"); _testOutput.WriteLine($"Binlog path: {logFilePath}"); Console.WriteLine($"Binlog path: {logFilePath}"); - sb.Append($" /bl:\"{logFilePath}\" /v:minimal /nologo"); + sb.Append($" /bl:\"{logFilePath}\" /nologo"); + sb.Append($" /v:diag /fl /flp:\"v:diag,LogFile={logFilePath}.log\" /v:minimal"); if (buildArgs.ExtraBuildArgs != null) sb.Append($" {buildArgs.ExtraBuildArgs} "); @@ -451,9 +463,9 @@ protected static void AssertFile(string file0, string file1, string? label=null, Assert.True(finfo0.Length != finfo1.Length, $"{label}: File sizes should not match for {file0} ({finfo0.Length}), and {file1} ({finfo1.Length})"); } - protected (int exitCode, string buildOutput) AssertBuild(string args, string label="build", bool expectSuccess=true, IDictionary? envVars=null) + protected (int exitCode, string buildOutput) AssertBuild(string args, string label="build", bool expectSuccess=true, IDictionary? envVars=null, int? timeoutMs=null) { - var result = RunProcess(s_buildEnv.DotNet, _testOutput, args, workingDir: _projectDir, label: label, envVars: envVars); + var result = RunProcess(s_buildEnv.DotNet, _testOutput, args, workingDir: _projectDir, label: label, envVars: envVars, timeoutMs: timeoutMs ?? s_defaultPerTestTimeoutMs); if (expectSuccess) Assert.True(0 == result.exitCode, $"Build process exited with non-zero exit code: {result.exitCode}"); else @@ -475,7 +487,8 @@ public static (int exitCode, string buildOutput) RunProcess(string path, IDictionary? envVars = null, string? workingDir = null, string? label = null, - bool logToXUnit = true) + bool logToXUnit = true, + int? timeoutMs = null) { _testOutput.WriteLine($"Running {path} {args}"); Console.WriteLine($"Running: {path}: {args}"); @@ -529,7 +542,14 @@ public static (int exitCode, string buildOutput) RunProcess(string path, // process.WaitForExit doesn't work if the process exits too quickly? // resetEvent.WaitOne(); - process.WaitForExit(); + if (!process.WaitForExit(timeoutMs ?? s_defaultPerTestTimeoutMs)) + { + // process didn't exit + process.Kill(entireProcessTree: true); + var lastLines = outputBuilder.ToString().Split('\r', '\n').TakeLast(20); + throw new XunitException($"Process timed out, output: {string.Join(Environment.NewLine, lastLines)}"); + + } return (process.ExitCode, outputBuilder.ToString().Trim('\r', '\n')); } catch (Exception ex) diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/DotNetCommand.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/DotNetCommand.cs index 2fefb87c0f0078..4136bf8ccea4cc 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/DotNetCommand.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/DotNetCommand.cs @@ -6,14 +6,18 @@ namespace Wasm.Build.Tests public class DotNetCommand : ToolCommand { private BuildEnvironment _buildEnvironment; + private bool _useDefaultArgs; - public DotNetCommand(BuildEnvironment buildEnv) : base(buildEnv.DotNet) + public DotNetCommand(BuildEnvironment buildEnv, bool useDefaultArgs=true) : base(buildEnv.DotNet) { _buildEnvironment = buildEnv; + _useDefaultArgs = useDefaultArgs; WithEnvironmentVariables(buildEnv.EnvVars); } protected override string GetFullArgs(params string[] args) - => $"{_buildEnvironment.DefaultBuildArgs} {string.Join(" ", args)}"; + => _useDefaultArgs + ? $"{string.Join(" ", args)} {_buildEnvironment.DefaultBuildArgs}" + : string.Join(" ", args); } } diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/NativeBuildTests.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/NativeBuildTests.cs index 130e59e0ea2a9c..30e487f8171c07 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/NativeBuildTests.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/NativeBuildTests.cs @@ -27,8 +27,6 @@ public NativeBuildTests(ITestOutputHelper output, SharedBuildPerTestClassFixture public void SimpleNativeBuild(BuildArgs buildArgs, RunHost host, string id) => NativeBuild("simple_native_build", s_mainReturns42, buildArgs, host, id); - - private void NativeBuild(string projectNamePrefix, string projectContents, BuildArgs buildArgs, RunHost host, string id) { string projectName = $"{projectNamePrefix}_{buildArgs.Config}_{buildArgs.AOT}"; diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/WorkloadTests.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/WorkloadTests.cs index 89b656ee444e42..ae67ab1cb4b9a8 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/WorkloadTests.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/WorkloadTests.cs @@ -4,10 +4,12 @@ using System; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Xml; using System.Xml.Serialization; using Xunit; using Xunit.Abstractions; +using Xunit.Sdk; #nullable enable @@ -21,6 +23,7 @@ public WorkloadTests(ITestOutputHelper output, SharedBuildPerTestClassFixture bu } [ConditionalFact(typeof(BuildTestBase), nameof(IsUsingWorkloads))] + [SkipOnPlatform(TestPlatforms.Windows, "Not applicable on windows")] public void FilesInUnixFilesPermissionsXmlExist() { // not doing any project generation here @@ -54,7 +57,14 @@ public void FilesInUnixFilesPermissionsXmlExist() // We don't install the cross compiler pack from nupkg, so we don't // have the unixFilePermissions for that // Expect just the emscripten ones here for now - Assert.Equal(3, unixPermFiles.Count()); + + // linux doesn't have Emscripten.Python package, so only 2 there + int expectedPermFileCount = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? 3 : 4; + + int permFileCount = unixPermFiles.Count(); + if (permFileCount != expectedPermFileCount) + throw new XunitException($"Expected to find 3 UnixFilePermissions.xml files, but got {permFileCount}." + + $"{Environment.NewLine}Files: {string.Join(", ", unixPermFiles)}"); } } From cf11f191a46b36e8002ad0891c7331daac6473b8 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 16:57:07 -0400 Subject: [PATCH 05/24] cross-aot: Allow the project to be built directly for packing - Currently, the cross aot packages get built on CI for the various configs, but we do get the binary built in artifacts. - These changes allow a package to be generated based on that, and it will be useful for installing workloads that use such a package. --- ...Microsoft.NETCore.App.MonoCrossAOT.sfxproj | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj index a951a58b643d16..27a590bfd08fa6 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj @@ -18,14 +18,20 @@ - <_ToolFile Include="$(MonoAotCrossDir)$(TargetCrossRid)\**" /> - - - + + + + $(MonoAotCrossDir) + $(MonoAotCrossDir)$(TargetCrossRid)\ + + + <_ToolFile Include="$(AotCompilerPath)**" /> + + <_SdkPropsProperties Condition="!$([MSBuild]::IsOsPlatform('Windows'))" Include="ExeSuffix" Value="" /> <_SdkPropsProperties Condition="$([MSBuild]::IsOsPlatform('Windows'))" Include="ExeSuffix" Value=".exe" /> <_SdkPropsProperties Include="TargetRid" Value="$(TargetCrossRid)" /> @@ -36,19 +42,20 @@ <_PermissionsProperties Include="PermissionsProperties" Value="$(_PermissionsFiles)" /> + + OutputPath="$(IntermediateOutputPath)Microsoft.NETCore.App.MonoCrossAOT.UnixFilePermissions.xml" /> + OutputPath="$(IntermediateOutputPath)$(TargetCrossRid).Sdk.props" /> - + - + From c87f5cfc8d39bda74f036855564e8a6fd83d1b1d Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 17:01:20 -0400 Subject: [PATCH 06/24] Add support for building Wasm.Build.Tests with workloads Currently we run `Wasm.Build.Tests` on helix, by setting various paths to reference files from `artifacts`. This PR adds another mode, we *try* to test against workload packs. For this: 1. we need the nugets for the various workload packs, and the manifests 2. manifest id, path to those nugets 3. and a SDK version to use for testing Steps: 1. The specified SDK is installed in `artifacts/bin/dotnet-workload` 2. the specified manifest is installed from the built nugets, and any `depends-on` manifests in the json. 3. `dotnet workload install` is used to install the packs, with the built nugets path being used as one the nuget sources Once this setup is done, the tests are run in an environment such that they use `dotnet` from above, and try to resolve packs from there. Known issues: 1. `Pack` target is explicitly invoked for the aotcross projects We still want to test without packs, the case of using `EMSDK_PATH` directly, for example, in the library tests. So, we now run `Wasm.Build.Tests` for Workloads, *and* the regular `EMSDK_PATH`. Two workload specific tests were added in a recent PR (https://github.com/dotnet/runtime/pull/54936) - simple test for building blazorwasm template project with AOT - a test to validate that the files in `UnixFilePermissions.xml` for the packs actually exist on disk .. and these are enabled here. Notes: - This also fixes using the correct runtime pack based on the version in the manifest json. - The sdk version is specified with `6.0.100-preview.7.21326.4` in `eng/Versions.props` TODO: - Run the blazorwasm test with playwright - Add sdk-with-no-packs case also --- Directory.Build.props | 2 + eng/Subsets.props | 2 +- eng/Versions.props | 1 + eng/testing/tests.mobile.targets | 9 + eng/testing/tests.wasm.targets | 8 + src/libraries/Directory.Build.props | 7 + src/libraries/Directory.Build.targets | 93 ++++++++ src/libraries/pretest.proj | 3 + src/libraries/sendtohelix.proj | 20 +- src/libraries/sendtohelixhelp.proj | 116 ++++++--- ...T.Workload.Mono.Toolchain.Manifest.pkgproj | 1 + .../WorkloadManifest.targets.in | 2 +- .../InstallWorkloadFromArtifacts.cs | 223 ++++++++++++++++++ .../WorkloadBuildTasks/PackageInstaller.cs | 163 +++++++++++++ .../WorkloadBuildTasks.csproj | 2 + .../Wasm.Build.Tests/BuildEnvironment.cs | 5 +- .../Wasm.Build.Tests/Wasm.Build.Tests.csproj | 7 +- .../data/Workloads.Directory.Build.props | 7 + .../data/Workloads.Directory.Build.targets | 95 ++++++++ 19 files changed, 720 insertions(+), 46 deletions(-) create mode 100644 src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs create mode 100644 src/tasks/WorkloadBuildTasks/PackageInstaller.cs create mode 100644 src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.props create mode 100644 src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.targets diff --git a/Directory.Build.props b/Directory.Build.props index 21e6b52fd02304..6cab9bcee30587 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -73,6 +73,7 @@ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WorkloadBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'RuntimeConfigParser', 'Debug', '$(NetCoreAppToolCurrent)')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'JsonToItemsTaskFactory', 'Debug', '$(NetCoreAppToolCurrent)')) @@ -85,6 +86,7 @@ $([MSBuild]::NormalizePath('$(AndroidAppBuilderDir)', 'AndroidAppBuilder.dll')) $([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll')) $([MSBuild]::NormalizePath('$(WasmBuildTasksDir)', 'WasmBuildTasks.dll')) + $([MSBuild]::NormalizePath('$(WorkloadBuildTasksDir)', 'WorkloadBuildTasks.dll')) $([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll')) $([MSBuild]::NormalizePath('$(RuntimeConfigParserDir)', 'RuntimeConfigParser.dll')) $([MSBuild]::NormalizePath('$(JsonToItemsTaskFactoryDir)', 'JsonToItemsTaskFactory.dll')) diff --git a/eng/Subsets.props b/eng/Subsets.props index 105b34254c6c2b..9234a8c2dde473 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -317,7 +317,7 @@ - + diff --git a/eng/Versions.props b/eng/Versions.props index 7be0ee173f2f37..925671b7b4a43a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -161,6 +161,7 @@ 2.0.4 4.12.0 2.14.3 + 6.0.100-preview.7.21362.5 5.0.0-preview-20201009.2 diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index 517ebf719850c1..c3107ec4a060a7 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -7,6 +7,10 @@ true BundleTestAppleApp;BundleTestAndroidApp + + + true @@ -291,5 +295,10 @@ AfterTargets="Build" DependsOnTargets="Publish;$(BundleTestAppTargets);ArchiveTests" /> + + diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index aa4fb305dbd425..ae9f6bcdffcaff 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -60,6 +60,14 @@ $(BundleTestWasmAppDependsOn);_BundleAOTTestWasmAppForHelix + + + + --interpreter + + $(ArtifactsBinDir)dotnet-workload\ + $([MSBuild]::NormalizeDirectory($(SdkPathForWorkloadTesting))) + + $(SdkPathForWorkloadTesting)version-$(SdkVersionForWorkloadTesting).stamp + + diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index a3553ca940f192..dd17dace8e4ba0 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -7,6 +7,13 @@ $(TestStrongNameKeyId) + + + true + + $(SdkPathForWorkloadTesting)workload.stamp + + @@ -328,4 +335,90 @@ Text="Analyzers must only target netstandard2.0 since they run in the compiler which targets netstandard2.0. The following files were found to target '%(_AnalyzerPackFile.TargetFramework)': @(_AnalyzerPackFile)" /> + + + + + + + + + + + + + <_DotNetInstallScriptPath Condition="!$([MSBuild]::IsOSPlatform('windows'))">$(DOTNET_INSTALL_DIR)/dotnet-install.sh + <_DotNetInstallScriptPath Condition=" $([MSBuild]::IsOSPlatform('windows'))">$(RepoRoot).dotnet\dotnet-install.ps1 + + + + + + + + + + + + + + + + + + + + + + + + + <_PropsForAOTCrossBuild Include="TestingWorkloads=true" /> + <_PropsForAOTCrossBuild Include="Configuration=$(Configuration)" /> + <_PropsForAOTCrossBuild Include="TargetOS=Browser" /> + <_PropsForAOTCrossBuild Include="TargetArchitecture=wasm" /> + <_PropsForAOTCrossBuild Include="ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)" /> + + <_PropsForAOTCrossBuild Include="RuntimeIdentifier=$(NETCoreSdkRuntimeIdentifier)" /> + <_PropsForAOTCrossBuild Include="TargetCrossRid=$(RuntimeIdentifier)" /> + + + + + + <_NuGetSourceForWorkloads Include="dotnet6" Value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" /> + <_BuiltNuGets Include="$(LibrariesShippingPackagesDir)\*.nupkg" /> + + + + + <_AOTCrossNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.AOT.$(NETCoreSdkRuntimeIdentifier).Cross.$(RuntimeIdentifier).$(PackageVersion).nupkg + + + + + + + + + + diff --git a/src/libraries/pretest.proj b/src/libraries/pretest.proj index 3e924e083abd51..fc2fee13d5c33c 100644 --- a/src/libraries/pretest.proj +++ b/src/libraries/pretest.proj @@ -22,6 +22,9 @@ + + + - <_ProjectsToBuild Include="$(PerScenarioProjectFile)"> + <_BaseProjectsToBuild Include="$(PerScenarioProjectFile)" Condition="'%(_Scenarios.Identity)' != 'buildwasmapps'"> $(_PropertiesToPass);Scenario=%(_Scenarios.Identity);TestArchiveRuntimeFile=$(TestArchiveRuntimeFile) - %(_ProjectsToBuild.AdditionalProperties);NeedsToBuildWasmAppsOnHelix=$(NeedsToBuildWasmAppsOnHelix) - + %(_BaseProjectsToBuild.AdditionalProperties);NeedsToBuildWasmAppsOnHelix=$(NeedsToBuildWasmAppsOnHelix) + + + + + + <_TestUsingWorkloadsValues Include="true;false" /> + + <_BuildWasmAppsProjectsToBuild Include="$(PerScenarioProjectFile)"> + $(_PropertiesToPass);Scenario=BuildWasmApps;TestArchiveRuntimeFile=$(TestArchiveRuntimeFile);TestUsingWorkloads=%(_TestUsingWorkloadsValues.Identity) + %(_BuildWasmAppsProjectsToBuild.AdditionalProperties);NeedsToBuildWasmAppsOnHelix=$(NeedsToBuildWasmAppsOnHelix) + + + + + <_ProjectsToBuild Include="@(_BuildWasmAppsProjectsToBuild);@(_BaseProjectsToBuild)" /> diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index b6d32e59138264..40b16a7515e8b9 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -7,6 +7,7 @@ true + true $(BUILD_BUILDNUMBER) @@ -53,6 +54,11 @@ $(WaitForWorkItemCompletion) true + $(RepoRoot)src\mono\wasm\emsdk\ + + true + true + true @@ -97,19 +103,29 @@ true - true + true - + - - true - true - true - + + + + false + true + + + + + true + true + true + + + + + + + + + + + + + true @@ -155,24 +183,6 @@ $([System.Text.RegularExpressions.Regex]::Match($(GlobalJsonContent), '(%3F<="dotnet": ").*(%3F=")')) - - dotnet dev-certs https && - - - powershell -command "New-SelfSignedCertificate -FriendlyName 'ASP.NET Core HTTPS development certificate' -DnsName @('localhost') -Subject 'CN = localhost' -KeyAlgorithm RSA -KeyLength 2048 -HashAlgorithm sha256 -CertStoreLocation 'Cert:\CurrentUser\My' -TextExtension @('2.5.29.37={text}1.3.6.1.5.5.7.3.1','1.3.6.1.4.1.311.84.1.1={hex}02','2.5.29.19={text}') -KeyUsage DigitalSignature,KeyEncipherment" && - - - $(HelixCommand)call RunTests.cmd - $(HelixCommand) --runtime-path %HELIX_CORRELATION_PAYLOAD% - - $(HelixCommand)./RunTests.sh - $(HelixCommand) --runtime-path "$HELIX_CORRELATION_PAYLOAD" - - @@ -224,6 +234,34 @@ + + @(HelixPreCommand) + $(HelixCommandPrefix) @(HelixCommandPrefixItem -> 'set "%(Identity)"', ' & ') + $(HelixCommandPrefix) @(HelixCommandPrefixItem, ' ') + true + + + + $(HelixCommandPrefix) + $(HelixCommandPrefix) & + + $(HelixCommand) dotnet dev-certs https && + + + $(HelixCommand) powershell -command "New-SelfSignedCertificate -FriendlyName 'ASP.NET Core HTTPS development certificate' -DnsName @('localhost') -Subject 'CN = localhost' -KeyAlgorithm RSA -KeyLength 2048 -HashAlgorithm sha256 -CertStoreLocation 'Cert:\CurrentUser\My' -TextExtension @('2.5.29.37={text}1.3.6.1.5.5.7.3.1','1.3.6.1.4.1.311.84.1.1={hex}02','2.5.29.19={text}') -KeyUsage DigitalSignature,KeyEncipherment" && + + + $(HelixCommand)call RunTests.cmd + $(HelixCommand) --runtime-path %HELIX_CORRELATION_PAYLOAD% + + $(HelixCommand)./RunTests.sh + $(HelixCommand) --runtime-path "$HELIX_CORRELATION_PAYLOAD" + + @@ -289,7 +327,7 @@ - + @@ -302,7 +340,15 @@ - + + + + + + + + @@ -321,8 +367,8 @@ - - + + <_WorkItem Include="$(WorkItemArchiveWildCard)" Exclude="$(HelixCorrelationPayload)" /> <_WorkItem Include="$(TestArchiveRoot)runonly/**/WebAssembly.Console.*.Test.zip" Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' != 'WasmTestOnBrowser' and '$(Scenario)' != 'BuildWasmApps'" /> @@ -376,7 +422,7 @@ - + @@ -394,6 +440,8 @@ + diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj index f89c42b2884dcd..747da02070f2f9 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj @@ -38,6 +38,7 @@ TemplateFile="WorkloadManifest.json.in" Properties="@(_WorkloadManifestValues)" OutputPath="$(WorkloadManifestPath)" /> + - + (); + + public override bool Execute() + { + Utils.Logger = Log; + + if (!HasMetadata(WorkloadId, nameof(WorkloadId), "Version") || + !HasMetadata(WorkloadId, nameof(WorkloadId), "ManifestName")) + { + return false; + } + + if (!Directory.Exists(SdkDir)) + { + Log.LogError($"Cannot find SdkDir={SdkDir}"); + return false; + } + + Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** Installing workload manifest {WorkloadId.ItemSpec} **{Environment.NewLine}"); + + string nugetConfigContents = GetNuGetConfig(); + if (!InstallWorkloadManifest(WorkloadId.GetMetadata("ManifestName"), WorkloadId.GetMetadata("Version"), nugetConfigContents, stopOnMissing: true)) + return false; + + string nugetConfigPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + File.WriteAllText(nugetConfigPath, nugetConfigContents); + + Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** workload install **{Environment.NewLine}"); + (int exitCode, string output) = Utils.TryRunProcess( + Path.Combine(SdkDir, "dotnet"), + $"workload install --skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {WorkloadId.ItemSpec}", + workingDir: Path.GetTempPath(), + silent: false, + debugMessageImportance: MessageImportance.High); + if (exitCode != 0) + { + Log.LogError($"workload install failed: {output}"); + return false; + } + + return !Log.HasLoggedErrors; + } + + private string GetNuGetConfig() + { + StringBuilder nugetConfigBuilder = new(); + nugetConfigBuilder.AppendLine($"{Environment.NewLine}"); + + nugetConfigBuilder.AppendLine($@""); + foreach (ITaskItem source in ExtraNuGetSources) + { + string key = source.ItemSpec; + string value = source.GetMetadata("Value"); + if (string.IsNullOrEmpty(value)) + { + Log.LogWarning($"ExtraNuGetSource {key} is missing Value metadata"); + continue; + } + + nugetConfigBuilder.AppendLine($@""); + } + + nugetConfigBuilder.AppendLine($"{Environment.NewLine}"); + return nugetConfigBuilder.ToString(); + } + + private bool InstallWorkloadManifest(string name, string version, string nugetConfigContents, bool stopOnMissing) + { + Log.LogMessage(MessageImportance.High, $"Installing workload manifest for {name}/{version}"); + + // Find any existing directory with the manifest name, ignoring the case + // Multiple directories for a manifest, differing only in case causes + // workload install to fail due to duplicate manifests! + // This is applicable only on case-sensitive filesystems + string outputDir = FindSubDirIgnoringCase(Path.Combine(SdkDir, "sdk-manifests", VersionBand), name); + + PackageReference pkgRef = new(Name: $"{name}.Manifest-{VersionBand}", + Version: version, + OutputDir: outputDir, + relativeSourceDir: "data"); + + if (!PackageInstaller.Install(new[]{ pkgRef }, nugetConfigContents, Log, stopOnMissing)) + return false; + + Log.LogMessage(MessageImportance.High, $"\t=> {pkgRef.OutputDir}"); + + string manifestDir = pkgRef.OutputDir; + string jsonPath = Path.Combine(manifestDir, "WorkloadManifest.json"); + if (!File.Exists(jsonPath)) + { + Log.LogError($"Could not find WorkloadManifest.json at {jsonPath}"); + return false; + } + + ManifestInformation? manifest; + try + { + manifest = JsonSerializer.Deserialize( + File.ReadAllBytes(jsonPath), + new JsonSerializerOptions(JsonSerializerDefaults.Web) + { + AllowTrailingCommas = true, + ReadCommentHandling = JsonCommentHandling.Skip + }); + + if (manifest == null) + { + Log.LogError($"Could not parse manifest from {jsonPath}."); + return false; + } + } + catch (JsonException je) + { + Log.LogError($"Failed to read from {jsonPath}: {je.Message}"); + return false; + } + + if (manifest.DependsOn != null) + { + foreach ((string depName, string depVersion) in manifest.DependsOn) + { + if (!InstallWorkloadManifest(depName, depVersion, nugetConfigContents, stopOnMissing: false)) + { + Log.LogWarning($"Could not install manifest {depName}/{depVersion}. This can be ignored if the workload {WorkloadId.ItemSpec} doesn't depend on it."); + continue; + } + } + } + + return true; + } + + private bool HasMetadata(ITaskItem item, string itemName, string metadataName) + { + if (!string.IsNullOrEmpty(item.GetMetadata(metadataName))) + return true; + + Log.LogError($"{itemName} item ({item.ItemSpec}) is missing Name metadata"); + return false; + } + + private string FindSubDirIgnoringCase(string parentDir, string dirName) + { + IEnumerable matchingDirs = Directory.EnumerateDirectories(parentDir, + dirName, + new EnumerationOptions { MatchCasing = MatchCasing.CaseInsensitive }); + + string? first = matchingDirs.FirstOrDefault(); + if (matchingDirs.Count() > 1) + { + Log.LogWarning($"Found multiple directories with names that differ only in case. {string.Join(", ", matchingDirs.ToArray())}" + + $"{Environment.NewLine}Using the first one: {first}"); + } + + return first ?? Path.Combine(parentDir, dirName); + } + + private record ManifestInformation( + object Version, + string Description, + + [property: JsonPropertyName("depends-on")] + IDictionary DependsOn, + IDictionary Workloads, + IDictionary Packs, + object Data + ); + + private record WorkloadInformation( + bool Abstract, + string Kind, + string Description, + + List Packs, + List Extends, + List Platforms + ); + + private record PackVersionInformation( + string Kind, + string Version, + [property: JsonPropertyName("alias-to")] + Dictionary AliasTo + ); + } + + internal record PackageReference(string Name, + string Version, + string OutputDir, + string relativeSourceDir = ""); +} diff --git a/src/tasks/WorkloadBuildTasks/PackageInstaller.cs b/src/tasks/WorkloadBuildTasks/PackageInstaller.cs new file mode 100644 index 00000000000000..f6d4e85cf76c84 --- /dev/null +++ b/src/tasks/WorkloadBuildTasks/PackageInstaller.cs @@ -0,0 +1,163 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +#nullable enable + +namespace Microsoft.Workload.Build.Tasks +{ + internal class PackageInstaller + { + private readonly string _tempDir; + private string _nugetConfigContents; + private TaskLoggingHelper _logger; + private string _packagesDir; + + private PackageInstaller(string nugetConfigContents, TaskLoggingHelper logger) + { + _nugetConfigContents = nugetConfigContents; + + _logger = logger; + _tempDir = Path.Combine(Path.GetTempPath(), "install-workload", Path.GetRandomFileName()); + _packagesDir = Path.Combine(_tempDir, "nuget-packages"); + } + + public static bool Install(PackageReference[] references, string nugetConfigContents, TaskLoggingHelper logger, bool stopOnMissing=true) + { + if (!references.Any()) + return true; + + return new PackageInstaller(nugetConfigContents, logger) + .InstallActual(references, stopOnMissing); + } + + private bool InstallActual(PackageReference[] references, bool stopOnMissing) + { + // Restore packages + if (Directory.Exists(_packagesDir)) + { + _logger.LogMessage(MessageImportance.Low, $"Deleting {_packagesDir}"); + Directory.Delete(_packagesDir, recursive: true); + } + + var projecDir = Path.Combine(_tempDir, "restore"); + var projectPath = Path.Combine(projecDir, "Restore.csproj"); + + Directory.CreateDirectory(projecDir); + + File.WriteAllText(Path.Combine(projecDir, "Directory.Build.props"), ""); + File.WriteAllText(Path.Combine(projecDir, "Directory.Build.targets"), ""); + File.WriteAllText(projectPath, GenerateProject(references)); + File.WriteAllText(Path.Combine(projecDir, "nuget.config"), _nugetConfigContents); + + _logger.LogMessage(MessageImportance.Low, $"Restoring packages: {string.Join(", ", references.Select(r => $"{r.Name}/{r.Version}"))}"); + + string args = $"restore \"{projectPath}\" /p:RestorePackagesPath=\"{_packagesDir}\""; + (int exitCode, string output) = Utils.TryRunProcess("dotnet", args, silent: false, debugMessageImportance: MessageImportance.Low); + if (exitCode != 0) + { + LogErrorOrWarning($"Restoring packages failed with exit code: {exitCode}. Output:{Environment.NewLine}{output}", stopOnMissing); + return false; + } + + IList<(PackageReference, string)> failedToRestore = references + .Select(r => (r, Path.Combine(_packagesDir, r.Name.ToLower(), r.Version))) + .Where(tuple => !Directory.Exists(tuple.Item2)) + .ToList(); + + if (failedToRestore.Count > 0) + { + _logger.LogMessage(MessageImportance.Normal, output); + foreach ((PackageReference pkgRef, string pkgDir) in failedToRestore) + LogErrorOrWarning($"Could not restore {pkgRef.Name}/{pkgRef.Version} (can't find {pkgDir})", stopOnMissing); + + return false; + } + + return LayoutPackages(references, stopOnMissing); + } + + private bool LayoutPackages(IEnumerable references, bool stopOnMissing) + { + foreach (var pkgRef in references) + { + var source = Path.Combine(_packagesDir, pkgRef.Name.ToLower(), pkgRef.Version, pkgRef.relativeSourceDir); + if (!Directory.Exists(source)) + { + LogErrorOrWarning($"Failed to restore {pkgRef.Name}/{pkgRef.Version} (could not find {source})", stopOnMissing); + if (stopOnMissing) + return false; + } + else + { + if (!CopyDirectoryAfresh(source, pkgRef.OutputDir) && stopOnMissing) + return false; + } + } + + return true; + } + + private static string GenerateProject(IEnumerable references) + { + StringBuilder projectFileBuilder = new(); + projectFileBuilder.Append(@" + + + net6.0 + + "); + + foreach (var reference in references) + projectFileBuilder.AppendLine($""); + + projectFileBuilder.Append(@" + + +"); + + return projectFileBuilder.ToString(); + } + + private bool CopyDirectoryAfresh(string srcDir, string destDir) + { + try + { + if (Directory.Exists(destDir)) + { + _logger.LogMessage(MessageImportance.Low, $"Deleting {destDir}"); + Directory.Delete(destDir, recursive: true); + } + + _logger.LogMessage(MessageImportance.Low, $"Copying {srcDir} to {destDir}"); + Directory.CreateDirectory(destDir); + Utils.DirectoryCopy(srcDir, destDir); + + return true; + } + catch (Exception ex) + { + _logger.LogError($"Failed while copying {srcDir} => {destDir}: {ex.Message}"); + if (ex is IOException) + return false; + + throw; + } + } + + private void LogErrorOrWarning(string msg, bool stopOnMissing) + { + if (stopOnMissing) + _logger.LogError(msg); + else + _logger.LogWarning(msg); + } + } +} diff --git a/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj b/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj index 328672b45145bc..537418ef31dc6d 100644 --- a/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj +++ b/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj @@ -6,6 +6,8 @@ $(NoWarn),CA1050 + + diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs index 51ad61a76e7997..a8f67d09eb689a 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs @@ -124,9 +124,8 @@ public BuildEnvironment() } } - // FIXME: update these to use Workload variants of the file, with the workload support - protected static string s_directoryBuildPropsForWorkloads = File.ReadAllText(Path.Combine(TestDataPath, "Local.Directory.Build.props")); - protected static string s_directoryBuildTargetsForWorkloads = File.ReadAllText(Path.Combine(TestDataPath, "Local.Directory.Build.targets")); + protected static string s_directoryBuildPropsForWorkloads = File.ReadAllText(Path.Combine(TestDataPath, "Workloads.Directory.Build.props")); + protected static string s_directoryBuildTargetsForWorkloads = File.ReadAllText(Path.Combine(TestDataPath, "Workloads.Directory.Build.targets")); protected static string s_directoryBuildPropsForLocal = File.ReadAllText(Path.Combine(TestDataPath, "Local.Directory.Build.props")); protected static string s_directoryBuildTargetsForLocal = File.ReadAllText(Path.Combine(TestDataPath, "Local.Directory.Build.targets")); diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj b/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj index 0f06b6f08dfe1e..f4c0124ccc6539 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj @@ -28,7 +28,7 @@ - + @@ -40,9 +40,8 @@ - - - + + diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.props b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.props new file mode 100644 index 00000000000000..6d8504088b955a --- /dev/null +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.props @@ -0,0 +1,7 @@ + + + browser-wasm + true + true + + diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.targets b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.targets new file mode 100644 index 00000000000000..19f795a01f2359 --- /dev/null +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.targets @@ -0,0 +1,95 @@ + + + PrepareForWasmBuild;$(WasmBuildAppDependsOn) + <_MicrosoftNetCoreAppRefDir>$(AppRefDir)\ + Microsoft.NETCore.App + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_targetingPackReferenceExclusion Include="$(TargetName)" /> + <_targetingPackReferenceExclusion Include="@(_ResolvedProjectReferencePaths->'%(Filename)')" /> + <_targetingPackReferenceExclusion Include="@(DefaultReferenceExclusion)" /> + + + + <_targetingPackReferenceWithExclusion Include="@(Reference)"> + %(_targetingPackReferenceExclusion.Identity) + + + + + From fa86d41cdd74c9b13a327df87f70e668dbb91a51 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 17:04:36 -0400 Subject: [PATCH 07/24] [wasm] Add support for running Wasm.Build.Tests on windows --- eng/testing/WasmRunnerTemplate.cmd | 4 +- .../Wasm.Build.Tests/Wasm.Build.Tests.csproj | 8 ++- .../data/RunScriptTemplate.cmd | 52 +++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.cmd diff --git a/eng/testing/WasmRunnerTemplate.cmd b/eng/testing/WasmRunnerTemplate.cmd index 63af8f917b8905..603199341a2b08 100644 --- a/eng/testing/WasmRunnerTemplate.cmd +++ b/eng/testing/WasmRunnerTemplate.cmd @@ -5,9 +5,9 @@ set EXECUTION_DIR=%~dp0 set SCENARIO=%3 if [%HELIX_WORKITEM_UPLOAD_ROOT%] == [] ( - set XHARNESS_OUT="%EXECUTION_DIR%xharness-output" + set "XHARNESS_OUT=%EXECUTION_DIR%xharness-output" ) else ( - set XHARNESS_OUT="%HELIX_WORKITEM_UPLOAD_ROOT%\xharness-output" + set "XHARNESS_OUT=%HELIX_WORKITEM_UPLOAD_ROOT%\xharness-output" ) if [%XHARNESS_CLI_PATH%] NEQ [] ( diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj b/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj index f4c0124ccc6539..a5b00d853fa935 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj @@ -17,7 +17,12 @@ - RunScriptTemplate.sh + + + + RunScriptTemplate.cmd + RunScriptTemplate.sh + $(MSBuildThisFileDirectory)data\$(RunScriptInputName) @@ -49,6 +54,7 @@ + diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.cmd b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.cmd new file mode 100644 index 00000000000000..0c2cfd89d1ee7a --- /dev/null +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.cmd @@ -0,0 +1,52 @@ +@echo off +setlocal enabledelayedexpansion + +set EXECUTION_DIR=%~dp0 +set SCENARIO=%3 + +cd %EXECUTION_DIR% + +if [%HELIX_WORKITEM_UPLOAD_ROOT%] == [] ( + set XHARNESS_OUT=%EXECUTION_DIR%xharness-output +) else ( + set XHARNESS_OUT=%HELIX_WORKITEM_UPLOAD_ROOT%\xharness-output +) + +if [%XHARNESS_CLI_PATH%] NEQ [] ( + :: When running in CI, we only have the .NET runtime available + :: We need to call the XHarness CLI DLL directly via dotnet exec + set HARNESS_RUNNER=dotnet.exe exec "%XHARNESS_CLI_PATH%" +) else ( + set HARNESS_RUNNER=dotnet.exe xharness +) + +set TEST_LOG_PATH=%XHARNESS_OUT%\logs + +:: ========================= BEGIN Test Execution ============================= +echo ----- start %DATE% %TIME% =============== To repro directly: ===================================================== +echo pushd %EXECUTION_DIR% +[[RunCommandsEcho]] +echo popd +echo =========================================================================================================== +pushd %EXECUTION_DIR% +@echo on +[[RunCommands]] +set EXIT_CODE=%ERRORLEVEL% +@echo off +popd +echo ----- end %DATE% %TIME% ----- exit code %EXIT_CODE% ---------------------------------------------------------- + +echo XHarness artifacts: %XHARNESS_OUT% + +exit /b %EXIT_CODE% + +REM Functions +:SetEnvVars +if [%TEST_USING_WORKLOADS%] == [true] ( + set "PATH=%BASE_DIR%\dotnet-workload;%PATH%" + set "SDK_FOR_WORKLOAD_TESTING_PATH=%BASE_DIR%\dotnet-workload" + set "AppRefDir=%BASE_DIR%\microsoft.netcore.app.ref" +) else ( + set "WasmBuildSupportDir=%BASE_DIR%\build" +) +EXIT /b 0 From 23c428c818cef82f75d6d1c5748b24b28ef11b1d Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 17:05:54 -0400 Subject: [PATCH 08/24] cleanup --- src/libraries/sendtohelixhelp.proj | 2 +- src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj | 2 +- src/tasks/Common/Utils.cs | 4 ++-- src/tasks/WasmAppBuilder/EmccCompile.cs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 40b16a7515e8b9..04d9ea34150c2e 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -312,7 +312,7 @@ 768968 https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/$(ChromiumRevision)/chrome-linux.zip - https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/$(ChromiumRevision)/chromedriver_linux64.zip + https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/$(ChromiumRevision)/chromedriver_linux64.zip $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'emsdk')) $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'build')) $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(NetCoreAppCurrent)-$(Configuration)')) diff --git a/src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj b/src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj index cdd5e95a4e2108..3a7b66fac7389f 100644 --- a/src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj +++ b/src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj @@ -22,7 +22,7 @@ - diff --git a/src/tasks/Common/Utils.cs b/src/tasks/Common/Utils.cs index ea2aba607dd8e0..7b25107d56f983 100644 --- a/src/tasks/Common/Utils.cs +++ b/src/tasks/Common/Utils.cs @@ -185,12 +185,12 @@ internal static string CreateTemporaryBatchFile(string command) } #if NETCOREAPP - public static void DirectoryCopy(string sourceDir, string destDir, Func predicate) + public static void DirectoryCopy(string sourceDir, string destDir, Func? predicate=null) { string[] files = Directory.GetFiles(sourceDir, "*", SearchOption.AllDirectories); foreach (string file in files) { - if (!predicate(file)) + if (predicate != null && !predicate(file)) continue; string relativePath = Path.GetRelativePath(sourceDir, file); diff --git a/src/tasks/WasmAppBuilder/EmccCompile.cs b/src/tasks/WasmAppBuilder/EmccCompile.cs index 78a6a4b1faa68f..2a8a2f12cbbe00 100644 --- a/src/tasks/WasmAppBuilder/EmccCompile.cs +++ b/src/tasks/WasmAppBuilder/EmccCompile.cs @@ -123,7 +123,7 @@ bool ProcessSourceFile(ITaskItem srcItem) if (exitCode != 0) { - Log.LogError($"Failed to compile {srcFile} -> {objFile}: {output}"); + Log.LogError($"Failed to compile {srcFile} -> {objFile}{Environment.NewLine}{output}"); return false; } @@ -135,7 +135,7 @@ bool ProcessSourceFile(ITaskItem srcItem) } catch (Exception ex) { - Log.LogError($"Failed to compile {srcFile} -> {objFile}: {ex.Message}"); + Log.LogError($"Failed to compile {srcFile} -> {objFile}{Environment.NewLine}{ex.Message}"); return false; } } From d7ad91b4785f8f34bbdaf3152b77fc7081ddd6c3 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 17:06:24 -0400 Subject: [PATCH 09/24] Set PYTHONPATH for emsdk case --- src/mono/wasm/build/EmSdkRepo.Defaults.props | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mono/wasm/build/EmSdkRepo.Defaults.props b/src/mono/wasm/build/EmSdkRepo.Defaults.props index b5d658c152abd9..a25b41ea5b5851 100644 --- a/src/mono/wasm/build/EmSdkRepo.Defaults.props +++ b/src/mono/wasm/build/EmSdkRepo.Defaults.props @@ -38,5 +38,8 @@ + + + From fede43139270840da3e6526bd71efa74f223c34f Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 17:07:44 -0400 Subject: [PATCH 10/24] Testing the build --- eng/pipelines/global-build.yml | 75 - .../libraries/helix-queues-setup.yml | 2 +- eng/pipelines/runtime-linker-tests.yml | 81 - eng/pipelines/runtime-staging.yml | 423 +--- eng/pipelines/runtime.yml | 1759 ++++++++--------- src/libraries/sendtohelixhelp.proj | 2 +- 6 files changed, 950 insertions(+), 1392 deletions(-) delete mode 100644 eng/pipelines/runtime-linker-tests.yml diff --git a/eng/pipelines/global-build.yml b/eng/pipelines/global-build.yml index 289f7d0033e9c2..b79c5aa9f39b9f 100644 --- a/eng/pipelines/global-build.yml +++ b/eng/pipelines/global-build.yml @@ -32,81 +32,6 @@ jobs: # # Build with Release config and Debug runtimeConfiguration # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - windows_x86 - - OSX_x64 - jobParameters: - testGroup: innerloop - nameSuffix: Runtime_Debug - buildArgs: -c release -runtimeConfiguration debug - timeoutInMinutes: 90 - -# -# Build with Release config and runtimeConfiguration with MSBuild generator -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - windows_x86 - jobParameters: - testGroup: innerloop - nameSuffix: MSBuild_CMake - buildArgs: -c Release -msbuild - timeoutInMinutes: 90 - -# -# Build with Debug config and Release runtimeConfiguration -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: debug - platforms: - - Linux_x64 - jobParameters: - testGroup: innerloop - nameSuffix: Runtime_Release - buildArgs: -c debug -runtimeConfiguration release - timeoutInMinutes: 90 - -# -# Build with RuntimeFlavor only. This excercise code paths where only RuntimeFlavor is -# specified. Catches cases where we depend on Configuration also being specified -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: debug - platforms: - - Linux_x64 - jobParameters: - testGroup: innerloop - nameSuffix: RuntimeFlavor_Mono - buildArgs: /p:RuntimeFlavor=Mono - timeoutInMinutes: 90 - -# -# Build Mono + Libraries. This excercises the code path where we build libraries without -# first building CoreCLR -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: debug - platforms: - - windows_x64 - jobParameters: - testGroup: innerloop - nameSuffix: Mono_Libraries - buildArgs: -subset mono+libs /p:RuntimeFlavor=Mono - timeoutInMinutes: 90 - # # Build Libraries AllConfigurations. This exercises the code path where we build libraries for all # configurations on a non Windows operating system. diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 75d6cbd2122170..9a23e783937bce 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -189,6 +189,6 @@ jobs: # WebAssembly windows - ${{ if eq(parameters.platform, 'Browser_wasm_win') }}: - - (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210531091615-f5c7a43 + - (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210629191214-f5c7a43 ${{ insert }}: ${{ parameters.jobParameters }} diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml deleted file mode 100644 index 836b54c849ab5f..00000000000000 --- a/eng/pipelines/runtime-linker-tests.yml +++ /dev/null @@ -1,81 +0,0 @@ -# The purpose of this pipeline is to exercise local developer workflow in the consolidated -# runtime repo. In particular, it is supposed to run the root "build" script just like any -# normal developer normally would and monitor regressions w.r.t. this fundamental scenario. - -trigger: - batch: true - branches: - include: - - main - - release/*.* - paths: - include: - - '*' - exclude: - - eng/Version.Details.xml - - .github/* - - docs/* - - CODE-OF-CONDUCT.md - - CONTRIBUTING.md - - LICENSE.TXT - - PATENTS.TXT - - README.md - - SECURITY.md - - THIRD-PARTY-NOTICES.TXT - -pr: - branches: - include: - - main - - release/*.* - paths: - include: - - '*' - exclude: - - eng/Version.Details.xml - - .github/* - - docs/* - - CODE-OF-CONDUCT.md - - CONTRIBUTING.md - - LICENSE.TXT - - PATENTS.TXT - - README.md - - SECURITY.md - - THIRD-PARTY-NOTICES.TXT - -jobs: -# -# Build Release config vertical for Windows, Linux, Linux musl and OSX -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - windows_x64 - - OSX_x64 - - Linux_x64 - jobParameters: - testGroup: innerloop - timeoutInMinutes: 120 - nameSuffix: Runtime_Release - buildArgs: -s clr+libs -c $(_BuildConfig) - extraStepsTemplate: /eng/pipelines/libraries/execute-trimming-tests-steps.yml - -# -# Build Release config vertical for Browser-wasm -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - Browser_wasm - jobParameters: - testGroup: innerloop - timeoutInMinutes: 120 - nameSuffix: Runtime_Release - buildArgs: -s mono+libs -c $(_BuildConfig) -p:WasmBuildNative=false - extraStepsTemplate: /eng/pipelines/libraries/execute-trimming-tests-steps.yml - extraStepsParameters: - extraTestArgs: '/p:WasmBuildNative=false' diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index f58caca2899de2..3b6a4991f1436f 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -57,302 +57,98 @@ jobs: # # Build the whole product using Mono and run libraries tests # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - iOSSimulator_x64 - - tvOSSimulator_x64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono - buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoForceInterpreter=true - timeoutInMinutes: 180 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - interpreter: true - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['monoContainsChange'], true), - eq(variables['isFullMatrix'], true)) - -# -# MacCatalyst interp - requires AOT Compilation and Interp flags -# Build the whole product using Mono and run libraries tests -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - MacCatalyst_x64 - # don't run tests on MacCatalyst_arm64 PRs until we can get significantly more devices - - ${{ if eq(variables['isFullMatrix'], true) }}: - - MacCatalyst_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono - buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true - timeoutInMinutes: 180 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - interpreter: true - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['monoContainsChange'], true), - eq(variables['isFullMatrix'], true)) - -# -# Build the whole product using Mono and run libraries tests -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - Android_x86 - - Android_x64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono - buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true - timeoutInMinutes: 180 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['monoContainsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #buildConfig: Release + #runtimeFlavor: mono + #platforms: + #- Android_x86 + #- Android_x64 + #- iOSSimulator_x64 + #- tvOSSimulator_x64 + #variables: + ## map dependencies variables to local variables + #- name: librariesContainsChange + #value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + #- name: monoContainsChange + #value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + #jobParameters: + #testGroup: innerloop + #nameSuffix: AllSubsets_Mono + #buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true + #timeoutInMinutes: 180 + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + #eq(variables['isFullMatrix'], true)) + ## extra steps, run tests + #extraStepsTemplate: /eng/pipelines/libraries/helix.yml + #extraStepsParameters: + #creator: dotnet-bot + #testRunNamePrefixSuffix: Mono_$(_BuildConfig) + #condition: >- + #or( + #eq(variables['librariesContainsChange'], true), + #eq(variables['monoContainsChange'], true), + #eq(variables['isFullMatrix'], true)) -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - Android_arm - - Android_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono - buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true - timeoutInMinutes: 180 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) - - # don't run tests on PRs until we can get significantly more devices - ${{ if eq(variables['isFullMatrix'], true) }}: - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['monoContainsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #buildConfig: Release + #platforms: + #- Android_arm + #jobParameters: + #testGroup: innerloop + #nameSuffix: Build_Subset_Mono + #buildArgs: -subset mono+libs # # Build the whole product using Mono and run libraries tests # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - Windows_x64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] - jobParameters: - testScope: innerloop - nameSuffix: AllSubsets_Mono - buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true - timeoutInMinutes: 120 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['monoContainsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #buildConfig: Release + #runtimeFlavor: mono + #platforms: + #- Windows_x64 + #variables: + ## map dependencies variables to local variables + #- name: librariesContainsChange + #value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + #- name: monoContainsChange + #value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + #jobParameters: + #testScope: innerloop + #nameSuffix: AllSubsets_Mono + #buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true + #timeoutInMinutes: 120 + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + #eq(variables['isFullMatrix'], true)) + ## extra steps, run tests + #extraStepsTemplate: /eng/pipelines/libraries/helix.yml + #extraStepsParameters: + #creator: dotnet-bot + #testRunNamePrefixSuffix: Mono_$(_BuildConfig) + #condition: >- + #or( + #eq(variables['librariesContainsChange'], true), + #eq(variables['monoContainsChange'], true), + #eq(variables['isFullMatrix'], true)) # # Build the whole product using Mono for Android and run runtime tests with interpreter # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - Android_x64 - variables: - - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - - name: _HelixSource - value: pr/dotnet/runtime/$(Build.SourceBranch) - - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: - - name: _HelixSource - value: ci/dotnet/runtime/$(Build.SourceBranch) - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_RuntimeTests - buildArgs: -s mono+libs -c $(_BuildConfig) - timeoutInMinutes: 240 - runtimeVariant: monointerpreter - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - -# -# Build the whole product using Mono for Android and run runtime tests with Android devices -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - Android_arm64 - variables: - - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - - name: _HelixSource - value: pr/dotnet/runtime/$(Build.SourceBranch) - - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: - - name: _HelixSource - value: ci/dotnet/runtime/$(Build.SourceBranch) - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_RuntimeTests - buildArgs: -s mono+libs -c $(_BuildConfig) - timeoutInMinutes: 240 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # don't run tests on PRs until we can get significantly more devices - ${{ if eq(variables['isFullMatrix'], true) }}: - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - -# Run disabled installer tests on Linux x64 -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release - platforms: - - Linux_x64 - jobParameters: - nameSuffix: Installer_Tests - isOfficialBuild: ${{ variables.isOfficialBuild }} - buildArgs: -s clr+libs+host+packs -restore -build -test -c $(_BuildConfig) -lc Debug /p:PortableBuild=true /p:RunOnStaging=true - useContinueOnErrorDuringBuild: true - enablePublisTestResults: true - testResultsFormat: xunit - timeoutInMinutes: 90 - # # Build Browser_wasm, on windows # @@ -394,33 +190,32 @@ jobs: eq(variables['librariesContainsChange'], true), eq(variables['monoContainsChange'], true), eq(variables['isFullMatrix'], true)) - # # CoreCLR Build for running Apple Silicon libraries-innerloop # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - buildConfig: release - platforms: - - ${{ if eq(variables['isFullMatrix'], true) }}: - - OSX_arm64 - jobParameters: - testGroup: innerloop -# -# Libraries Build for running Apple Silicon libraries-innerloop -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/build-job.yml - buildConfig: Release - platforms: - - ${{ if eq(variables['isFullMatrix'], true) }}: - - OSX_arm64 - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - jobParameters: - isOfficialBuild: ${{ variables['isOfficialBuild'] }} - isFullMatrix: ${{ variables['isFullMatrix'] }} - runTests: true - testScope: innerloop - liveRuntimeBuildConfig: release +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + #buildConfig: release + #platforms: + #- ${{ if eq(variables['isFullMatrix'], true) }}: + #- OSX_arm64 + #jobParameters: + #testGroup: innerloop +## +## Libraries Build for running Apple Silicon libraries-innerloop +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/build-job.yml + #buildConfig: Release + #platforms: + #- ${{ if eq(variables['isFullMatrix'], true) }}: + #- OSX_arm64 + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #jobParameters: + #isOfficialBuild: ${{ variables['isOfficialBuild'] }} + #isFullMatrix: ${{ variables['isFullMatrix'] }} + #runTests: true + #testScope: innerloop + #liveRuntimeBuildConfig: release diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 931a65a05e11ee..e7ebeb8c9c9bbb 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -60,141 +60,141 @@ jobs: # Build CoreCLR checked # Only when CoreCLR is changed # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - buildConfig: checked - platforms: - - Linux_x64 - - Linux_arm - - Linux_arm64 - - Linux_musl_arm - - Linux_musl_arm64 - - Linux_musl_x64 - - OSX_arm64 - - windows_x86 - - windows_x64 - - windows_arm - - windows_arm64 - jobParameters: - testGroup: innerloop - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + #buildConfig: checked + #platforms: + #- Linux_x64 + #- Linux_arm + #- Linux_arm64 + #- Linux_musl_arm + #- Linux_musl_arm64 + #- Linux_musl_x64 + #- OSX_arm64 + #- windows_x86 + #- windows_x64 + #- windows_arm + #- windows_arm64 + #jobParameters: + #testGroup: innerloop + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# Build CoreCLR checked using GCC toolchain -# Only when CoreCLR is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - buildConfig: checked - platforms: - - Linux_x64 - jobParameters: - testGroup: innerloop - compilerName: gcc - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## Build CoreCLR checked using GCC toolchain +## Only when CoreCLR is changed +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + #buildConfig: checked + #platforms: + #- Linux_x64 + #jobParameters: + #testGroup: innerloop + #compilerName: gcc + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# Build CoreCLR OSX_x64 checked -# Only when CoreCLR or Libraries is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - buildConfig: checked - platforms: - - OSX_x64 - jobParameters: - testGroup: innerloop - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## Build CoreCLR OSX_x64 checked +## Only when CoreCLR or Libraries is changed +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + #buildConfig: checked + #platforms: + #- OSX_x64 + #jobParameters: + #testGroup: innerloop + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# Build CoreCLR release -# Always as they are needed by Installer and we always build and test the Installer. -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - buildConfig: release - platforms: - - OSX_arm64 - - OSX_x64 - - Linux_x64 - - Linux_arm - - Linux_arm64 - - Linux_musl_x64 - - Linux_musl_arm - - Linux_musl_arm64 - - windows_x64 - - windows_x86 - - windows_arm - - windows_arm64 - - FreeBSD_x64 - jobParameters: - testGroup: innerloop +## +## Build CoreCLR release +## Always as they are needed by Installer and we always build and test the Installer. +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + #buildConfig: release + #platforms: + #- OSX_arm64 + #- OSX_x64 + #- Linux_x64 + #- Linux_arm + #- Linux_arm64 + #- Linux_musl_x64 + #- Linux_musl_arm + #- Linux_musl_arm64 + #- windows_x64 + #- windows_x86 + #- windows_arm + #- windows_arm64 + #- FreeBSD_x64 + #jobParameters: + #testGroup: innerloop -# -# Build PGO CoreCLR release -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - buildConfig: release - platforms: - - windows_x64 - - windows_x86 - - Linux_x64 - jobParameters: - testGroup: innerloop - pgoType: 'PGO' +## +## Build PGO CoreCLR release +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + #buildConfig: release + #platforms: + #- windows_x64 + #- windows_x86 + #- Linux_x64 + #jobParameters: + #testGroup: innerloop + #pgoType: 'PGO' # # Build CoreCLR Formatting Job # Only when CoreCLR is changed, and only in the 'main' branch (no release branches; # both CI and PR builds). # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/format-job.yml - platforms: - - Linux_x64 - - windows_x64 - jobParameters: - condition: >- - and( - or( - eq(variables['Build.SourceBranchName'], 'main'), - eq(variables['System.PullRequest.TargetBranch'], 'main')), - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true))) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/coreclr/templates/format-job.yml + #platforms: + #- Linux_x64 + #- windows_x64 + #jobParameters: + #condition: >- + #and( + #or( + #eq(variables['Build.SourceBranchName'], 'main'), + #eq(variables['System.PullRequest.TargetBranch'], 'main')), + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + #eq(variables['isFullMatrix'], true))) # Build and test clr tools -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - buildConfig: checked - platforms: - - Linux_x64 - jobParameters: - testGroup: clrTools - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + #buildConfig: checked + #platforms: + #- Linux_x64 + #jobParameters: + #testGroup: clrTools + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + #eq(variables['isFullMatrix'], true)) # Build Mono AOT offset headers once, for consumption elsewhere # Only when mono changed @@ -204,11 +204,11 @@ jobs: jobTemplate: /eng/pipelines/mono/templates/generate-offsets.yml buildConfig: release platforms: - - Android_x64 + #- Android_x64 - Browser_wasm - - tvOS_arm64 - - iOS_arm64 - - MacCatalyst_x64 + #- tvOS_arm64 + #- iOS_arm64 + #- MacCatalyst_x64 jobParameters: condition: >- or( @@ -219,48 +219,48 @@ jobs: # Build the whole product using Mono runtime # Only when libraries, mono or installer are changed # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - runtimeFlavor: mono - platforms: - - MacCatalyst_x64 - - MacCatalyst_arm64 - - tvOSSimulator_x64 - - iOSSimulator_x86 - - iOS_arm64 - - Linux_arm - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #runtimeFlavor: mono + #platforms: + #- MacCatalyst_x64 + #- MacCatalyst_arm64 + #- tvOSSimulator_x64 + #- iOSSimulator_x86 + #- iOS_arm64 + #- Linux_arm + #jobParameters: + #testGroup: innerloop + #nameSuffix: AllSubsets_Mono + #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - tvOS_arm64 - - iOS_arm - - Linux_musl_x64 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #buildConfig: Release + #runtimeFlavor: mono + #platforms: + #- tvOS_arm64 + #- iOS_arm + #- Linux_musl_x64 + #jobParameters: + #testGroup: innerloop + #nameSuffix: AllSubsets_Mono + #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + #eq(variables['isFullMatrix'], true)) # # Build the whole product using Mono and run libraries tests, multi-scenario @@ -347,69 +347,28 @@ jobs: eq(variables['monoContainsChange'], true), eq(variables['isFullMatrix'], true)) -# -# Build for Browser/wasm with RunAOTCompilation=true -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - Browser_wasm - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_AOT - buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true - timeoutInMinutes: 180 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true - scenarios: - - normal - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['monoContainsChange'], true), - eq(variables['isFullMatrix'], true)) # Build and test libraries under single-file publishing -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - platforms: - - windows_x64 - - Linux_x64 - jobParameters: - testGroup: innerloop - isFullMatrix: ${{ variables.isFullMatrix }} - isSingleFile: true - nameSuffix: SingleFile - buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:TestSingleFile=true /p:ArchiveTests=true - timeoutInMinutes: 120 - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: SingleFile_$(_BuildConfig) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #buildConfig: Release + #platforms: + #- windows_x64 + #- Linux_x64 + #jobParameters: + #testGroup: innerloop + #isFullMatrix: ${{ variables.isFullMatrix }} + #isSingleFile: true + #nameSuffix: SingleFile + #buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:TestSingleFile=true /p:ArchiveTests=true + #timeoutInMinutes: 120 + ## extra steps, run tests + #extraStepsTemplate: /eng/pipelines/libraries/helix.yml + #extraStepsParameters: + #creator: dotnet-bot + #testRunNamePrefixSuffix: SingleFile_$(_BuildConfig) # # Build the whole product using Mono and run runtime tests @@ -452,271 +411,271 @@ jobs: # # Build the whole product using Mono for Android and run runtime tests with Android emulator # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - Android_x64 - variables: - - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - - name: _HelixSource - value: pr/dotnet/runtime/$(Build.SourceBranch) - - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: - - name: _HelixSource - value: ci/dotnet/runtime/$(Build.SourceBranch) - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_RuntimeTests - buildArgs: -s mono+libs -c $(_BuildConfig) - timeoutInMinutes: 240 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + #buildConfig: Release + #runtimeFlavor: mono + #platforms: + #- Android_x64 + #variables: + #- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: + #- name: _HelixSource + #value: pr/dotnet/runtime/$(Build.SourceBranch) + #- ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: + #- name: _HelixSource + #value: ci/dotnet/runtime/$(Build.SourceBranch) + #- name: timeoutPerTestInMinutes + #value: 60 + #- name: timeoutPerTestCollectionInMinutes + #value: 180 + #jobParameters: + #testGroup: innerloop + #nameSuffix: AllSubsets_Mono_RuntimeTests + #buildArgs: -s mono+libs -c $(_BuildConfig) + #timeoutInMinutes: 240 + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(variables['isFullMatrix'], true)) + ## extra steps, run tests + #extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml + #extraStepsParameters: + #creator: dotnet-bot + #testRunNamePrefixSuffix: Mono_$(_BuildConfig) # # Build Mono and Installer on LLVMJIT mode # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - OSX_x64 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_LLVMJIT - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=false - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #buildConfig: Release + #runtimeFlavor: mono + #platforms: + #- OSX_x64 + #jobParameters: + #testGroup: innerloop + #nameSuffix: AllSubsets_Mono_LLVMJIT + #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + #/p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=false + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - runtimeFlavor: mono - platforms: - - Linux_x64 - - Linux_arm64 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_LLVMJIT - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=false - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #runtimeFlavor: mono + #platforms: + #- Linux_x64 + #- Linux_arm64 + #jobParameters: + #testGroup: innerloop + #nameSuffix: AllSubsets_Mono_LLVMJIT + #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + #/p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=false + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + #eq(variables['isFullMatrix'], true)) # # Build Mono and Installer on LLVMAOT mode # +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #buildConfig: Release + #runtimeFlavor: mono + #platforms: + #- Linux_x64 + #- Linux_arm64 + #jobParameters: + #testGroup: innerloop + #nameSuffix: AllSubsets_Mono_LLVMAOT + #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + #/p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + #eq(variables['isFullMatrix'], true)) + +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/global-build-job.yml + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #runtimeFlavor: mono + #platforms: + #- OSX_x64 + #jobParameters: + #testGroup: innerloop + #nameSuffix: AllSubsets_Mono_LLVMAOT + #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + #/p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + #eq(variables['isFullMatrix'], true)) + +# +# Build Mono debug +# Only when libraries or mono changed +# +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/mono/templates/build-job.yml + #runtimeFlavor: mono + #buildConfig: debug + #platforms: + #- OSX_x64 + #- OSX_arm64 + #- Linux_x64 + #- Linux_arm64 + ## - Linux_musl_arm64 + #- windows_x64 + #- windows_x86 + ## - windows_arm + ## - windows_arm64 + #jobParameters: + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(variables['isFullMatrix'], true)) + +# +# Build Mono release AOT cross-compilers +# Only when mono changed +# - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release + jobTemplate: /eng/pipelines/mono/templates/build-job.yml runtimeFlavor: mono + buildConfig: release platforms: - Linux_x64 - - Linux_arm64 + # - Linux_arm64 + # - Linux_musl_arm64 + - Windows_x64 + # - windows_x86 + # - windows_arm + # - windows_arm64 jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_LLVMAOT - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true + runtimeVariant: crossaot + dependsOn: + #- mono_android_offsets + - mono_browser_offsets + monoCrossAOTTargetOS: + #- Android + - Browser condition: >- or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), eq(variables['isFullMatrix'], true)) - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + jobTemplate: /eng/pipelines/mono/templates/build-job.yml runtimeFlavor: mono + buildConfig: release platforms: - OSX_x64 jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_LLVMAOT - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true + runtimeVariant: crossaot + dependsOn: + #- mono_android_offsets + - mono_browser_offsets + #- mono_tvos_offsets + #- mono_ios_offsets + #- mono_maccatalyst_offsets + monoCrossAOTTargetOS: + #- Android + - Browser + #- tvOS + #- iOS + #- MacCatalyst condition: >- or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), eq(variables['isFullMatrix'], true)) # -# Build Mono debug +# Build Mono release # Only when libraries or mono changed # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/mono/templates/build-job.yml - runtimeFlavor: mono - buildConfig: debug - platforms: - - OSX_x64 - - OSX_arm64 - - Linux_x64 - - Linux_arm64 - # - Linux_musl_arm64 - - windows_x64 - - windows_x86 - # - windows_arm - # - windows_arm64 - jobParameters: - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(variables['isFullMatrix'], true)) - -# -# Build Mono release AOT cross-compilers -# Only when mono changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/mono/templates/build-job.yml - runtimeFlavor: mono - buildConfig: release - platforms: - - Linux_x64 - # - Linux_arm64 - # - Linux_musl_arm64 - - Windows_x64 - # - windows_x86 - # - windows_arm - # - windows_arm64 - jobParameters: - runtimeVariant: crossaot - dependsOn: - - mono_android_offsets - - mono_browser_offsets - monoCrossAOTTargetOS: - - Android - - Browser - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) - -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/mono/templates/build-job.yml - runtimeFlavor: mono - buildConfig: release - platforms: - - OSX_x64 - jobParameters: - runtimeVariant: crossaot - dependsOn: - - mono_android_offsets - - mono_browser_offsets - - mono_tvos_offsets - - mono_ios_offsets - - mono_maccatalyst_offsets - monoCrossAOTTargetOS: - - Android - - Browser - - tvOS - - iOS - - MacCatalyst - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isFullMatrix'], true)) - -# -# Build Mono release -# Only when libraries or mono changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/mono/templates/build-job.yml - runtimeFlavor: mono - buildConfig: release - platforms: - - Linux_x64 - # - Linux_musl_arm64 - - windows_x64 - - windows_x86 - # - windows_arm - # - windows_arm64 - jobParameters: - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/mono/templates/build-job.yml + #runtimeFlavor: mono + #buildConfig: release + #platforms: + #- Linux_x64 + ## - Linux_musl_arm64 + #- windows_x64 + #- windows_x86 + ## - windows_arm + ## - windows_arm64 + #jobParameters: + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(variables['isFullMatrix'], true)) # # Build Mono release # Only when libraries, mono, or the runtime tests changed # Currently only these architectures are needed for the runtime tests. -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/mono/templates/build-job.yml - runtimeFlavor: mono - buildConfig: release - platforms: - - OSX_x64 - - Linux_arm64 - jobParameters: - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/mono/templates/build-job.yml + #runtimeFlavor: mono + #buildConfig: release + #platforms: + #- OSX_x64 + #- Linux_arm64 + #jobParameters: + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(variables['isFullMatrix'], true)) # # Build Mono release with LLVM AOT # Only when mono, or the runtime tests changed # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/mono/templates/build-job.yml - runtimeFlavor: mono - buildConfig: release - platforms: - - Linux_x64 - - Linux_arm64 - jobParameters: - runtimeVariant: llvmaot - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/mono/templates/build-job.yml + #runtimeFlavor: mono + #buildConfig: release + #platforms: + #- Linux_x64 + #- Linux_arm64 + #jobParameters: + #runtimeVariant: llvmaot + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(variables['isFullMatrix'], true)) # # Build libraries using live CoreLib @@ -724,509 +683,469 @@ jobs: # The reason for that is because Corelib and Installer needs it and # These are part of the test matrix for Libraries changes. # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/build-job.yml - buildConfig: Release - platforms: - - Linux_arm - - Linux_musl_arm - - Linux_musl_arm64 - - windows_arm - - windows_arm64 - - windows_x86 - jobParameters: - liveRuntimeBuildConfig: release +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/build-job.yml + #buildConfig: Release + #platforms: + #- Linux_arm + #- Linux_musl_arm + #- Linux_musl_arm64 + #- windows_arm + #- windows_arm64 + #- windows_x86 + #jobParameters: + #liveRuntimeBuildConfig: release -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - Linux_arm64 - - Linux_musl_x64 - - Linux_x64 - - OSX_arm64 - - OSX_x64 - - windows_x64 - - FreeBSD_x64 - jobParameters: - testScope: innerloop - testBuildPlatforms: - - Linux_x64 - - windows_x64 - - OSX_x64 - liveRuntimeBuildConfig: release +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/build-job.yml + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #platforms: + #- Linux_arm64 + #- Linux_musl_x64 + #- Linux_x64 + #- OSX_arm64 + #- OSX_x64 + #- windows_x64 + #- FreeBSD_x64 + #jobParameters: + #testScope: innerloop + #testBuildPlatforms: + #- Linux_x64 + #- windows_x64 + #- OSX_x64 + #liveRuntimeBuildConfig: release # # Libraries Build that only run when libraries is changed # -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - ${{ if eq(variables['isFullMatrix'], false) }}: - - windows_x86 - jobParameters: - liveRuntimeBuildConfig: release - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/build-job.yml + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #platforms: + #- ${{ if eq(variables['isFullMatrix'], false) }}: + #- windows_x86 + #jobParameters: + #liveRuntimeBuildConfig: release + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/build-job.yml - buildConfig: Release - platforms: - - windows_x86 - - ${{ if eq(variables['isFullMatrix'], true) }}: - - windows_x64 - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - jobParameters: - isFullMatrix: ${{ variables.isFullMatrix }} - framework: net48 - runTests: true - testScope: innerloop - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/build-job.yml + #buildConfig: Release + #platforms: + #- windows_x86 + #- ${{ if eq(variables['isFullMatrix'], true) }}: + #- windows_x64 + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #jobParameters: + #isFullMatrix: ${{ variables.isFullMatrix }} + #framework: net48 + #runTests: true + #testScope: innerloop + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - windows_x64 - jobParameters: - isFullMatrix: ${{ variables.isFullMatrix }} - framework: allConfigurations - runTests: true - useHelix: false - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/build-job.yml + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #platforms: + #- windows_x64 + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #jobParameters: + #isFullMatrix: ${{ variables.isFullMatrix }} + #framework: allConfigurations + #runTests: true + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(variables['isFullMatrix'], true)) # # Installer Build and Test # These are always built since they only take like 15 minutes # we expect these to be done before we finish libraries or coreclr testing. # -- template: /eng/pipelines/installer/installer-matrix.yml - parameters: - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - Linux_arm - - Linux_musl_arm - - Linux_musl_arm64 - - windows_x86 - - windows_arm - - windows_arm64 - jobParameters: - liveRuntimeBuildConfig: release - liveLibrariesBuildConfig: Release +#- template: /eng/pipelines/installer/installer-matrix.yml + #parameters: + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #platforms: + #- Linux_arm + #- Linux_musl_arm + #- Linux_musl_arm64 + #- windows_x86 + #- windows_arm + #- windows_arm64 + #jobParameters: + #liveRuntimeBuildConfig: release + #liveLibrariesBuildConfig: Release -- template: /eng/pipelines/installer/installer-matrix.yml - parameters: - buildConfig: Release - platforms: - - OSX_arm64 - - OSX_x64 - - Linux_x64 - - Linux_arm64 - - Linux_musl_x64 - - windows_x64 - - FreeBSD_x64 - jobParameters: - liveRuntimeBuildConfig: release - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} +#- template: /eng/pipelines/installer/installer-matrix.yml + #parameters: + #buildConfig: Release + #platforms: + #- OSX_arm64 + #- OSX_x64 + #- Linux_x64 + #- Linux_arm64 + #- Linux_musl_x64 + #- windows_x64 + #- FreeBSD_x64 + #jobParameters: + #liveRuntimeBuildConfig: release + #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} -# -# PGO Build -# -- template: /eng/pipelines/installer/installer-matrix.yml - parameters: - buildConfig: Release - jobParameters: - isOfficialBuild: ${{ variables.isOfficialBuild }} - liveRuntimeBuildConfig: release - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - pgoType: 'PGO' - platforms: - - windows_x64 - - windows_x86 - - Linux_x64 +## +## PGO Build +## +#- template: /eng/pipelines/installer/installer-matrix.yml + #parameters: + #buildConfig: Release + #jobParameters: + #isOfficialBuild: ${{ variables.isOfficialBuild }} + #liveRuntimeBuildConfig: release + #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #pgoType: 'PGO' + #platforms: + #- windows_x64 + #- windows_x86 + #- Linux_x64 -# -# Crossgen-comparison jobs -# Only when CoreCLR is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/crossgen-comparison-job.yml - buildConfig: checked - platforms: - - Linux_arm - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - liveLibrariesBuildConfig: Release - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## Crossgen-comparison jobs +## Only when CoreCLR is changed +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/coreclr/templates/crossgen-comparison-job.yml + #buildConfig: checked + #platforms: + #- Linux_arm + #helixQueueGroup: pr + #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + #jobParameters: + #liveLibrariesBuildConfig: Release + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# CoreCLR Test builds using live libraries release build -# Only when CoreCLR is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml - buildConfig: checked - platforms: - - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## CoreCLR Test builds using live libraries release build +## Only when CoreCLR is changed +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + #buildConfig: checked + #platforms: + #- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + #jobParameters: + #testGroup: innerloop + #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# CoreCLR Test executions using live libraries -# Only when CoreCLR is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: checked - platforms: - - Linux_arm - - windows_x86 - - windows_arm64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## CoreCLR Test executions using live libraries +## Only when CoreCLR is changed +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + #buildConfig: checked + #platforms: + #- Linux_arm + #- windows_x86 + #- windows_arm64 + #helixQueueGroup: pr + #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + #jobParameters: + #testGroup: innerloop + #liveLibrariesBuildConfig: Release + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: checked - platforms: - - OSX_x64 - - Linux_x64 - - Linux_arm64 - - windows_x64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + #buildConfig: checked + #platforms: + #- OSX_x64 + #- Linux_x64 + #- Linux_arm64 + #- windows_x64 + #helixQueueGroup: pr + #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + #jobParameters: + #testGroup: innerloop + #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: checked - platforms: - - OSX_arm64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr_AppleSilicon.containsChange'], true), - eq(variables['isFullMatrix'], true)) +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + #buildConfig: checked + #platforms: + #- OSX_arm64 + #helixQueueGroup: pr + #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + #jobParameters: + #testGroup: innerloop + #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr_AppleSilicon.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# Mono Test builds with CoreCLR runtime tests using live libraries debug build -# Only when Mono is changed -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - liveRuntimeBuildConfig: release - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## Mono Test builds with CoreCLR runtime tests using live libraries debug build +## Only when Mono is changed +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + #buildConfig: release + #runtimeFlavor: mono + #platforms: + #- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + #jobParameters: + #testGroup: innerloop + #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #liveRuntimeBuildConfig: release + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# Mono CoreCLR runtime Test executions using live libraries in jit mode -# Only when Mono is changed -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - OSX_x64 - - Linux_arm64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - liveRuntimeBuildConfig: release - runtimeVariant: minijit - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## Mono CoreCLR runtime Test executions using live libraries +## Only when Mono is changed +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + #buildConfig: release + #runtimeFlavor: mono + #platforms: + #- OSX_x64 + #- Linux_arm64 + #helixQueueGroup: pr + #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + #jobParameters: + #testGroup: innerloop + #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #liveRuntimeBuildConfig: release + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(variables['isFullMatrix'], true)) +## +## Mono CoreCLR runtime Test executions using live libraries and LLVM AOT +## Only when Mono is changed +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + #buildConfig: release + #runtimeFlavor: mono + #platforms: + #- Linux_x64 + #- Linux_arm64 + #helixQueueGroup: pr + #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + #jobParameters: + #testGroup: innerloop + #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #liveRuntimeBuildConfig: release + #runtimeVariant: llvmaot + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# Mono CoreCLR runtime Test executions using live libraries in interpreter mode -# Only when Mono is changed -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - OSX_x64 - - Linux_arm64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - liveRuntimeBuildConfig: release - runtimeVariant: monointerpreter - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isFullMatrix'], true)) -# -# Mono CoreCLR runtime Test executions using live libraries and LLVM AOT -# Only when Mono is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - Linux_x64 - - Linux_arm64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - liveRuntimeBuildConfig: release - runtimeVariant: llvmaot - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## Libraries Release Test Execution against a release mono runtime. +## Only when libraries or mono changed +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/run-test-job.yml + #runtimeFlavor: mono + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #platforms: + ## - windows_x64 + #- OSX_x64 + #- Linux_arm64 + #- Linux_x64 + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #jobParameters: + #isOfficialBuild: false + #isFullMatrix: ${{ variables.isFullMatrix }} + #runtimeDisplayName: mono + #testScope: innerloop + #liveRuntimeBuildConfig: release + #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + #dependsOnTestArchitecture: x64 + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# Libraries Release Test Execution against a release mono runtime. -# Only when libraries or mono changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - runtimeFlavor: mono - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - # - windows_x64 - - OSX_x64 - - Linux_arm64 - - Linux_x64 - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - jobParameters: - isOfficialBuild: false - isFullMatrix: ${{ variables.isFullMatrix }} - runtimeDisplayName: mono - testScope: innerloop - liveRuntimeBuildConfig: release - dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - dependsOnTestArchitecture: x64 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## Libraries Release Test Execution against a release mono interpreter runtime. +## Only when libraries or mono changed +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/run-test-job.yml + #runtimeFlavor: mono + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #platforms: + ## - windows_x64 + ##- OSX_x64 + #- Linux_x64 + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #jobParameters: + #isOfficialBuild: false + #isFullMatrix: ${{ variables.isFullMatrix }} + #interpreter: true + #runtimeDisplayName: mono_interpreter + #testScope: innerloop + #liveRuntimeBuildConfig: release + #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + #dependsOnTestArchitecture: x64 + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# Libraries Release Test Execution against a release mono interpreter runtime. -# Only when libraries or mono changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - runtimeFlavor: mono - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - # - windows_x64 +## +## Libraries Release Test Execution against a release coreclr runtime +## Only when the PR contains a libraries change +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/run-test-job.yml + #buildConfig: Release + #platforms: + #- windows_x86 + #- ${{ if eq(variables['isFullMatrix'], true) }}: + #- windows_arm64 + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #jobParameters: + #isOfficialBuild: false + #isFullMatrix: ${{ variables.isFullMatrix }} + #testScope: innerloop + #liveRuntimeBuildConfig: release + #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + #dependsOnTestArchitecture: x64 + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(variables['isFullMatrix'], true)) + +## +## Libraries Debug Test Execution against a release coreclr runtime +## Only when the PR contains a libraries change +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/run-test-job.yml + #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + #platforms: + #- windows_x64 #- OSX_x64 - - Linux_x64 - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - jobParameters: - isOfficialBuild: false - isFullMatrix: ${{ variables.isFullMatrix }} - interpreter: true - runtimeDisplayName: mono_interpreter - testScope: innerloop - liveRuntimeBuildConfig: release - dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - dependsOnTestArchitecture: x64 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(variables['isFullMatrix'], true)) + #- Linux_x64 + #- Linux_musl_x64 + #- ${{ if eq(variables['isFullMatrix'], true) }}: + #- Linux_arm64 + #- ${{ if eq(variables['isFullMatrix'], false) }}: + #- windows_x86 + #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + #jobParameters: + #isOfficialBuild: false + #isFullMatrix: ${{ variables.isFullMatrix }} + #testScope: innerloop + #liveRuntimeBuildConfig: release + #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + #dependsOnTestArchitecture: x64 + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(variables['isFullMatrix'], true)) -# -# Libraries Release Test Execution against a release coreclr runtime -# Only when the PR contains a libraries change -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: Release - platforms: - - windows_x86 - - ${{ if eq(variables['isFullMatrix'], true) }}: - - windows_arm64 - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - jobParameters: - isOfficialBuild: false - isFullMatrix: ${{ variables.isFullMatrix }} - testScope: innerloop - liveRuntimeBuildConfig: release - dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - dependsOnTestArchitecture: x64 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isFullMatrix'], true)) +## +## Libraries Test Execution against a checked runtime +## Only when the PR contains a coreclr change +## +#- template: /eng/pipelines/common/platform-matrix.yml + #parameters: + #jobTemplate: /eng/pipelines/libraries/run-test-job.yml + #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + #dependsOnTestArchitecture: x64 + #condition: >- + #or( + #eq(variables['isFullMatrix'], true)) -# -# Libraries Debug Test Execution against a release coreclr runtime -# Only when the PR contains a libraries change -# +## +## Libraries Test Execution against a checked runtime - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - windows_x64 - - OSX_x64 - - Linux_x64 - - Linux_musl_x64 - - ${{ if eq(variables['isFullMatrix'], true) }}: - - Linux_arm64 - - ${{ if eq(variables['isFullMatrix'], false) }}: - - windows_x86 + jobTemplate: /eng/pipelines/common/global-build-job.yml helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - jobParameters: - isOfficialBuild: false - isFullMatrix: ${{ variables.isFullMatrix }} - testScope: innerloop - liveRuntimeBuildConfig: release - dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - dependsOnTestArchitecture: x64 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isFullMatrix'], true)) - -# -# Libraries Test Execution against a checked runtime -# Only when the PR contains a coreclr change -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml buildConfig: Release + runtimeFlavor: mono platforms: - # - windows_arm return this when https://github.com/dotnet/runtime/issues/1097 is fixed. - - Linux_arm - - Linux_musl_arm - - Linux_musl_arm64 - - windows_x86 - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - helixQueueGroup: libraries - jobParameters: - testScope: innerloop - liveRuntimeBuildConfig: checked - dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - dependsOnTestArchitecture: x64 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true)) - -# -# Libraries Test Execution against a checked runtime -# Only if CoreCLR or Libraries is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - windows_x64 - - Linux_x64 - - Linux_musl_x64 - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - helixQueueGroup: libraries - jobParameters: - testScope: innerloop - liveRuntimeBuildConfig: checked - dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - dependsOnTestArchitecture: x64 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true)) - -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - OSX_x64 - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - helixQueueGroup: libraries + - Browser_wasm + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] jobParameters: - testScope: innerloop - liveRuntimeBuildConfig: checked - dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - dependsOnTestArchitecture: x64 - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isFullMatrix'], true)) + testGroup: innerloop + nameSuffix: AllSubsets_Mono_AOT + buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true + timeoutInMinutes: 180 + #condition: >- + #or( + #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + #eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true + scenarios: + - normal + #condition: >- + #or( + #eq(variables['librariesContainsChange'], true), + #eq(variables['monoContainsChange'], true), + #eq(variables['isFullMatrix'], true)) diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 04d9ea34150c2e..4fa606d7d9ee2c 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -29,7 +29,7 @@ <_workItemTimeout Condition="'$(_workItemTimeout)' == '' and ('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'Android')">00:30:00 <_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">00:45:00 <_workItemTimeout Condition="'$(Scenario)' != '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">01:00:00 - <_workItemTimeout Condition="'$(Scenario)' == 'BuildWasmApps' and '$(_workItemTimeout)' == ''">01:00:00 + <_workItemTimeout Condition="'$(Scenario)' == 'BuildWasmApps' and '$(_workItemTimeout)' == ''">01:30:00 <_workItemTimeout Condition="'$(TargetOS)' == 'Browser' and '$(NeedsToBuildWasmAppsOnHelix)' == 'true'">01:00:00 <_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and '$(Outerloop)' == 'true'">00:20:00 <_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == ''">00:15:00 From 2282814a5a32bb14ac874cde79f3247036cf5f1a Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 17:59:30 -0400 Subject: [PATCH 11/24] Add missing EnvironmentVariables.cs --- .../Wasm.Build.Tests/EnvironmentVariables.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/tests/BuildWasmApps/Wasm.Build.Tests/EnvironmentVariables.cs diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/EnvironmentVariables.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/EnvironmentVariables.cs new file mode 100644 index 00000000000000..5ab3ad4108cabd --- /dev/null +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/EnvironmentVariables.cs @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +#nullable enable + +namespace Wasm.Build.Tests +{ + internal static class EnvironmentVariables + { + internal static readonly string? SdkForWorkloadTestingPath = Environment.GetEnvironmentVariable("SDK_FOR_WORKLOAD_TESTING_PATH"); + internal static readonly string? WorkloadPacksVersion = Environment.GetEnvironmentVariable("WORKLOAD_PACKS_VER"); + internal static readonly string? AppRefDir = Environment.GetEnvironmentVariable("AppRefDir"); + internal static readonly string? WasmBuildSupportDir = Environment.GetEnvironmentVariable("WasmBuildSupportDir"); + internal static readonly string? EMSDK_PATH = Environment.GetEnvironmentVariable("EMSDK_PATH"); + internal static readonly string? TestLogPath = Environment.GetEnvironmentVariable("TEST_LOG_PATH"); + internal static readonly string? SkipProjectCleanup = Environment.GetEnvironmentVariable("SKIP_PROJECT_CLEANUP"); + internal static readonly string? XHarnessCliPath = Environment.GetEnvironmentVariable("XHARNESS_CLI_PATH"); + } +} From 0f13abc9f24e0e081168be74836ae21be2e8666e Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 18:28:44 -0400 Subject: [PATCH 12/24] Add doc for workloads testing --- docs/workflow/testing/testing-workloads.md | 28 +++++++++++++++++++ .../BuildWasmApps/Wasm.Build.Tests/README.md | 19 +++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 docs/workflow/testing/testing-workloads.md create mode 100644 src/tests/BuildWasmApps/Wasm.Build.Tests/README.md diff --git a/docs/workflow/testing/testing-workloads.md b/docs/workflow/testing/testing-workloads.md new file mode 100644 index 00000000000000..cb03515554a01e --- /dev/null +++ b/docs/workflow/testing/testing-workloads.md @@ -0,0 +1,28 @@ +# Testing Workloads + +Workloads based on packages in `artifacts` can be installed, and used for testing. + +- This is done by installing a specified SDK version (`$(SdkVersionForWorkloadTesting)`) in `artifacts/bin/dotnet-workload`. +- Then the manifest for the workload in `@(WorkloadIdForTesting)` is installed + - Then workload packs are installed + - packs, or manifests not generated by `runtime`, are restored from nuget + +- The SDK is installed by `ProvisionSdkForWorkloadTesting` target +- and the workload is installed by `InstallWorkloadUsingArtifacts` target, using the `InstallWorkloadFromArtifacts` task + +- `@(WorkloadIdForTesting)`: + +Example for wasm: +```xml + +``` + +- Currently, this is used only by `src/tests/BuildWasmApps/Wasm.Build.Tests` + +## Limitations: + +- The cross compiler package is built manually from the `InstallWorkloadUsingArtifacts` target diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/README.md b/src/tests/BuildWasmApps/Wasm.Build.Tests/README.md new file mode 100644 index 00000000000000..4f0be0c3672412 --- /dev/null +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/README.md @@ -0,0 +1,19 @@ +# Wasm.Build.Tests + +Contains tests for wasm project builds, eg. for aot, relinking, globalization +etc. The intent is to check if the build inputs result in a correct app bundle +being generated. + +- When running locally, it tests against a local workload install (based on `artifacts`) + - but this can be turned off with `/p:TestUsingWorkloads=false` + - in which case, it will run against `emsdk` from `EMSDK_PATH` + +- On CI, both workload, and emsdk cases are tested + +- Running: + +Linux/macOS: `$ make -C src/mono/wasm run-build-tests` +Windows: `.\dotnet.cmd build .\src\tests\BuildWasmApps\Wasm.Build.Tests\Wasm.Build.Tests.csproj -c Release -t:Test -p:TargetOS=Browser -p:TargetArchitecture=wasm` + +- Specific tests can be run via `XUnitClassName`, and `XUnitMethodName` + - eg. `XUnitClassName=Wasm.Build.Tests.BlazorWasmTests` From 0a6532ae37acd8f28f443aa82c5cb8d8774d3ec4 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 19:22:27 -0400 Subject: [PATCH 13/24] cleanup --- eng/testing/tests.wasm.targets | 1 - src/libraries/sendtohelixhelp.proj | 2 ++ src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs | 4 +--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index ae9f6bcdffcaff..16edf35847b833 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -62,7 +62,6 @@ diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 4fa606d7d9ee2c..cd0039658b3103 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -413,6 +413,8 @@ + + diff --git a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs index 348f539381e98a..55b669d17e43e5 100644 --- a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs +++ b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs @@ -66,7 +66,7 @@ public override bool Execute() debugMessageImportance: MessageImportance.High); if (exitCode != 0) { - Log.LogError($"workload install failed: {output}"); + Log.LogError($"workload install failed"); return false; } @@ -114,8 +114,6 @@ private bool InstallWorkloadManifest(string name, string version, string nugetCo if (!PackageInstaller.Install(new[]{ pkgRef }, nugetConfigContents, Log, stopOnMissing)) return false; - Log.LogMessage(MessageImportance.High, $"\t=> {pkgRef.OutputDir}"); - string manifestDir = pkgRef.OutputDir; string jsonPath = Path.Combine(manifestDir, "WorkloadManifest.json"); if (!File.Exists(jsonPath)) From df94014f614f46a59120ff6e24b594a883fc8376 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 19:42:17 -0400 Subject: [PATCH 14/24] Log directories in the dotnet sdk-manifests, and packs dir if installation fails --- .../InstallWorkloadFromArtifacts.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs index 55b669d17e43e5..43208942c1553f 100644 --- a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs +++ b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs @@ -60,13 +60,20 @@ public override bool Execute() Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** workload install **{Environment.NewLine}"); (int exitCode, string output) = Utils.TryRunProcess( Path.Combine(SdkDir, "dotnet"), - $"workload install --skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {WorkloadId.ItemSpec}", + $"workload install -sdqoweiu-skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {WorkloadId.ItemSpec}", workingDir: Path.GetTempPath(), silent: false, debugMessageImportance: MessageImportance.High); if (exitCode != 0) { - Log.LogError($"workload install failed"); + Log.LogError($"workload install failed: {output}"); + + foreach (var dir in Directory.EnumerateDirectories(Path.Combine(SdkDir, "sdk-manifests"), "*", SearchOption.AllDirectories)) + Log.LogMessage(MessageImportance.Low, $"\t{Path.Combine(SdkDir, "sdk-manifests", dir)}"); + + foreach (var dir in Directory.EnumerateDirectories(Path.Combine(SdkDir, "packs"), "*", SearchOption.AllDirectories)) + Log.LogMessage(MessageImportance.Low, $"\t{Path.Combine(SdkDir, "packs", dir)}"); + return false; } From dd92d283daed1c3f2e2421006368f6197a9c3779 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 20:44:39 -0400 Subject: [PATCH 15/24] Fix typo --- src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs index 43208942c1553f..6f774df93101f4 100644 --- a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs +++ b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs @@ -60,7 +60,7 @@ public override bool Execute() Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** workload install **{Environment.NewLine}"); (int exitCode, string output) = Utils.TryRunProcess( Path.Combine(SdkDir, "dotnet"), - $"workload install -sdqoweiu-skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {WorkloadId.ItemSpec}", + $"workload install -skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {WorkloadId.ItemSpec}", workingDir: Path.GetTempPath(), silent: false, debugMessageImportance: MessageImportance.High); From 5d897b841ba2a8a789df2a1fda81a4cd5fd2c13d Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 12 Jul 2021 21:56:19 -0400 Subject: [PATCH 16/24] fix typo --- src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs index 6f774df93101f4..c76659d5db3a01 100644 --- a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs +++ b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs @@ -60,7 +60,7 @@ public override bool Execute() Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** workload install **{Environment.NewLine}"); (int exitCode, string output) = Utils.TryRunProcess( Path.Combine(SdkDir, "dotnet"), - $"workload install -skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {WorkloadId.ItemSpec}", + $"workload install --skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {WorkloadId.ItemSpec}", workingDir: Path.GetTempPath(), silent: false, debugMessageImportance: MessageImportance.High); From 1dbae8017dd4e3fb2f6f2a4c04ad5c38fd756c95 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 13 Jul 2021 00:11:37 -0400 Subject: [PATCH 17/24] Fix skipping tests on windows --- src/libraries/sendtohelixhelp.proj | 2 -- .../BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs | 11 ----------- .../Wasm.Build.Tests/Wasm.Build.Tests.csproj | 3 +++ 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index cd0039658b3103..4fa606d7d9ee2c 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -413,8 +413,6 @@ - - diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs index d740c626888f88..681a49696d3c3d 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs @@ -57,18 +57,7 @@ static BuildTestBase() if (!string.IsNullOrEmpty(nugetPackagesPath)) { if (!Directory.Exists(nugetPackagesPath)) - { Directory.CreateDirectory(nugetPackagesPath); - Console.WriteLine ($"-- Created {nugetPackagesPath}"); - } - else - { - Console.WriteLine ($"-- already exists {nugetPackagesPath}"); - } - } - else - { - Console.WriteLine ($"-- NUGET_PACKAGES envvar was empty"); } Console.WriteLine (""); diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj b/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj index a5b00d853fa935..d6709715ef0451 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj @@ -65,6 +65,9 @@ $(RunScriptCommand) -method $(XUnitMethodName) $(RunScriptCommand) -class $(XUnitClassName) + + + $(RunScriptCommand) -notrait category=IgnoreForCI -notrait category=failing From cc382683f98fd9db0b3b21dfe8bb9ad3b4f49148 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 13 Jul 2021 00:26:23 -0400 Subject: [PATCH 18/24] Add a prefix to helix jobs for wasm.build.tests --- src/libraries/sendtohelixhelp.proj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 4fa606d7d9ee2c..572481d7ccb806 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -317,6 +317,8 @@ $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'build')) $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(NetCoreAppCurrent)-$(Configuration)')) $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'RemoteLoopServer', '$(NetCoreAppCurrent)-$(Configuration)')) + Workloads/ + EMSDK/ @@ -375,7 +377,7 @@ <_WorkItem Include="$(TestArchiveRoot)runonly/**/WebAssembly.Browser.*.Test.zip" Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' == 'WasmTestOnBrowser'" /> <_WorkItem Include="$(TestArchiveRoot)browseronly/**/*.zip" Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' == 'WasmTestOnBrowser'" /> - + %(Identity) $(HelixCommand) $(_workItemTimeout) From 364dc80127e2dbe26fffd933cb511a0d41efcd29 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 13 Jul 2021 00:27:51 -0400 Subject: [PATCH 19/24] re-enable all the jobs --- eng/pipelines/global-build.yml | 75 + .../libraries/helix-queues-setup.yml | 2 +- eng/pipelines/runtime-linker-tests.yml | 81 + eng/pipelines/runtime-staging.yml | 423 +++- eng/pipelines/runtime.yml | 1761 +++++++++-------- 5 files changed, 1392 insertions(+), 950 deletions(-) create mode 100644 eng/pipelines/runtime-linker-tests.yml diff --git a/eng/pipelines/global-build.yml b/eng/pipelines/global-build.yml index b79c5aa9f39b9f..289f7d0033e9c2 100644 --- a/eng/pipelines/global-build.yml +++ b/eng/pipelines/global-build.yml @@ -32,6 +32,81 @@ jobs: # # Build with Release config and Debug runtimeConfiguration # +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - windows_x86 + - OSX_x64 + jobParameters: + testGroup: innerloop + nameSuffix: Runtime_Debug + buildArgs: -c release -runtimeConfiguration debug + timeoutInMinutes: 90 + +# +# Build with Release config and runtimeConfiguration with MSBuild generator +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - windows_x86 + jobParameters: + testGroup: innerloop + nameSuffix: MSBuild_CMake + buildArgs: -c Release -msbuild + timeoutInMinutes: 90 + +# +# Build with Debug config and Release runtimeConfiguration +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: debug + platforms: + - Linux_x64 + jobParameters: + testGroup: innerloop + nameSuffix: Runtime_Release + buildArgs: -c debug -runtimeConfiguration release + timeoutInMinutes: 90 + +# +# Build with RuntimeFlavor only. This excercise code paths where only RuntimeFlavor is +# specified. Catches cases where we depend on Configuration also being specified +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: debug + platforms: + - Linux_x64 + jobParameters: + testGroup: innerloop + nameSuffix: RuntimeFlavor_Mono + buildArgs: /p:RuntimeFlavor=Mono + timeoutInMinutes: 90 + +# +# Build Mono + Libraries. This excercises the code path where we build libraries without +# first building CoreCLR +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: debug + platforms: + - windows_x64 + jobParameters: + testGroup: innerloop + nameSuffix: Mono_Libraries + buildArgs: -subset mono+libs /p:RuntimeFlavor=Mono + timeoutInMinutes: 90 + # # Build Libraries AllConfigurations. This exercises the code path where we build libraries for all # configurations on a non Windows operating system. diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 9a23e783937bce..75d6cbd2122170 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -189,6 +189,6 @@ jobs: # WebAssembly windows - ${{ if eq(parameters.platform, 'Browser_wasm_win') }}: - - (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210629191214-f5c7a43 + - (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210531091615-f5c7a43 ${{ insert }}: ${{ parameters.jobParameters }} diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml new file mode 100644 index 00000000000000..836b54c849ab5f --- /dev/null +++ b/eng/pipelines/runtime-linker-tests.yml @@ -0,0 +1,81 @@ +# The purpose of this pipeline is to exercise local developer workflow in the consolidated +# runtime repo. In particular, it is supposed to run the root "build" script just like any +# normal developer normally would and monitor regressions w.r.t. this fundamental scenario. + +trigger: + batch: true + branches: + include: + - main + - release/*.* + paths: + include: + - '*' + exclude: + - eng/Version.Details.xml + - .github/* + - docs/* + - CODE-OF-CONDUCT.md + - CONTRIBUTING.md + - LICENSE.TXT + - PATENTS.TXT + - README.md + - SECURITY.md + - THIRD-PARTY-NOTICES.TXT + +pr: + branches: + include: + - main + - release/*.* + paths: + include: + - '*' + exclude: + - eng/Version.Details.xml + - .github/* + - docs/* + - CODE-OF-CONDUCT.md + - CONTRIBUTING.md + - LICENSE.TXT + - PATENTS.TXT + - README.md + - SECURITY.md + - THIRD-PARTY-NOTICES.TXT + +jobs: +# +# Build Release config vertical for Windows, Linux, Linux musl and OSX +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - windows_x64 + - OSX_x64 + - Linux_x64 + jobParameters: + testGroup: innerloop + timeoutInMinutes: 120 + nameSuffix: Runtime_Release + buildArgs: -s clr+libs -c $(_BuildConfig) + extraStepsTemplate: /eng/pipelines/libraries/execute-trimming-tests-steps.yml + +# +# Build Release config vertical for Browser-wasm +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - Browser_wasm + jobParameters: + testGroup: innerloop + timeoutInMinutes: 120 + nameSuffix: Runtime_Release + buildArgs: -s mono+libs -c $(_BuildConfig) -p:WasmBuildNative=false + extraStepsTemplate: /eng/pipelines/libraries/execute-trimming-tests-steps.yml + extraStepsParameters: + extraTestArgs: '/p:WasmBuildNative=false' diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 3b6a4991f1436f..f58caca2899de2 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -57,98 +57,302 @@ jobs: # # Build the whole product using Mono and run libraries tests # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #buildConfig: Release - #runtimeFlavor: mono - #platforms: - #- Android_x86 - #- Android_x64 - #- iOSSimulator_x64 - #- tvOSSimulator_x64 - #variables: - ## map dependencies variables to local variables - #- name: librariesContainsChange - #value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - #- name: monoContainsChange - #value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] - #jobParameters: - #testGroup: innerloop - #nameSuffix: AllSubsets_Mono - #buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true - #timeoutInMinutes: 180 - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - #eq(variables['isFullMatrix'], true)) - ## extra steps, run tests - #extraStepsTemplate: /eng/pipelines/libraries/helix.yml - #extraStepsParameters: - #creator: dotnet-bot - #testRunNamePrefixSuffix: Mono_$(_BuildConfig) - #condition: >- - #or( - #eq(variables['librariesContainsChange'], true), - #eq(variables['monoContainsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - iOSSimulator_x64 + - tvOSSimulator_x64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoForceInterpreter=true + timeoutInMinutes: 180 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + interpreter: true + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['isFullMatrix'], true)) + +# +# MacCatalyst interp - requires AOT Compilation and Interp flags +# Build the whole product using Mono and run libraries tests +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - MacCatalyst_x64 + # don't run tests on MacCatalyst_arm64 PRs until we can get significantly more devices + - ${{ if eq(variables['isFullMatrix'], true) }}: + - MacCatalyst_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true + timeoutInMinutes: 180 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + interpreter: true + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['isFullMatrix'], true)) + +# +# Build the whole product using Mono and run libraries tests +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - Android_x86 + - Android_x64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true + timeoutInMinutes: 180 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['isFullMatrix'], true)) -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #buildConfig: Release - #platforms: - #- Android_arm - #jobParameters: - #testGroup: innerloop - #nameSuffix: Build_Subset_Mono - #buildArgs: -subset mono+libs +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - Android_arm + - Android_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true + timeoutInMinutes: 180 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + + # don't run tests on PRs until we can get significantly more devices + ${{ if eq(variables['isFullMatrix'], true) }}: + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['isFullMatrix'], true)) # # Build the whole product using Mono and run libraries tests # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #buildConfig: Release - #runtimeFlavor: mono - #platforms: - #- Windows_x64 - #variables: - ## map dependencies variables to local variables - #- name: librariesContainsChange - #value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - #- name: monoContainsChange - #value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] - #jobParameters: - #testScope: innerloop - #nameSuffix: AllSubsets_Mono - #buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true - #timeoutInMinutes: 120 - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - #eq(variables['isFullMatrix'], true)) - ## extra steps, run tests - #extraStepsTemplate: /eng/pipelines/libraries/helix.yml - #extraStepsParameters: - #creator: dotnet-bot - #testRunNamePrefixSuffix: Mono_$(_BuildConfig) - #condition: >- - #or( - #eq(variables['librariesContainsChange'], true), - #eq(variables['monoContainsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - Windows_x64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + jobParameters: + testScope: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true + timeoutInMinutes: 120 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['isFullMatrix'], true)) # # Build the whole product using Mono for Android and run runtime tests with interpreter # +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - Android_x64 + variables: + - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: + - name: _HelixSource + value: pr/dotnet/runtime/$(Build.SourceBranch) + - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: + - name: _HelixSource + value: ci/dotnet/runtime/$(Build.SourceBranch) + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_RuntimeTests + buildArgs: -s mono+libs -c $(_BuildConfig) + timeoutInMinutes: 240 + runtimeVariant: monointerpreter + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + +# +# Build the whole product using Mono for Android and run runtime tests with Android devices +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - Android_arm64 + variables: + - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: + - name: _HelixSource + value: pr/dotnet/runtime/$(Build.SourceBranch) + - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: + - name: _HelixSource + value: ci/dotnet/runtime/$(Build.SourceBranch) + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_RuntimeTests + buildArgs: -s mono+libs -c $(_BuildConfig) + timeoutInMinutes: 240 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # don't run tests on PRs until we can get significantly more devices + ${{ if eq(variables['isFullMatrix'], true) }}: + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + +# Run disabled installer tests on Linux x64 +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release + platforms: + - Linux_x64 + jobParameters: + nameSuffix: Installer_Tests + isOfficialBuild: ${{ variables.isOfficialBuild }} + buildArgs: -s clr+libs+host+packs -restore -build -test -c $(_BuildConfig) -lc Debug /p:PortableBuild=true /p:RunOnStaging=true + useContinueOnErrorDuringBuild: true + enablePublisTestResults: true + testResultsFormat: xunit + timeoutInMinutes: 90 + # # Build Browser_wasm, on windows # @@ -190,32 +394,33 @@ jobs: eq(variables['librariesContainsChange'], true), eq(variables['monoContainsChange'], true), eq(variables['isFullMatrix'], true)) + # # CoreCLR Build for running Apple Silicon libraries-innerloop # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - #buildConfig: release - #platforms: - #- ${{ if eq(variables['isFullMatrix'], true) }}: - #- OSX_arm64 - #jobParameters: - #testGroup: innerloop -## -## Libraries Build for running Apple Silicon libraries-innerloop -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/build-job.yml - #buildConfig: Release - #platforms: - #- ${{ if eq(variables['isFullMatrix'], true) }}: - #- OSX_arm64 - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #jobParameters: - #isOfficialBuild: ${{ variables['isOfficialBuild'] }} - #isFullMatrix: ${{ variables['isFullMatrix'] }} - #runTests: true - #testScope: innerloop - #liveRuntimeBuildConfig: release +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: release + platforms: + - ${{ if eq(variables['isFullMatrix'], true) }}: + - OSX_arm64 + jobParameters: + testGroup: innerloop +# +# Libraries Build for running Apple Silicon libraries-innerloop +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/build-job.yml + buildConfig: Release + platforms: + - ${{ if eq(variables['isFullMatrix'], true) }}: + - OSX_arm64 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isOfficialBuild: ${{ variables['isOfficialBuild'] }} + isFullMatrix: ${{ variables['isFullMatrix'] }} + runTests: true + testScope: innerloop + liveRuntimeBuildConfig: release diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index e7ebeb8c9c9bbb..931a65a05e11ee 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -60,141 +60,141 @@ jobs: # Build CoreCLR checked # Only when CoreCLR is changed # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - #buildConfig: checked - #platforms: - #- Linux_x64 - #- Linux_arm - #- Linux_arm64 - #- Linux_musl_arm - #- Linux_musl_arm64 - #- Linux_musl_x64 - #- OSX_arm64 - #- windows_x86 - #- windows_x64 - #- windows_arm - #- windows_arm64 - #jobParameters: - #testGroup: innerloop - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: checked + platforms: + - Linux_x64 + - Linux_arm + - Linux_arm64 + - Linux_musl_arm + - Linux_musl_arm64 + - Linux_musl_x64 + - OSX_arm64 + - windows_x86 + - windows_x64 + - windows_arm + - windows_arm64 + jobParameters: + testGroup: innerloop + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Build CoreCLR checked using GCC toolchain -## Only when CoreCLR is changed -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - #buildConfig: checked - #platforms: - #- Linux_x64 - #jobParameters: - #testGroup: innerloop - #compilerName: gcc - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# Build CoreCLR checked using GCC toolchain +# Only when CoreCLR is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: checked + platforms: + - Linux_x64 + jobParameters: + testGroup: innerloop + compilerName: gcc + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Build CoreCLR OSX_x64 checked -## Only when CoreCLR or Libraries is changed -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - #buildConfig: checked - #platforms: - #- OSX_x64 - #jobParameters: - #testGroup: innerloop - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# Build CoreCLR OSX_x64 checked +# Only when CoreCLR or Libraries is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: checked + platforms: + - OSX_x64 + jobParameters: + testGroup: innerloop + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Build CoreCLR release -## Always as they are needed by Installer and we always build and test the Installer. -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - #buildConfig: release - #platforms: - #- OSX_arm64 - #- OSX_x64 - #- Linux_x64 - #- Linux_arm - #- Linux_arm64 - #- Linux_musl_x64 - #- Linux_musl_arm - #- Linux_musl_arm64 - #- windows_x64 - #- windows_x86 - #- windows_arm - #- windows_arm64 - #- FreeBSD_x64 - #jobParameters: - #testGroup: innerloop +# +# Build CoreCLR release +# Always as they are needed by Installer and we always build and test the Installer. +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: release + platforms: + - OSX_arm64 + - OSX_x64 + - Linux_x64 + - Linux_arm + - Linux_arm64 + - Linux_musl_x64 + - Linux_musl_arm + - Linux_musl_arm64 + - windows_x64 + - windows_x86 + - windows_arm + - windows_arm64 + - FreeBSD_x64 + jobParameters: + testGroup: innerloop -## -## Build PGO CoreCLR release -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - #buildConfig: release - #platforms: - #- windows_x64 - #- windows_x86 - #- Linux_x64 - #jobParameters: - #testGroup: innerloop - #pgoType: 'PGO' +# +# Build PGO CoreCLR release +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: release + platforms: + - windows_x64 + - windows_x86 + - Linux_x64 + jobParameters: + testGroup: innerloop + pgoType: 'PGO' # # Build CoreCLR Formatting Job # Only when CoreCLR is changed, and only in the 'main' branch (no release branches; # both CI and PR builds). # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/coreclr/templates/format-job.yml - #platforms: - #- Linux_x64 - #- windows_x64 - #jobParameters: - #condition: >- - #and( - #or( - #eq(variables['Build.SourceBranchName'], 'main'), - #eq(variables['System.PullRequest.TargetBranch'], 'main')), - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - #eq(variables['isFullMatrix'], true))) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/format-job.yml + platforms: + - Linux_x64 + - windows_x64 + jobParameters: + condition: >- + and( + or( + eq(variables['Build.SourceBranchName'], 'main'), + eq(variables['System.PullRequest.TargetBranch'], 'main')), + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true))) # Build and test clr tools -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - #buildConfig: checked - #platforms: - #- Linux_x64 - #jobParameters: - #testGroup: clrTools - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: checked + platforms: + - Linux_x64 + jobParameters: + testGroup: clrTools + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true)) # Build Mono AOT offset headers once, for consumption elsewhere # Only when mono changed @@ -204,11 +204,11 @@ jobs: jobTemplate: /eng/pipelines/mono/templates/generate-offsets.yml buildConfig: release platforms: - #- Android_x64 + - Android_x64 - Browser_wasm - #- tvOS_arm64 - #- iOS_arm64 - #- MacCatalyst_x64 + - tvOS_arm64 + - iOS_arm64 + - MacCatalyst_x64 jobParameters: condition: >- or( @@ -219,48 +219,48 @@ jobs: # Build the whole product using Mono runtime # Only when libraries, mono or installer are changed # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #runtimeFlavor: mono - #platforms: - #- MacCatalyst_x64 - #- MacCatalyst_arm64 - #- tvOSSimulator_x64 - #- iOSSimulator_x86 - #- iOS_arm64 - #- Linux_arm - #jobParameters: - #testGroup: innerloop - #nameSuffix: AllSubsets_Mono - #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + runtimeFlavor: mono + platforms: + - MacCatalyst_x64 + - MacCatalyst_arm64 + - tvOSSimulator_x64 + - iOSSimulator_x86 + - iOS_arm64 + - Linux_arm + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #buildConfig: Release - #runtimeFlavor: mono - #platforms: - #- tvOS_arm64 - #- iOS_arm - #- Linux_musl_x64 - #jobParameters: - #testGroup: innerloop - #nameSuffix: AllSubsets_Mono - #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - tvOS_arm64 + - iOS_arm + - Linux_musl_x64 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) # # Build the whole product using Mono and run libraries tests, multi-scenario @@ -347,28 +347,69 @@ jobs: eq(variables['monoContainsChange'], true), eq(variables['isFullMatrix'], true)) +# +# Build for Browser/wasm with RunAOTCompilation=true +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - Browser_wasm + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_AOT + buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true + timeoutInMinutes: 180 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true + scenarios: + - normal + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['isFullMatrix'], true)) # Build and test libraries under single-file publishing -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #buildConfig: Release - #platforms: - #- windows_x64 - #- Linux_x64 - #jobParameters: - #testGroup: innerloop - #isFullMatrix: ${{ variables.isFullMatrix }} - #isSingleFile: true - #nameSuffix: SingleFile - #buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:TestSingleFile=true /p:ArchiveTests=true - #timeoutInMinutes: 120 - ## extra steps, run tests - #extraStepsTemplate: /eng/pipelines/libraries/helix.yml - #extraStepsParameters: - #creator: dotnet-bot - #testRunNamePrefixSuffix: SingleFile_$(_BuildConfig) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + platforms: + - windows_x64 + - Linux_x64 + jobParameters: + testGroup: innerloop + isFullMatrix: ${{ variables.isFullMatrix }} + isSingleFile: true + nameSuffix: SingleFile + buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:TestSingleFile=true /p:ArchiveTests=true + timeoutInMinutes: 120 + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: SingleFile_$(_BuildConfig) # # Build the whole product using Mono and run runtime tests @@ -411,271 +452,271 @@ jobs: # # Build the whole product using Mono for Android and run runtime tests with Android emulator # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - #buildConfig: Release - #runtimeFlavor: mono - #platforms: - #- Android_x64 - #variables: - #- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - #- name: _HelixSource - #value: pr/dotnet/runtime/$(Build.SourceBranch) - #- ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: - #- name: _HelixSource - #value: ci/dotnet/runtime/$(Build.SourceBranch) - #- name: timeoutPerTestInMinutes - #value: 60 - #- name: timeoutPerTestCollectionInMinutes - #value: 180 - #jobParameters: - #testGroup: innerloop - #nameSuffix: AllSubsets_Mono_RuntimeTests - #buildArgs: -s mono+libs -c $(_BuildConfig) - #timeoutInMinutes: 240 - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(variables['isFullMatrix'], true)) - ## extra steps, run tests - #extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml - #extraStepsParameters: - #creator: dotnet-bot - #testRunNamePrefixSuffix: Mono_$(_BuildConfig) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - Android_x64 + variables: + - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: + - name: _HelixSource + value: pr/dotnet/runtime/$(Build.SourceBranch) + - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: + - name: _HelixSource + value: ci/dotnet/runtime/$(Build.SourceBranch) + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_RuntimeTests + buildArgs: -s mono+libs -c $(_BuildConfig) + timeoutInMinutes: 240 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) # # Build Mono and Installer on LLVMJIT mode # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #buildConfig: Release - #runtimeFlavor: mono - #platforms: - #- OSX_x64 - #jobParameters: - #testGroup: innerloop - #nameSuffix: AllSubsets_Mono_LLVMJIT - #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - #/p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=false - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - OSX_x64 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_LLVMJIT + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=false + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #runtimeFlavor: mono - #platforms: - #- Linux_x64 - #- Linux_arm64 - #jobParameters: - #testGroup: innerloop - #nameSuffix: AllSubsets_Mono_LLVMJIT - #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - #/p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=false - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + runtimeFlavor: mono + platforms: + - Linux_x64 + - Linux_arm64 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_LLVMJIT + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=false + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) # # Build Mono and Installer on LLVMAOT mode # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #buildConfig: Release - #runtimeFlavor: mono - #platforms: - #- Linux_x64 - #- Linux_arm64 - #jobParameters: - #testGroup: innerloop - #nameSuffix: AllSubsets_Mono_LLVMAOT - #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - #/p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - #eq(variables['isFullMatrix'], true)) - -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/global-build-job.yml - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #runtimeFlavor: mono - #platforms: - #- OSX_x64 - #jobParameters: - #testGroup: innerloop - #nameSuffix: AllSubsets_Mono_LLVMAOT - #buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - #/p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - #eq(variables['isFullMatrix'], true)) - -# -# Build Mono debug -# Only when libraries or mono changed -# -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/mono/templates/build-job.yml - #runtimeFlavor: mono - #buildConfig: debug - #platforms: - #- OSX_x64 - #- OSX_arm64 - #- Linux_x64 - #- Linux_arm64 - ## - Linux_musl_arm64 - #- windows_x64 - #- windows_x86 - ## - windows_arm - ## - windows_arm64 - #jobParameters: - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(variables['isFullMatrix'], true)) - -# -# Build Mono release AOT cross-compilers -# Only when mono changed -# - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/mono/templates/build-job.yml + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release runtimeFlavor: mono - buildConfig: release platforms: - Linux_x64 - # - Linux_arm64 - # - Linux_musl_arm64 - - Windows_x64 - # - windows_x86 - # - windows_arm - # - windows_arm64 + - Linux_arm64 jobParameters: - runtimeVariant: crossaot - dependsOn: - #- mono_android_offsets - - mono_browser_offsets - monoCrossAOTTargetOS: - #- Android - - Browser + testGroup: innerloop + nameSuffix: AllSubsets_Mono_LLVMAOT + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true condition: >- or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), eq(variables['isFullMatrix'], true)) - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/mono/templates/build-job.yml + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} runtimeFlavor: mono - buildConfig: release platforms: - OSX_x64 jobParameters: - runtimeVariant: crossaot - dependsOn: - #- mono_android_offsets - - mono_browser_offsets - #- mono_tvos_offsets - #- mono_ios_offsets - #- mono_maccatalyst_offsets - monoCrossAOTTargetOS: - #- Android - - Browser - #- tvOS - #- iOS - #- MacCatalyst + testGroup: innerloop + nameSuffix: AllSubsets_Mono_LLVMAOT + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true condition: >- or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), eq(variables['isFullMatrix'], true)) # -# Build Mono release +# Build Mono debug # Only when libraries or mono changed # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/mono/templates/build-job.yml - #runtimeFlavor: mono - #buildConfig: release - #platforms: - #- Linux_x64 - ## - Linux_musl_arm64 - #- windows_x64 - #- windows_x86 - ## - windows_arm - ## - windows_arm64 - #jobParameters: - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(variables['isFullMatrix'], true)) - +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/mono/templates/build-job.yml + runtimeFlavor: mono + buildConfig: debug + platforms: + - OSX_x64 + - OSX_arm64 + - Linux_x64 + - Linux_arm64 + # - Linux_musl_arm64 + - windows_x64 + - windows_x86 + # - windows_arm + # - windows_arm64 + jobParameters: + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) + +# +# Build Mono release AOT cross-compilers +# Only when mono changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/mono/templates/build-job.yml + runtimeFlavor: mono + buildConfig: release + platforms: + - Linux_x64 + # - Linux_arm64 + # - Linux_musl_arm64 + - Windows_x64 + # - windows_x86 + # - windows_arm + # - windows_arm64 + jobParameters: + runtimeVariant: crossaot + dependsOn: + - mono_android_offsets + - mono_browser_offsets + monoCrossAOTTargetOS: + - Android + - Browser + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/mono/templates/build-job.yml + runtimeFlavor: mono + buildConfig: release + platforms: + - OSX_x64 + jobParameters: + runtimeVariant: crossaot + dependsOn: + - mono_android_offsets + - mono_browser_offsets + - mono_tvos_offsets + - mono_ios_offsets + - mono_maccatalyst_offsets + monoCrossAOTTargetOS: + - Android + - Browser + - tvOS + - iOS + - MacCatalyst + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + +# +# Build Mono release +# Only when libraries or mono changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/mono/templates/build-job.yml + runtimeFlavor: mono + buildConfig: release + platforms: + - Linux_x64 + # - Linux_musl_arm64 + - windows_x64 + - windows_x86 + # - windows_arm + # - windows_arm64 + jobParameters: + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # # Build Mono release # Only when libraries, mono, or the runtime tests changed # Currently only these architectures are needed for the runtime tests. -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/mono/templates/build-job.yml - #runtimeFlavor: mono - #buildConfig: release - #platforms: - #- OSX_x64 - #- Linux_arm64 - #jobParameters: - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/mono/templates/build-job.yml + runtimeFlavor: mono + buildConfig: release + platforms: + - OSX_x64 + - Linux_arm64 + jobParameters: + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) # # Build Mono release with LLVM AOT # Only when mono, or the runtime tests changed # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/mono/templates/build-job.yml - #runtimeFlavor: mono - #buildConfig: release - #platforms: - #- Linux_x64 - #- Linux_arm64 - #jobParameters: - #runtimeVariant: llvmaot - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/mono/templates/build-job.yml + runtimeFlavor: mono + buildConfig: release + platforms: + - Linux_x64 + - Linux_arm64 + jobParameters: + runtimeVariant: llvmaot + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) # # Build libraries using live CoreLib @@ -683,469 +724,509 @@ jobs: # The reason for that is because Corelib and Installer needs it and # These are part of the test matrix for Libraries changes. # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/build-job.yml - #buildConfig: Release - #platforms: - #- Linux_arm - #- Linux_musl_arm - #- Linux_musl_arm64 - #- windows_arm - #- windows_arm64 - #- windows_x86 - #jobParameters: - #liveRuntimeBuildConfig: release +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/build-job.yml + buildConfig: Release + platforms: + - Linux_arm + - Linux_musl_arm + - Linux_musl_arm64 + - windows_arm + - windows_arm64 + - windows_x86 + jobParameters: + liveRuntimeBuildConfig: release -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/build-job.yml - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #platforms: - #- Linux_arm64 - #- Linux_musl_x64 - #- Linux_x64 - #- OSX_arm64 - #- OSX_x64 - #- windows_x64 - #- FreeBSD_x64 - #jobParameters: - #testScope: innerloop - #testBuildPlatforms: - #- Linux_x64 - #- windows_x64 - #- OSX_x64 - #liveRuntimeBuildConfig: release +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - Linux_arm64 + - Linux_musl_x64 + - Linux_x64 + - OSX_arm64 + - OSX_x64 + - windows_x64 + - FreeBSD_x64 + jobParameters: + testScope: innerloop + testBuildPlatforms: + - Linux_x64 + - windows_x64 + - OSX_x64 + liveRuntimeBuildConfig: release # # Libraries Build that only run when libraries is changed # -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/build-job.yml - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #platforms: - #- ${{ if eq(variables['isFullMatrix'], false) }}: - #- windows_x86 - #jobParameters: - #liveRuntimeBuildConfig: release - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - ${{ if eq(variables['isFullMatrix'], false) }}: + - windows_x86 + jobParameters: + liveRuntimeBuildConfig: release + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isFullMatrix'], true)) -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/build-job.yml - #buildConfig: Release - #platforms: - #- windows_x86 - #- ${{ if eq(variables['isFullMatrix'], true) }}: - #- windows_x64 - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #jobParameters: - #isFullMatrix: ${{ variables.isFullMatrix }} - #framework: net48 - #runTests: true - #testScope: innerloop - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/build-job.yml + buildConfig: Release + platforms: + - windows_x86 + - ${{ if eq(variables['isFullMatrix'], true) }}: + - windows_x64 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isFullMatrix: ${{ variables.isFullMatrix }} + framework: net48 + runTests: true + testScope: innerloop + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isFullMatrix'], true)) -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/build-job.yml - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #platforms: - #- windows_x64 - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #jobParameters: - #isFullMatrix: ${{ variables.isFullMatrix }} - #framework: allConfigurations - #runTests: true - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - windows_x64 + jobParameters: + isFullMatrix: ${{ variables.isFullMatrix }} + framework: allConfigurations + runTests: true + useHelix: false + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isFullMatrix'], true)) # # Installer Build and Test # These are always built since they only take like 15 minutes # we expect these to be done before we finish libraries or coreclr testing. # -#- template: /eng/pipelines/installer/installer-matrix.yml - #parameters: - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #platforms: - #- Linux_arm - #- Linux_musl_arm - #- Linux_musl_arm64 - #- windows_x86 - #- windows_arm - #- windows_arm64 - #jobParameters: - #liveRuntimeBuildConfig: release - #liveLibrariesBuildConfig: Release - -#- template: /eng/pipelines/installer/installer-matrix.yml - #parameters: - #buildConfig: Release - #platforms: - #- OSX_arm64 - #- OSX_x64 - #- Linux_x64 - #- Linux_arm64 - #- Linux_musl_x64 - #- windows_x64 - #- FreeBSD_x64 - #jobParameters: - #liveRuntimeBuildConfig: release - #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} +- template: /eng/pipelines/installer/installer-matrix.yml + parameters: + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - Linux_arm + - Linux_musl_arm + - Linux_musl_arm64 + - windows_x86 + - windows_arm + - windows_arm64 + jobParameters: + liveRuntimeBuildConfig: release + liveLibrariesBuildConfig: Release -## -## PGO Build -## -#- template: /eng/pipelines/installer/installer-matrix.yml - #parameters: - #buildConfig: Release - #jobParameters: - #isOfficialBuild: ${{ variables.isOfficialBuild }} - #liveRuntimeBuildConfig: release - #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #pgoType: 'PGO' - #platforms: - #- windows_x64 - #- windows_x86 - #- Linux_x64 +- template: /eng/pipelines/installer/installer-matrix.yml + parameters: + buildConfig: Release + platforms: + - OSX_arm64 + - OSX_x64 + - Linux_x64 + - Linux_arm64 + - Linux_musl_x64 + - windows_x64 + - FreeBSD_x64 + jobParameters: + liveRuntimeBuildConfig: release + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} -## -## Crossgen-comparison jobs -## Only when CoreCLR is changed -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/coreclr/templates/crossgen-comparison-job.yml - #buildConfig: checked - #platforms: - #- Linux_arm - #helixQueueGroup: pr - #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - #jobParameters: - #liveLibrariesBuildConfig: Release - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# PGO Build +# +- template: /eng/pipelines/installer/installer-matrix.yml + parameters: + buildConfig: Release + jobParameters: + isOfficialBuild: ${{ variables.isOfficialBuild }} + liveRuntimeBuildConfig: release + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + pgoType: 'PGO' + platforms: + - windows_x64 + - windows_x86 + - Linux_x64 -## -## CoreCLR Test builds using live libraries release build -## Only when CoreCLR is changed -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml - #buildConfig: checked - #platforms: - #- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 - #jobParameters: - #testGroup: innerloop - #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# Crossgen-comparison jobs +# Only when CoreCLR is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/crossgen-comparison-job.yml + buildConfig: checked + platforms: + - Linux_arm + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + liveLibrariesBuildConfig: Release + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## CoreCLR Test executions using live libraries -## Only when CoreCLR is changed -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - #buildConfig: checked - #platforms: - #- Linux_arm - #- windows_x86 - #- windows_arm64 - #helixQueueGroup: pr - #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - #jobParameters: - #testGroup: innerloop - #liveLibrariesBuildConfig: Release - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# CoreCLR Test builds using live libraries release build +# Only when CoreCLR is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: checked + platforms: + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - #buildConfig: checked - #platforms: - #- OSX_x64 - #- Linux_x64 - #- Linux_arm64 - #- windows_x64 - #helixQueueGroup: pr - #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - #jobParameters: - #testGroup: innerloop - #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# CoreCLR Test executions using live libraries +# Only when CoreCLR is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: checked + platforms: + - Linux_arm + - windows_x86 + - windows_arm64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - #buildConfig: checked - #platforms: - #- OSX_arm64 - #helixQueueGroup: pr - #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - #jobParameters: - #testGroup: innerloop - #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr_AppleSilicon.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: checked + platforms: + - OSX_x64 + - Linux_x64 + - Linux_arm64 + - windows_x64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Mono Test builds with CoreCLR runtime tests using live libraries debug build -## Only when Mono is changed -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml - #buildConfig: release - #runtimeFlavor: mono - #platforms: - #- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 - #jobParameters: - #testGroup: innerloop - #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #liveRuntimeBuildConfig: release - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: checked + platforms: + - OSX_arm64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr_AppleSilicon.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Mono CoreCLR runtime Test executions using live libraries -## Only when Mono is changed -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - #buildConfig: release - #runtimeFlavor: mono - #platforms: - #- OSX_x64 - #- Linux_arm64 - #helixQueueGroup: pr - #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - #jobParameters: - #testGroup: innerloop - #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #liveRuntimeBuildConfig: release - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(variables['isFullMatrix'], true)) -## -## Mono CoreCLR runtime Test executions using live libraries and LLVM AOT -## Only when Mono is changed -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - #buildConfig: release - #runtimeFlavor: mono - #platforms: - #- Linux_x64 - #- Linux_arm64 - #helixQueueGroup: pr - #helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - #jobParameters: - #testGroup: innerloop - #liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #liveRuntimeBuildConfig: release - #runtimeVariant: llvmaot - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# Mono Test builds with CoreCLR runtime tests using live libraries debug build +# Only when Mono is changed +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + liveRuntimeBuildConfig: release + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Libraries Release Test Execution against a release mono runtime. -## Only when libraries or mono changed -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/run-test-job.yml - #runtimeFlavor: mono - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #platforms: - ## - windows_x64 - #- OSX_x64 - #- Linux_arm64 - #- Linux_x64 - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #jobParameters: - #isOfficialBuild: false - #isFullMatrix: ${{ variables.isFullMatrix }} - #runtimeDisplayName: mono - #testScope: innerloop - #liveRuntimeBuildConfig: release - #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - #dependsOnTestArchitecture: x64 - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# Mono CoreCLR runtime Test executions using live libraries in jit mode +# Only when Mono is changed +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - OSX_x64 + - Linux_arm64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + liveRuntimeBuildConfig: release + runtimeVariant: minijit + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Libraries Release Test Execution against a release mono interpreter runtime. -## Only when libraries or mono changed -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/run-test-job.yml - #runtimeFlavor: mono - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #platforms: - ## - windows_x64 - ##- OSX_x64 - #- Linux_x64 - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #jobParameters: - #isOfficialBuild: false - #isFullMatrix: ${{ variables.isFullMatrix }} - #interpreter: true - #runtimeDisplayName: mono_interpreter - #testScope: innerloop - #liveRuntimeBuildConfig: release - #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - #dependsOnTestArchitecture: x64 - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# Mono CoreCLR runtime Test executions using live libraries in interpreter mode +# Only when Mono is changed +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - OSX_x64 + - Linux_arm64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + liveRuntimeBuildConfig: release + runtimeVariant: monointerpreter + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) +# +# Mono CoreCLR runtime Test executions using live libraries and LLVM AOT +# Only when Mono is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - Linux_x64 + - Linux_arm64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + liveRuntimeBuildConfig: release + runtimeVariant: llvmaot + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Libraries Release Test Execution against a release coreclr runtime -## Only when the PR contains a libraries change -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/run-test-job.yml - #buildConfig: Release - #platforms: - #- windows_x86 - #- ${{ if eq(variables['isFullMatrix'], true) }}: - #- windows_arm64 - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #jobParameters: - #isOfficialBuild: false - #isFullMatrix: ${{ variables.isFullMatrix }} - #testScope: innerloop - #liveRuntimeBuildConfig: release - #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - #dependsOnTestArchitecture: x64 - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(variables['isFullMatrix'], true)) +# +# Libraries Release Test Execution against a release mono runtime. +# Only when libraries or mono changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + runtimeFlavor: mono + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + # - windows_x64 + - OSX_x64 + - Linux_arm64 + - Linux_x64 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isOfficialBuild: false + isFullMatrix: ${{ variables.isFullMatrix }} + runtimeDisplayName: mono + testScope: innerloop + liveRuntimeBuildConfig: release + dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + dependsOnTestArchitecture: x64 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Libraries Debug Test Execution against a release coreclr runtime -## Only when the PR contains a libraries change -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/run-test-job.yml - #buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - #platforms: - #- windows_x64 +# +# Libraries Release Test Execution against a release mono interpreter runtime. +# Only when libraries or mono changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + runtimeFlavor: mono + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + # - windows_x64 #- OSX_x64 - #- Linux_x64 - #- Linux_musl_x64 - #- ${{ if eq(variables['isFullMatrix'], true) }}: - #- Linux_arm64 - #- ${{ if eq(variables['isFullMatrix'], false) }}: - #- windows_x86 - #helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - #jobParameters: - #isOfficialBuild: false - #isFullMatrix: ${{ variables.isFullMatrix }} - #testScope: innerloop - #liveRuntimeBuildConfig: release - #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - #dependsOnTestArchitecture: x64 - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(variables['isFullMatrix'], true)) + - Linux_x64 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isOfficialBuild: false + isFullMatrix: ${{ variables.isFullMatrix }} + interpreter: true + runtimeDisplayName: mono_interpreter + testScope: innerloop + liveRuntimeBuildConfig: release + dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + dependsOnTestArchitecture: x64 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Libraries Test Execution against a checked runtime -## Only when the PR contains a coreclr change -## -#- template: /eng/pipelines/common/platform-matrix.yml - #parameters: - #jobTemplate: /eng/pipelines/libraries/run-test-job.yml - #dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} - #dependsOnTestArchitecture: x64 - #condition: >- - #or( - #eq(variables['isFullMatrix'], true)) +# +# Libraries Release Test Execution against a release coreclr runtime +# Only when the PR contains a libraries change +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: Release + platforms: + - windows_x86 + - ${{ if eq(variables['isFullMatrix'], true) }}: + - windows_arm64 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isOfficialBuild: false + isFullMatrix: ${{ variables.isFullMatrix }} + testScope: innerloop + liveRuntimeBuildConfig: release + dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + dependsOnTestArchitecture: x64 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isFullMatrix'], true)) -## -## Libraries Test Execution against a checked runtime +# +# Libraries Debug Test Execution against a release coreclr runtime +# Only when the PR contains a libraries change +# - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - windows_x64 + - OSX_x64 + - Linux_x64 + - Linux_musl_x64 + - ${{ if eq(variables['isFullMatrix'], true) }}: + - Linux_arm64 + - ${{ if eq(variables['isFullMatrix'], false) }}: + - windows_x86 helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isOfficialBuild: false + isFullMatrix: ${{ variables.isFullMatrix }} + testScope: innerloop + liveRuntimeBuildConfig: release + dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + dependsOnTestArchitecture: x64 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isFullMatrix'], true)) + +# +# Libraries Test Execution against a checked runtime +# Only when the PR contains a coreclr change +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml buildConfig: Release - runtimeFlavor: mono platforms: - - Browser_wasm - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + # - windows_arm return this when https://github.com/dotnet/runtime/issues/1097 is fixed. + - Linux_arm + - Linux_musl_arm + - Linux_musl_arm64 + - windows_x86 + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + helixQueueGroup: libraries jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_AOT - buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true - timeoutInMinutes: 180 - #condition: >- - #or( - #eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - #eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - #eq(variables['isFullMatrix'], true)) - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true - scenarios: - - normal - #condition: >- - #or( - #eq(variables['librariesContainsChange'], true), - #eq(variables['monoContainsChange'], true), - #eq(variables['isFullMatrix'], true)) + testScope: innerloop + liveRuntimeBuildConfig: checked + dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + dependsOnTestArchitecture: x64 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true)) + +# +# Libraries Test Execution against a checked runtime +# Only if CoreCLR or Libraries is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - windows_x64 + - Linux_x64 + - Linux_musl_x64 + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + helixQueueGroup: libraries + jobParameters: + testScope: innerloop + liveRuntimeBuildConfig: checked + dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + dependsOnTestArchitecture: x64 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true)) + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - OSX_x64 + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + helixQueueGroup: libraries + jobParameters: + testScope: innerloop + liveRuntimeBuildConfig: checked + dependsOnTestBuildConfiguration: ${{ variables.debugOnPrReleaseOnRolling }} + dependsOnTestArchitecture: x64 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isFullMatrix'], true)) From d7d8b27919738dcc2843e496a3013dcc6ec4bc8b Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 13 Jul 2021 00:58:15 -0400 Subject: [PATCH 20/24] cleanup --- src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs index 681a49696d3c3d..7416552ee1a6a2 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs @@ -252,10 +252,7 @@ protected static BuildArgs ExpandBuildArgs(BuildArgs buildArgs, string extraProp if (buildArgs.AOT) { extraProperties = $"{extraProperties}\ntrue"; - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - extraProperties += $"\nfalse\n"; - else - extraProperties += $"\ntrue\n"; + extraProperties += $"\n{RuntimeInformation.IsOSPlatform(OSPlatform.Windows)}\n"; } string projectContents = projectTemplate From 236b644e9481dcc25f64df3d6a01141b7adf8f16 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 13 Jul 2021 13:20:35 -0400 Subject: [PATCH 21/24] lock access to the stringbuilder for output, to prevent it from getting corrupted by concurrent access --- .../BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs index 7416552ee1a6a2..ec8fe802b9fc99 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs @@ -481,6 +481,8 @@ public static (int exitCode, string buildOutput) RunProcess(string path, Console.WriteLine($"WorkingDirectory: {workingDir}"); _testOutput.WriteLine($"WorkingDirectory: {workingDir}"); StringBuilder outputBuilder = new (); + object syncObj = new(); + var processStartInfo = new ProcessStartInfo { FileName = path, @@ -546,12 +548,15 @@ public static (int exitCode, string buildOutput) RunProcess(string path, void LogData(string label, string? message) { - if (logToXUnit && message != null) + lock (syncObj) { - _testOutput.WriteLine($"{label} {message}"); - Console.WriteLine($"{label} {message}"); + if (logToXUnit && message != null) + { + _testOutput.WriteLine($"{label} {message}"); + Console.WriteLine($"{label} {message}"); + } + outputBuilder.AppendLine($"{label} {message}"); } - outputBuilder.AppendLine($"{label} {message}"); } } From 31d41b907ca6c7b7e5a8d211b110f1a9f04ea491 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 13 Jul 2021 15:47:12 -0400 Subject: [PATCH 22/24] Add a separate build job for wasm.build.tests --- eng/pipelines/runtime.yml | 41 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 931a65a05e11ee..fdeeecdaa82936 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -296,7 +296,6 @@ jobs: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) scenarios: - - buildwasmapps - normal - wasmtestonbrowser condition: >- @@ -305,6 +304,46 @@ jobs: eq(variables['monoContainsChange'], true), eq(variables['isFullMatrix'], true)) +# +# Build the whole product using Mono and run libraries tests, for Wasm.Build.Tests +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - Browser_wasm + variables: + # map dependencies variables to local variables + - name: monoContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ] + - name: installerContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_WasmBuildTests + buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true + timeoutInMinutes: 180 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + scenarios: + - buildwasmapps + condition: >- + or( + eq(variables['monoContainsChange'], true), + eq(variables['installerContainsChange'], true), + eq(variables['isFullMatrix'], true)) + # # Build for Browser/wasm, with EnableAggressiveTrimming=true # From 32fa9c457bcec0b76a360659aa97fa1736ae97a4 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 13 Jul 2021 16:17:24 -0400 Subject: [PATCH 23/24] dummy commit in mono, to trigger the builds --- src/mono/wasm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/README.md b/src/mono/wasm/README.md index 67cf64b8c05766..48b565d3f87be6 100644 --- a/src/mono/wasm/README.md +++ b/src/mono/wasm/README.md @@ -4,7 +4,7 @@ This depends on `emsdk` to be installed. ## emsdk on mac -* You can run `make provision-wasm`, which will install it to `$reporoot/src/mono/wasm/emsdk`. +* You can run `make provision-wasm`, which will install it to `$reporoot/src/mono/wasm/emsdk` . Note: Irrespective of `$(EMSDK_PATH)`'s value, `provision-wasm` will always install into `$reporoot/src/mono/wasm/emsdk`. `EMSDK_PATH` is set to `$reporoot/src/mono/wasm/emsdk` by default, by the Makefile. From b9f99a825f95567bcf5183a2453178893ef15971 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Tue, 13 Jul 2021 23:38:11 -0500 Subject: [PATCH 24/24] Lock around ToString to ensure the handlers have flushed --- .../Wasm.Build.Tests/BuildTestBase.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs index ec8fe802b9fc99..7d211ae6189124 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs @@ -534,11 +534,19 @@ public static (int exitCode, string buildOutput) RunProcess(string path, { // process didn't exit process.Kill(entireProcessTree: true); - var lastLines = outputBuilder.ToString().Split('\r', '\n').TakeLast(20); - throw new XunitException($"Process timed out, output: {string.Join(Environment.NewLine, lastLines)}"); + lock (syncObj) + { + var lastLines = outputBuilder.ToString().Split('\r', '\n').TakeLast(20); + throw new XunitException($"Process timed out, output: {string.Join(Environment.NewLine, lastLines)}"); + } + + } + lock (syncObj) + { + var exitCode = process.ExitCode; + return (process.ExitCode, outputBuilder.ToString().Trim('\r', '\n')); } - return (process.ExitCode, outputBuilder.ToString().Trim('\r', '\n')); } catch (Exception ex) {