Skip to content

feat: add support for ARM and Intel architectures in builds and workflows#7

Merged
DecSmith42 merged 2 commits intomainfrom
improvements
Apr 11, 2026
Merged

feat: add support for ARM and Intel architectures in builds and workflows#7
DecSmith42 merged 2 commits intomainfrom
improvements

Conversation

@DecSmith42
Copy link
Copy Markdown
Collaborator

  • Enhanced platform matrix to include ARM architectures (windows-11-arm, ubuntu-24.04-arm, macos-15-intel) across validation and build workflows.
  • Enabled runtime identifiers for ARM64 in csproj configuration.
  • Improved cleaning process with verbose logging, parallel deletion, and detailed error handling.
  • Updated README and renamed tool package for clarity in usage and installation instructions.

…lows

- Enhanced platform matrix to include ARM architectures (`windows-11-arm`, `ubuntu-24.04-arm`, `macos-15-intel`) across validation and build workflows.
- Enabled runtime identifiers for ARM64 in `csproj` configuration.
- Improved cleaning process with verbose logging, parallel deletion, and detailed error handling.
- Updated README and renamed tool package for clarity in usage and installation instructions.
Copilot AI review requested due to automatic review settings April 11, 2026 04:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds ARM/Intel architecture support across CI builds and the ArtifactClean tool packaging, while enhancing ArtifactClean’s cleaning implementation and user-facing docs.

Changes:

  • Expanded GitHub Actions runner matrices to include Windows/Ubuntu ARM and macOS Intel variants.
  • Updated ArtifactClean packaging to include ARM64 runtime identifiers and adjusted AOT-related ILCompiler settings.
  • Enhanced ArtifactClean cleaning logic with verbose mode, parallel deletions, and improved traversal behavior; updated README installation instructions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
README.md Updates installation package ID and improves usage formatting for artclean.
Invex.Tools.ArtifactClean/Invex.Tools.ArtifactClean.csproj Adds ARM64 runtime identifiers and tweaks publish/AOT compiler settings.
Invex.Tools.ArtifactClean/Commands.cs Adds --verbose, refactors dotnet command execution, and parallelizes bin/obj deletion.
.github/workflows/Validate.yml Expands validation matrix to include additional ARM/Intel runners.
.github/workflows/Build.yml Expands build matrix and downloads additional platform artifacts in release/publish jobs.
_atom/Build.cs Updates Atom platform matrix to include new runner labels.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Invex.Tools.ArtifactClean/Commands.cs
Comment thread Invex.Tools.ArtifactClean/Commands.cs
Comment thread Invex.Tools.ArtifactClean/Commands.cs
Comment thread Invex.Tools.ArtifactClean/Invex.Tools.ArtifactClean.csproj
Comment thread README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 11, 2026 04:13
@DecSmith42 DecSmith42 merged commit fc8b725 into main Apr 11, 2026
7 checks passed
@DecSmith42 DecSmith42 deleted the improvements branch April 11, 2026 04:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +84 to 91
process.Start();

// Should always drain output streams to prevent buffer deadlock
// When RedirectStandardOutput/Error = true but streams aren't consumed,
// the process buffer can fill and hang. BeginOutputReadLine() drains asynchronously.
process.BeginOutputReadLine();
process.BeginErrorReadLine();

Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

process.Start() can throw (e.g., missing dotnet on PATH, invalid working directory, or start failures). Previously the code handled a null process; now this will crash the tool. Wrap the start + read initialization in a try/catch (e.g., for Win32Exception/InvalidOperationException) and emit a clear error to stderr before returning a non-zero outcome (or equivalent).

Suggested change
process.Start();
// Should always drain output streams to prevent buffer deadlock
// When RedirectStandardOutput/Error = true but streams aren't consumed,
// the process buffer can fill and hang. BeginOutputReadLine() drains asynchronously.
process.BeginOutputReadLine();
process.BeginErrorReadLine();
try
{
process.Start();
// Should always drain output streams to prevent buffer deadlock
// When RedirectStandardOutput/Error = true but streams aren't consumed,
// the process buffer can fill and hang. BeginOutputReadLine() drains asynchronously.
process.BeginOutputReadLine();
process.BeginErrorReadLine();
}
catch (System.ComponentModel.Win32Exception ex)
{
Console.Error.WriteLine($"Failed to start 'dotnet {command}' in '{path}': {ex.Message}");
return;
}
catch (InvalidOperationException ex)
{
Console.Error.WriteLine($"Failed to initialize output capture for 'dotnet {command}' in '{path}': {ex.Message}");
return;
}

Copilot uses AI. Check for mistakes.
process.BeginErrorReadLine();

process.WaitForExit();

Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

With asynchronous BeginOutputReadLine/BeginErrorReadLine, a single WaitForExit() can return before all output events are fully drained/processed, potentially truncating logs (especially in verbose mode). Consider ensuring async reads complete (e.g., a second WaitForExit() or equivalent pattern) before returning.

Suggested change
// Ensure asynchronous output/error events are fully drained before returning.
process.WaitForExit();

Copilot uses AI. Check for mistakes.
Comment on lines +104 to +106
var directories = Directory
.EnumerateDirectories(path, "*", EnumerationOptions)
.ToArray();
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

Materializing all subdirectories into an array at every recursion level can increase memory pressure and latency for large repos. You can avoid ToArray() by building two lists during a single enumeration pass (e.g., one for bin/obj deletion and one for recursion), which keeps streaming behavior and still supports the two-pass logic.

Copilot uses AI. Check for mistakes.
Comment on lines +85 to +108
- name: Download Invex.Tools.ArtifactClean
uses: actions/download-artifact@v4
with:
name: Invex.Tools.ArtifactClean-windows-11-arm
path: "${{ github.workspace }}/.github/artifacts/Invex.Tools.ArtifactClean"

- name: Download Invex.Tools.ArtifactClean
uses: actions/download-artifact@v4
with:
name: Invex.Tools.ArtifactClean-ubuntu-latest
path: "${{ github.workspace }}/.github/artifacts/Invex.Tools.ArtifactClean"

- name: Download Invex.Tools.ArtifactClean
uses: actions/download-artifact@v4
with:
name: Invex.Tools.ArtifactClean-ubuntu-24.04-arm
path: "${{ github.workspace }}/.github/artifacts/Invex.Tools.ArtifactClean"

- name: Download Invex.Tools.ArtifactClean
uses: actions/download-artifact@v4
with:
name: Invex.Tools.ArtifactClean-macos-15-intel
path: "${{ github.workspace }}/.github/artifacts/Invex.Tools.ArtifactClean"

Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

These download steps are highly repetitive and will keep growing as the matrix expands. With actions/download-artifact@v4, consider downloading via a single step using a pattern (e.g., Invex.Tools.ArtifactClean-*) and merge-multiple: true, or drive downloads via a small matrix/loop, to reduce duplication and the chance of missing future runner additions.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants