Skip to content

ci: matrix builds with native ARM64 runners and PR test comments#62

Merged
supervoidcoder merged 8 commits intomainfrom
copilot/ci-upgrade-release-and-build
Feb 1, 2026
Merged

ci: matrix builds with native ARM64 runners and PR test comments#62
supervoidcoder merged 8 commits intomainfrom
copilot/ci-upgrade-release-and-build

Conversation

Copy link
Contributor

Copilot AI commented Feb 1, 2026

CI Workflow Upgrades

Plan

  • Update release.yml to add merge commit extended description to release notes
    • Extract merge commit message body from the merge commit itself
    • Place it at the top of release notes before commit history
    • Check if PR was actually merged before running release steps
    • Use merge_commit_sha instead of HEAD for merge commit body
  • Update build.yml to use matrix for multiple architectures
    • Create matrix job with x64, x86, and arm64 architectures
    • Use native windows-11-arm runner for ARM64 testing
    • Use x64 runner for x86/x64 (WoW64 compatibility)
    • Update test execution to run on appropriate runners
    • Fix ARM64 to use native compilation (not cross-compilation)
    • Fix test exit code capture
    • Remove unused test output variable
    • Use unique timestamp-based delimiter for multiline output
    • Create standard executable name (win-witr.exe) for tests
    • Capture test stdout/stderr in test results
    • Add job status field to test results JSON
    • Fix undefined variable in catch block
  • Add PR comment with test results to build.yml
    • Collect test output during test runs
    • Format test results
    • Post comment to PR only when triggered by pull request
    • Show test pass/fail counts by architecture
    • Handle compile/setup failures and show appropriate messages

Changes Made

release.yml:

  • Added extraction of merge commit extended description (commit body)
  • Placed merge commit notes at the top of release notes as "Release Notes" section
  • Followed by separator and then the auto-generated commit history
  • Added guard to only run if PR was actually merged (github.event.pull_request.merged == true)
  • Use github.event.pull_request.merge_commit_sha instead of HEAD for correct merge commit

build.yml:

  • Converted to matrix-based build strategy with three architectures: x64, x86, arm64
  • ARM64 now uses windows-11-arm runner for native compilation and testing (no cross-compilation needed!)
  • x86 uses x64 runner with WoW64 compatibility
  • Each architecture compiles and tests in parallel with fail-fast: false
  • Creates architecture-specific binaries (win-witr-{arch}.exe) and standard name copy for tests
  • Tests now capture stdout/stderr output and include in test results
  • Added job status field to test results JSON
  • Uses timestamp-based delimiter for multiline output to avoid conflicts
  • Fixed undefined variable issue by initializing $output outside try block
  • Test results are saved as artifacts and then posted as a formatted PR comment
  • PR comments only appear on pull requests (not on push events)
  • Comment shows test summary for each architecture with expandable details including test output
  • Handles compile/setup failures by checking job status and showing appropriate error messages
Original prompt

This section details on the original issue you should resolve

<issue_title>ci upgrade</issue_title>
<issue_description>we don't have to cross compile arm anymore, github actions has windows-11-arm labels for runners.

the upgrades I want:

  • in release.yml, I want the actual merge commit extended description to be added to the top of the release as a sorta personal "release notes" so i can write it myself, and then the commit history is after that.
  • in build.yml, i want it to be a matrix that compiles all arch versions, then another matrix that tests them (it can be the same matrix job actually). for x86 there isn't a specific runner for that but we can just run it in x64 either way since they're compatible (WoW64). the only one that's really that different is arm64
  • in build.yml, perhaps we can take the output of the batch tests and post them in a comment ONLY when the build runs in a pull request. that way, i can see a comment like:

Tests Completed

x/x tests passed

Test 1 (name of bat file) ``` output here ```

and so on</issue_description>

<agent_instructions>Do NOT make a documentation markdown file for your additions. Any of your "documentation" must be in the yml comments or the pull request description. Do NOT, I repeat, do NOT touch the c++ file(s)</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Summary by CodeRabbit

Chores

  • Build and test workflow expanded to support x64, x86, and arm64 architectures with independent execution and detailed per-architecture test result summaries posted to pull requests
  • Release notes generation now includes merge commit information for improved traceability

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI and others added 5 commits February 1, 2026 01:48
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade CI configuration for release and build processes ci: matrix builds with native ARM64 runners and PR test comments Feb 1, 2026
Copilot AI requested a review from supervoidcoder February 1, 2026 01:53
@supervoidcoder supervoidcoder marked this pull request as ready for review February 1, 2026 01:55
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 1, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • ✅ Full review completed - (🔄 Check again to review again)

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot added build Build system related ci/cd CI/CD workflow issues enhancement New feature or request windows Windows-specific issues labels Feb 1, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @.github/workflows/build.yml:
- Around line 143-208: The test result JSON needs a job status field and the
comment logic must consider it: update the step that writes test results to
include a stable field (e.g., "status" or "job.status") reflecting the job
outcome, then modify the GitHub Script that reads files (the files loop using
const files = ... and data = JSON.parse(...)) to mark allPassed = false when
either data.failed > 0 OR data.status !== 'success'; also adjust the
status/emoji logic (the const status = ... line) to use data.status alongside
failed so compile/setup failures show ❌ and the commentBody accurately reports
failures when tests never ran. Ensure you reference the same field name in both
the producer and consumer of the JSON.
- Around line 56-89: The test runner currently discards stdout/stderr with "|
Out-Null", losing output needed for PR comments; update the block that invokes
$_.FullName to capture the command output into a variable (e.g., $output = &
$_.FullName 2>&1), then use $LASTEXITCODE as before to determine pass/fail and
append the captured output to $testResults (include it alongside the
"PASSED"/"FAILED" message and exit code) so downstream post-test-results job can
post detailed logs; ensure the catch block also captures and appends $_ (the
exception) and any $output to $testResults for failed runs.

