Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions .github/workflows/main.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
if: needs.precheck.outputs.should_run == 'true'
strategy:
matrix:
os: [macos-latest, windows-2022, ubuntu-latest]
os: [macos-latest, windows-2025-vs2026, ubuntu-latest]
cmake: ['3.22.x', '4.0.x']

steps:
Expand All @@ -164,14 +164,20 @@ jobs:
sudo apt-get install libopencv-dev libudev-dev libusb-1.0-0-dev

- name: Install dependencies
if: matrix.os == 'windows-2022'
if: runner.os == 'Windows'
run: |
choco install opencv
echo "OpenCV_DIR=C:\tools\opencv\build" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

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

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.


- name: Build
run: |
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON ${{ env.CMAKE_ARGS }}
cmake -S . -B build ${{ runner.os == 'Windows' && '-G Ninja' || '' }} -D CMAKE_BUILD_TYPE=Release -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON ${{ env.CMAKE_ARGS }}
cmake --build build --parallel 4 --config Release

integration:
Expand All @@ -180,7 +186,7 @@ jobs:
if: needs.precheck.outputs.should_run == 'true'
strategy:
matrix:
os: [macos-latest, windows-2022, ubuntu-latest]
os: [macos-latest, windows-2025-vs2026, ubuntu-latest]
build-type: [Debug, Release]
# shared: [true, false]
shared: [true]
Expand Down Expand Up @@ -212,30 +218,34 @@ jobs:
sudo apt-get install libopencv-dev libudev-dev libusb-1.0-0-dev

- name: Install dependencies
if: matrix.os == 'windows-2022'
if: runner.os == 'Windows'
run: |
choco install opencv
echo "OpenCV_DIR=C:\tools\opencv\build" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CMAKE_GENERATOR=Visual Studio 17 2022" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CMAKE_GENERATOR_PLATFORM=${{ matrix.platform }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Configure MSVC environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.29.x'

- name: Configure ${{ matrix.build-type }}, shared ${{ matrix.shared }}, ${{ matrix.platform }}
run: cmake -S . -B build -D BUILD_SHARED_LIBS=${{ matrix.shared}} -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install ${{ env.CMAKE_ARGS }}
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: matrix.os == 'windows-2022'
if: runner.os == 'Windows'
run: echo "$GITHUB_WORKSPACE/depthai_install/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Build and install
run: cmake --build build --config ${{ matrix.build-type }} --target install --parallel 4

- name: Upload Win64 shared library
if: matrix.os == 'windows-2022' && matrix.shared && matrix.platform == 'x64'
if: runner.os == 'Windows' && matrix.shared && matrix.platform == 'x64'
uses: actions/upload-artifact@v4
with:
name: windows-prebuilt-win64-${{ matrix.build-type }}
Expand All @@ -257,7 +267,7 @@ jobs:

- 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
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/python-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
###################################

env:
CMAKE_WINDOWS_SDK_VERSION: '10.0.18362.0'
CMAKE_WINDOWS_SDK_VERSION: '10.0.26100.0'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
VCPKG_BINARY_SOURCES: "clear;files,/home/runner/.vcpkg,readwrite"
strategy:
matrix:
# os: [ubuntu-latest, windows-2022, macos-latest]
# os: [ubuntu-latest, windows-2025-vs2026, macos-latest]
os: [ubuntu-latest] # TODO(Morato) - re-enable windows & macos
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -139,13 +139,13 @@ jobs:
run: echo Home directory inside container $HOME

- name: Cache vcpkg folder
if: matrix.os != 'windows-2022'
if: runner.os != 'Windows'
uses: actions/cache@v3
with:
path: /home/runner/.vcpkg/
key: vcpkg-${{ matrix.os }}
- name: Cache vcpkg folder
if: matrix.os == 'windows-2022'
if: runner.os == 'Windows'
uses: actions/cache@v3
with:
path: C:/.vcpkg/
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
# This job builds wheels for Windows x86_64 arch
build-windows-x86_64:
needs: build-docstrings
runs-on: windows-2022
runs-on: windows-2025-vs2026
strategy:
matrix:
python-version: [3.9, '3.10', '3.11', '3.12', '3.13', '3.14']
Expand All @@ -238,7 +238,11 @@ jobs:
uses: actions/cache@v3
with:
path: C:/.vcpkg
key: vcpkg-windows-2022
key: vcpkg-windows-2025-vs2026
- name: Configure MSVC environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- uses: actions/checkout@v3
with:
submodules: 'recursive'
Expand All @@ -257,7 +261,7 @@ jobs:
run: echo "DEPTHAI_PYTHON_DOCSTRINGS_INPUT=$PWD/bindings/python/docstrings/depthai_python_docstring.hpp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Select Windows SDK
run: echo "CMAKE_ARGS=-DCMAKE_SYSTEM_VERSION=${{ env.CMAKE_WINDOWS_SDK_VERSION }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
run: echo "CMAKE_ARGS=-G Ninja -DCMAKE_SYSTEM_VERSION=${{ env.CMAKE_WINDOWS_SDK_VERSION }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down Expand Up @@ -665,7 +669,7 @@ jobs:

combine-windows-x86_64-wheels:
needs: build-windows-x86_64
runs-on: windows-2022
runs-on: windows-2025-vs2026
steps:
- uses: actions/checkout@v3
- name: Download audited wheels
Expand Down
5 changes: 3 additions & 2 deletions bindings/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys
import platform
import subprocess
import shlex
import find_version

from setuptools import setup, Extension
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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'])

if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
Expand Down