|
335 | 335 | Text="Analyzers must only target netstandard2.0 since they run in the compiler which targets netstandard2.0. The following files were found to target '%(_AnalyzerPackFile.TargetFramework)': @(_AnalyzerPackFile)" /> |
336 | 336 | </Target> |
337 | 337 |
|
338 | | - <!-- ************** Workload based testing ************** --> |
339 | | - |
340 | | - <Target Name="ProvisionSdkForWorkloadTesting" Condition="!Exists($(SdkForWorkloadTestingStampPath)) and '$(InstallWorkloadForTesting)' == 'true'"> |
341 | | - <Error Text="%24(SdkPathForWorkloadTesting) is not set" Condition="'$(SdkPathForWorkloadTesting)' == ''" /> |
342 | | - <Error Text="%24(SdkVersionForWorkloadTesting) is not set" Condition="'$(SdkVersionForWorkloadTesting)' == ''" /> |
343 | | - |
344 | | - <Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests" Importance="High" /> |
345 | | - |
346 | | - <RemoveDir Directories="$(SdkPathForWorkloadTesting)" /> |
347 | | - <MakeDir Directories="$(SdkPathForWorkloadTesting)" /> |
348 | | - |
349 | | - <PropertyGroup> |
350 | | - <_DotNetInstallScriptPath Condition="!$([MSBuild]::IsOSPlatform('windows'))">$(DOTNET_INSTALL_DIR)/dotnet-install.sh</_DotNetInstallScriptPath> |
351 | | - <_DotNetInstallScriptPath Condition=" $([MSBuild]::IsOSPlatform('windows'))">$(RepoRoot).dotnet\dotnet-install.ps1</_DotNetInstallScriptPath> |
352 | | - </PropertyGroup> |
353 | | - |
354 | | - <Exec Condition="!$([MSBuild]::IsOSPlatform('windows'))" |
355 | | - Command="chmod +x $(_DotNetInstallScriptPath); $(_DotNetInstallScriptPath) -i $(SdkPathForWorkloadTesting) -v $(SdkVersionForWorkloadTesting)" /> |
356 | | - |
357 | | - <Exec Condition="$([MSBuild]::IsOSPlatform('windows'))" |
358 | | - Command='powershell -ExecutionPolicy ByPass -NoProfile -command "& $(_DotNetInstallScriptPath) -InstallDir $(SdkPathForWorkloadTesting) -Version $(SdkVersionForWorkloadTesting)"' /> |
359 | | - |
360 | | - <WriteLinesToFile File="$(SdkForWorkloadTestingStampPath)" Lines="" Overwrite="true" /> |
361 | | - </Target> |
362 | | - |
363 | | - <Target Name="GetWorkloadInputs"> |
364 | | - <ItemGroup> |
365 | | - <AvailableNuGetsInArtifacts Include="$(LibrariesShippingPackagesDir)\*.nupkg" /> |
366 | | - </ItemGroup> |
367 | | - |
368 | | - <Error Text="Cannot find any nupkg files in $(LibrariesShippingPackagesDir), needed for workloads" Condition="@(AvailableNuGetsInArtifacts->Count()) == 0" /> |
369 | | - </Target> |
370 | | - |
371 | | - <UsingTask Condition="'$(InstallWorkloadForTesting)' == 'true'" |
372 | | - TaskName="Microsoft.Workload.Build.Tasks.InstallWorkloadFromArtifacts" |
373 | | - AssemblyFile="$(WorkloadBuildTasksAssemblyPath)" /> |
374 | | - |
375 | | - <UsingTask Condition="'$(InstallWorkloadForTesting)' == 'true'" |
376 | | - TaskName="GenerateFileFromTemplate" |
377 | | - AssemblyFile="$(WorkloadBuildTasksAssemblyPath)" /> |
378 | | - |
379 | | - <Target Name="InstallWorkloadUsingArtifacts" |
380 | | - AfterTargets="ArchiveTests" |
381 | | - DependsOnTargets="ProvisionSdkForWorkloadTesting;GetWorkloadInputs" |
382 | | - Inputs="@(AvailableNuGetsInArtifacts)" |
383 | | - Outputs="$(WorkloadStampFile)" |
384 | | - Condition="'$(InstallWorkloadForTesting)' == 'true'"> |
385 | | - |
386 | | - <ItemGroup> |
387 | | - <_PropsForAOTCrossBuild Include="TestingWorkloads=true" /> |
388 | | - <_PropsForAOTCrossBuild Include="Configuration=$(Configuration)" /> |
389 | | - <_PropsForAOTCrossBuild Include="TargetOS=Browser" /> |
390 | | - <_PropsForAOTCrossBuild Include="TargetArchitecture=wasm" /> |
391 | | - <_PropsForAOTCrossBuild Include="ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)" /> |
392 | | - |
393 | | - <_PropsForAOTCrossBuild Include="RuntimeIdentifier=$(NETCoreSdkRuntimeIdentifier)" /> |
394 | | - <_PropsForAOTCrossBuild Include="TargetCrossRid=$(RuntimeIdentifier)" /> |
395 | | - </ItemGroup> |
396 | | - |
397 | | - <Exec Command="dotnet build -bl -restore -t:Pack @(_PropsForAOTCrossBuild -> '-p:%(Identity)', ' ') Microsoft.NETCore.App.MonoCrossAOT.sfxproj" |
398 | | - WorkingDirectory="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App" /> |
399 | | - |
400 | | - <ItemGroup> |
401 | | - <_NuGetSourceForWorkloads Include="dotnet6" Value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" /> |
402 | | - <_BuiltNuGets Include="$(LibrariesShippingPackagesDir)\*.nupkg" /> |
403 | | - </ItemGroup> |
404 | | - |
405 | | - <PropertyGroup> |
406 | | - <!-- Eg. Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm.6.0.0-dev.nupkg --> |
407 | | - <_AOTCrossNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.AOT.$(NETCoreSdkRuntimeIdentifier).Cross.$(RuntimeIdentifier).$(PackageVersion).nupkg</_AOTCrossNuGetPath> |
408 | | - </PropertyGroup> |
409 | | - |
410 | | - <Error Text="Could not find cross compiler nupkg at $(_AOTCrossNuGetPath). Found packages: @(_BuiltNuGets)" |
411 | | - Condition="!Exists($(_AOTCrossNuGetPath))" /> |
412 | | - |
413 | | - <Message Text="Packages found in $(LibrariesShippingPackagesDir): @(_BuiltNuGets)" Importance="Low" /> |
414 | | - |
415 | | - <InstallWorkloadFromArtifacts |
416 | | - WorkloadId="@(WorkloadIdForTesting)" |
417 | | - VersionBand="$(SdkBandVersion)" |
418 | | - LocalNuGetsPath="$(LibrariesShippingPackagesDir)" |
419 | | - ExtraNuGetSources="@(_NuGetSourceForWorkloads)" |
420 | | - SdkDir="$(SdkPathForWorkloadTesting)" /> |
421 | | - |
422 | | - <WriteLinesToFile File="$(WorkloadStampFile)" Lines="" Overwrite="true" /> |
423 | | - </Target> |
| 338 | + <Import Project="$(MSBuildThisFileDirectory)workloads-testing.targets" /> |
424 | 339 | </Project> |
0 commit comments