Skip to content

Update/move to windows 2025-2026 runners - #1844

Open
MaticTonin wants to merge 4 commits into
developfrom
update/moveTo_windows-2025_runners
Open

Update/move to windows 2025-2026 runners#1844
MaticTonin wants to merge 4 commits into
developfrom
update/moveTo_windows-2025_runners

Conversation

@MaticTonin

@MaticTonin MaticTonin commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Purpose

GH are updating to latest runners Windows 2025-2026 and so we must update our CI / CD as well.
THere were some required changes to make this happen.

Passing DepthAI CI / CD (pyton one not tested yet).

https://github.com/luxonis/depthai-core/actions/runs/27312021250/job/80684235156

Summary by CodeRabbit

  • Chores
    • Updated CI to use newer Windows runners and a newer Windows SDK for more consistent Windows builds
    • Improved Windows job conditions and build steps, including OpenCV setup and adding the Ninja generator for Windows CMake builds
    • Refined Python wheel build caching and environment handling for Windows vs non-Windows runs
    • Enhanced the Python build script to correctly split CMake build arguments from environment variables

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d56f1e99-7071-4dcc-8948-f05f93332479

📥 Commits

Reviewing files that changed from the base of the PR and between 13a1bab and 19f33b9.

📒 Files selected for processing (2)
  • .github/workflows/main.workflow.yml
  • .github/workflows/python-main.yml
📜 Recent review details
🧰 Additional context used
🪛 zizmor (1.25.2)
.github/workflows/main.workflow.yml

[warning] 270-270: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

.github/workflows/python-main.yml

[warning] 260-260: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🛑 Comments failed to post (1)
.github/workflows/main.workflow.yml (1)

270-270: ⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify Windows run steps that use $GITHUB_WORKSPACE without explicit bash shell.
rg -n -C2 '\$GITHUB_WORKSPACE' .github/workflows/main.workflow.yml
rg -n -C2 '^\s*shell:\s*bash' .github/workflows/main.workflow.yml

Repository: luxonis/depthai-core

Length of output: 1529


🏁 Script executed:

# Read the workflow file to understand shell specifications and context
head -n 280 .github/workflows/main.workflow.yml | tail -n 100

Repository: luxonis/depthai-core

Length of output: 4391


🏁 Script executed:

# Check for any shell specifications in the workflow
rg -n 'shell:' .github/workflows/main.workflow.yml | head -20

Repository: luxonis/depthai-core

Length of output: 46


🏁 Script executed:

# Check the job context around line 238 and 270
sed -n '220,250p' .github/workflows/main.workflow.yml
sed -n '250,280p' .github/workflows/main.workflow.yml

Repository: luxonis/depthai-core

Length of output: 3296


Use shell-agnostic workspace expansion in CMake arguments running on Windows.

Lines 238, 242, and 270 use $GITHUB_WORKSPACE without accounting for the default PowerShell shell on Windows runners. In PowerShell, environment variables require $env: prefix—bare $VARIABLE_NAME won't expand. This will cause CMake and path configuration to fail on windows-2025 runner. Use ${{ github.workspace }} (GitHub Actions context syntax, shell-agnostic) or $env:GITHUB_WORKSPACE (PowerShell-specific) consistently across all three locations.

Affected lines and fix
-    - name: Configure ${{ matrix.build-type }}, shared ${{ matrix.shared }}, ${{ matrix.platform }}
-      run: cmake -S . -B build ${{ runner.os == 'Windows' && '-G Ninja' || '' }} -D BUILD_SHARED_LIBS=${{ matrix.shared}} -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install ${{ env.CMAKE_ARGS }}
+    - name: Configure ${{ matrix.build-type }}, shared ${{ matrix.shared }}, ${{ matrix.platform }}
+      run: cmake -S . -B build ${{ runner.os == 'Windows' && '-G Ninja' || '' }} -D BUILD_SHARED_LIBS=${{ matrix.shared}} -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/depthai_install ${{ env.CMAKE_ARGS }}

-    - name: Set path to shared library dll (Windows)
-      if: runner.os == 'Windows'
-      run: echo "$GITHUB_WORKSPACE/depthai_install/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+    - name: Set path to shared library dll (Windows)
+      if: runner.os == 'Windows'
+      run: echo "${{ github.workspace }}/depthai_install/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