In @.github/workflows/release.yml:
- Around line 158-162: The workflow uses git log on HEAD to build
mergeCommitBody (variable mergeCommitBody) which is invalid when a PR is closed
without merging; add a guard that checks github.event.pull_request.merged ==
true before running release-note generation steps and replace the HEAD lookup
with the actual merge commit SHA (github.event.pull_request.merge_commit_sha)
when populating mergeCommitBody so the workflow always reads the correct merge
commit message.

@supervoidcoder
Copy link
Owner

@copilot In @.github/workflows/build.yml:

  • Around line 143-208: The test result JSON needs a job status field and the
    comment logic must consider it: update the step that writes test results to
    include a stable field (e.g., "status" or "job.status") reflecting the job
    outcome, then modify the GitHub Script that reads files (the files loop using
    const files = ... and data = JSON.parse(...)) to mark allPassed = false when
    either data.failed > 0 OR data.status !== 'success'; also adjust the
    status/emoji logic (the const status = ... line) to use data.status alongside
    failed so compile/setup failures show ❌ and the commentBody accurately reports
    failures when tests never ran. Ensure you reference the same field name in both
    the producer and consumer of the JSON.
  • Around line 56-89: The test runner currently discards stdout/stderr with "|
    Out-Null", losing output needed for PR comments; update the block that invokes
    $.FullName to capture the command output into a variable (e.g., $output = &
    $
    .FullName 2>&1), then use $LASTEXITCODE as before to determine pass/fail and
    append the captured output to $testResults (include it alongside the
    "PASSED"/"FAILED" message and exit code) so downstream post-test-results job can
    post detailed logs; ensure the catch block also captures and appends $_ (the
    exception) and any $output to $testResults for failed runs.

In @.github/workflows/release.yml:

  • Around line 158-162: The workflow uses git log on HEAD to build
    mergeCommitBody (variable mergeCommitBody) which is invalid when a PR is closed
    without merging; add a guard that checks github.event.pull_request.merged ==
    true before running release-note generation steps and replace the HEAD lookup
    with the actual merge commit SHA (github.event.pull_request.merge_commit_sha)
    when populating mergeCommitBody so the workflow always reads the correct merge
    commit message.

Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 1, 2026

@copilot In @.github/workflows/build.yml:

  • Around line 143-208: The test result JSON needs a job status field and the
    comment logic must consider it: update the step that writes test results to
    ...

Fixed in commit 8906b05:

build.yml:

  • Test runner now captures stdout/stderr output instead of discarding with | Out-Null and includes it in test results
  • Added status field to test results JSON based on steps.run_tests.outcome
  • Updated comment logic to check both data.failed > 0 and data.status !== 'success'
  • Comment now shows "Job failed" message when compile/setup failures prevent tests from running
  • Exception handling also captures and includes output in test results

release.yml:

  • Added if: github.event.pull_request.merged == true guard to only run when PR is actually merged
  • Changed merge commit lookup from HEAD to github.event.pull_request.merge_commit_sha for the correct merge commit message

…d errors

Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/build.yml:
- Around line 197-205: The logic currently hides test counts when status !==
'success'; modify the branch around commentBody construction (variables: status,
total, passed, failed, arch, commentBody) so the "Job failed - Tests may not
have run..." message is only added when total === 0 (compile/setup failure). In
practice, change the condition to check both status and total (e.g., if (status
!== 'success' && total === 0) show the setup-failure message) and ensure the
else branch prints the `${passed}/${total} tests passed` line even when status
=== 'failure' but total > 0 so failed test runs still display counts.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

160-166: Good use of merge commit SHA, but consider adding defensive validation.

The change correctly uses merge_commit_sha instead of HEAD to retrieve the actual merge commit body. With the merged guard at line 17, this SHA should always be valid.

However, adding a defensive check for an empty SHA would make the workflow more robust against edge cases:

🛡️ Optional defensive validation
          $mergeCommitSha = "${{ github.event.pull_request.merge_commit_sha }}"
          Write-Output "DEBUG: Merge commit SHA: $mergeCommitSha"
          
-          $mergeCommitBody = git log -1 --pretty=format:"%b" $mergeCommitSha
+          $mergeCommitBody = ""
+          if (-not [string]::IsNullOrWhiteSpace($mergeCommitSha)) {
+            $mergeCommitBody = git log -1 --pretty=format:"%b" $mergeCommitSha
+          }
          Write-Output "DEBUG: Merge commit body: $mergeCommitBody"

@supervoidcoder supervoidcoder merged commit c83f5be into main Feb 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build system related ci/cd CI/CD workflow issues enhancement New feature or request windows Windows-specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci upgrade

2 participants