diff options
author | Radek Doulik <radekdoulik@gmail.com> | 2022-07-15 11:34:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 11:34:41 +0300 |
commit | 91dda98cc9d8c25350ce16807a7cbc90b4fc49ab (patch) | |
tree | 68962c1eca1b21b93a0bcf7a482982b5c3a804ac /eng/testing | |
parent | 8f135a28b705c523ecea3aefd8c166adfa6ce2a5 (diff) |
[wasm] Add interop code to the browser template (#72172)
* [wasm] Add interop code to the browser template
* Try to use AnalyzerReference instead of ProjectReference
* Try to make the analyzer reference unconditional
* fix
* no namespace fix
* InstallWorkloadFromArtifacts: Update the targeting pack from the local
.. nugets.
* Wasm.Build.Tests: remove the app.ref fixup from the targets
* workload-testing.targets: Ensure that app.ref nuget is available
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Diffstat (limited to 'eng/testing')
-rw-r--r-- | eng/testing/workloads-testing.targets | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/eng/testing/workloads-testing.targets b/eng/testing/workloads-testing.targets index c4e9e5e0e63..0dc8c88d157 100644 --- a/eng/testing/workloads-testing.targets +++ b/eng/testing/workloads-testing.targets @@ -97,36 +97,50 @@ <Target Name="InstallWorkloadUsingArtifacts" AfterTargets="ArchiveTests" - DependsOnTargets="ProvisionSdkForWorkloadTesting;GetWorkloadInputs;_InstallWorkload;_UpdateManifestsForSdkWithNoWorkload" + DependsOnTargets="_GetNuGetsToBuild;_PreparePackagesForWorkloadInstall;ProvisionSdkForWorkloadTesting;GetWorkloadInputs;_InstallWorkload;_UpdateManifestsForSdkWithNoWorkload" Condition="'$(InstallWorkloadForTesting)' == 'true'" /> - <Target Name="_InstallWorkload" - Inputs="@(AvailableNuGetsInArtifacts)" - Outputs="$(SdkWithWorkload_WorkloadStampPath)"> + <Target Name="_GetNuGetsToBuild" Returns="@(_NuGetsToBuild)"> + <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> <ItemGroup> - <_PropsForAOTCrossBuild Include="TestingWorkloads=true" /> - <_PropsForAOTCrossBuild Include="Configuration=$(Configuration)" /> - <_PropsForAOTCrossBuild Include="TargetOS=Browser" /> - <_PropsForAOTCrossBuild Include="TargetArchitecture=wasm" /> - <_PropsForAOTCrossBuild Include="ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)" /> + <_PropsForNuGetBuild Include="Configuration=$(Configuration)" /> + <_PropsForNuGetBuild Include="TargetOS=Browser" /> + <_PropsForNuGetBuild Include="TargetArchitecture=wasm" /> + <_PropsForNuGetBuild Include="ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)" /> + <_PropsForAOTCrossBuild Include="@(_PropsForNuGetBuild)" /> + <_PropsForAOTCrossBuild Include="TestingWorkloads=true" /> <_PropsForAOTCrossBuild Include="RuntimeIdentifier=$(NETCoreSdkRuntimeIdentifier)" /> <_PropsForAOTCrossBuild Include="TargetCrossRid=$(RuntimeIdentifier)" /> + + <_NuGetsToBuild Include="$(_AOTCrossNuGetPath)" + Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App\Microsoft.NETCore.App.MonoCrossAOT.sfxproj" + BuildArgs="@(_PropsForAOTCrossBuild -> '-p:%(Identity)', ' ')" /> + + <_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Ref.$(_PackageVersion).nupkg" + Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App\Microsoft.NETCore.App.Ref.sfxproj" + BuildArgs="@(_PropsForNuGetBuild -> '-p:%(Identity)', ' ')" /> </ItemGroup> + </Target> - <Exec Command="dotnet build -bl -restore -t:Pack @(_PropsForAOTCrossBuild -> '-p:%(Identity)', ' ') Microsoft.NETCore.App.MonoCrossAOT.sfxproj" - WorkingDirectory="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App" /> + <Target Name="_PreparePackagesForWorkloadInstall" Inputs="%(_NuGetsToBuild.Project)" Outputs="%(_NuGetsToBuild.Identity)"> + <Exec Command="dotnet build -bl -restore -v:q -t:Pack %(_NuGetsToBuild.BuildArgs) %(_NuGetsToBuild.Project)" /> + </Target> + <Target Name="_InstallWorkload" + Inputs="@(AvailableNuGetsInArtifacts)" + Outputs="$(SdkWithWorkload_WorkloadStampPath)"> <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)" |