dotnet-installer/src/SourceBuild/content/repo-projects/installer.proj

141 lines
7.7 KiB
Text
Raw Normal View History

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Need to set to false to calculate RepositoryCommit. -->
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
<!-- Use the repo root build script -->
<BuildScript>$(ProjectDirectory)build$(ShellExtension)</BuildScript>
<!-- Restore and Build actions are already passed in by the root script. -->
<BuildActions>$(FlagParameterPrefix)pack $(FlagParameterPrefix)publish</BuildActions>
<!--
Setting NETCoreAppMaximumVersion to a high version so that the sdk doesn't complain if we're restoring/publishing for a higher version than the sdk.
See https://github.com/dotnet/sdk/issues/1512#issuecomment-377082883
-->
<BuildArgs>$(BuildArgs) /p:NETCoreAppMaximumVersion=99.9</BuildArgs>
<!-- We need to extract the non-portable OS name from the non-portable RID and pass that to installer build script.
This should not happen except when building non-portable. installer generally extracts the OSName from the host OS,
or from the Rid if supplied. -->
<BuildArgs Condition="$(PortableBuild) != 'true'">$(BuildArgs) /p:OSName=$(TargetRid.Substring(0, $(TargetRid.IndexOf("-"))))</BuildArgs>
<BuildArgs>$(BuildArgs) /p:PortableOSName=$(__PortableTargetOS)</BuildArgs>
<BuildArgs>$(BuildArgs) /p:Rid=$(TargetRid)</BuildArgs>
<BuildArgs>$(BuildArgs) /p:Architecture=$(TargetArchitecture)</BuildArgs>
<BuildArgs>$(BuildArgs) /p:DOTNET_INSTALL_DIR=$(DotNetRoot)</BuildArgs>
<BuildArgs Condition="'$(TargetOS)' != 'windows'">$(BuildArgs) /p:AspNetCoreInstallerRid=$(TargetRid)</BuildArgs>
<!-- installer always wants to build portable on FreeBSD -->
<BuildArgs Condition="'$(TargetOS)' == 'freebsd' and '$(DotNetBuildSourceOnly)' == 'true'">$(BuildArgs) /p:PortableBuild=true</BuildArgs>
<BuildArgs Condition="'$(TargetOS)' != 'windows'">$(BuildArgs) /p:NetRuntimeRid=$(TargetRid)</BuildArgs>
<!-- https://github.com/dotnet/source-build/issues/4138 -->
<BuildArgs Condition="'$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx'">$(BuildArgs) /p:SkipBuildingInstallers=true</BuildArgs>
<BuildArgs>$(BuildArgs) /p:PublicBaseURL=file:%2F%2F$(ArtifactsAssetsDir)</BuildArgs>
<!-- In non-source-only scenarios, currently consume aspnetcore from the normal public base url -->
<BuildArgs>$(BuildArgs) /p:FallbackPublicBaseURL=https://dotnetbuilds.blob.core.windows.net/public/</BuildArgs>
<BuildArgs>$(BuildArgs) /p:UsePortableLinuxSharedFramework=false</BuildArgs>
<BuildArgs Condition="'$(PgoInstrument)' == 'true'">$(BuildArgs) /p:PgoInstrument=true</BuildArgs>
</PropertyGroup>
<ItemGroup>
<RepositoryReference Include="arcade" />
Isolate package flow between repos (#18557) As a prerequisite to enabling parallel builds of the repos in the VMR, it's necessary to isolate the package flow between repos. This ensures that repo dependencies are defined correctly. Prior to these changes, the packages outputted by repos went to the same directory (Shipping or NonShipping) and those two directories were used as the package feed inputs to dependent repos. This would be dangerous in the context of running builds in parallel across repos because any ill-defined dependencies could lead to race conditions. For example, consider the msbuild repo's dependency on System.Text.Json from the runtime repo. If runtime was not defined as a dependency of msbuild, then there's no guarantee that System.Text.Json will exist when it restores it. Based on timing, it may exist in one build and then not exist in another build. To solve this problem, the packages output from a repos build are placed in a repo-specific package location as a sub-directory of the package location (Shipping or NonShipping). Previously, all repos would output their packages to `artifacts/packages/Release/[NonShipping|Shipping]`. With these changes, they output to `artifacts/packages/Release/[NonShipping|Shipping]/<repo-name>`. This isolates all packages on a per-repo basis. The next step is to provide access to these packages based on dependencies. Going back to msbuild's dependency on runtime, this is accomplished by modifying msbuild's nuget.config file to include feeds specific to runtime: ```xml <add key="source-built-runtime" value="/vmr/artifacts/packages/Release/Shipping/runtime/" /> <add key="source-built-transport-runtime" value="/vmr/artifacts/packages/Release/NonShipping/runtime/" /> ```
2024-02-22 10:25:55 -06:00
<RepositoryReference Include="aspire" />
<RepositoryReference Include="aspnetcore" />
Isolate package flow between repos (#18557) As a prerequisite to enabling parallel builds of the repos in the VMR, it's necessary to isolate the package flow between repos. This ensures that repo dependencies are defined correctly. Prior to these changes, the packages outputted by repos went to the same directory (Shipping or NonShipping) and those two directories were used as the package feed inputs to dependent repos. This would be dangerous in the context of running builds in parallel across repos because any ill-defined dependencies could lead to race conditions. For example, consider the msbuild repo's dependency on System.Text.Json from the runtime repo. If runtime was not defined as a dependency of msbuild, then there's no guarantee that System.Text.Json will exist when it restores it. Based on timing, it may exist in one build and then not exist in another build. To solve this problem, the packages output from a repos build are placed in a repo-specific package location as a sub-directory of the package location (Shipping or NonShipping). Previously, all repos would output their packages to `artifacts/packages/Release/[NonShipping|Shipping]`. With these changes, they output to `artifacts/packages/Release/[NonShipping|Shipping]/<repo-name>`. This isolates all packages on a per-repo basis. The next step is to provide access to these packages based on dependencies. Going back to msbuild's dependency on runtime, this is accomplished by modifying msbuild's nuget.config file to include feeds specific to runtime: ```xml <add key="source-built-runtime" value="/vmr/artifacts/packages/Release/Shipping/runtime/" /> <add key="source-built-transport-runtime" value="/vmr/artifacts/packages/Release/NonShipping/runtime/" /> ```
2024-02-22 10:25:55 -06:00
<RepositoryReference Include="command-line-api" />
<RepositoryReference Include="deployment-tools" />
2023-01-31 12:33:55 -05:00
<RepositoryReference Include="emsdk" />
<RepositoryReference Include="fsharp" />
<RepositoryReference Include="msbuild" />
[ArPow] Add NuGet.Client (#11489) * [main] Update dependencies from dotnet/sdk (#11565) [main] Update dependencies from dotnet/sdk - Coherency Updates: - Microsoft.AspNetCore.App.Ref: from 6.0.0-rc.1.21417.2 to 6.0.0-rc.1.21417.8 (parent: Microsoft.NET.Sdk) - Microsoft.AspNetCore.App.Ref.Internal: from 6.0.0-rc.1.21417.2 to 6.0.0-rc.1.21417.8 (parent: Microsoft.NET.Sdk) - Microsoft.AspNetCore.App.Runtime.win-x64: from 6.0.0-rc.1.21417.2 to 6.0.0-rc.1.21417.8 (parent: Microsoft.NET.Sdk) - VS.Redist.Common.AspNetCore.SharedFramework.x64.6.0: from 6.0.0-rc.1.21417.2 to 6.0.0-rc.1.21417.8 (parent: Microsoft.NET.Sdk) - dotnet-dev-certs: from 6.0.0-rc.1.21417.2 to 6.0.0-rc.1.21417.8 (parent: Microsoft.NET.Sdk) - dotnet-user-secrets: from 6.0.0-rc.1.21417.2 to 6.0.0-rc.1.21417.8 (parent: Microsoft.NET.Sdk) * Update dependencies from https://github.com/dotnet/sdk build 20210817.21 (#11569) [main] Update dependencies from dotnet/sdk - Coherency Updates: - Microsoft.NET.Test.Sdk: from 17.0.0-preview-20210817-01 to 17.0.0-preview-20210817-02 (parent: Microsoft.NET.Sdk) * Update dependencies from https://github.com/dotnet/arcade build 20210817.1 (#11570) [main] Update dependencies from dotnet/arcade - Coherency Updates: - Microsoft.SourceLink.GitHub: from 1.1.0-beta-21309-01 to 1.1.0-beta-21416-05 (parent: Microsoft.DotNet.Arcade.Sdk) - Microsoft.DotNet.XliffTasks: from 1.0.0-beta.21412.1 to 1.0.0-beta.21414.1 (parent: Microsoft.DotNet.Arcade.Sdk) * [ArPow] Add runtime repo to tarball (#11506) * Add runtime repo / update runtime project * Update runtime-portable logs and properties * Create runtime-portable git-info * Fix unpack of IntermediatePackages * Re-enable references to runtime * Pass TargetRid and NonPortable to runtime build * Only build allconfigurations in non-portable build * Add SDK patch to disable new CA warning * Increase built tarball timeout * Update prebuilt version * Remove 5.0.3xx and preview 7 Add rc1, 6.0 daily, and move main to 7.0 * Removing 7.0 for now as there aren't builds yet. * Update dependencies from https://github.com/dotnet/arcade build 20210818.12 (#11594) [main] Update dependencies from dotnet/arcade - Coherency Updates: - Microsoft.SourceLink.GitHub: from 1.1.0-beta-21416-05 to 1.1.0-beta-21417-01 (parent: Microsoft.DotNet.Arcade.Sdk) - Microsoft.DotNet.XliffTasks: from 1.0.0-beta.21414.1 to 1.0.0-beta.21417.1 (parent: Microsoft.DotNet.Arcade.Sdk) * [ArPow] Add installer repo to tarball (#11483) * Fix the rc2 aka.ms links * Add NuGet * Make safe repo name safer. * some more props filename stuff * Patches to get the repo to build * Use NuGet build script instead of manually calling msbuild. * Add patch for source-build in build.sh in nuget. * Use existing 5.0 nuget patch. * Fixes for build scripts and .NET 6 SDK upgrade. * Remove obsolete patch - this was caused by not using the correct source-build SDK. * Address code review comment for source-build build script. * Restore reference from installer to NuGet. * Fix patch not applying. * Don't try to pass Arcade build args to MSBuild. * Fix script typo. * Patch NuGet.Frameworks to produce netstandard2.0 for VSTest. * Did this patch the wrong way around. * Ignore failure in no-network case * UPdate prebuilts version. Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Dan Seefeldt <dseefeld@microsoft.com> Co-authored-by: Marc Paine <marcpop@microsoft.com> Co-authored-by: Michael Simons <msimons@microsoft.com> Co-authored-by: Matt Galbraith <mattgal@microsoft.com>
2021-08-24 15:01:06 -05:00
<RepositoryReference Include="nuget-client" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="runtime" />
<RepositoryReference Include="sdk" />
Isolate package flow between repos (#18557) As a prerequisite to enabling parallel builds of the repos in the VMR, it's necessary to isolate the package flow between repos. This ensures that repo dependencies are defined correctly. Prior to these changes, the packages outputted by repos went to the same directory (Shipping or NonShipping) and those two directories were used as the package feed inputs to dependent repos. This would be dangerous in the context of running builds in parallel across repos because any ill-defined dependencies could lead to race conditions. For example, consider the msbuild repo's dependency on System.Text.Json from the runtime repo. If runtime was not defined as a dependency of msbuild, then there's no guarantee that System.Text.Json will exist when it restores it. Based on timing, it may exist in one build and then not exist in another build. To solve this problem, the packages output from a repos build are placed in a repo-specific package location as a sub-directory of the package location (Shipping or NonShipping). Previously, all repos would output their packages to `artifacts/packages/Release/[NonShipping|Shipping]`. With these changes, they output to `artifacts/packages/Release/[NonShipping|Shipping]/<repo-name>`. This isolates all packages on a per-repo basis. The next step is to provide access to these packages based on dependencies. Going back to msbuild's dependency on runtime, this is accomplished by modifying msbuild's nuget.config file to include feeds specific to runtime: ```xml <add key="source-built-runtime" value="/vmr/artifacts/packages/Release/Shipping/runtime/" /> <add key="source-built-transport-runtime" value="/vmr/artifacts/packages/Release/NonShipping/runtime/" /> ```
2024-02-22 10:25:55 -06:00
<RepositoryReference Include="symreader" />
<RepositoryReference Include="test-templates" />
<RepositoryReference Include="vstest" />
Isolate package flow between repos (#18557) As a prerequisite to enabling parallel builds of the repos in the VMR, it's necessary to isolate the package flow between repos. This ensures that repo dependencies are defined correctly. Prior to these changes, the packages outputted by repos went to the same directory (Shipping or NonShipping) and those two directories were used as the package feed inputs to dependent repos. This would be dangerous in the context of running builds in parallel across repos because any ill-defined dependencies could lead to race conditions. For example, consider the msbuild repo's dependency on System.Text.Json from the runtime repo. If runtime was not defined as a dependency of msbuild, then there's no guarantee that System.Text.Json will exist when it restores it. Based on timing, it may exist in one build and then not exist in another build. To solve this problem, the packages output from a repos build are placed in a repo-specific package location as a sub-directory of the package location (Shipping or NonShipping). Previously, all repos would output their packages to `artifacts/packages/Release/[NonShipping|Shipping]`. With these changes, they output to `artifacts/packages/Release/[NonShipping|Shipping]/<repo-name>`. This isolates all packages on a per-repo basis. The next step is to provide access to these packages based on dependencies. Going back to msbuild's dependency on runtime, this is accomplished by modifying msbuild's nuget.config file to include feeds specific to runtime: ```xml <add key="source-built-runtime" value="/vmr/artifacts/packages/Release/Shipping/runtime/" /> <add key="source-built-transport-runtime" value="/vmr/artifacts/packages/Release/NonShipping/runtime/" /> ```
2024-02-22 10:25:55 -06:00
<RepositoryReference Include="windowsdesktop" Condition="'$(TargetOS)' == 'windows'" />
</ItemGroup>
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
<RepositoryReference Include="source-build-externals" />
<RepositoryReference Include="source-build-reference-packages" />
</ItemGroup>
<!--
If we have authentication, keep the templating internal feed (if one exists) to acquire the
text-only prebuilt. The source-build repo as a whole should depend on the same internal feed as
this repo does, so authentication should already be set up in the global endpoints json.
-->
<ItemGroup Condition="'$(VSS_NUGET_EXTERNAL_FEED_ENDPOINTS)' != ''">
<KeepFeedPrefixes Include="darc-int-dotnet-aspnetcore-" />
</ItemGroup>
<ItemGroup>
<EnvironmentVariables Include="CLIBUILD_SKIP_TESTS=true" />
<!-- https://github.com/dotnet/source-build/issues/4115. -->
<EnvironmentVariables Include="PublishWindowsPdb=false" />
</ItemGroup>
<Target Name="GetInputsOutputForCreatePrivateSourceBuiltArtifactsArchive"
DependsOnTargets="DetermineSourceBuiltSdkVersion">
<!-- Inputs: Packages to include in the tarball -->
<ItemGroup>
<ArtifactsPackageToBundle Include="$(ArtifactsShippingPackagesDir)**;
$(ArtifactsNonShippingPackagesDir)**"
Condition="!$([System.String]::Copy('%(Identity)').EndsWith('.symbols.nupkg'))" />
<ReferencePackageToBundle Include="$(ReferencePackagesDir)**"
Condition="!$([System.String]::Copy('%(Identity)').EndsWith('.symbols.nupkg'))" />
</ItemGroup>
<PropertyGroup>
<!-- Create a layout directory for the files that are to be included in the artifacts tarball. -->
<SourceBuiltLayoutDir>$([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)', 'artifacts-layout'))</SourceBuiltLayoutDir>
<!-- Outputs -->
<SourceBuiltTarballName>$(ArtifactsAssetsDir)$(SourceBuiltArtifactsTarballName).$(SourceBuiltSdkVersion).$(TargetRid)$(ArchiveExtension)</SourceBuiltTarballName>
<SourceBuiltVersionName>$(SourceBuiltLayoutDir).version</SourceBuiltVersionName>
<AllPackageVersionsPropsName>$(SourceBuiltLayoutDir)PackageVersions.props</AllPackageVersionsPropsName>
</PropertyGroup>
</Target>
<!-- Create the SourceBuilt.Private.Artifacts archive when building source-only. -->
<Target Name="CreatePrivateSourceBuiltArtifactsArchive"
AfterTargets="Build"
DependsOnTargets="GetInputsOutputForCreatePrivateSourceBuiltArtifactsArchive"
Inputs="@(ArtifactsPackageToBundle);@(ReferencePackageToBundle)"
Outputs="$(SourceBuiltTarballName);$(SourceBuiltVersionName);$(AllPackageVersionsPropsName)"
Condition="'$(DotNetBuildSourceOnly)' == 'true'">
<!-- Copy packages to layout directory. Since there are a large number of files,
this will use symlinks instead of copying files to make this execute quickly. -->
<Copy SourceFiles="@(ArtifactsPackageToBundle)"
DestinationFolder="$(SourceBuiltLayoutDir)"
UseSymbolicLinksIfPossible="true" />
<Copy SourceFiles="@(ReferencePackageToBundle)"
DestinationFolder="$(SourceBuiltLayoutDir)SourceBuildReferencePackages"
UseSymbolicLinksIfPossible="true" />
<!-- Content of the .version file to include in the tarball -->
<ItemGroup>
<VersionFileContent Include="$(RepositoryCommit);$(SourceBuiltSdkVersion)" />
</ItemGroup>
<WriteLinesToFile File="$(SourceBuiltVersionName)"
Lines="@(VersionFileContent)"
Overwrite="true" />
<!-- Create a PackageVersions.props file that includes entries for all packages. -->
<WritePackageVersionsProps NuGetPackages="@(ArtifactsPackageToBundle)"
ExtraProperties="@(ExtraPackageVersionPropsPackageInfo)"
VersionPropsFlowType="AllPackages"
OutputPath="$(AllPackageVersionsPropsName)" />
<Exec Command="tar --numeric-owner -czhf $(SourceBuiltTarballName) $([System.IO.Path]::GetFileName('$(SourceBuiltVersionName)')) *"
WorkingDirectory="$(SourceBuiltLayoutDir)" />
<Message Importance="High" Text="Packaged source-built artifacts to $(SourceBuiltTarballName)" />
</Target>
</Project>