diff --git a/eng/pipelines/runtime-wasm-features.yml b/eng/pipelines/runtime-wasm-features.yml new file mode 100644 index 00000000000000..940b59c800ab25 --- /dev/null +++ b/eng/pipelines/runtime-wasm-features.yml @@ -0,0 +1,27 @@ +# This pipeline is meant to be run manually. It contains +# jobs that exercise extra/optional features for wasm, eg. SIMD + +trigger: none + +variables: + - template: /eng/pipelines/common/variables.yml + +jobs: + +# Evaluate paths +- template: /eng/pipelines/common/evaluate-default-paths.yml + +# Run AOT tests with SIMD enabled +- template: /eng/pipelines/common/templates/wasm-library-tests.yml + parameters: + platforms: + - Browser_wasm + nameSuffix: _SIMD_AOT + isExtraPlatformsBuild: false + isWasmOnlyBuild: true + extraBuildArgs: /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true + extraHelixArgs: /p:NeedsToBuildWasmAppsOnHelix=true /p:WasmEnableSIMD=true + runSmokeOnlyArg: '' + alwaysRun: true + scenarios: + - WasmTestOnNodeJS diff --git a/eng/pipelines/runtime-wasm.yml b/eng/pipelines/runtime-wasm.yml index 62de930be9d1f9..04eac67a9399cf 100644 --- a/eng/pipelines/runtime-wasm.yml +++ b/eng/pipelines/runtime-wasm.yml @@ -19,3 +19,22 @@ jobs: parameters: isWasmOnlyBuild: ${{ variables.isWasmOnlyBuild }} isRollingBuild: ${{ variables.isRollingBuild }} + +# Run AOT tests with SIMD enabled +- template: /eng/pipelines/common/templates/wasm-library-tests.yml + parameters: + platforms: + - Browser_wasm + nameSuffix: _SIMD_AOT + isExtraPlatformsBuild: false + isWasmOnlyBuild: true + extraBuildArgs: /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true + extraHelixArgs: /p:NeedsToBuildWasmAppsOnHelix=true /p:WasmEnableSIMD=true + runSmokeOnlyArg: '' + alwaysRun: true + # failures due to + # https://github.com/dotnet/runtime/issues/75044 + # and https://github.com/dotnet/runtime/issues/75098 + shouldContinueOnError: true + scenarios: + - WasmTestOnNodeJS diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index b4187faf8f6dda..b85acb34fb6196 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -105,6 +105,8 @@ <_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration) <_AOTBuildCommand>$(_AOTBuildCommand) /p:RunAOTCompilation=$(RunAOTCompilation) + <_AOTBuildCommand Condition="'$(BrowserHost)' == 'windows'">$(_AOTBuildCommand) %AOT_BUILD_ARGS% + <_AOTBuildCommand Condition="'$(BrowserHost)' != 'windows'">$(_AOTBuildCommand) %24AOT_BUILD_ARGS <_AOTBuildCommand>$(_AOTBuildCommand) $(_ShellCommandSeparator) cd wasm_build/AppBundle $(_AOTBuildCommand) diff --git a/src/libraries/System.Runtime.Intrinsics/tests/System.Runtime.Intrinsics.Tests.csproj b/src/libraries/System.Runtime.Intrinsics/tests/System.Runtime.Intrinsics.Tests.csproj index 3009539cc05335..6c0187cf21ff84 100644 --- a/src/libraries/System.Runtime.Intrinsics/tests/System.Runtime.Intrinsics.Tests.csproj +++ b/src/libraries/System.Runtime.Intrinsics/tests/System.Runtime.Intrinsics.Tests.csproj @@ -7,6 +7,10 @@ $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser $(Features.Replace('nullablePublicOnly', '') + + wasm.helix.targets + $(WasmXHarnessArgs) --engine-arg=--experimental-wasm-simd diff --git a/src/libraries/System.Runtime.Intrinsics/tests/wasm.helix.targets b/src/libraries/System.Runtime.Intrinsics/tests/wasm.helix.targets new file mode 100644 index 00000000000000..65123620588e8d --- /dev/null +++ b/src/libraries/System.Runtime.Intrinsics/tests/wasm.helix.targets @@ -0,0 +1,49 @@ + + + $(HelixExtensionTargets);_AddHelixRuntimeIntrinsicsItems + <_RuntimeIntrinsicsProjectName>System.Runtime.Intrinsics.Tests + + + + + + + <_AOTBuildArgsSIMD Condition="'$(OS)' != 'Windows_NT'">"WasmXHarnessArgs=$WasmXHarnessArgs --engine-arg=--experimental-wasm-simd" + <_AOTBuildArgsSIMD Condition="'$(OS)' == 'Windows_NT'">"WasmXHarnessArgs=%WasmXHarnessArgs% --engine-arg=--experimental-wasm-simd" + + + + <_AOTBuildArgsSIMD Condition="'$(OS)' != 'Windows_NT'">$(_AOTBuildArgsSIMD) "AOT_BUILD_ARGS=-p:WasmEnableSIMD=true" + + <_AOTBuildArgsSIMD Condition="'$(OS)' != 'Windows_NT'">export $(_AOTBuildArgsSIMD) + <_AOTBuildArgsSIMD Condition="'$(OS)' == 'Windows_NT'">set $(_AOTBuildArgsSIMD) + + + + + + + + $(TestArchiveTestsDir)$(_RuntimeIntrinsicsProjectName).zip + $(HelixCommand) + $(_workItemTimeout) + + + + $(TestArchiveTestsDir)$(_RuntimeIntrinsicsProjectName).zip + $(HelixCommand) + $(_workItemTimeout) + + $(_AOTBuildArgsSIMD) + + + <_RuntimeIntrinsicsHelixItem + Include="@(HelixWorkItem)" + Condition="$([System.String]::new('%(HelixWorkItem.Identity)').EndsWith('-$(_RuntimeIntrinsicsProjectName)'))" /> + + + + + diff --git a/src/libraries/sendtohelix-wasm.targets b/src/libraries/sendtohelix-wasm.targets index 82b14495dd5267..ed76264134f306 100644 --- a/src/libraries/sendtohelix-wasm.targets +++ b/src/libraries/sendtohelix-wasm.targets @@ -305,7 +305,9 @@ <_EmSdkFiles Include="$(EMSDK_PATH)\**\*" Exclude="$(EMSDK_PATH)\.git\**\*" /> - + diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 8e6d4712feee36..07349a0d3d4497 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -19,6 +19,7 @@ false false + true false @@ -545,7 +546,12 @@ - + + + +