Add NativeAOT dotnet tool packaging and E2E smoke test#15955
Draft
radical wants to merge 8 commits intomicrosoft:mainfrom
Draft
Add NativeAOT dotnet tool packaging and E2E smoke test#15955radical wants to merge 8 commits intomicrosoft:mainfrom
radical wants to merge 8 commits intomicrosoft:mainfrom
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15955Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15955" |
16 tasks
ab7a1ea to
dcfcce3
Compare
Contributor
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
Squashed NativeAOT dotnet-tool changes, excluding aspire-update-json. Changes: - Make CLI dotnet-tool nupkg contain NativeAOT binary - Add NativeAOT tool pack to AzDO pipeline - Split stage/publish loops so 1ES compliance steps run once - Add dotnet-tool smoke test to GitHub CI - Add C# dotnet-tool install smoke test - Add CLI E2E tests for dotnet tool installation and self-update - Fix Windows dotnet tool test for NativeAOT .cmd shim - Dispose ServiceProvider in UpdateCommand tests to close log file handles - Collapse/merge Windows+Unix step pairs in build-cli-native-archives - Remove cli_dotnet_tool_smoke_test job from tests.yml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add eng/clitoolpack/ with per-RID projects that mirror the eng/clipack/ pattern. When the native build runs with TargetRids, this produces the Aspire.Cli dotnet tool nupkg alongside the CLI archives — same build, same artifacts. - 7 per-RID csproj wrappers (one per supported RID) - Common.projitems: NoTargets project that calls Restore+Pack on Aspire.Cli.Tool.csproj with the correct RID, NativeAOT settings, BundlePayloadPath, and version properties - eng/Build.props: wired into the native build section next to clipack Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… races Instead of a separate eng/clitoolpack/ directory with per-RID wrappers that ran as parallel ProjectToBuild items (racing on shared deps like Aspire.TypeSystem.deps.json), add a PackCliTool target to clipack's Common.projitems that runs AfterTargets="Build". This ensures the tool nupkg is produced after the archive publish, reusing cached dependency outputs without file locking. Removes: eng/clitoolpack/ (8 per-RID csprojs + Common.projitems) Modifies: eng/clipack/Common.projitems (adds PackCliTool target) Modifies: eng/Build.props (removes _NativeToolPackProject items) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the per-RID 'dotnet pack Aspire.Cli.Tool.csproj' step from after the main build+sign step into the per-RID loop that runs before it. This ensures the tool nupkgs are already in Shipping when Arcade's -sign step runs, so they get signed alongside all other packages. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove duplicate PackCliTool target from Common.projitems that was overwriting signed nupkgs with unsigned ones during Build step - Keep pack step ordering: pack before build+sign in build_sign_native.yml so Arcade's --sign signs the nupkg - Add verify-cli-tool-nupkg.sh (Unix) and verify-cli-tool-nupkg.ps1 (Windows) validation scripts that check: - nupkg existence for the target RID - size sanity (>5MB for NativeAOT binary) - binary presence and file type (ELF/Mach-O/PE) - primary pointer package existence - Wire validation steps into both pipeline templates: - build_sign_native.yml: runs for all macOS/Linux RIDs - BuildAndTest.yml: runs for all Windows RIDs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
544e9aa to
2f6c0e9
Compare
Move tool nupkg creation inside clipack via _PackCliTool target, which runs after _PublishProject. Instead of having dotnet pack compile its own NativeAOT binary (which fails for cross-RID targets), we pass the clipack-built binary via PreBuiltCliBinaryPath. The csproj sets IsPublishable=false to skip the SDK's Publish step and copies the pre-built binary to PublishDir for PackTool to glob. This ensures: - No cross-compilation failures (binary is built by clipack on matching OS) - Signing alignment (nupkg in Shipping dir before Arcade --sign runs) - SDK still generates DotnetToolSettings.xml with Runner="executable" - Works across all contexts: GH Actions, AzDO macOS/Linux, AzDO Windows Removes standalone 'Pack CLI dotnet-tool' steps from all three pipelines since clipack now handles it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or 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
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.
Summary
Adds CI plumbing and an E2E smoke test for the
dotnet tool installpackaging path of the Aspire CLI.Changes
CI Workflow (
build-cli-native-archives.yml,run-tests.yml):Aspire.Cli.{rid}.*.nupkgas a CI artifact from the native archives buildASPIRE_CLI_TOOL_NUPKG_DIRenv varE2E Test (
DotnetToolSmokeTests.cs):dotnet tool install→ self-extracting bundle →aspire new+aspire runMotivation
The existing CLI E2E tests install the native binary directly (mount or download), but none test the dotnet tool packaging path. Since the dotnet tool wraps a native AOT binary via
SelfExtractingBundle, we need a test that validates the full distribution chain.Testing
SplitTestsOnCI=true