From a4a335607d38cb3f5a77e67c482d1ac74ae269cf Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Sun, 9 Jan 2022 20:35:34 -0500 Subject: [PATCH 1/5] Extract wasm, and mobile specific bits from sendtohelixhelp.proj into .. separate files, so they can be easier to manage. - the platform specific properties are set in their respective files (for eg `sendtohelixhelp-wasm.proj`) - a new target `BuildHelixCommand` is extracted from `BuildHelixWorkItems`, which runs first - and essentially builds `@(HelixCommand)` - Platform specific targets can run via `$(BuildHelixWorkItemsDependsOn)` - which then add any "special" helix work items - `BuildHelixWorkItems` in the main file supports adding for the regular case, which is controlled by `$(EnableDefaultBuildHelixWorkItems)`. --- .../sendtohelixhelp-mobile-non-wasm.proj | 143 ++++++ src/libraries/sendtohelixhelp-wasm.proj | 221 +++++++++ src/libraries/sendtohelixhelp.proj | 442 +++--------------- 3 files changed, 428 insertions(+), 378 deletions(-) create mode 100644 src/libraries/sendtohelixhelp-mobile-non-wasm.proj create mode 100644 src/libraries/sendtohelixhelp-wasm.proj diff --git a/src/libraries/sendtohelixhelp-mobile-non-wasm.proj b/src/libraries/sendtohelixhelp-mobile-non-wasm.proj new file mode 100644 index 0000000000000..33b538779f0b8 --- /dev/null +++ b/src/libraries/sendtohelixhelp-mobile-non-wasm.proj @@ -0,0 +1,143 @@ + + + $(BuildHelixWorkItemsDependsOn);PrepareForBuildHelixWorkItems_Mobile + false + false + + true + true + + + + + maccatalyst + $(_workItemTimeout) + $(_workItemTimeout) + + + + + + armeabi-v7a + arm64-v8a + x86_64 + x86 + net.dot.MonoRunner + $(_workItemTimeout) + + + + + true + true + true + + + + + + + + + + + ios-simulator-64 + tvos-simulator + ios-device + tvos-device + maccatalyst + + + + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'msbuild', 'apple', 'build')) + $(TargetOS)- + + https://netcorenativeassets.blob.core.windows.net/resource-packages/external/macos/cmake/cmake-3.16.4-Darwin-x86_64.tar.gz + + <_XHarnessAppleCustomCommand Condition="'$(NeedsiOSSDK)' == 'true'"> + source build-apple-app.sh + + + + + + + + + + + + + + + + + $(AppleTestTarget) + $(_workItemTimeout) + $(_XHarnessAppleCustomCommand) + + + + + $(AppleTestTarget) + $(_workItemTimeout) + $(_XHarnessAppleCustomCommand) + + + + + + false + + 42 + $(AppleTestTarget) + + + + + + false + + 42 + $(AppleTestTarget) + + + + + <_apks Include="$(TestArchiveTestsRoot)**/*.apk" /> + + net.dot.%(Filename) + + <_runonlyApks Include="$(TestArchiveRoot)runonly/**/*.apk" /> + + net.dot.%(Filename) + + 42 + + + + + + + + + <_TestPath Condition="'%(XHarnessAppBundleToTest.CustomCommands)' != ''">$([System.IO.Path]::GetDirectoryName('%(XHarnessAppBundleToTest.Identity)')) + + + + + + diff --git a/src/libraries/sendtohelixhelp-wasm.proj b/src/libraries/sendtohelixhelp-wasm.proj new file mode 100644 index 0000000000000..0941e72a2e0aa --- /dev/null +++ b/src/libraries/sendtohelixhelp-wasm.proj @@ -0,0 +1,221 @@ + + + <_workItemTimeout Condition="'$(Scenario)' == 'BuildWasmApps' and '$(_workItemTimeout)' == ''">01:30:00 + <_workItemTimeout Condition="'$(NeedsToBuildWasmAppsOnHelix)' == 'true'">01:00:00 + <_workItemTimeout Condition="'$(Scenario)' == 'WasmDebuggerTests'">00:10:00 + <_workItemTimeout Condition="'$(Scenario)' == 'WasmTestOnBrowser' and '$(BrowserHost)' == 'windows'">00:45:00 + + true + true + + $(BuildHelixWorkItemsDependsOn);StageEmSdkForHelix;PrepareForBuildHelixWorkItems_Wasm + false + false + + $(RepositoryEngineeringDir)\testing\scenarios\BuildWasmAppsJobsList.txt + $(RepositoryEngineeringDir)\testing\scenarios\WasmDebuggerTestsJobsList.txt + + + $(RepoRoot)src\mono\wasm\emsdk\ + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'emsdk')) + + true + true + true + true + true + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(IsRunningLibraryTests) + + + true + + + + + + true + true + true + true + + + + + true + true + + + + + + + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'build')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(AspNetCoreAppCurrent)-$(Configuration)')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'RemoteLoopServer', '$(AspNetCoreAppCurrent)-$(Configuration)')) + Workloads- + EMSDK- + $(Scenario)- + + + + + 929513 + 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 + + + 929513 + https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/$(ChromiumRevision)/chrome-win.zip + https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/$(ChromiumRevision)/chromedriver_win32.zip + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_WasmWorkItem Include="$(WorkItemArchiveWildCard)" Exclude="$(HelixCorrelationPayload)" Condition="'$(Scenario)' == 'BuildWasmApps'" /> + + <_WasmWorkItem Include="$(TestArchiveTestsRoot)**/Wasm.Debugger.Tests.zip" Condition="'$(IsWasmDebuggerTests)' == 'true'" /> + <_WasmWorkItem Include="$(TestArchiveRoot)browseronly/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnBrowser'" /> + + + + <_BuildWasmAppsPayloadArchive>@(_WasmWorkItem) + <_WasmDebuggerTestsPayloadArchive>@(_WasmWorkItem) + + + + + + + $(_BuildWasmAppsPayloadArchive) + set "HELIX_XUNIT_ARGS=-class %(Identity)" + export "HELIX_XUNIT_ARGS=-class %(Identity)" + $(HelixCommand) + $(_workItemTimeout) + + + + + + $(_WasmDebuggerTestsPayloadArchive) + + + set TEST_ARGS=--filter "FullyQualifiedName~%(Identity)&Category^!=windows-failing" + export TEST_ARGS="--filter FullyQualifiedName~%(Identity)&Category!=linux-failing" + + $(HelixCommand) + $(_workItemTimeout) + + + + + + <_WasmSampleZipFile Condition="'$(Scenario)' == 'normal' or '$(Scenario)' == ''" Include="$(TestArchiveRoot)runonly/**/*.Console.V8.*.Sample.zip" /> + <_WasmSampleZipFile Condition="'$(Scenario)' == 'WasmTestOnNodeJs'" Include="$(TestArchiveRoot)runonly/**/*.Console.Node.*.Sample.zip" /> + <_WasmSampleZipFile Condition="'$(Scenario)' == 'WasmTestOnBrowser'" Include="$(TestArchiveRoot)runonly/**/*.Browser.*.Sample.zip" /> + + + %(Identity) + $(HelixCommand) + $(_workItemTimeout) + + + + + + + + + + + + <_EmSdkFiles Include="$(EMSDK_PATH)\**\*" Exclude="$(EMSDK_PATH)\.git\**\*" /> + + + + + diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index d1f6b0542de0e..1fa5909fe969a 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -13,6 +13,16 @@ $(BUILD_BUILDNUMBER) default + $(Configuration) + $(TargetArchitecture) + BuildHelixCommand + true + + + + + + @@ -30,23 +40,17 @@ <_workItemTimeout Condition="'$(_workItemTimeout)' == '' and ('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS')">00:45: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:30:00 - <_workItemTimeout Condition="'$(TargetOS)' == 'Browser' and '$(NeedsToBuildWasmAppsOnHelix)' == 'true'">01:00:00 - <_workItemTimeout Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' == 'WasmDebuggerTests'">00:10:00 <_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and '$(Outerloop)' == 'true'">00:20:00 <_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == ''">00:15:00 <_workItemTimeout Condition="'$(Scenario)' != '' and '$(_workItemTimeout)' == ''">00:30:00 - <_workItemTimeout Condition="'$(Scenario)' == 'WasmTestOnBrowser' and '$(BrowserHost)' == 'windows'">00:45:00 + + $(TestArchiveRuntimeFile) - $(TestArchiveTestsRoot)**/Wasm.Debugger.Tests.zip $(TestArchiveTestsRoot)**/*.zip - $(Configuration) - $(TargetArchitecture) - - $(RepoRoot)src\mono\wasm\emsdk\ - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'emsdk')) + $(WaitForWorkItemCompletion) - true - true - true - true - true - - dotnet-workload - sdk-no-workload + dotnet-workload + sdk-no-workload @@ -92,100 +78,21 @@ - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - true - - - true + + false + true + true - - - - - - - - - - - - - - - - - - - - false - true - true - - - - - true - true - true - true - - - - - true - true - - - - - true - true - true - - - - - - + @@ -243,174 +154,38 @@ - - - maccatalyst - $(_workItemTimeout) - $(_workItemTimeout) - - - - - - armeabi-v7a - arm64-v8a - x86_64 - x86 - net.dot.MonoRunner - $(_workItemTimeout) - - - - - + + @(HelixPreCommand) $(HelixCommandPrefix) @(HelixCommandPrefixItem -> 'set "%(Identity)"', ' & ') $(HelixCommandPrefix) @(HelixCommandPrefixItem, ' ') - true + true $(HelixCommandPrefix) $(HelixCommandPrefix) & - $(HelixCommand) dotnet dev-certs https && + $(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) 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" - - - - - - - - - - - - - ios-simulator-64 - tvos-simulator - ios-device - tvos-device - maccatalyst - - - - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'msbuild', 'apple', 'build')) - $(TargetOS)- - - https://netcorenativeassets.blob.core.windows.net/resource-packages/external/macos/cmake/cmake-3.16.4-Darwin-x86_64.tar.gz - - <_XHarnessAppleCustomCommand Condition="'$(NeedsiOSSDK)' == 'true'"> - source build-apple-app.sh - - - - - - - $(AppleTestTarget) - $(_workItemTimeout) - $(_XHarnessAppleCustomCommand) - - - - - $(AppleTestTarget) - $(_workItemTimeout) - $(_XHarnessAppleCustomCommand) - - - - - - false - - 42 - $(AppleTestTarget) - - - - - - false - - 42 - $(AppleTestTarget) - - - - - <_apks Include="$(TestArchiveTestsRoot)**/*.apk" /> - - net.dot.%(Filename) - - <_runonlyApks Include="$(TestArchiveRoot)runonly/**/*.apk" /> - - net.dot.%(Filename) - - 42 - - + $(HelixCommand)call RunTests.cmd + $(HelixCommand) --runtime-path %HELIX_CORRELATION_PAYLOAD% - - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'build')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(AspNetCoreAppCurrent)-$(Configuration)')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'RemoteLoopServer', '$(AspNetCoreAppCurrent)-$(Configuration)')) - Workloads- - EMSDK- - $(Scenario)- - - - - - 929513 - 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 - - - 929513 - https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/$(ChromiumRevision)/chrome-win.zip - https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/$(ChromiumRevision)/chromedriver_win32.zip + $(HelixCommand)./RunTests.sh + $(HelixCommand) --runtime-path "$HELIX_CORRELATION_PAYLOAD" + <_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(MonoAotCrossDir), 'mono-aot-cross')) <_MonoAotCrossCompilerPath Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">$(_MonoAotCrossCompilerPath).exe @@ -418,8 +193,24 @@ + - + + + + + + + + + + + @@ -445,138 +236,33 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - <_WorkItem Include="$(WorkItemArchiveWildCard)" Exclude="$(HelixCorrelationPayload)" /> + <_DefaultWorkItems Include="$(WorkItemArchiveWildCard)" Exclude="$(HelixCorrelationPayload)" /> - <_WorkItem Include="$(TestArchiveRoot)browseronly/**/*.zip" Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' == 'WasmTestOnBrowser'" /> - - + %(Identity) $(HelixCommand) $(_workItemTimeout) - - - - <_BuildWasmAppsPayloadArchive>@(_WorkItem) - <_WasmDebuggerTestsPayloadArchive>@(_WorkItem) - - - - - $(_BuildWasmAppsPayloadArchive) - set "HELIX_XUNIT_ARGS=-class %(Identity)" - export "HELIX_XUNIT_ARGS=-class %(Identity)" - $(HelixCommand) - $(_workItemTimeout) - - - - - - $(_WasmDebuggerTestsPayloadArchive) - - - set TEST_ARGS=--filter "FullyQualifiedName~%(Identity)&Category^!=windows-failing" - export TEST_ARGS="--filter FullyQualifiedName~%(Identity)&Category!=linux-failing" - - $(HelixCommand) - $(_workItemTimeout) - - - - - - <_WasmSampleZipFile Condition="'$(Scenario)' == 'normal' or '$(Scenario)' == ''" Include="$(TestArchiveRoot)runonly/**/*.Console.V8.*.Sample.zip" /> - <_WasmSampleZipFile Condition="'$(Scenario)' == 'WasmTestOnNodeJs'" Include="$(TestArchiveRoot)runonly/**/*.Console.Node.*.Sample.zip" /> - <_WasmSampleZipFile Condition="'$(Scenario)' == 'WasmTestOnBrowser'" Include="$(TestArchiveRoot)runonly/**/*.Browser.*.Sample.zip" /> - - - %(Identity) - $(HelixCommand) - $(_workItemTimeout) - - - - - - - - - <_TestPath Condition="'%(XHarnessAppBundleToTest.CustomCommands)' != ''">$([System.IO.Path]::GetDirectoryName('%(XHarnessAppBundleToTest.Identity)')) - - - + + - - - - - - - + - - <_EmSdkFiles Include="$(EMSDK_PATH)\**\*" Exclude="$(EMSDK_PATH)\.git\**\*" /> - + - + From 44b4932b89591217325fc922d8b42c7174543b35 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Sun, 9 Jan 2022 20:41:58 -0500 Subject: [PATCH 2/5] [wasm] Enable samples that were fixed in an earlier PR Fixes https://github.com/dotnet/runtime/issues/52137 --- src/libraries/tests.proj | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index c0d361ba8dbfa..8df7367d8c776 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -336,12 +336,6 @@ Roslyn4.0.Tests.csproj" /> - - - - - - From 1dccd127bdcec87466fa26d76e632abf951e80d0 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Sun, 9 Jan 2022 20:42:55 -0500 Subject: [PATCH 3/5] [wasm] Update condition for preparing samples for helix --- src/mono/sample/wasm/Directory.Build.targets | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mono/sample/wasm/Directory.Build.targets b/src/mono/sample/wasm/Directory.Build.targets index 6eaaa941cdd5d..4e7b4c60aea30 100644 --- a/src/mono/sample/wasm/Directory.Build.targets +++ b/src/mono/sample/wasm/Directory.Build.targets @@ -41,5 +41,8 @@ - + From 6f5ae4d39cf695c811ec54211d7988a998a3bdb9 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Sun, 9 Jan 2022 20:43:51 -0500 Subject: [PATCH 4/5] cleanup --- eng/pipelines/runtime-manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/runtime-manual.yml b/eng/pipelines/runtime-manual.yml index d6182de37f3be..997849ed2b86c 100644 --- a/eng/pipelines/runtime-manual.yml +++ b/eng/pipelines/runtime-manual.yml @@ -465,7 +465,7 @@ jobs: - normal # -# Build for Browser/wasm and test it on NodeJS +# Build for Browser/wasm and test it on v8, browser, and nodejs # - template: /eng/pipelines/common/platform-matrix.yml parameters: From 2fac92bad3db1ae9b85a2c2455f1a566d026e561 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 10 Jan 2022 16:49:30 -0500 Subject: [PATCH 5/5] address review feedback --- ...ixhelp-mobile-non-wasm.proj => sendtohelix-mobile.targets} | 0 .../{sendtohelixhelp-wasm.proj => sendtohelix-wasm.targets} | 0 src/libraries/sendtohelixhelp.proj | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/libraries/{sendtohelixhelp-mobile-non-wasm.proj => sendtohelix-mobile.targets} (100%) rename src/libraries/{sendtohelixhelp-wasm.proj => sendtohelix-wasm.targets} (100%) diff --git a/src/libraries/sendtohelixhelp-mobile-non-wasm.proj b/src/libraries/sendtohelix-mobile.targets similarity index 100% rename from src/libraries/sendtohelixhelp-mobile-non-wasm.proj rename to src/libraries/sendtohelix-mobile.targets diff --git a/src/libraries/sendtohelixhelp-wasm.proj b/src/libraries/sendtohelix-wasm.targets similarity index 100% rename from src/libraries/sendtohelixhelp-wasm.proj rename to src/libraries/sendtohelix-wasm.targets diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 1fa5909fe969a..3875c28fdf383 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -19,8 +19,8 @@ true - - + +