diff --git a/Directory.Build.props b/Directory.Build.props
index 7d3052b6942f0..7309f8db887f5 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -168,7 +168,9 @@
$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'coreclr', '$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)'))
$(CoreCLRToolPath)
- $([MSBuild]::NormalizeDirectory($(ArtifactsObjDir), 'wasmtime'))
+ $(WASMTIME_PATH)
+ $([MSBuild]::NormalizeDirectory($(ArtifactsObjDir), 'wasmtime'))
+ true
diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml
index f059b449b9467..630e80530e8ab 100644
--- a/eng/pipelines/common/global-build-job.yml
+++ b/eng/pipelines/common/global-build-job.yml
@@ -234,9 +234,9 @@ jobs:
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/'
PublishLocation: Container
- ${{ if ne(parameters.osGroup, 'browser') }}:
+ ${{ if notin(parameters.osGroup, 'browser', 'wasi') }}:
ArtifactName: Logs_Build_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
- ${{ if eq(parameters.osGroup, 'browser') }}:
- ArtifactName: Logs_Build_browser_wasm_${{ parameters.hostedOs }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
+ ${{ if in(parameters.osGroup, 'browser', 'wasi') }}:
+ ArtifactName: Logs_Build_${{ parameters.osGroup }}_${{ parameters.archType }}_${{ parameters.hostedOs }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
continueOnError: true
condition: always()
diff --git a/eng/testing/wasi-provisioning.targets b/eng/testing/wasi-provisioning.targets
index 29c82eadd4c92..23eece8d8018e 100644
--- a/eng/testing/wasi-provisioning.targets
+++ b/eng/testing/wasi-provisioning.targets
@@ -1,11 +1,17 @@
<_WasmtimeVersionFile>$(MonoProjectRoot)wasi/wasmtime-version.txt
- true
+ <_WasmtimeStampPath>$(WasmtimeDir)\.stamp-wasmtime-version.txt
+ true
-
+
+
@@ -24,6 +30,6 @@
-
+
diff --git a/src/libraries/sendtohelix-wasi.targets b/src/libraries/sendtohelix-wasi.targets
index 9998b62ecfd59..b09ff8656dff9 100644
--- a/src/libraries/sendtohelix-wasi.targets
+++ b/src/libraries/sendtohelix-wasi.targets
@@ -15,6 +15,17 @@
- Useful properties to condition on: $(Scenario), $(IsRunningLibraryTests)
- And add to, change, or remove from @(HelixWorkItem)
+
+ ** Staging system directories before use as helix payloads **
+
+ Helix tries to write a `.payload` file to the payload directory, but if that is
+ not writable then it needs to be staged first. For example:
+
+
+
+ Then the payload can use specified as:
+
+
-->
@@ -29,11 +40,13 @@
_AddWorkItemsForBuildWasmApps
- $(BuildHelixWorkItemsDependsOn);StageWasiSdkForHelix;PrepareForBuildHelixWorkItems_Wasi
+ $(BuildHelixWorkItemsDependsOn);PrepareForBuildHelixWorkItems_Wasi
false
false
+
$(RepoRoot)src\mono\wasi\wasi-sdk\
- $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasi', 'wasi-sdk'))
+ $(HelixDependenciesStagingPath)\wasi-sdk
+ $(HelixDependenciesStagingPath)\wasmtime
true
true
@@ -46,6 +59,11 @@
dotnet-none
+
+
+
+
+
@@ -95,13 +113,11 @@
-
-
-
+
-
+
@@ -167,22 +183,4 @@
-
-
-
-
-
-
-
-
- <_WasiSdkFiles Include="$(WASI_SDK_PATH)\**\*" Exclude="$(WASI_SDK_PATH)\.git\**\*" />
-
-
-
-
diff --git a/src/libraries/sendtohelix-wasm.targets b/src/libraries/sendtohelix-wasm.targets
index 2a40f18884fa2..e6be4a9df2f3e 100644
--- a/src/libraries/sendtohelix-wasm.targets
+++ b/src/libraries/sendtohelix-wasm.targets
@@ -15,6 +15,17 @@
- Useful properties to condition on: $(Scenario), $(IsRunningLibraryTests)
- And add to, change, or remove from @(HelixWorkItem)
+
+ ** Staging system directories before use as helix payloads **
+
+ Helix tries to write a `.payload` file to the payload directory, but if that is
+ not writable then it needs to be staged first. For example:
+
+
+
+ Then the payload can use specified as:
+
+
-->
@@ -35,13 +46,13 @@
_AddWorkItemsForBuildWasmApps
- $(BuildHelixWorkItemsDependsOn);StageEmSdkForHelix;PrepareForBuildHelixWorkItems_Wasm
+ $(BuildHelixWorkItemsDependsOn);PrepareForBuildHelixWorkItems_Wasm
false
false
$(RepoRoot)src\mono\wasm\emsdk\
- $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'emsdk'))
+ $(HelixDependenciesStagingPath)\emsdk
chrome
true
@@ -70,6 +81,15 @@
<_HelixLocalNodePath Condition="'$(NeedsEMSDK)' == 'true' and '$(WindowsShell)' == 'true'">%HELIX_CORRELATION_PAYLOAD%\build\emsdk\node
+
+
+
+
@@ -274,22 +294,4 @@
-
-
-
-
-
-
-
-
- <_EmSdkFiles Include="$(EMSDK_PATH)\**\*" Exclude="$(EMSDK_PATH)\.git\**\*" />
-
-
-
-
diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj
index ee53ea89b53fd..1e90bd57cb637 100644
--- a/src/libraries/sendtohelixhelp.proj
+++ b/src/libraries/sendtohelixhelp.proj
@@ -13,8 +13,9 @@
$(Configuration)
$(TargetArchitecture)
- BuildHelixCommand
+ BuildHelixCommand;StageDependenciesForHelix
true
+ $([MSBuild]::NormalizeDirectory($(ArtifactsObjDir), 'helix-staging'))
@@ -104,6 +105,11 @@
SetStressModes_$(Scenario).sh
+
+ <__HelixDependenciesToStageThatDontExist Include="@(HelixDependenciesToStage)" />
+ <__HelixDependenciesToStageThatDontExist Remove="@(HelixDependenciesToStage->Exists())" />
+
+
@@ -298,4 +304,33 @@
+
+
+
+
+
+
+ <__HelixDependenciesToStageThatDontExist Name="%(FileName)" />
+
+
+
+
+
+
+ <_FilesToStage Remove="@(_FilesToStage)" />
+ <_FilesToStage Include="%(__HelixDependenciesToStageThatDontExist.SourcePath)\**\*"
+ Exclude="%(__HelixDependenciesToStageThatDontExist.SourcePath)\.git\**\*"
+ DirName="@(__HelixDependenciesToStageThatDontExist->'%(Name)')" />
+
+
+
+
diff --git a/src/mono/sample/wasi/Directory.Build.targets b/src/mono/sample/wasi/Directory.Build.targets
index 780be2b6702bb..b5d9605d7a6d8 100644
--- a/src/mono/sample/wasi/Directory.Build.targets
+++ b/src/mono/sample/wasi/Directory.Build.targets
@@ -3,7 +3,6 @@
- true
<_SampleProject Condition="'$(_SampleProject)' == ''">$(MSBuildProjectFile)
<_SampleAssembly Condition="'$(_SampleAssembly)' == ''">$(TargetFileName)
<_ExeExt Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">.exe
diff --git a/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj b/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj
index 0663c1bc7a620..dde5b3a169bea 100644
--- a/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj
+++ b/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj
@@ -15,7 +15,6 @@
false
true
- true
false