-    - name: Build and test find_package (installed)
-      run: |
-        cmake -S tests/integration/ -B tests/integration/build_find_package -D TEST_FIND_PACKAGE=ON -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/depthai_install/ ${{ env.CMAKE_ARGS }}
+    - name: Build and test find_package (installed)
+      run: |
+        cmake -S tests/integration/ -B tests/integration/build_find_package -D TEST_FIND_PACKAGE=ON -D CMAKE_PREFIX_PATH=${{ github.workspace }}/depthai_install/ ${{ env.CMAKE_ARGS }}
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 270-270: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🤖 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/main.workflow.yml at line 270, The CMake commands at lines
238, 242, and 270 in .github/workflows/main.workflow.yml use $GITHUB_WORKSPACE
which will not expand in PowerShell on Windows runners. Replace all three
instances of $GITHUB_WORKSPACE with ${{ github.workspace }}, which is the
shell-agnostic GitHub Actions context syntax that will work correctly across all
runners regardless of the default shell.
🔇 Additional comments (2)
.github/workflows/main.workflow.yml (1)

142-143: LGTM!

Also applies to: 189-190

.github/workflows/python-main.yml (1)

130-131: LGTM!

Also applies to: 220-223, 241-242, 260-260, 668-668


📝 Walkthrough

Walkthrough

This PR modernizes CI infrastructure by upgrading Windows runners from windows-2022 to windows-2025 across two GitHub Actions workflows, generalizing Windows-specific build conditions from hard-coded matrix checks to runtime OS detection using runner.os, updating the Windows SDK version to a newer build, and adding Ninja build generator support for Windows CMake configurations. It also fixes Python packaging to properly parse multi-argument CMake environment variables using shlex.split().

Changes

CI Environment Modernization

Layer / File(s) Summary
Main workflow Windows runner and environment
.github/workflows/main.workflow.yml
build and integration jobs updated to use windows-2025; Windows-specific steps (OpenCV, MSVC dev-cmd) switched from matrix.os == 'windows-2022' to runner.os == 'Windows'; CMake configure steps add -G Ninja on Windows.
Python workflow Windows infrastructure
.github/workflows/python-main.yml
CMAKE_WINDOWS_SDK_VERSION set to 10.0.26100.0; Windows wheel build jobs migrated to windows-2025; vcpkg caching split by runner.os with separate cache keys for Windows (vcpkg-windows-2025) and non-Windows; commented OS matrix list updated.
Python packaging: CMake environment-argument parsing
bindings/python/setup.py
Added import shlex; CMAKE_BUILD_ARGS and CMAKE_ARGS now parsed with shlex.split(...) when read from environment variables to properly handle multi-argument values.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • danilo-pejovic
  • moratom

Poem

🐰 I hopped through workflows, traded old for new,
Windows boots upgraded to twenty-twenty-five's crew,
Runtime checks now smarter, matrix tricks eschewed,
Ninja speeds the building, shlex parses args true,
A rabbit's cheer for CI made fresh and new! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly references the main objective of the PR: updating CI/CD workflows to use Windows 2025-2026 runners instead of older versions.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update/moveTo_windows-2025_runners

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 and usage tips.

@MaticTonin MaticTonin changed the title Update/move to windows 2025 runners Update/move to windows 2025-2026 runners Jun 10, 2026

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/python-main.yml (1)

142-152: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider upgrading to actions/cache@v4 for consistency.

The workflow uses actions/cache@v3 here but actions/cache@v4 elsewhere (lines 238, 300, etc.). For consistency and to use the latest version, consider upgrading this step.

♻️ Optional refactor to use v4
       - name: Cache vcpkg folder
         if: runner.os != 'Windows'
-        uses: actions/cache@v3
+        uses: actions/cache@v4
         with:
           path: /home/runner/.vcpkg/
           key: vcpkg-${{ matrix.os }}
       - name: Cache vcpkg folder
         if: runner.os == 'Windows'
-        uses: actions/cache@v3
+        uses: actions/cache@v4
         with:
           path: C:/.vcpkg/
           key: vcpkg-${{ matrix.os }}
