Skip to content
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
wants to merge 6 commits into from
Closed

Conversation

agocke
Copy link
Member

@agocke agocke commented Dec 17, 2022

This PR attempts to create a dedicated live publishing workflow that many different projects can use to publish with live bits, specifically in self-contained scenarios. The two consumers right now are crossgen2 and ILC. The ILC binaries currently don't go anywhere (they don't ship in any packages), but they could if we decide to go that route.

The new suggested workflow would be to create a new dedicated project for publishing, which avoids potential headaches with shared assets from the original project. Then, setting the 'LivePublish' MSBuild variable should enable the Publish task to use live bits. Setting the 'PublishOnBuild' property to 'true' will let a project publish itself whenever build is executed.

This PR attempts to create a dedicated live publishing workflow that
many different projects can use to publish with live bits, specifically
in self-contained scenarios. The two consumers right now are crossgen2
and ILC. The ILC binaries currently don't go anywhere (they don't ship
in any packages), but they could if we decide to go that route.

The new suggested workflow would be to create a new dedicated project
for publishing, which avoids potential headaches with shared assets from
the original project. Then, setting the 'LivePublish' MSBuild variable
should enable the Publish task to use live bits. Setting the
'PublishOnBuild' property to 'true' will let a project publish itself
whenever build is executed.
Example:
<SingleFileHostIncludeFilename Include="somefile.dll" />
-->
<ItemGroup>
Copy link
Member Author

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.

;RuntimeIdentifier=$(PackageRID)
;CoreCLRArtifactsPath=$(CoreCLRArtifactsPath)
;R2ROverridePath=$(MSBuildThisFileDirectory)ReadyToRun.targets">
Properties="PublishOnBuild=false">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary because otherwise there seems to be some sort of cycle of target dependencies. I didn't spend time debugging it since it didn't seem important.

@am11
Copy link
Member

am11 commented Dec 17, 2022

The ILC binaries currently don't go anywhere (they don't ship in any packages)

Is it about different binaries than the one shipped in ilcompiler's runtime package (which msbuild invokes with PublishAot=true)?

~/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/8.0.0-alpha.1.22609.9/tools/ilc
~/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/7.0.0/tools/ilc

packs subset builds that package.

@agocke
Copy link
Member Author

agocke commented Dec 17, 2022

Ah yeah, that should read "the AOT'd ILC binaries don't go anywhere in this PR" -- I changed packaging to pull the FX-dependent versions. That may be the wrong move, it was just simple to do for the moment.

@ghost ghost closed this Jan 17, 2023
@ghost
Copy link

ghost commented Jan 17, 2023

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@agocke agocke deleted the move-publish-new-proj branch January 23, 2023 21:12
@agocke agocke restored the move-publish-new-proj branch January 23, 2023 21:13
@agocke agocke reopened this Jan 23, 2023
@ghost ghost closed this Feb 22, 2023
@ghost
Copy link

ghost commented Feb 22, 2023

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 25, 2023
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants