Merge branch 'main' into shortstack

This commit is contained in:
Jo Shields 2024-02-07 13:09:19 -05:00 committed by GitHub
commit 3a55a8ebaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 35 additions and 124 deletions

View file

@ -34,6 +34,8 @@ variables:
value: NetCore-Public-XL
- name: defaultPoolNameLinuxArm64
value: Docker-Linux-Arm-Public
- name: defaultPoolNameMac
value: macos-12
- name: defaultPoolDemandsLinux
value: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
- name: defaultPoolDemandsWindows
@ -47,10 +49,9 @@ variables:
value: NetCore1ESPool-Svc-Internal
- name: defaultPoolNameLinuxArm64
value: Docker-Linux-Arm-Internal
- name: defaultPoolNameMac
value: macos-13-arm64
- name: defaultPoolDemandsLinux
value: ImageOverride -equals Build.Ubuntu.1804.Amd64
- name: defaultPoolDemandsWindows
value: ImageOverride -equals windows.vs2022.amd64
- name: defaultPoolNameMac
value: macos-12

View file

@ -3,7 +3,7 @@
# - installer-source-build (public)
# - PR: release/* and main, ultralite build
# - installer-unified-build (public)
# - PR: release/* and main, lite build
# - PR: main, lite build
trigger: none
pr:

View file

@ -1,11 +1,9 @@
/.dotnet
/.packages
/artifacts
/eng/tools/**/bin
/eng/tools/**/obj
/prereqs/packages
/src/linker/src/ILLink.Tasks/ILLink.Tasks.nuspec
/src/nuget-client/NuGet.config
/test/Microsoft.DotNet.SourceBuild.SmokeTests/bin
/test/Microsoft.DotNet.SourceBuild.SmokeTests/obj
/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestResults
*.binlog
*.binlog

View file

@ -164,7 +164,7 @@
<KeysDir>$([MSBuild]::NormalizeDirectory('$(PrereqsDir)', 'keys'))</KeysDir>
<PrereqsPackagesDir>$([MSBuild]::NormalizeDirectory('$(PrereqsDir)', 'packages'))</PrereqsPackagesDir>
<!-- When SB mode, the initial arcade is unzipped to a the "ArcadeBootStrap" dir.
<!-- When SB mode, the initial arcade is unzipped to the "ArcadeBootstrapPackage" dir.
When running in VBPOC, the bootstrap package is the arcade restored at the beginning of the build. -->
<ArcadeBootstrapPackageDir Condition="'$(DotNetBuildSourceOnly)' == 'true'">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'ArcadeBootstrapPackage'))</ArcadeBootstrapPackageDir>
<ArcadeBootstrapPackageDir Condition="'$(DotNetBuildSourceOnly)' != 'true'">$(NuGetPackageRoot)</ArcadeBootstrapPackageDir>

View file

@ -19,6 +19,21 @@
StopOnFirstFailure="true" />
</Target>
<!-- Copies the output assets of the builds to the output path. -->
<Target Name="CopyBinariesToBinFolder"
AfterTargets="Build">
<ItemGroup>
<BinaryToCopy Include="$(SourceBuiltAssetsDir)*.*"
Exclude="$(SourceBuiltAssetsDir)*.nupkg;
$(SourceBuiltAssetsDir)*.requires_nupkg_signing" />
</ItemGroup>
<Copy SourceFiles="@(BinaryToCopy)"
DestinationFolder="$(SharedOutputPath)"
SkipUnchangedFiles="true"
Condition="'@(BinaryToCopy)'!=''" />
</Target>
<Import Project="$(RepositoryEngineeringDir)build.sourcebuild.targets" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
</Project>

View file

@ -57,8 +57,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
# Set the NUGET_PACKAGES dir so that we don't accidentally pull some packages from the global location,
# They should be pulled from the local feeds.
packagesDir="$scriptroot/prereqs/packages/"
packagesRestoredDir="${packagesDir}restored/"
packagesRestoredDir="$scriptroot/.packages/"
export NUGET_PACKAGES=$packagesRestoredDir/
# Common settings
@ -77,6 +76,7 @@ sourceRepository=''
sourceVersion=''
CUSTOM_PACKAGES_DIR=''
CUSTOM_SDK_DIR=''
packagesDir="$scriptroot/prereqs/packages/"
packagesArchiveDir="${packagesDir}archive/"
packagesPreviouslySourceBuiltDir="${packagesDir}previously-source-built/"

