Follow-up on enabling Windows VMR build (#18239)

This commit is contained in:
Viktor Hofer 2024-01-16 15:29:50 +01:00 committed by GitHub
parent 0b9698a9fb
commit b6e0746caf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 28 deletions

View file

@ -81,8 +81,8 @@
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</ArtifactsDir>
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
<RepositoryEngineeringDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'eng'))</RepositoryEngineeringDir>
<ArtifactsLogDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'log', '$(Configuration)'))</ArtifactsLogDir>
<RepositoryEngineeringDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'eng'))</RepositoryEngineeringDir>
<!-- ProjectLayout.props -->
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
@ -153,11 +153,11 @@
<ArcadeBootstrapPackageDir Condition="'$(DotNetBuildFromSource)' == 'true'">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'ArcadeBootstrapPackage'))</ArcadeBootstrapPackageDir>
<ArcadeBootstrapPackageDir Condition="'$(DotNetBuildFromSource)' != 'true'">$(NuGetPackageRoot)</ArcadeBootstrapPackageDir>
<!-- Collapsed output and intermediate path folders that are architecture and configuration specific. -->
<CollapsedOutputPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', '$(TargetArchitecture)', '$(Configuration)'))</CollapsedOutputPath>
<CollapsedIntermediatePath>$([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', '$(TargetArchitecture)', '$(Configuration)'))</CollapsedIntermediatePath>
<!-- Shared output and intermediate output path folders that are architecture and configuration specific. -->
<SharedOutputPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', '$(TargetArchitecture)', '$(Configuration)'))</SharedOutputPath>
<SharedIntermediateOutputPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', '$(TargetArchitecture)', '$(Configuration)'))</SharedIntermediateOutputPath>
<SourceBuiltBlobFeedDir>$([MSBuild]::NormalizeDirectory('$(CollapsedIntermediatePath)', 'blob-feed'))</SourceBuiltBlobFeedDir>
<SourceBuiltBlobFeedDir>$([MSBuild]::NormalizeDirectory('$(SharedIntermediateOutputPath)', 'blob-feed'))</SourceBuiltBlobFeedDir>
<SourceBuiltPackagesPath>$([MSBuild]::NormalizeDirectory('$(SourceBuiltBlobFeedDir)', 'packages'))</SourceBuiltPackagesPath>
<SourceBuiltAssetsDir>$([MSBuild]::NormalizeDirectory('$(SourceBuiltBlobFeedDir)', 'assets'))</SourceBuiltAssetsDir>

View file

@ -5,7 +5,7 @@
<Target Name="DetermineMicrosoftSourceBuildIntermediateInstallerVersion"
Condition="'$(DotNetBuildFromSource)' == 'true'">
<!-- Manually load the installer version from the PVP. -->
<XmlPeek XmlInputPath="$(CollapsedIntermediatePath)PackageVersions.package-source-build.Current.props"
<XmlPeek XmlInputPath="$(SharedIntermediateOutputPath)PackageVersions.package-source-build.Current.props"
Query="msb:Project/msb:PropertyGroup/msb:MicrosoftSourceBuildIntermediateInstallerVersion/text()"
Namespaces="&lt;Namespace Prefix='msb' Uri='http://schemas.microsoft.com/developer/msbuild/2003'/&gt;">
<Output TaskParameter="Result" ItemName="MicrosoftSourceBuildIntermediateInstallerVersionItem" />

View file

@ -31,6 +31,7 @@ function print_help () {
MSBUILD_ARGUMENTS=("-flp:v=detailed")
MSBUILD_ARGUMENTS=("--tl:off")
# TODO: Make it possible to invoke this script for non source build use cases
# https://github.com/dotnet/source-build/issues/3965
MSBUILD_ARGUMENTS+=("/p:DotNetBuildFromSource=true")
MSBUILD_ARGUMENTS+=("/p:DotNetBuildVertical=false")
CUSTOM_PACKAGES_DIR=''

View file

@ -18,7 +18,7 @@
</ItemGroup>
<Copy SourceFiles="@(BinariesToCopy)"
DestinationFolder="$(CollapsedOutputPath)"
DestinationFolder="$(SharedOutputPath)"
SkipUnchangedFiles="true"
Condition="'@(BinariesToCopy)'!=''" />
</Target>
@ -33,7 +33,7 @@
<Target Name="DiscoverSymbolsTarballs"
AfterTargets="Build">
<ItemGroup>
<SymbolsTarball Include="$(CollapsedOutputPath)Symbols.*$(ArchiveExtension)" />
<SymbolsTarball Include="$(SharedOutputPath)Symbols.*$(ArchiveExtension)" />
</ItemGroup>
</Target>
@ -64,7 +64,7 @@
DiscoverSymbolsTarballs;
ExtractSymbolsTarballs">
<PropertyGroup>
<UnifiedSymbolsTarball>$(CollapsedOutputPath)dotnet-symbols-all-$(MicrosoftSourceBuildIntermediateInstallerVersion)-$(TargetRid)$(ArchiveExtension)</UnifiedSymbolsTarball>
<UnifiedSymbolsTarball>$(SharedOutputPath)dotnet-symbols-all-$(MicrosoftSourceBuildIntermediateInstallerVersion)-$(TargetRid)$(ArchiveExtension)</UnifiedSymbolsTarball>
</PropertyGroup>
<Exec Command="tar --numeric-owner -czf $(UnifiedSymbolsTarball) *"
@ -79,19 +79,19 @@
AfterTargets="Build"
DependsOnTargets="RepackageSymbols">
<ItemGroup>
<SdkTarballItem Include="$(CollapsedOutputPath)dotnet-sdk-*$(ArchiveExtension)" />
<SdkTarballItem Include="$(SharedOutputPath)dotnet-sdk-*$(ArchiveExtension)" />
</ItemGroup>
<PropertyGroup>
<SdkSymbolsLayout>$(ArtifactsTmpDir)SdkSymbols</SdkSymbolsLayout>
<SdkSymbolsTarball>$(CollapsedOutputPath)dotnet-symbols-sdk-$(MicrosoftSourceBuildIntermediateInstallerVersion)-$(TargetRid)$(ArchiveExtension)</SdkSymbolsTarball>
<SdkSymbolsTarball>$(SharedOutputPath)dotnet-symbols-sdk-$(MicrosoftSourceBuildIntermediateInstallerVersion)-$(TargetRid)$(ArchiveExtension)</SdkSymbolsTarball>
<SdkLayout>$(ArtifactsTmpDir)Sdk</SdkLayout>
<SdkTarball>%(SdkTarballItem.Identity)</SdkTarball>
</PropertyGroup>
<MakeDir Directories="$(SdkLayout)" />
<Exec Command="tar -xzf $(SdkTarball) -C $(SdkLayout)"
WorkingDirectory="$(CollapsedOutputPath)" />
WorkingDirectory="$(SharedOutputPath)" />
<CreateSdkSymbolsLayout SdkLayoutPath="$(SdkLayout)"
AllSymbolsPath="$(UnifiedSymbolsLayout)"
@ -126,7 +126,7 @@
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(BaseIntermediateOutputPath)ReportPoisonUsage.complete" >
<ItemGroup>
<FinalCliTarball Include="$(CollapsedOutputPath)**/*$(ArchiveExtension)" />
<FinalCliTarball Include="$(SharedOutputPath)**/*$(ArchiveExtension)" />
</ItemGroup>
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Checking @(FinalCliTarball) for poisoned files." />
@ -170,8 +170,8 @@
<Target Name="RunSmokeTest">
<ItemGroup>
<SdkTarballItem Include="$(CollapsedOutputPath)**/dotnet-sdk*$(ArchiveExtension)" />
<SourceBuiltArtifactsItem Include="$(CollapsedOutputPath)**/$(SourceBuiltArtifactsTarballName).*$(ArchiveExtension)" />
<SdkTarballItem Include="$(SharedOutputPath)**/dotnet-sdk*$(ArchiveExtension)" />
<SourceBuiltArtifactsItem Include="$(SharedOutputPath)**/$(SourceBuiltArtifactsTarballName).*$(ArchiveExtension)" />
</ItemGroup>
<PropertyGroup>
@ -217,7 +217,7 @@
DependsOnTargets="DetermineMicrosoftSourceBuildIntermediateInstallerVersion"
Condition="'@(SmokeTestsPrereqs->Count())' != '0'">
<PropertyGroup>
<SmokeTestPrereqsTarballName>$(CollapsedOutputPath)dotnet-smoke-test-prereqs.$(MicrosoftSourceBuildIntermediateInstallerVersion).$(TargetRid)$(ArchiveExtension)</SmokeTestPrereqsTarballName>
<SmokeTestPrereqsTarballName>$(SharedOutputPath)dotnet-smoke-test-prereqs.$(MicrosoftSourceBuildIntermediateInstallerVersion).$(TargetRid)$(ArchiveExtension)</SmokeTestPrereqsTarballName>
<SmokeTestsPrereqPackagesDir>$(SmokeTestsArtifactsDir)prereq-packages/</SmokeTestsPrereqPackagesDir>
</PropertyGroup>
@ -250,7 +250,7 @@
DependsOnTargets="DetermineMicrosoftSourceBuildIntermediateInstallerVersion"
Condition="'@(PrebuiltFile->Count())' != '0'">
<PropertyGroup>
<TarballFilePath>$(CollapsedOutputPath)$(SourceBuiltPrebuiltsTarballName).$(MicrosoftSourceBuildIntermediateInstallerVersion).$(TargetRid)$(ArchiveExtension)</TarballFilePath>
<TarballFilePath>$(SharedOutputPath)$(SourceBuiltPrebuiltsTarballName).$(MicrosoftSourceBuildIntermediateInstallerVersion).$(TargetRid)$(ArchiveExtension)</TarballFilePath>
<TarballWorkingDir>$(ResultingPrebuiltPackagesDir)</TarballWorkingDir>
</PropertyGroup>

View file

@ -18,10 +18,10 @@
<PackagesOutput>$([MSBuild]::NormalizeDirectory('$(ProjectDirectory)', 'artifacts', 'packages', '$(Configuration)', 'NonShipping'))</PackagesOutput>
<!-- Paths to the version props files -->
<PackageVersionPropsPath>$(CollapsedIntermediatePath)PackageVersions.$(RepositoryName).props</PackageVersionPropsPath>
<CurrentSourceBuiltPackageVersionPropsPath>$(CollapsedIntermediatePath)PackageVersions.$(RepositoryName).Current.props</CurrentSourceBuiltPackageVersionPropsPath>
<PreviouslySourceBuiltPackageVersionPropsPath>$(CollapsedIntermediatePath)PackageVersions.$(RepositoryName).Previous.props</PreviouslySourceBuiltPackageVersionPropsPath>
<SnapshotPackageVersionPropsPath>$(CollapsedIntermediatePath)PackageVersions.$(RepositoryName).Snapshot.props</SnapshotPackageVersionPropsPath>
<PackageVersionPropsPath>$(SharedIntermediateOutputPath)PackageVersions.$(RepositoryName).props</PackageVersionPropsPath>
<CurrentSourceBuiltPackageVersionPropsPath>$(SharedIntermediateOutputPath)PackageVersions.$(RepositoryName).Current.props</CurrentSourceBuiltPackageVersionPropsPath>
<PreviouslySourceBuiltPackageVersionPropsPath>$(SharedIntermediateOutputPath)PackageVersions.$(RepositoryName).Previous.props</PreviouslySourceBuiltPackageVersionPropsPath>
<SnapshotPackageVersionPropsPath>$(SharedIntermediateOutputPath)PackageVersions.$(RepositoryName).Snapshot.props</SnapshotPackageVersionPropsPath>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
<GlobalJsonFile Condition="'$(GlobalJsonFile)' == '' and Exists('$(ProjectDirectory)global.json')">$(ProjectDirectory)global.json</GlobalJsonFile>

View file

@ -124,14 +124,13 @@
<!-- TODO: Remove when all repos use a consistent set of eng/common files: https://github.com/dotnet/source-build/issues/3710. -->
<Target Name="UpdateEngCommonFiles"
Condition="'$(RepositoryName)' != 'arcade' and ('$(UpdateEngCommonFiles)' == 'true' or '$(DotNetBuildVertical)' == 'true')"
Condition="'$(UpdateEngCommonFiles)' == 'true' or '$(DotNetBuildVertical)' == 'true'"
BeforeTargets="Build">
<!-- We assume that the eng/common files in Arcade are most up-to-date. -->
<ItemGroup>
<OriginEngCommonFile Include="$(RepoRoot)src\arcade\eng\common\**\*" />
<OrchestratorEngCommonFile Include="$(RepositoryEngineeringDir)common\**\*" />
</ItemGroup>
<Copy SourceFiles="@(OriginEngCommonFile)"
<Copy SourceFiles="@(OrchestratorEngCommonFile)"
DestinationFolder="$(ProjectDirectory)eng\common\%(RecursiveDir)"
SkipUnchangedFiles="true" />
</Target>
@ -541,7 +540,7 @@
Outputs="$(BaseIntermediateOutputPath)WritePrebuiltUsageData.complete">
<!-- Save the PVP snapshot of each build step to be evaluated while building the report. -->
<ItemGroup>
<PackageVersionPropsSnapshotFiles Include="$(CollapsedIntermediatePath)PackageVersions.*.Snapshot.props" />
<PackageVersionPropsSnapshotFiles Include="$(SharedIntermediateOutputPath)PackageVersions.*.Snapshot.props" />
</ItemGroup>
<Copy SourceFiles="@(PackageVersionPropsSnapshotFiles)" DestinationFolder="$(PackageReportDir)snapshots/" />

View file

@ -45,7 +45,7 @@
Directories="$(SourceBuildReferencePackagesDestination)extractArtifacts/" />
<PropertyGroup>
<SourceBuiltTarballName>$(CollapsedOutputPath)$(SourceBuiltArtifactsTarballName).$(MicrosoftSourceBuildIntermediateInstallerVersion).$(TargetRid)$(ArchiveExtension)</SourceBuiltTarballName>
<SourceBuiltTarballName>$(SharedOutputPath)$(SourceBuiltArtifactsTarballName).$(MicrosoftSourceBuildIntermediateInstallerVersion).$(TargetRid)$(ArchiveExtension)</SourceBuiltTarballName>
<SourceBuiltVersionFileName>.version</SourceBuiltVersionFileName>
</PropertyGroup>
@ -59,7 +59,7 @@
Lines="@(VersionFileContent)"
Overwrite="true" />
<MakeDir Directories="$(CollapsedOutputPath)" />
<MakeDir Directories="$(SharedOutputPath)" />
<Exec Command="tar --numeric-owner --exclude='Microsoft.SourceBuild.Intermediate.*.nupkg' -czf $(SourceBuiltTarballName) $(SourceBuiltVersionFileName) *.nupkg *.props SourceBuildReferencePackages/"
WorkingDirectory="$(SourceBuiltPackagesPath)" />