From c01fb58940926e3489d518da51a281c9ceed33ff Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 05:45:24 +0000 Subject: [PATCH 1/6] Update GitHub Actions workflow with fixes from simplify branch Incorporated multiple fixes to ensure proper build in GitHub Actions: 1. **Add Windows SDK tools to PATH**: Fixes RC.exe not found error by adding Windows SDK bin directory to PATH before vcpkg runs. This ensures the Resource Compiler is available during dependency builds. 2. **Explicit generator specification**: Added `-G "Visual Studio 17 2022"` to cmake commands to ensure MSBuild is used instead of Ninja, preventing linker and resource compiler errors. 3. **vcpkg build caching**: Added `useVcpkgInstallArtifactCaching: true` to speed up builds by caching vcpkg artifacts between runs. 4. **Submodule support**: Added `submodules: recursive` to checkout step to support repositories using git submodules (like Detours). 5. **Split debug/release builds**: Separated into two parallel jobs for better build organization and potential parallelization. 6. **Updated artifact paths**: Changed artifact paths to bin/ directory to match actual build output locations. These changes address build failures related to missing build tools, incorrect generator selection, and missing dependencies. --- .github/workflows/build.yml | 89 ++++++++++++++++++++++++++++++++++--- 1 file changed, 83 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b85d44..b7afb27 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,23 +9,43 @@ on: - main jobs: - build: + build-debug: + name: Build Debug runs-on: [self-hosted, DESKTOP-N792BI5] - + steps: - name: Checkout repository uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Add Windows SDK tools to PATH + shell: pwsh + run: | + $sdkPaths = @( + "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64", + "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64", + "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64" + ) + foreach ($path in $sdkPaths) { + if (Test-Path $path) { + echo "$path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + Write-Host "Added to PATH: $path" + break + } + } - name: Setup vcpkg uses: lukka/run-vcpkg@v11 with: vcpkgJsonGlob: 'vcpkg.json' + useVcpkgInstallArtifactCaching: true - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 - name: Configure CMake (Debug) - run: cmake --preset debug -G "Visual Studio 17 2022" -DBUILD_DOC=OFF -DBUILD_DRIVER=ON -DBUILD_WIX_INSTALLER=OFF -DBUILD_GRPC=ON + run: cmake --preset debug -DBUILD_DOC=OFF -DBUILD_DRIVER=ON -DBUILD_WIX_INSTALLER=OFF -DBUILD_GRPC=ON -G "Visual Studio 17 2022" env: VCPKG_ROOT: ${{ github.workspace }}/vcpkg @@ -37,7 +57,64 @@ jobs: with: name: panoptes-debug path: | - build/debug/**/*.dll - build/debug/**/*.exe - build/debug/**/*.pdb + bin/Debug/**/*.dll + bin/Debug/**/*.exe + bin/Debug/**/*.pdb + bin/tests/Debug/**/*.exe + bin/tests/Debug/**/*.pdb + if-no-files-found: warn + + build-release: + name: Build Release + runs-on: [self-hosted, DESKTOP-N792BI5] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Add Windows SDK tools to PATH + shell: pwsh + run: | + $sdkPaths = @( + "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64", + "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64", + "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64" + ) + foreach ($path in $sdkPaths) { + if (Test-Path $path) { + echo "$path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + Write-Host "Added to PATH: $path" + break + } + } + + - name: Setup vcpkg + uses: lukka/run-vcpkg@v11 + with: + vcpkgJsonGlob: 'vcpkg.json' + useVcpkgInstallArtifactCaching: true + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Configure CMake (Release) + run: cmake --preset release -DBUILD_DOC=OFF -DBUILD_DRIVER=ON -DBUILD_WIX_INSTALLER=OFF -DBUILD_GRPC=ON -G "Visual Studio 17 2022" + env: + VCPKG_ROOT: ${{ github.workspace }}/vcpkg + + - name: Build (Release) + run: msbuild build/release/Panoptes.sln /p:Configuration=Release /p:Platform=x64 /m + + - name: Upload Release Artifacts + uses: actions/upload-artifact@v4 + with: + name: panoptes-release + path: | + bin/Release/**/*.dll + bin/Release/**/*.exe + bin/Release/**/*.pdb + bin/tests/Release/**/*.exe + bin/tests/Release/**/*.pdb if-no-files-found: warn From e88fce928aa91788a39d645773d4647655df87a9 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 05:48:17 +0000 Subject: [PATCH 2/6] Remove Windows SDK tools PATH setup step CMakePresets.json now defines x86_BUILD_TOOLS_PATH and x64_BUILD_TOOLS_PATH variables, so the manual PATH modification is no longer needed. --- .github/workflows/build.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7afb27..2b71af7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,22 +19,6 @@ jobs: with: submodules: recursive - - name: Add Windows SDK tools to PATH - shell: pwsh - run: | - $sdkPaths = @( - "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64", - "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64", - "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64" - ) - foreach ($path in $sdkPaths) { - if (Test-Path $path) { - echo "$path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - Write-Host "Added to PATH: $path" - break - } - } - - name: Setup vcpkg uses: lukka/run-vcpkg@v11 with: @@ -74,22 +58,6 @@ jobs: with: submodules: recursive - - name: Add Windows SDK tools to PATH - shell: pwsh - run: | - $sdkPaths = @( - "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64", - "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64", - "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64" - ) - foreach ($path in $sdkPaths) { - if (Test-Path $path) { - echo "$path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - Write-Host "Added to PATH: $path" - break - } - } - - name: Setup vcpkg uses: lukka/run-vcpkg@v11 with: From 0a0990bcb9dfa227b84949c3fce2b789de2e52a4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 05:50:18 +0000 Subject: [PATCH 3/6] Add Ninja installation step to build workflow Install Ninja build system using Chocolatey in both debug and release build jobs. This ensures Ninja is available for vcpkg and CMake. --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b71af7..f454417 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,9 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 + - name: Install Ninja + run: choco install ninja -y + - name: Configure CMake (Debug) run: cmake --preset debug -DBUILD_DOC=OFF -DBUILD_DRIVER=ON -DBUILD_WIX_INSTALLER=OFF -DBUILD_GRPC=ON -G "Visual Studio 17 2022" env: @@ -67,6 +70,9 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 + - name: Install Ninja + run: choco install ninja -y + - name: Configure CMake (Release) run: cmake --preset release -DBUILD_DOC=OFF -DBUILD_DRIVER=ON -DBUILD_WIX_INSTALLER=OFF -DBUILD_GRPC=ON -G "Visual Studio 17 2022" env: From 9d06dd2aa20077f3f6590089796afe6d6c95f00b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 05:52:15 +0000 Subject: [PATCH 4/6] Add Chocolatey installation step to build workflow Install Chocolatey package manager before installing Ninja, since Chocolatey is not pre-installed on the self-hosted runner. --- .github/workflows/build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f454417..92cbf4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,13 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 + - name: Install Chocolatey + shell: pwsh + run: | + Set-ExecutionPolicy Bypass -Scope Process -Force + [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 + iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + - name: Install Ninja run: choco install ninja -y @@ -70,6 +77,13 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 + - name: Install Chocolatey + shell: pwsh + run: | + Set-ExecutionPolicy Bypass -Scope Process -Force + [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 + iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + - name: Install Ninja run: choco install ninja -y From 88d6c3bffaf6f20df4196748922bd1a0ac44a7af Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 05:54:49 +0000 Subject: [PATCH 5/6] Fix shell type from pwsh to powershell Change shell from pwsh (PowerShell Core) to powershell (Windows PowerShell) for Chocolatey installation since pwsh is not available on the self-hosted runner. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 92cbf4a..4a0dc37 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: uses: microsoft/setup-msbuild@v2 - name: Install Chocolatey - shell: pwsh + shell: powershell run: | Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 @@ -78,7 +78,7 @@ jobs: uses: microsoft/setup-msbuild@v2 - name: Install Chocolatey - shell: pwsh + shell: powershell run: | Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 From e535283e752f0621929f9639588f298cd0c13b72 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 05:57:12 +0000 Subject: [PATCH 6/6] Combine Chocolatey and Ninja installation with admin check - Merge Chocolatey and Ninja installation into a single step - Add administrator privilege check to ensure proper permissions - Refresh environment PATH after Chocolatey installation to make choco available - This ensures the installation runs with elevated privileges on the self-hosted runner --- .github/workflows/build.yml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a0dc37..db99ef9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,15 +28,25 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 - - name: Install Chocolatey + - name: Install Chocolatey and Ninja shell: powershell run: | + # Ensure running as administrator + if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { + Write-Error "This script must be run as Administrator!" + exit 1 + } + + # Install Chocolatey Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - - name: Install Ninja - run: choco install ninja -y + # Refresh environment variables to make choco available + $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") + + # Install Ninja + & choco install ninja -y - name: Configure CMake (Debug) run: cmake --preset debug -DBUILD_DOC=OFF -DBUILD_DRIVER=ON -DBUILD_WIX_INSTALLER=OFF -DBUILD_GRPC=ON -G "Visual Studio 17 2022" @@ -77,15 +87,25 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 - - name: Install Chocolatey + - name: Install Chocolatey and Ninja shell: powershell run: | + # Ensure running as administrator + if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { + Write-Error "This script must be run as Administrator!" + exit 1 + } + + # Install Chocolatey Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - - name: Install Ninja - run: choco install ninja -y + # Refresh environment variables to make choco available + $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") + + # Install Ninja + & choco install ninja -y - name: Configure CMake (Release) run: cmake --preset release -DBUILD_DOC=OFF -DBUILD_DRIVER=ON -DBUILD_WIX_INSTALLER=OFF -DBUILD_GRPC=ON -G "Visual Studio 17 2022"