Skip to content

Commit

Permalink
[wasm][bench] Change target dependencies (dotnet#98163)
Browse files Browse the repository at this point in the history
To make it easier to build sample with startup templates, without
running the sample. This fits better into the measurements infrastructure.
  • Loading branch information
radekdoulik authored Feb 8, 2024
1 parent e87d5d9 commit 4312cc2
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
<EnableAggressiveTrimming Condition="'$(EnableAOTAndTrimming)' != ''">$(EnableAOTAndTrimming)</EnableAggressiveTrimming>
<PublishTrimmed Condition="'$(EnableAOTAndTrimming)' != ''">$(EnableAOTAndTrimming)</PublishTrimmed>
<RunAOTCompilation Condition="'$(EnableAOTAndTrimming)' != ''">$(EnableAOTAndTrimming)</RunAOTCompilation>
<RunSampleDependencies>RunSampleWithBrowserAndSimpleServer</RunSampleDependencies>
<RunSampleDependencies Condition="'$(BlazorStartup)' == 'true'">BuildBlazorFrame;$(RunSampleDependencies)</RunSampleDependencies>
<RunSampleDependencies Condition="'$(BrowserStartup)' == 'true'">BuildBrowserFrame;$(RunSampleDependencies)</RunSampleDependencies>
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,7 +19,7 @@
<Compile Remove="Console/Console.cs" />
</ItemGroup>

<Target Name="RunSample" DependsOnTargets="$(RunSampleDependencies)" />
<Target Name="RunSample" DependsOnTargets="RunSampleWithBrowserAndSimpleServer" />

<PropertyGroup>
<NugetConfigContent>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
Expand Down Expand Up @@ -75,7 +72,7 @@
<Exec WorkingDirectory="$(MSBuildThisFileDirectory)../blazor-frame" Command="git apply blazor-frame.diff" />
</Target>

<Target Name="BuildBlazorFrame" DependsOnTargets="BuildSampleInTree;BuildWBT;PrepareBlazorTemplate">
<Target Name="BuildBlazorFrame" AfterTargets="BuildSampleInTree" Condition="'$(BlazorStartup)' == 'true'" DependsOnTargets="BuildWBT;PrepareBlazorTemplate">
<Exec EnvironmentVariables="MSBuildSDKsPath=;DOTNET_ROOT=$(ArtifactsDir)bin/dotnet-latest;PATH=$(ArtifactsDir)bin/dotnet-latest:$(PATH)" WorkingDirectory="$(MSBuildThisFileDirectory)../blazor-frame/blazor" Command="dotnet publish blazor.csproj -c $(Configuration) -p:WBTOverrideRuntimePack=true -p:TargetOS=browser -p:TargetArchitecture=wasm $(BuildAdditionalArgs)" />

<ItemGroup>
Expand All @@ -87,7 +84,7 @@
DestinationFolder="$(MSBuildThisFileDirectory)/bin/$(Configuration)/AppBundle/blazor-template/%(RecursiveDir)" />
</Target>

<Target Name="BuildBrowserFrame" DependsOnTargets="BuildSampleInTree;BuildWBT">
<Target Name="BuildBrowserFrame" AfterTargets="BuildSampleInTree" Condition="'$(BrowserStartup)' == 'true'" DependsOnTargets="BuildWBT">
<ItemGroup>
<OverrideFiles Include="$(MonoProjectRoot)wasm/Wasm.Build.Tests/data/WasmOverridePacks.targets" />
<OverrideFiles Include="$(MonoProjectRoot)wasm/Wasm.Build.Tests/data/Blazor.Directory.Build.targets" />
Expand Down

0 comments on commit 4312cc2

Please sign in to comment.