feat: add support for ARM and Intel architectures in builds and workflows#7
feat: add support for ARM and Intel architectures in builds and workflows#7DecSmith42 merged 2 commits intomainfrom
Conversation
…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.
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
| 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(); | ||
|
|
There was a problem hiding this comment.
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).
| 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; | |
| } |
| process.BeginErrorReadLine(); | ||
|
|
||
| process.WaitForExit(); | ||
|
|
There was a problem hiding this comment.
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.
| // Ensure asynchronous output/error events are fully drained before returning. | |
| process.WaitForExit(); |
| var directories = Directory | ||
| .EnumerateDirectories(path, "*", EnumerationOptions) | ||
| .ToArray(); |
There was a problem hiding this comment.
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.
| - 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" | ||
|
|
There was a problem hiding this comment.
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.
windows-11-arm,ubuntu-24.04-arm,macos-15-intel) across validation and build workflows.csprojconfiguration.