View file

@ -41,7 +41,7 @@ function Get-Usage() {
# Set the NUGET_PACKAGES dir so that we don't accidentally pull some packages from the global location,
# They should be pulled from the local feeds.
$env:NUGET_PACKAGES="$RepoRoot\prereqs\packages\restored\"
$env:NUGET_PACKAGES="$RepoRoot\.packages\"
if ($help) {
Get-Usage

View file

@ -9,20 +9,6 @@
<PoisonUsageReportFile>$(PackageReportDir)poison-usage.xml</PoisonUsageReportFile>
</PropertyGroup>
<!-- Copies the output assets of the builds to the output path. -->
<Target Name="CopyBinariesToBinFolder"
AfterTargets="Build">
<ItemGroup>
<BinariesToCopy Include="$(SourceBuiltAssetsDir)*.*"
Exclude="$(SourceBuiltAssetsDir)*.nupkg;$(SourceBuiltAssetsDir)*.requires_nupkg_signing" />
</ItemGroup>
<Copy SourceFiles="@(BinariesToCopy)"
DestinationFolder="$(SharedOutputPath)"
SkipUnchangedFiles="true"
Condition="'@(BinariesToCopy)'!=''" />
</Target>
<!-- After building, generate a prebuilt usage report. -->
<Target Name="ReportPrebuiltUsage"
AfterTargets="Build"

View file

@ -345,18 +345,13 @@
</ItemGroup>
</Target>
<!--
Condition should be removed after source-build picks up version of Arcade that has
source-build infra changes for removal od inner-clone in VMR build. Until then some
repos will produce intermediate packages instead of repo manifest file.
https://github.com/dotnet/source-build/issues/3930
-->
<Target Name="CopyRepoArtifacts"
AfterTargets="Package"
Condition="Exists($(RepoManifestFile))"
Condition="'$(IsUtilityProject)' != 'true'"
Inputs="$(RepoManifestFile)"
Outputs="$(BaseIntermediateOutputPath)ArtifactsCopy.complete">
<Error Text="Repo manifest file doesn't exist." Condition="!Exists('$(RepoManifestFile)')" />
<XmlPeek XmlInputPath="$(RepoManifestFile)"
Query="Build/Artifact/@Path">
<Output TaskParameter="Result" ItemName="RepoManifestArtifact" />
@ -408,75 +403,6 @@
</Touch>
</Target>
<!--
This target can be removed after source-build picks up version of Arcade that has
source-build infra changes for removal od inner-clone in VMR build. Until then the target
is needed for building source-build-reference-packages and arcade repos.
https://github.com/dotnet/source-build/issues/3930
-->
<Target Name="ExtractIntermediatePackages"
AfterTargets="Package"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(BaseIntermediateOutputPath)IntermediateExtraction.complete">
<ItemGroup>
<_BuiltIntermediatePackages Condition="'$(PackagesOutput)' != ''" Include="$(PackagesOutput)/Microsoft.SourceBuild.Intermediate.*.nupkg" Exclude="$(PackagesOutput)/*.symbols.nupkg"/>
<_BuiltIntermediatePackages Condition="'@(PackagesOutputList)' != ''" Include="%(PackagesOutputList.Identity)/Microsoft.SourceBuild.Intermediate.*.nupkg" Exclude="%(PackagesOutputList.Identity)/*.symbols.nupkg"/>
</ItemGroup>
<PropertyGroup Condition="'@(_BuiltIntermediatePackages)' != ''">
<_NupkgDestinationPath>$(SourceBuiltPackagesPath)</_NupkgDestinationPath>
<!-- SBRP packages unpack into the Reference packages directory instead of into blob-feed packages -->
<_NupkgDestinationPath Condition="$([System.String]::Copy(%(_BuiltIntermediatePackages.Identity)).Contains('source-build-reference-packages'))">$(ReferencePackagesDir)</_NupkgDestinationPath>
</PropertyGroup>
<Unzip SourceFiles="@(_BuiltIntermediatePackages)"
DestinationFolder="$(SourceBuiltPackagesPath)extractArtifacts/%(_BuiltIntermediatePackages.FileName)/"
SkipUnchangedFiles="true"
Condition="'@(_BuiltIntermediatePackages)' != ''" />
<ItemGroup Condition="'@(_BuiltIntermediatePackages)' != ''">
<SourceBuiltNupkgFiles Include="$(SourceBuiltPackagesPath)extractArtifacts/**/artifacts/*.nupkg" />
</ItemGroup>
<ItemGroup Condition="'@(_BuiltIntermediatePackages)' != ''">
<NonShippingPackageLists Include="$(SourceBuiltPackagesPath)extractArtifacts/**/$(NonShippingPackagesListPrefix)*" />
</ItemGroup>
<!-- Copy lists of NonShipping packages to prebuilt-report dir -->
<Copy SourceFiles="@(NonShippingPackageLists)" DestinationFolder="$(PackageListsDir)" />
<!-- Building SBRP: At this point the References directory contains the previously-source-built SBRPs,
clear it before moving the current SBRPs. This ensures n-1 SBRPs aren't required to build the product repos. -->
<RemoveDir
Condition="'$(_NupkgDestinationPath)' == '$(ReferencePackagesDir)'"
Directories="$(ReferencePackagesDir)" />
<Move
Condition="'@(SourceBuiltNupkgFiles)' != ''"
SourceFiles="@(SourceBuiltNupkgFiles)"
DestinationFiles="@(SourceBuiltNupkgFiles -> '$(_NupkgDestinationPath)%(Filename)%(Extension)')" />
<ItemGroup Condition="'@(_BuiltIntermediatePackages)' != ''">
<SourceBuiltAssetFiles Include="$(SourceBuiltPackagesPath)extractArtifacts/**/artifacts/*.*" />
<SourceBuiltAssetFiles Remove="$(SourceBuiltPackagesPath)extractArtifacts/**/artifacts/*.nupkg" />
</ItemGroup>
<Move
Condition="'@(SourceBuiltAssetFiles)' != ''"
SourceFiles="@(SourceBuiltAssetFiles)"
DestinationFiles="@(SourceBuiltAssetFiles -> '$(SourceBuiltAssetsDir)%(Filename)%(Extension)')" />
<RemoveDir
Condition="Exists('$(SourceBuiltPackagesPath)extractArtifacts/')"
Directories="$(SourceBuiltPackagesPath)extractArtifacts/" />
<MakeDir Directories="$(BaseIntermediateOutputPath)" />
<Touch Files="$(BaseIntermediateOutputPath)IntermediateExtraction.complete" AlwaysCreate="true">
<Output TaskParameter="TouchedFiles" ItemName="FileWrites" />
</Touch>
</Target>
<!-- Copy restored packages from inner build to ensure they're included in the
main build prebuilt check -->
<Target Name="CopyInnerBuildRestoredPackages"

View file

@ -28,10 +28,7 @@
</BundledToolLayoutProject>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(BundledToolLayoutProject)">
</MSBuild>
<MSBuild Projects="@(BundledToolLayoutProject)" />
</Target>
</Project>

View file

@ -26,10 +26,7 @@
</CrossGenDownloadPackageProject>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(CrossGenDownloadPackageProject)">
</MSBuild>
<MSBuild Projects="@(CrossGenDownloadPackageProject)" />
<!-- This PropertyGroup contains the paths to the various SDK tooling that should be
cross-genned. This tooling multi-targets, and we only want to cross-gen the .NET Core

View file

@ -409,10 +409,7 @@
</BundledLayoutPackageDownloadProject>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(BundledLayoutPackageDownloadProject)">
</MSBuild>
<MSBuild Projects="@(BundledLayoutPackageDownloadProject)" />
<ItemGroup>
<!-- Use lowercase package name in package path -->
@ -534,10 +531,7 @@
</AppHostTemplateDownloadPackageProject>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(AppHostTemplateDownloadPackageProject)">
</MSBuild>
<MSBuild Projects="@(AppHostTemplateDownloadPackageProject)" />
<PropertyGroup>
<AppHostExecutableName>AppHost$(ExeExtension)</AppHostExecutableName>

View file

@ -82,8 +82,7 @@
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="InstallRuntimeToLayout"
Properties="RuntimeVersionToInstall=%(RuntimeVersionToInstall.Identity)"
BuildInParallel="false"/>
Properties="RuntimeVersionToInstall=%(RuntimeVersionToInstall.Identity)" />
</Target>
<Target Name="InstallRuntimeToLayout">
@ -155,9 +154,7 @@
</ItemGroup>
<MSBuild Projects="@(TestProjectToRun)"
Targets="RunTestsAsTool"
BuildInParallel="true"
/>
Targets="RunTestsAsTool" />
</Target>
<Target Name="RunTestsAsTool">