-
Notifications
You must be signed in to change notification settings - Fork 5.3k
ArPow stage 1: local source-build infrastructure #53294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 48 commits
1054536
7d0c956
376c10c
8a4c258
9d474ce
06f1d5e
0e4d155
cc4124f
59fb50e
ad4201b
1c87b39
c4f711d
479c95a
2565431
cd313cd
2b5307d
d7546c5
d6602eb
843caa7
a7d8b95
18d9616
f8e8475
aa13d3c
38cea15
f5445ee
4d94fd4
0a8059d
9b2c5b3
1b2d9b1
23e4735
5a12eaf
e0c3357
658dea4
de586df
e9b7fe4
469f6a1
6c2e477
1c97495
e6f5d8f
f026627
371a532
58bb935
309421d
7230fa1
972035a
f905b0e
0124b4f
cf48c62
4211c03
88a1715
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| <Project> | ||
|
|
||
| <PropertyGroup> | ||
| <GitHubRepositoryName>runtime</GitHubRepositoryName> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Set up the dotnet/runtime source-build command. --> | ||
| <PropertyGroup> | ||
| <BaseInnerSourceBuildCommand>./build.sh</BaseInnerSourceBuildCommand> | ||
|
|
||
| <SourceBuildPortable>true</SourceBuildPortable> | ||
| <SourceBuildPortable Condition="'$(SourceBuildNonPortable)' == 'true'">false</SourceBuildPortable> | ||
|
|
||
| <!-- If TargetRid not specified, detect RID based on portability. --> | ||
| <TargetRid Condition="'$(TargetRid)' == '' and '$(SourceBuildNonPortable)' == 'true'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid> | ||
| <TargetRid Condition="'$(TargetRid)' == ''">$(__DistroRid)</TargetRid> | ||
|
|
||
| <!-- Split e.g. 'fedora.33-x64' into 'fedora.33' and 'x64'. --> | ||
| <_targetRidPlatformIndex>$(TargetRid.LastIndexOfAny("-"))</_targetRidPlatformIndex> | ||
| <TargetRidWithoutPlatform>$(TargetRid.Substring(0, $(_targetRidPlatformIndex)))</TargetRidWithoutPlatform> | ||
| <TargetRidPlatform>$(TargetRid.Substring($(_targetRidPlatformIndex)).TrimStart('-'))</TargetRidPlatform> | ||
|
|
||
| <LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <!-- Work around issue where local clone may cause failure using non-origin remote fallback: https://github.com/dotnet/sourcelink/issues/629 --> | ||
| <InnerBuildEnv Include="EnableSourceControlManagerQueries=false" /> | ||
| <InnerBuildEnv Include="EnableSourceLink=false" /> | ||
| <InnerBuildEnv Include="DisableSourceLink=true" /> | ||
| <InnerBuildEnv Include="DeterministicSourcePaths=false" /> | ||
| </ItemGroup> | ||
|
|
||
| <Target Name="GetRuntimeSourceBuildCommandConfiguration" | ||
| BeforeTargets="GetSourceBuildCommandConfiguration"> | ||
| <PropertyGroup> | ||
| <InnerBuildArgs>$(InnerBuildArgs) --arch $(TargetRidPlatform)</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) --configuration $(Configuration)</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) --ci</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) --allconfigurations</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) --verbosity $(LogVerbosity)</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) --nodereuse false</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) --warnAsError false</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:MicrosoftNetFrameworkReferenceAssembliesVersion=1.0.0</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:ContinuousIntegrationBuild=true</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:PackageRid=$(TargetRid)</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:NoPgoOptimize=true</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:KeepNativeSymbols=true</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(TargetRidWithoutPlatform)</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable)</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:BuildDebPackage=false</InnerBuildArgs> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| <!-- Remove once patches are integrated into the repo --> | ||
| <Target Name="ApplySourceBuildPatchFiles" | ||
| AfterTargets="PrepareInnerSourceBuildRepoRoot" | ||
| BeforeTargets="RunInnerSourceBuildCommand"> | ||
|
|
||
| <ItemGroup> | ||
| <SourceBuildPatchFile Include="$(RepositoryEngineeringDir)source-build-patches\*.patch" /> | ||
| </ItemGroup> | ||
|
|
||
| <Exec | ||
| Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)"" | ||
| WorkingDirectory="$(InnerSourceBuildRepoRoot)" | ||
| Condition="'@(SourceBuildPatchFile)' != ''" /> | ||
| </Target> | ||
|
|
||
| <Target Name="CategorizeRuntimeSupplementalArtifacts" | ||
| BeforeTargets="GetCategorizedIntermediateNupkgContents"> | ||
| <ItemGroup> | ||
| <!-- | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI - I logged an issue for having the ArPOW infrastructure handle large packages. |
||
| Runtime artifacts are too large to fit into a single package (Azure DevOps feeds 500 mb constraint). | ||
| Split large components into separate packages. | ||
| --> | ||
| <IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-runtime-*.tar.gz" Category="runtime" /> | ||
|
|
||
| <IntermediateNupkgArtifactFile | ||
| Include=" | ||
| $(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-crossgen2-*.tar.gz; | ||
| $(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\Microsoft.NETCore.App.Crossgen2.*.nupkg" | ||
| Category="Crossgen2Pack" /> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <UsageData> | ||
| <IgnorePatterns> | ||
| <UsagePattern IdentityGlob="*/*" /> | ||
ViktorHofer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </IgnorePatterns> | ||
| </UsageData> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| From a3b356e19adaa1b001fdf6de79896ed85ec74df5 Mon Sep 17 00:00:00 2001 | ||
| From: Davis Goodin <[email protected]> | ||
| Date: Fri, 12 Feb 2021 11:11:04 -0600 | ||
| Subject: [PATCH] Fix missing crossgen2 for non-portable RID | ||
|
|
||
| --- | ||
| .../Microsoft.NETCore.App.Crossgen2.sfxproj | 3 ++- | ||
| 1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
|
||
| diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj | ||
| index ec198224a2e..51dc61d8783 100644 | ||
| --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj | ||
| +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj | ||
| @@ -9,7 +9,8 @@ | ||
| <OverridePackageId>$(SharedFrameworkName)$(PgoSuffix).$(RuntimeIdentifier)</OverridePackageId> | ||
| <ArchiveName>dotnet-crossgen2</ArchiveName> | ||
| <SharedFrameworkHostFileNameOverride>crossgen2</SharedFrameworkHostFileNameOverride> | ||
| - <RuntimeIdentifiers>linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers> | ||
| + <!-- Build this pack for any RID if building from source. Otherwise, only build a few RIDs. --> | ||
ViktorHofer marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| + <RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers> | ||
| <GenerateInstallers>false</GenerateInstallers> | ||
| <GetSharedFrameworkFilesForReadyToRunDependsOn> | ||
| AddRuntimeFilesToPackage; | ||
| -- | ||
| 2.25.4 | ||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||
| From da5a2c2593df373d1fafa605e1d7ce3ba2ca38e7 Mon Sep 17 00:00:00 2001 | ||||
| From: Tom Deseyn <[email protected]> | ||||
| Date: Wed, 18 Nov 2020 09:29:17 +0100 | ||||
| Subject: [PATCH] runtime: libraries-packages: use net5.0 PackagingTaskAssembly | ||||
|
|
||||
| --- | ||||
| src/libraries/libraries-packages.proj | 2 +- | ||||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||||
|
|
||||
| diff --git a/src/libraries/libraries-packages.proj b/src/libraries/libraries-packages.proj | ||||
| index 603d523df55..38cd7e74337 100644 | ||||
| --- a/src/libraries/libraries-packages.proj | ||||
| +++ b/src/libraries/libraries-packages.proj | ||||
| @@ -7,7 +7,7 @@ | ||||
|
|
||||
| <PropertyGroup> | ||||
| <PackagingTaskAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\tools\</PackagingTaskAssembly> | ||||
| - <PackagingTaskAssembly Condition="'$(MSBuildRuntimeType)' == 'core'">$(PackagingTaskAssembly)netcoreapp3.1\</PackagingTaskAssembly> | ||||
| + <PackagingTaskAssembly Condition="'$(MSBuildRuntimeType)' == 'core'">$(PackagingTaskAssembly)net5.0\</PackagingTaskAssembly> | ||||
| <PackagingTaskAssembly Condition="'$(MSBuildRuntimeType)' != 'core'">$(PackagingTaskAssembly)net472\</PackagingTaskAssembly> | ||||
| <PackagingTaskAssembly>$(PackagingTaskAssembly)Microsoft.DotNet.Build.Tasks.Packaging.dll</PackagingTaskAssembly> | ||||
|
||||
| <PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" /> |
I'd prefer to make things less hacky if possible though, was hoping your conversion of this to a traversal project would just let it naturally consume the package and let us delete stuff. If that's not the case then I'm fine leaving this since it'll go away with PkgProj removal, as you said.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be downloaded before that, I think, as part of
Right, that's how the package is available before the project's restore to calculate the PackageDownload items. Libraries-packages.proj itself would need to manually import the props and targets files which IMO isn't great either. Let's just keep it as-is for now and apply the patch.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| From 6521f8a43f5c146efc72b72dd3b0e61344a71618 Mon Sep 17 00:00:00 2001 | ||
| From: dseefeld <[email protected]> | ||
| Date: Mon, 15 Mar 2021 19:00:55 +0000 | ||
| Subject: [PATCH] Exclude Microsoft.Extensions.Hosting.WindowsServices from | ||
| source-build | ||
|
|
||
| --- | ||
| .../Directory.Build.props | 3 ++ | ||
| 1 file changed, 3 insertions(+) | ||
|
|
||
| diff --git a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/Directory.Build.props b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/Directory.Build.props | ||
| index c5f4d2e6da1..5493f19bc19 100644 | ||
| --- a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/Directory.Build.props | ||
| +++ b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/Directory.Build.props | ||
| @@ -2,5 +2,8 @@ | ||
| <PropertyGroup> | ||
| <PackageTags>hosting</PackageTags> | ||
| <SupportedOSPlatforms>windows</SupportedOSPlatforms> | ||
| + <!-- Source build does not support Windows. --> | ||
| + <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild> | ||
| + <IsPackable>false</IsPackable> | ||
|
||
| </PropertyGroup> | ||
| </Project> | ||
| -- | ||
| 2.25.4 | ||
Uh oh!
There was an error while loading. Please reload this page.