From d844e06819ed3775fa8e441e124c0447e7daf685 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 12:48:45 +0000 Subject: [PATCH 1/4] Initial plan From 9c4d95eb8adde86ef0c45953a0140282ee363f8f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 12:50:46 +0000 Subject: [PATCH 2/4] ci: upgrade workflows with merge commit notes and architecture matrix Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com> --- .github/workflows/build.yml | 61 ++++++++++++++++++++++++++--------- .github/workflows/release.yml | 13 +++++++- 2 files changed, 58 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0564a0..0375998 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,27 +3,58 @@ on: [pull_request, push] permissions: contents: read jobs: - build-windows: - runs-on: windows-latest + build-and-test: + strategy: + matrix: + include: + - arch: x64 + runner: windows-latest + vcvars_arch: x64 + - arch: x86 + runner: windows-latest + vcvars_arch: x64_x86 + - arch: arm64 + runner: windows-11-arm + vcvars_arch: arm64 + runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v4 - - name: Setup MSVC - uses: ilammy/msvc-dev-cmd@v1 - - - name: Compile - shell: pwsh + - name: Compile for ${{ matrix.arch }} + shell: cmd run: | - cl /O2 /std:c++20 /EHsc main.cpp /DUNICODE /D_UNICODE /Fe:win-witr.exe - # Add the current directory (where win-witr.exe was compiled) to PATH - $env:PATH = "$PWD;$env:PATH" - - # Verify the exe is accessible - Write-Host "Checking win-witr.exe availability..." - win-witr --version - - name: Run Tests + @echo off + REM Find vcvarsall.bat dynamically + for /f "usebackq tokens=*" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( + set "VS_PATH=%%i" + ) + + if not exist "%VS_PATH%\VC\Auxiliary\Build\vcvarsall.bat" ( + echo Error: vcvarsall.bat not found. + exit /b 1 + ) + + REM Initialize environment for the target architecture + call "%VS_PATH%\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.vcvars_arch }} + + set outName=win-witr-${{ matrix.arch }}.exe + echo Compiling %outName%... + cl /O2 /Ot /GL /std:c++20 /EHsc main.cpp /DUNICODE /D_UNICODE /Fe:%outName% + if errorlevel 1 exit /b 1 + + - name: Run Tests for ${{ matrix.arch }} shell: pwsh run: | + # Add the current directory (where win-witr-${{ matrix.arch }}.exe was compiled) to PATH + $env:PATH = "$PWD;$env:PATH" + + # Copy the architecture-specific exe to the generic name for tests + Copy-Item "win-witr-${{ matrix.arch }}.exe" "win-witr.exe" + + # Verify the exe is accessible + Write-Host "Checking win-witr.exe availability..." + win-witr --version + # Run all test .bat files Get-ChildItem -Path tests -Recurse -Filter *.bat | ForEach-Object { Write-Host "Running test: $($_.FullName)" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7958ac8..15b6d95 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -155,6 +155,10 @@ jobs: Write-Output "DEBUG: Base SHA: $baseSha" Write-Output "DEBUG: Head SHA: $headSha" + # Get the merge commit (HEAD) message body for personal release notes + $mergeCommitBody = git log -1 --pretty=format:"%b" HEAD + Write-Output "DEBUG: Merge commit body: $mergeCommitBody" + # Get all commit messages in the PR $commits = @(git log --pretty=format:"%h|%s|%b" "$baseSha..$headSha") Write-Output "DEBUG: Found $($commits.Count) commits in PR" @@ -215,7 +219,14 @@ jobs: } # Build release notes - $releaseNotes = "## Changes`n`n" + $releaseNotes = "" + + # Add merge commit body at the top if it exists + if (-not [string]::IsNullOrWhiteSpace($mergeCommitBody)) { + $releaseNotes += "$mergeCommitBody`n`n---`n`n" + } + + $releaseNotes += "## Changes`n`n" if ($features.Count -gt 0) { $releaseNotes += "### ✨ Features`n" From 93a2620251b5d2a0b1a2941876066c7eccb18c2e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 12:51:55 +0000 Subject: [PATCH 3/4] fix: handle vswhere.exe path for ARM64 runners and remove unnecessary echo off Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com> --- .github/workflows/build.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0375998..58990df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,9 +23,20 @@ jobs: - name: Compile for ${{ matrix.arch }} shell: cmd run: | - @echo off - REM Find vcvarsall.bat dynamically - for /f "usebackq tokens=*" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( + REM Find vcvarsall.bat dynamically - check both possible vswhere.exe locations + set "VSWHERE_X86=C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" + set "VSWHERE_ARM64=C:\Program Files\Microsoft Visual Studio\Installer\vswhere.exe" + + if exist "%VSWHERE_X86%" ( + set "VSWHERE_PATH=%VSWHERE_X86%" + ) else if exist "%VSWHERE_ARM64%" ( + set "VSWHERE_PATH=%VSWHERE_ARM64%" + ) else ( + echo Error: vswhere.exe not found in either location. + exit /b 1 + ) + + for /f "usebackq tokens=*" %%i in (`"%VSWHERE_PATH%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( set "VS_PATH=%%i" ) From ff643a782867519258885e60512c727d01db39db Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 12:52:50 +0000 Subject: [PATCH 4/4] refactor: improve variable naming and remove redundant compiler flag Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com> --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58990df..56b1b00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,13 +24,13 @@ jobs: shell: cmd run: | REM Find vcvarsall.bat dynamically - check both possible vswhere.exe locations - set "VSWHERE_X86=C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" - set "VSWHERE_ARM64=C:\Program Files\Microsoft Visual Studio\Installer\vswhere.exe" + set "VSWHERE_LEGACY=C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" + set "VSWHERE_NATIVE=C:\Program Files\Microsoft Visual Studio\Installer\vswhere.exe" - if exist "%VSWHERE_X86%" ( - set "VSWHERE_PATH=%VSWHERE_X86%" - ) else if exist "%VSWHERE_ARM64%" ( - set "VSWHERE_PATH=%VSWHERE_ARM64%" + if exist "%VSWHERE_LEGACY%" ( + set "VSWHERE_PATH=%VSWHERE_LEGACY%" + ) else if exist "%VSWHERE_NATIVE%" ( + set "VSWHERE_PATH=%VSWHERE_NATIVE%" ) else ( echo Error: vswhere.exe not found in either location. exit /b 1 @@ -50,7 +50,7 @@ jobs: set outName=win-witr-${{ matrix.arch }}.exe echo Compiling %outName%... - cl /O2 /Ot /GL /std:c++20 /EHsc main.cpp /DUNICODE /D_UNICODE /Fe:%outName% + cl /O2 /GL /std:c++20 /EHsc main.cpp /DUNICODE /D_UNICODE /Fe:%outName% if errorlevel 1 exit /b 1 - name: Run Tests for ${{ matrix.arch }}