Add NativeAOT dotnet tool packaging and E2E smoke test#15955
Draft
radical wants to merge 31 commits intomicrosoft:mainfrom
Draft
Add NativeAOT dotnet tool packaging and E2E smoke test#15955radical wants to merge 31 commits intomicrosoft:mainfrom
radical wants to merge 31 commits intomicrosoft:mainfrom
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-azdo # Conflicts: # eng/pipelines/azure-pipelines-unofficial.yml
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
For RID-specific native AOT tools, the SDK may place the executable in a nested path rather than directly at the tool-path root. Search the tool-path tree to find the actual executable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add SmokeTestNativeBinary MSBuild target to eng/clipack/Common.projitems that validates native binaries after build: - File signature check (Unix, works for cross-compiled binaries) - aspire --version execution (only when host arch matches target) - Skips execution for musl binaries on glibc hosts Invoke from both CI systems: - GHA: build-cli-native-archives.yml (after build, before upload) - AzDO: build_sign_native.yml (after tool package, before staging) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Microsoft.Build.NoTargets SDK evaluates OutputPath differently when invoked standalone vs through the build infrastructure. Add a _ResolveSmokeTestBinaryPath target that searches the artifacts tree for the binary when the default path doesn't exist. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- build-cli-native-archives.yml: Upload Aspire.Cli.{rid}.*.nupkg per RID
- run-tests.yml: Download linux-x64 nupkg and set ASPIRE_CLI_TOOL_NUPKG_DIR
The test class that consumes these will be added in a follow-up.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests the full distribution chain: dotnet tool install from nupkg → self-extracting bundle extraction → aspire new + aspire run. Reuses existing Docker/Hex1b infrastructure with a custom install step that runs 'dotnet tool install --global Aspire.Cli.linux-x64' from a mounted nupkg directory. Skips gracefully when no linux-x64 nupkg is available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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" |
The nupkg was never produced in CI because: - build-packages.yml skips CLI with SkipBundleDeps=true - build-cli-native-archives.yml only does Publish, never Pack Add 'dotnet pack Aspire.Cli.Tool.csproj' step after the native build, using the same BundlePayloadPath and RID. Also fix the install command in DotnetToolSmokeTests to use 'Aspire.Cli' (main tool package) instead of 'Aspire.Cli.linux-x64' (RID-specific runtime dependency). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…er Release - Exclude .symbols.nupkg from upload glob in build-cli-native-archives.yml - Verify both pointer and RID nupkg exist before setting env var - Prefer Release config when multiple nupkg directories found locally - Add ID to download step + gate set-path on download success - Update plan doc to reflect committed state Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous pack step set RuntimeIdentifier (singular) which puts dotnet
pack in single-RID mode, producing only the RID-specific nupkg. This broke
dotnet tool install because the pointer package (Aspire.Cli.{ver}.nupkg)
was missing.
Fix: remove RuntimeIdentifier from pack, keep only ToolPackageRuntimeIdentifiers.
Add PublishAot=false since the tool package contains the managed shim
(the native binary is embedded as a self-extracting bundle resource).
Also includes robustness fixes from review:
- Exclude .symbols.nupkg from upload glob
- Verify both pointer and RID nupkg exist before setting env var
- Prefer Release config when multiple nupkg directories found locally
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
16 tasks
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