mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
* [wasm] Use --emit-symbol-map to generate a dotnet.js.symbols .. and package it in the runtime pack. This can be disabled with `$(WasmEmitSymbolMap)`. * wasm.proj: cleanup * [wasm] honor XunitShowProgress property * [wasm] avoid extra build when publishing * [wasm] WasmAppBuilder: Fix handling of ExtraFilesToDeploy It incorrectly treated `TargetPath` metadata as a directory. * [wasm] Disable generation of symbol maps by default - this is needed because the sdk needs to handle this file specifically, and would break tests. - Once, the sdk gets the fix, then we can turn this on by default. - For tests, turn it on by default * [wasm] Deploy dotnet.js.symbols with the tests * cleanup * [wasm] dotnet-install.sh logs errors from curl, while trying older urls, .. don't let that fail the build. * [wasm] Temporarily disable WasmEmitSymbolMap by default .. because sdk needs a fix for blazor projects to handle `dotnet.js.symbols`. But explicitly enable this for tests. * Address review feedback
139 lines
7.1 KiB
XML
139 lines
7.1 KiB
XML
<Project>
|
|
|
|
<PropertyGroup Condition="'$(TestUsingWorkloads)' == 'true'">
|
|
<!-- for non-ci builds, we install the sdk when tests are run -->
|
|
<InstallWorkloadForTesting Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(ArchiveTests)' == 'true'">true</InstallWorkloadForTesting>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="ProvisionSdkForWorkloadTesting"
|
|
DependsOnTargets="_ProvisionSdkWithNoWorkload"
|
|
Condition="!Exists($(SdkWithNoWorkloadStampPath)) or !Exists($(SdkWithWorkloadStampPath))">
|
|
|
|
<Error Text="%24(SdkWithWorkloadForTestingPath) is not set" Condition="'$(SdkWithWorkloadForTestingPath)' == ''" />
|
|
<Error Text="%24(SdkVersionForWorkloadTesting) is not set" Condition="'$(SdkVersionForWorkloadTesting)' == ''" />
|
|
|
|
<Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests into $(SdkWithWorkloadForTestingPath)" Importance="High" />
|
|
|
|
<RemoveDir Directories="$(SdkWithWorkloadForTestingPath)" />
|
|
<MakeDir Directories="$(SdkWithWorkloadForTestingPath)" />
|
|
|
|
<ItemGroup>
|
|
<_SourceFiles Include="$(SdkWithNoWorkloadForTestingPath)\**" />
|
|
</ItemGroup>
|
|
|
|
<Copy SourceFiles="@(_SourceFiles)" DestinationFolder="$(SdkWithWorkloadForTestingPath)\%(_SourceFiles.RecursiveDir)" />
|
|
|
|
<WriteLinesToFile File="$(SdkWithWorkloadStampPath)" Lines="" Overwrite="true" />
|
|
</Target>
|
|
|
|
<Target Name="_ProvisionSdkWithNoWorkload" Condition="!Exists($(SdkWithNoWorkloadStampPath))">
|
|
<Error Text="%24(SdkWithNoWorkloadForTestingPath) is not set" Condition="'$(SdkWithNoWorkloadForTestingPath)' == ''" />
|
|
<Error Text="%24(SdkVersionForWorkloadTesting) is not set" Condition="'$(SdkVersionForWorkloadTesting)' == ''" />
|
|
|
|
<Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests into $(SdkWithNoWorkloadForTestingPath)" Importance="High" />
|
|
|
|
<RemoveDir Directories="$(SdkWithNoWorkloadForTestingPath)" />
|
|
<MakeDir Directories="$(SdkWithNoWorkloadForTestingPath)" />
|
|
|
|
<PropertyGroup>
|
|
<_DotNetInstallScriptName Condition="!$([MSBuild]::IsOSPlatform('windows'))">dotnet-install.sh</_DotNetInstallScriptName>
|
|
<_DotNetInstallScriptName Condition=" $([MSBuild]::IsOSPlatform('windows'))">dotnet-install.ps1</_DotNetInstallScriptName>
|
|
|
|
<_DotNetInstallScriptPath>$(ArtifactsObjDir)$(_DotNetInstallScriptName)</_DotNetInstallScriptPath>
|
|
</PropertyGroup>
|
|
|
|
<DownloadFile SourceUrl="https://dot.net/v1/$(_DotNetInstallScriptName)"
|
|
DestinationFolder="$(ArtifactsObjDir)"
|
|
Retries="3"
|
|
Condition="!Exists($(_DotNetInstallScriptPath))"/>
|
|
|
|
<Exec Condition="!$([MSBuild]::IsOSPlatform('windows'))"
|
|
IgnoreStandardErrorWarningFormat="true"
|
|
Command="chmod +x $(_DotNetInstallScriptPath); $(_DotNetInstallScriptPath) -i $(SdkWithNoWorkloadForTestingPath) -v $(SdkVersionForWorkloadTesting)" />
|
|
|
|
<Exec Condition="$([MSBuild]::IsOSPlatform('windows'))"
|
|
Command='powershell -ExecutionPolicy ByPass -NoProfile -command "& $(_DotNetInstallScriptPath) -InstallDir $(SdkWithNoWorkloadForTestingPath) -Version $(SdkVersionForWorkloadTesting)"' />
|
|
|
|
<WriteLinesToFile File="$(SdkWithNoWorkloadStampPath)" Lines="" Overwrite="true" />
|
|
</Target>
|
|
|
|
<Target Name="GetWorkloadInputs">
|
|
<ItemGroup>
|
|
<AvailableNuGetsInArtifacts Include="$(LibrariesShippingPackagesDir)\*.nupkg" />
|
|
</ItemGroup>
|
|
|
|
<Error Text="Cannot find any nupkg files in $(LibrariesShippingPackagesDir), needed for workloads" Condition="@(AvailableNuGetsInArtifacts->Count()) == 0" />
|
|
</Target>
|
|
|
|
<UsingTask Condition="'$(InstallWorkloadForTesting)' == 'true'"
|
|
TaskName="Microsoft.Workload.Build.Tasks.InstallWorkloadFromArtifacts"
|
|
AssemblyFile="$(WorkloadBuildTasksAssemblyPath)" />
|
|
|
|
<UsingTask Condition="'$(InstallWorkloadForTesting)' == 'true'"
|
|
TaskName="GenerateFileFromTemplate"
|
|
AssemblyFile="$(WorkloadBuildTasksAssemblyPath)" />
|
|
|
|
<Target Name="InstallWorkloadUsingArtifacts"
|
|
AfterTargets="ArchiveTests"
|
|
DependsOnTargets="ProvisionSdkForWorkloadTesting;GetWorkloadInputs;_InstallWorkload;_UpdateManifestsForSdkWithNoWorkload"
|
|
Condition="'$(InstallWorkloadForTesting)' == 'true'" />
|
|
|
|
<Target Name="_InstallWorkload"
|
|
Inputs="@(AvailableNuGetsInArtifacts)"
|
|
Outputs="$(SdkWithWorkload_WorkloadStampPath)">
|
|
|
|
<ItemGroup>
|
|
<_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)" />
|
|
</ItemGroup>
|
|
|
|
<Exec Command="dotnet build -bl -restore -t:Pack @(_PropsForAOTCrossBuild -> '-p:%(Identity)', ' ') Microsoft.NETCore.App.MonoCrossAOT.sfxproj"
|
|
WorkingDirectory="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App" />
|
|
|
|
<ItemGroup>
|
|
<_BuiltNuGets Include="$(LibrariesShippingPackagesDir)\*.nupkg" />
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup>
|
|
<_PackageVersion>$(PackageVersion)</_PackageVersion>
|
|
<_PackageVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</_PackageVersion>
|
|
<!-- Eg. Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm.6.0.0-dev.nupkg -->
|
|
<_AOTCrossNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.AOT.$(NETCoreSdkRuntimeIdentifier).Cross.$(RuntimeIdentifier).$(_PackageVersion).nupkg</_AOTCrossNuGetPath>
|
|
</PropertyGroup>
|
|
|
|
<Error Text="Could not find cross compiler nupkg at $(_AOTCrossNuGetPath). Found packages: @(_BuiltNuGets)"
|
|
Condition="!Exists($(_AOTCrossNuGetPath))" />
|
|
|
|
<Message Text="Packages found in $(LibrariesShippingPackagesDir): @(_BuiltNuGets)" Importance="Low" />
|
|
|
|
<InstallWorkloadFromArtifacts
|
|
WorkloadId="@(WorkloadIdForTesting)"
|
|
VersionBand="$(SdkBandVersion)"
|
|
LocalNuGetsPath="$(LibrariesShippingPackagesDir)"
|
|
TemplateNuGetConfigPath="$(RepoRoot)NuGet.config"
|
|
SdkDir="$(SdkWithWorkloadForTestingPath)" />
|
|
<WriteLinesToFile File="$(SdkWithWorkload_WorkloadStampPath)" Lines="" Overwrite="true" />
|
|
</Target>
|
|
|
|
<Target Name="_UpdateManifestsForSdkWithNoWorkload"
|
|
Inputs="@(AvailableNuGetsInArtifacts)"
|
|
Outputs="$(SdkWithNoWorkload_WorkloadStampPath)">
|
|
|
|
<InstallWorkloadFromArtifacts
|
|
WorkloadId="@(WorkloadIdForTesting)"
|
|
VersionBand="$(SdkBandVersion)"
|
|
LocalNuGetsPath="$(LibrariesShippingPackagesDir)"
|
|
TemplateNuGetConfigPath="$(RepoRoot)NuGet.config"
|
|
SdkDir="$(SdkWithNoWorkloadForTestingPath)"
|
|
OnlyUpdateManifests="true"/>
|
|
|
|
<WriteLinesToFile File="$(SdkWithNoWorkload_WorkloadStampPath)" Lines="" Overwrite="true" />
|
|
</Target>
|
|
</Project>
|