-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Create live publishing workflow #79775
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0fa869f
Create live publishing workflow
agocke c1763e5
Stop setting SelfContained
agocke 7f2f4d3
Revert changes to property passing
agocke 80d3f04
Typo
agocke 08e4bbb
Try using RuntimeArtifactsPath instead
agocke cff45b6
Go back to CoreCLRArtifactsPath
agocke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<SingleFileHostSourcePath>$([MSBuild]::NormalizePath('$(CoreCLRArtifactsPath)', 'corehost', 'singlefilehost$(ExeSuffix)'))</SingleFileHostSourcePath> | ||
<StripSymbols>true</StripSymbols> | ||
</PropertyGroup> | ||
|
||
<!-- Native AOT live hosting configuration--> | ||
<PropertyGroup> | ||
<IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath> | ||
<IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath> | ||
<CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' == 'linux' and '$(RuntimeIdentifier)' == 'linux-musl-arm64'">clang-15</CppCompilerAndLinker> | ||
<CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' == 'linux' and '$(RuntimeIdentifier)' != 'linux-musl-arm64'">clang-9</CppCompilerAndLinker> | ||
<SysRoot Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot> | ||
<IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath> | ||
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath> | ||
<IlcFrameworkPath>$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</IlcFrameworkPath> | ||
<IlcFrameworkNativePath>$(MicrosoftNetCoreAppRuntimePackNativeDir)</IlcFrameworkNativePath> | ||
<TrimmerSingleWarn>false</TrimmerSingleWarn> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(R2ROverridePath)" Condition="'$(R2ROverridePath)' != ''" /> | ||
<Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.props" | ||
Condition="'$(PublishAot)' == 'true' or Exists('$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.props')" /> | ||
|
||
<Target Name="PublishOnBuild" | ||
Condition="'$(PublishOnBuild)' == 'true'" | ||
AfterTargets="Build" | ||
DependsOnTargets="Publish" /> | ||
|
||
<Target Name="RewriteRuntimePackDir" | ||
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild" | ||
BeforeTargets="ResolveRuntimePackAssets"> | ||
<ItemGroup> | ||
<!-- Remove AspNetCore runtime pack since we don't build it locally --> | ||
<ResolvedRuntimePack Remove="Microsoft.AspNetCore.App.Runtime.$(RuntimeIdentifier)" /> | ||
|
||
<ResolvedRuntimePack Update="Microsoft.NETCore.App.Runtime.$(RuntimeIdentifier)"> | ||
<PackageDirectory>$(MicrosoftNetCoreAppRuntimePackDir)</PackageDirectory> | ||
</ResolvedRuntimePack> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputPath>$(RuntimeBinDir)ilc_live</OutputPath> | ||
<PublishOnBuild>true</PublishOnBuild> | ||
<LivePublish>true</LivePublish> | ||
<!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 --> | ||
<NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported> | ||
<PublishAot Condition="'$(NativeAotSupported)' == 'true'">true</PublishAot> | ||
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier> | ||
</PropertyGroup> | ||
|
||
<!-- If we can't publish AOT, publish trimmed single-file --> | ||
<PropertyGroup Condition="'$(PublishAot)' != 'true'"> | ||
<PublishTrimmed>true</PublishTrimmed> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<PublishReadyToRun>true</PublishReadyToRun> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)ILCompiler.props" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,9 @@ | ||
<Project> | ||
|
||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputPath>$(RuntimeBinDir)crossgen2</OutputPath> | ||
<!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 --> | ||
<NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported> | ||
<!-- Trimming is not currently working, but set the appropriate feature flags for NativeAOT --> | ||
<PublishTrimmed Condition="'$(NativeAotSupported)' == 'true'">true</PublishTrimmed> | ||
<RuntimeIdentifiers Condition="'$(_IsPublishing)' != 'true' and '$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers> | ||
<RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(PackageRID)</RuntimeIdentifiers> | ||
<SelfContained>false</SelfContained> | ||
<SelfContained Condition="'$(_IsPublishing)' == 'true'">true</SelfContained> | ||
</PropertyGroup> | ||
|
||
<Import Project="crossgen2.props" /> | ||
|
||
<PropertyGroup Condition="'$(NativeAotSupported)' != 'true'"> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<PublishReadyToRun>true</PublishReadyToRun> | ||
<!-- Disable crossgen on NetBSD, illumos and Solaris for now. This can be revisited when we have full support. --> | ||
<PublishReadyToRun Condition="'$(TargetOS)'=='NetBSD' Or '$(TargetOS)'=='illumos' Or '$(TargetOS)'=='Solaris'">false</PublishReadyToRun> | ||
<!-- Disable crossgen on FreeBSD when cross building from Linux. --> | ||
<PublishReadyToRun Condition="'$(TargetOS)'=='FreeBSD' and '$(CrossBuild)'=='true'">false</PublishReadyToRun> | ||
<PublishReadyToRunComposite>true</PublishReadyToRunComposite> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<PropertyGroup Condition="'$(NativeAotSupported)' == 'true'"> | ||
<IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath> | ||
<IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath> | ||
<CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' == 'linux' and '$(RuntimeIdentifier)' == 'linux-musl-arm64'">clang-15</CppCompilerAndLinker> | ||
<CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' == 'linux' and '$(RuntimeIdentifier)' != 'linux-musl-arm64'">clang-9</CppCompilerAndLinker> | ||
<SysRoot Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot> | ||
<IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath> | ||
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath> | ||
<IlcFrameworkPath>$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</IlcFrameworkPath> | ||
<IlcFrameworkNativePath>$(MicrosoftNetCoreAppRuntimePackNativeDir)</IlcFrameworkNativePath> | ||
<TrimmerSingleWarn>false</TrimmerSingleWarn> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(R2ROverridePath)" Condition="'$(R2ROverridePath)' != ''" /> | ||
<Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.SingleEntry.targets" | ||
Condition="'$(NativeAotSupported)' == 'true' and '$(_IsPublishing)' == 'true'" /> | ||
|
||
<Target Name="RewriteRuntimePackDir" | ||
Condition="'$(_IsPublishing)' == 'true'" | ||
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild" | ||
BeforeTargets="ResolveRuntimePackAssets"> | ||
<ItemGroup> | ||
<!-- Remove AspNetCore runtime pack since we don't build it locally --> | ||
<ResolvedRuntimePack Remove="Microsoft.AspNetCore.App.Runtime.$(RuntimeIdentifier)" /> | ||
|
||
<ResolvedRuntimePack Update="Microsoft.NETCore.App.Runtime.$(RuntimeIdentifier)"> | ||
<PackageDirectory>$(MicrosoftNetCoreAppRuntimePackDir)</PackageDirectory> | ||
</ResolvedRuntimePack> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputPath>$(RuntimeBinDir)crossgen2_live</OutputPath> | ||
<PublishOnBuild>true</PublishOnBuild> | ||
<LivePublish>true</LivePublish> | ||
<!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 --> | ||
<NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported> | ||
<PublishAot Condition="'$(NativeAotSupported)' == 'true'">true</PublishAot> | ||
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier> | ||
<StripSymbols>true</StripSymbols> | ||
</PropertyGroup> | ||
|
||
<!-- If we can't publish AOT, publish trimmed single-file --> | ||
<PropertyGroup Condition="'$(PublishAot)' != 'true'"> | ||
<PublishTrimmed>true</PublishTrimmed> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<PublishReadyToRun>true</PublishReadyToRun> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)crossgen2.props" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I moved this out of packaging so that it would also get used for the
pretest
live runtimepack that we generate. Without this, live publishing for single-file ends up with a lot of extra binaries in the output.