Skip to content

Add Windows CI#55

Open
Shakai-Dev wants to merge 2 commits into
Redot-Engine:masterfrom
Shakai-Dev:windows-ci
Open

Add Windows CI#55
Shakai-Dev wants to merge 2 commits into
Redot-Engine:masterfrom
Shakai-Dev:windows-ci

Conversation

@Shakai-Dev

@Shakai-Dev Shakai-Dev commented Jul 14, 2026

Copy link
Copy Markdown
Member

Adds CI for Windows

Summary by CodeRabbit

  • Chores
    • Added an automated Windows build workflow that runs on each push and pull request, including toolchain/Vulkan setup, ccache-enabled compilation, unit test execution, and debug artifact upload.
    • Updated the Linux CI workflow to use the latest checkout action and avoid persisting Git credentials after checkout.
    • Improves cross-platform validation confidence by exercising builds and tests in both Windows and Linux environments.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4e379040-550a-4d55-9541-b3957adf40f2

📥 Commits

Reviewing files that changed from the base of the PR and between d17d99f and 7e5b636.

📒 Files selected for processing (2)
  • .github/workflows/linux_build.yml
  • .github/workflows/windows_build.yml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/linux_build.yml
  • .github/workflows/windows_build.yml

📝 Walkthrough

Walkthrough

Adds a Windows GitHub Actions workflow that provisions Clang and Vulkan, configures and builds the debug target with CMake and Ninja, runs unit tests, and uploads the resulting artifact. Linux checkout is updated to avoid persisting credentials.

Changes

Cross-Platform CI Workflows

Layer / File(s) Summary
Workflow and environment setup
.github/workflows/windows_build.yml, .github/workflows/linux_build.yml
Adds Windows workflow triggers and checkout, installs and verifies Clang and Vulkan, and disables persisted checkout credentials in Linux CI.
Build configuration and caching
.github/workflows/windows_build.yml
Configures ccache and the debug CMake preset with Ninja and Clang.
Build validation and artifact publication
.github/workflows/windows_build.yml
Builds the debug target, runs parallel CTest execution, and uploads build/debug/ as windows_debug for seven days.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding Windows CI workflow support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
.github/workflows/windows_build.yml (3)

26-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Standardize shell selection.

This step specifies shell: powershell (Windows PowerShell 5.1), while the rest of the workflow uses shell: pwsh (PowerShell Core). It is recommended to use pwsh consistently across all steps for uniform behavior, as both shells fully support the Chocolatey commands and syntax used here.

♻️ Proposed consistency fix
       - name: Install System Dependencies
-        shell: powershell
+        shell: pwsh
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/windows_build.yml around lines 26 - 27, Update the
“Install System Dependencies” workflow step to use shell `pwsh` instead of
`powershell`, matching the shell selection used throughout the workflow while
preserving its existing Chocolatey commands.

16-19: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

Disable credential persistence to improve security posture.

It is a security best practice to set persist-credentials: false when checking out the code, especially for public repositories. This ensures that the GitHub API token is not left lingering in the local Git configuration, eliminating the risk of it being inadvertently read or exported by subsequent build scripts or uploaded artifacts.

🛡️ Proposed fix to secure the checkout
       - name: Checkout Source Code
         uses: actions/checkout@v4
         with:
           submodules: recursive
+          persist-credentials: false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/windows_build.yml around lines 16 - 19, Update the
“Checkout Source Code” step using actions/checkout@v4 to set persist-credentials
to false, while preserving the existing recursive submodules configuration.

Source: Linters/SAST tools


48-64: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Consider using sccache for native Windows caching stability.

The hendrikmuhs/ccache-action documentation explicitly recommends sccache for stable caching on Windows. The standard ccache distribution provided by the action relies on MSYS2, which can occasionally introduce path translation quirks or certificate issues in native Windows CI pipelines.

If you adopt this, ensure both the action variant and the CMake compiler launchers are updated to use sccache.

♻️ Proposed refactoring to use sccache
       - name: Cache Build Artifacts
         uses: hendrikmuhs/ccache-action@v1.2
         with:
-          key: ${{ runner.os }}-ccache-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
+          variant: sccache
+          key: ${{ runner.os }}-sccache-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
           restore-keys: |
-            ${{ runner.os }}-ccache-
+            ${{ runner.os }}-sccache-
           max-size: "500M"
 
       - name: Configure Build System
         shell: pwsh
         run: |
           cmake --preset debug `
             -G Ninja `
             -DCMAKE_C_COMPILER=clang `
             -DCMAKE_CXX_COMPILER=clang++ `
-            -DCMAKE_C_COMPILER_LAUNCHER=ccache `
-            -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
+            -DCMAKE_C_COMPILER_LAUNCHER=sccache `
+            -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/windows_build.yml around lines 48 - 64, Replace the
Windows cache setup using hendrikmuhs/ccache-action and the ccache compiler
launchers with the action’s sccache-compatible variant. Update both
CMAKE_C_COMPILER_LAUNCHER and CMAKE_CXX_COMPILER_LAUNCHER in the Configure Build
System step to use sccache, while preserving the existing cache key and size
settings.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/windows_build.yml:
- Around line 32-36: Update the Vulkan version extraction in the PowerShell
block guarded by Test-Path so Get-ChildItem is coerced to an array before
selecting the first item's Name. Preserve the existing VULKAN_SDK and
GITHUB_PATH assignments while ensuring a single installed SDK directory yields
its complete version name rather than the first character.
- Around line 32-36: Update the Vulkan SDK version assignment in the Test-Path
block to use the full selected child item's Name rather than indexing the Name
string with [0]. Preserve selecting the installed SDK directory and use that
complete version when setting VULKAN_SDK and VULKAN_PATH.

---

Nitpick comments:
In @.github/workflows/windows_build.yml:
- Around line 26-27: Update the “Install System Dependencies” workflow step to
use shell `pwsh` instead of `powershell`, matching the shell selection used
throughout the workflow while preserving its existing Chocolatey commands.
- Around line 16-19: Update the “Checkout Source Code” step using
actions/checkout@v4 to set persist-credentials to false, while preserving the
existing recursive submodules configuration.
- Around line 48-64: Replace the Windows cache setup using
hendrikmuhs/ccache-action and the ccache compiler launchers with the action’s
sccache-compatible variant. Update both CMAKE_C_COMPILER_LAUNCHER and
CMAKE_CXX_COMPILER_LAUNCHER in the Configure Build System step to use sccache,
while preserving the existing cache key and size settings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e7c9c4e0-3930-47c4-a305-dffa10953d2d

📥 Commits

Reviewing files that changed from the base of the PR and between da9ea3c and 24211a1.

📒 Files selected for processing (1)
  • .github/workflows/windows_build.yml

Comment thread .github/workflows/windows_build.yml

@AFCMS AFCMS left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The used versions of actions/checkout and hendrikmuhs/ccache-action trigger a warning due to the use of the deprecated NodeJS 20.

Image

actions/checkout could be updated to v7 and hendrikmuhs/ccache-action could be pinned to v1.2.23 to fix the warning (for some reason v1.2 doesn't pick the latest patch release which runs on Node24).

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