-
Notifications
You must be signed in to change notification settings - Fork 29
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
Revamp CI infrastructure and implement release automation #1873
Merged
Conversation
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
The x64 platform didn't actually build most of Bonsai, it's an artifact of fb65c18 when Bonsai64 was added (before becoming the default and leading to Bonsai32.) The "Mixed Platforms" platform is something Visual Studio used to automatically add to solutions when multiple projects had conflicting platforms. Technically Mixed Platforms was the default before, but Any CPU was equivalent and makes more sense in the context of Bonsai.
The XML declarations are an artifact of the fact that Bonsai is old enough to have use the legacy csproj format. They aren't present the official .NET templates anymore and only serve as noise. The Microsoft.NET.Sdk.WindowsDesktop distinction no longer actually exists. (For modern projects you'd generally add a -windows suffix to the target framework instead, although in the case of Bonsai that wasn't actually necessary anywhere since we still target .NET Framework which is implicitly Windows-only.) https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/netsdk1137
This is being done in preparation for having auxiliary files for organization purposes. The csproj-specific files pattern is intended to avoid issues when projects of multiple types share the same repo. This isn't strictly necessary in the case of Bonsai, but I did it out of habit. This also adds a dummy Directory.Build.rsp (another lesser-used ambient MSBuild configuration mechanism) to avoid searching for one outside of the repo.
…'s output Most of the side-effects of this mistake were not externally observable, but they can (and did) result in extremely confusingly broken builds.
This was referenced Jul 3, 2024
Closed
glopesdev
reviewed
Jul 3, 2024
PathogenDavid
force-pushed
the
release-automation
branch
from
July 4, 2024 05:51
93503f2
to
399f50f
Compare
The .NET SDK uses MSBuild Core rather than MSBuild Framework. One difference between them is that the legacy Windows-centric resource embedding was completely dropped from Core. This updated resource embedding can be used with .NET Framework by using System.Resources.Extensions. (It only affects non-string resources like images, hence why only Bonsai.Design needs it.) ------------------------------------------------- The new reference to System.Runtime.CompilerServices.Unsafe in Bonsai32 is to work around a quirk of how NuGet resolves the dependency graph. There exists two paths to this package from the main Bonsai project (versions noted where important): 1) Bonsai -> Bonsai.Design -> System.Resources.Extensions -> System.Memory -> System.Runtime.CompilerServices.Unsafe/4.5.3 2) Bonsai -> System.Reflection.MetadataLoadContext->System.Collections.Immutable -> System.Runtime.CompilerServices.Unsafe/6.0.0 Path bonsai-rx#2 is private to Bonsai, while Path bonsai-rx#1 is not. Because Path bonsai-rx#2 is private, it isn't even part of the restore graph of Bonsai32. As a result, Bonsai32 gets a transitive reference to S.R.CS.Unsafe 4.5.3 but Bonsai already has private reference to S.R.CS.Unsafe 6.0.0, resulting in a conflict. This eventually results in a MSB3277 warning and can result in a completely broken build (if it weren't for the recent change the prevented Bonsai32 from clobbering Bonsai's output.)
Source link is enabled by default in .NET 8, so this mostly just means removing things that were interfering with it and enforcing building with the .NET 8 SDK. Release automation will rely on Source Link being made default in .NET 8 and we're going to be moving to .NET 8 soon anyway, so no time like the present.
…s` projects This reference is causing bogus warnings on build and isn't actually being used. I think this is an artifact from older versions of Visual Studio, the current VSIX project template doesn't include it.
More info: https://learn.microsoft.com/en-us/dotnet/core/sdk/artifacts-output This also applies to the setup executables and VSIX projects even though they use legacy .NET SDK.
Also add it to the main solution since it was orphaned and it'll be able to be built from it.
The ancient version of ILRepack we were using was broken due to a bug in Mono.Cecil that caused it to crash when running in a modern .NET context. Even ignoring that, it chokes on modern resources embeddings. The package we were using hasn't been updated since early 2019. There is a fork that branched off in 2013 https://www.nuget.org/packages/ILRepack.Lib.MSBuild.Task but it doesn't work quite the same way (it tries to work automagically) and isn't a drop-in replacement. As such this change just invokes the executable from the official distribution of ILRepack. This change also makes it so that repacking is no longer done automatically during release builds. It'll be done explicitly by release automation.
This commit also comes with some major changes to how versioning of Bonsai and its components works: * All packages within Bonsai are versioned together now (packages with no changes skip version numbers instead of getting out of sync) * This means Bonsai.Shaders and friends are no longer using initial development (IE: 0.y.z) version numbers * It is now forbidden for projects to explicitly specify their versions (this is required for package diffing * The now-unnecessary revision octet of the file versions has been eliminated (RIP days since first commit Easter egg) * The origin and purpose of Bonsai binaries is now labeled clearly: Developer (local) builds, unstable CI builds, preview builds, and final release builds * The title of Bonsai's editor will be tagged as such for anything other than the final release builds
The labels in the table try to use word wrap when they're too long, but only the first line is visible so the wrapped text just disappears instead. AutoEllipsis prevents the wrap and instead cuts off excess information with an ellipsis. Version was disappearing entirely when build metadata was included. The copyright year range was being cut off as well, made the form a bit wider so it's fully visible.
glopesdev
approved these changes
Jul 4, 2024
PathogenDavid
force-pushed
the
release-automation
branch
from
July 4, 2024 16:17
399f50f
to
3a4a723
Compare
glopesdev
changed the title
Release automation
Revamp CI infrastructure and implement release automation
Jul 4, 2024
This was referenced Jul 9, 2024
This was referenced Jul 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR revamps CI and adds release automation.
I don't expect to make any more changes, but I've marked this as a draft because manual configuration to the Bonsai repo must be completed before merging.
As a side effect, this PR brings some other changes as well:
artifacts
folder at the root of the repositorybin
folderBonsai32
no longer clobbersBonsai
's output (this was mostly invisible but was causing chaos within the build could break things in subtle ways)global.json
) -- This isn't strictly necessary (we do assume .NET 8 since it comes with Source Link) but we're going to have a hard requirement soon so might as wellThis PR furthermore makes some major changes to how Bonsai is versioned:
compare-nuget-packages.py
)main
will have their origin clearly tagged. (For example, adevel
branch would produce packages versioned like2.8.5-devel-ci42
)Some things that didn't end up making it into this PR:
Related docs repo PR: bonsai-rx/docs#87
Related infrastructure backport PR: #1880
Closes #1856
Indirectly fixes #1831 (Bonsai.Editor is always released now, so this scenario can't happen anymore)