🤖 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/python-main.yml around lines 142 - 152, Update the
workflow cache step that currently references actions/cache@v3 to
actions/cache@v4 so it matches the other cache usages (the steps using "uses:
actions/cache@v3" in the vcpkg cache blocks) — edit the two vcpkg cache steps
(the non-Windows and Windows branches) to use "actions/cache@v4" instead of v3
to ensure consistency across the workflow.
🤖 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/main.workflow.yml:
- Around line 172-176: The workflow currently uses the unpinned GitHub Action
identifier ilammy/msvc-dev-cmd@v1 in three jobs (the main build job, the
integration job, and the Python workflow build job); replace each occurrence of
uses: ilammy/msvc-dev-cmd@v1 with a pinned commit SHA (uses:
ilammy/msvc-dev-cmd@<commit-sha>) so the action is fixed to a specific commit,
update all three locations consistently, and ensure the chosen commit SHA is the
same across the three occurrences.

---

Outside diff comments:
In @.github/workflows/python-main.yml:
- Around line 142-152: Update the workflow cache step that currently references
actions/cache@v3 to actions/cache@v4 so it matches the other cache usages (the
steps using "uses: actions/cache@v3" in the vcpkg cache blocks) — edit the two
vcpkg cache steps (the non-Windows and Windows branches) to use
"actions/cache@v4" instead of v3 to ensure consistency across the workflow.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 12569ae4-895a-47e2-848b-4f5645914c9c

📥 Commits

Reviewing files that changed from the base of the PR and between a713be1 and de6dee1.

📒 Files selected for processing (2)
  • .github/workflows/main.workflow.yml
  • .github/workflows/python-main.yml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: integration (windows-2025-vs2026, Release, true, x64)
  • GitHub Check: integration (windows-2025-vs2026, Debug, true, x64)
  • GitHub Check: build (ubuntu-latest, 4.0.x)
  • GitHub Check: build (windows-2025-vs2026, 4.0.x)
  • GitHub Check: build (windows-2025-vs2026, 3.22.x)
  • GitHub Check: build (ubuntu-latest, 3.22.x)
  • GitHub Check: build (macos-latest, 4.0.x)
  • GitHub Check: tidy
🧰 Additional context used
🪛 actionlint (1.7.12)
.github/workflows/python-main.yml

[error] 143-143: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 zizmor (1.25.2)
.github/workflows/main.workflow.yml

[warning] 180-180: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 180-180: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[error] 174-174: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 238-238: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 238-238: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 238-238: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 238-238: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 245-245: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[error] 228-228: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 233-233: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 270-270: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 270-270: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

.github/workflows/python-main.yml

[error] 143-143: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 143-143: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default

(cache-poisoning)


[error] 243-243: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 264-264: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🔇 Additional comments (6)
.github/workflows/main.workflow.yml (4)

238-238: Also applies to: 270-270


241-242: LGTM!

Also applies to: 248-252


180-180: Ninja doesn’t need an extra install on windows-2025-vs2026.

The win25-vs2026 runner image includes Ninja (e.g., Ninja 1.13.x), so the Windows-only -G Ninja CMake generator selection is appropriate.


142-142: Confirm windows-2025-vs2026 runner availability (GA)
windows-2025-vs2026 is generally available (GA) as of May/June 2026 and is supported in workflows via runs-on: windows-2025-vs2026, so the .github/workflows/main.workflow.yml matrix entry at line 142 is appropriate. (See runner image docs: https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-VS2026-Readme.md)

.github/workflows/python-main.yml (2)

241-241: LGTM!


27-27: Update: 10.0.26100.0 is included on windows-2025-vs2026
The windows-2025-vs2026 runner image documentation lists Windows SDK 10.0.26100.0 (Windows 11 SDK 26100) as included, so the runner availability concern is covered. [1][2]

Comment on lines +172 to +176
- name: Configure MSVC environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Pin ilammy/msvc-dev-cmd action across all jobs.

The ilammy/msvc-dev-cmd@v1 action is unpinned in three locations (main workflow build job, integration job, and Python workflow build job). All three should be pinned to a specific commit SHA to prevent supply chain attacks and ensure reproducible builds.

🔒 Recommended fix for all occurrences

Check the latest release and apply consistently across all three locations:

-      uses: ilammy/msvc-dev-cmd@v1
+      uses: ilammy/msvc-dev-cmd@v1.13.0  # or pin to commit SHA: `@0b201ec93dde9f1f0e49b7b84a51e4dbb7e43c5f`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Configure MSVC environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Configure MSVC environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: x64
🧰 Tools
🪛 zizmor (1.25.2)

[error] 174-174: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 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/main.workflow.yml around lines 172 - 176, The workflow
currently uses the unpinned GitHub Action identifier ilammy/msvc-dev-cmd@v1 in
three jobs (the main build job, the integration job, and the Python workflow
build job); replace each occurrence of uses: ilammy/msvc-dev-cmd@v1 with a
pinned commit SHA (uses: ilammy/msvc-dev-cmd@<commit-sha>) so the action is
fixed to a specific commit, update all three locations consistently, and ensure
the chosen commit SHA is the same across the three occurrences.

@MaticTonin MaticTonin added the testable PR is ready to be tested - run vanilla tests label Jun 10, 2026

@moratom moratom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, left a few comments!

Comment thread bindings/python/setup.py
Comment on lines 5 to 259
@@ -207,7 +208,7 @@ def build_extension(self, ext):

# Add additional cmake build args from environment
if 'CMAKE_BUILD_ARGS' in os.environ:
build_args += [os.environ['CMAKE_BUILD_ARGS']]
build_args += shlex.split(os.environ['CMAKE_BUILD_ARGS'])

# Windows
if platform.system() == "Windows":
@@ -255,7 +256,7 @@ def build_extension(self, ext):

# Add additional cmake args from environment
if 'CMAKE_ARGS' in os.environ:
cmake_args += [os.environ['CMAKE_ARGS']]
cmake_args += shlex.split(os.environ['CMAKE_ARGS'])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Any idea why this is needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines 226 to 263
@@ -257,7 +267,7 @@

- name: Build and test find_package (installed)
run: |
cmake -S tests/integration/ -B tests/integration/build_find_package -D TEST_FIND_PACKAGE=ON -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/depthai_install/ ${{ env.CMAKE_ARGS }}
cmake -S tests/integration/ -B tests/integration/build_find_package ${{ runner.os == 'Windows' && '-G Ninja' || '' }} -D TEST_FIND_PACKAGE=ON -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/depthai_install/ ${{ env.CMAKE_ARGS }}
cmake --build tests/integration/build_find_package --config ${{ matrix.build-type }} --parallel 4
cd tests/integration/build_find_package
ctest -C ${{ matrix.build-type }} --output-on-failure --no-tests=error

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we used Visual Studio before, any reason we went with Ninja here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

As far as I have tested, there was one failture if this was not Ninja, can find the GH action run.

@MaticTonin

Copy link
Copy Markdown
Collaborator Author

Currently branch cannot be merged due to:
https://github.com/luxonis/depthai-core/actions/runs/27313962886/job/80731817401

@MaticTonin

Copy link
Copy Markdown
Collaborator Author

@moratom can we assign someone who previously resolved too many symbols issue to take a look at what could be done?

@MaticTonin MaticTonin removed the testable PR is ready to be tested - run vanilla tests label Jun 16, 2026
@MaticTonin MaticTonin self-assigned this Jun 16, 2026
@MaticTonin MaticTonin added the testable PR is ready to be tested - run vanilla tests label Jun 16, 2026

@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: 1

🤖 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/main.workflow.yml:
- Line 270: The CMake commands at lines 238, 242, and 270 in
.github/workflows/main.workflow.yml use $GITHUB_WORKSPACE which will not expand
in PowerShell on Windows runners. Replace all three instances of
$GITHUB_WORKSPACE with ${{ github.workspace }}, which is the shell-agnostic
GitHub Actions context syntax that will work correctly across all runners
regardless of the default shell.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d56f1e99-7071-4dcc-8948-f05f93332479

📥 Commits

Reviewing files that changed from the base of the PR and between 13a1bab and 19f33b9.

📒 Files selected for processing (2)
  • .github/workflows/main.workflow.yml
  • .github/workflows/python-main.yml
📜 Review details
🧰 Additional context used
🪛 zizmor (1.25.2)
.github/workflows/main.workflow.yml

[warning] 270-270: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

.github/workflows/python-main.yml

[warning] 260-260: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🔇 Additional comments (2)
.github/workflows/main.workflow.yml (1)

142-143: LGTM!

Also applies to: 189-190

.github/workflows/python-main.yml (1)

130-131: LGTM!

Also applies to: 220-223, 241-242, 260-260, 668-668

@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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🤖 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/main.workflow.yml:
- Line 270: The CMake commands at lines 238, 242, and 270 in
.github/workflows/main.workflow.yml use $GITHUB_WORKSPACE which will not expand
in PowerShell on Windows runners. Replace all three instances of
$GITHUB_WORKSPACE with ${{ github.workspace }}, which is the shell-agnostic
GitHub Actions context syntax that will work correctly across all runners
regardless of the default shell.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d56f1e99-7071-4dcc-8948-f05f93332479

📥 Commits

Reviewing files that changed from the base of the PR and between 13a1bab and 19f33b9.

📒 Files selected for processing (2)
  • .github/workflows/main.workflow.yml
  • .github/workflows/python-main.yml
📜 Review details
🔇 Additional comments (2)
.github/workflows/main.workflow.yml (1)

142-143: LGTM!

Also applies to: 189-190

.github/workflows/python-main.yml (1)

130-131: LGTM!

Also applies to: 220-223, 241-242, 260-260, 668-668

🛑 Comments failed to post (1)
.github/workflows/main.workflow.yml (1)

270-270: ⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify Windows run steps that use $GITHUB_WORKSPACE without explicit bash shell.
rg -n -C2 '\$GITHUB_WORKSPACE' .github/workflows/main.workflow.yml
rg -n -C2 '^\s*shell:\s*bash' .github/workflows/main.workflow.yml

Repository: luxonis/depthai-core

Length of output: 1529


🏁 Script executed:

# Read the workflow file to understand shell specifications and context
head -n 280 .github/workflows/main.workflow.yml | tail -n 100

Repository: luxonis/depthai-core

Length of output: 4391


🏁 Script executed:

# Check for any shell specifications in the workflow
rg -n 'shell:' .github/workflows/main.workflow.yml | head -20

Repository: luxonis/depthai-core

Length of output: 46


🏁 Script executed:

# Check the job context around line 238 and 270
sed -n '220,250p' .github/workflows/main.workflow.yml
sed -n '250,280p' .github/workflows/main.workflow.yml

Repository: luxonis/depthai-core

Length of output: 3296


Use shell-agnostic workspace expansion in CMake arguments running on Windows.

Lines 238, 242, and 270 use $GITHUB_WORKSPACE without accounting for the default PowerShell shell on Windows runners. In PowerShell, environment variables require $env: prefix—bare $VARIABLE_NAME won't expand. This will cause CMake and path configuration to fail on windows-2025 runner. Use ${{ github.workspace }} (GitHub Actions context syntax, shell-agnostic) or $env:GITHUB_WORKSPACE (PowerShell-specific) consistently across all three locations.

Affected lines and fix
-    - name: Configure ${{ matrix.build-type }}, shared ${{ matrix.shared }}, ${{ matrix.platform }}
-      run: cmake -S . -B build ${{ runner.os == 'Windows' && '-G Ninja' || '' }} -D BUILD_SHARED_LIBS=${{ matrix.shared}} -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install ${{ env.CMAKE_ARGS }}
+    - name: Configure ${{ matrix.build-type }}, shared ${{ matrix.shared }}, ${{ matrix.platform }}
+      run: cmake -S . -B build ${{ runner.os == 'Windows' && '-G Ninja' || '' }} -D BUILD_SHARED_LIBS=${{ matrix.shared}} -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/depthai_install ${{ env.CMAKE_ARGS }}

-    - name: Set path to shared library dll (Windows)
-      if: runner.os == 'Windows'
-      run: echo "$GITHUB_WORKSPACE/depthai_install/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+    - name: Set path to shared library dll (Windows)
+      if: runner.os == 'Windows'
+      run: echo "${{ github.workspace }}/depthai_install/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

-    - name: Build and test find_package (installed)
-      run: |
-        cmake -S tests/integration/ -B tests/integration/build_find_package -D TEST_FIND_PACKAGE=ON -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/depthai_install/ ${{ env.CMAKE_ARGS }}
+    - name: Build and test find_package (installed)
+      run: |
+        cmake -S tests/integration/ -B tests/integration/build_find_package -D TEST_FIND_PACKAGE=ON -D CMAKE_PREFIX_PATH=${{ github.workspace }}/depthai_install/ ${{ env.CMAKE_ARGS }}
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 270-270: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🤖 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/main.workflow.yml at line 270, The CMake commands at lines
238, 242, and 270 in .github/workflows/main.workflow.yml use $GITHUB_WORKSPACE
which will not expand in PowerShell on Windows runners. Replace all three
instances of $GITHUB_WORKSPACE with ${{ github.workspace }}, which is the
shell-agnostic GitHub Actions context syntax that will work correctly across all
runners regardless of the default shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testable PR is ready to be tested - run vanilla tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants