Skip to content
Open
Changes from all 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
6 changes: 3 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,87 +20,87 @@

jobs:
build-windows:
# Pin to windows-2025 (VS 2022) until VS 2026 is validated.
runs-on: windows-2025
# Pin to the VS 2022 image until newer MSVC toolchains are validated.
runs-on: windows-2022

env:
SCCACHE_GHA_ENABLED: "true"

strategy:
matrix:
build_type: [Debug, Release]

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive

- name: Install uv
uses: ./.github/actions/setup-uv

- name: Setup sccache
uses: Mozilla-Actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10

# Hunter cache - caches depthai dependencies
# Note: Hunter uses C:/.hunter on Windows (at drive root)
- name: Cache Hunter packages
uses: actions/cache@v5
with:
path: C:/.hunter
key: hunter-${{ runner.os }}-${{ hashFiles('cmake/SetupHunter.cmake') }}
restore-keys: |
hunter-${{ runner.os }}-

- name: Verify sccache
run: |
sccache --version

# Put cl.exe and other build tools in PATH
# Put cl.exe and other build tools in PATH.
- name: Setup MSVC (Developer Command Prompt)
uses: ilammy/msvc-dev-cmd@v1

# Install LunarG Vulkan SDK (headers + loader lib). Sets VULKAN_SDK
# env var so CMake's FindVulkan locates the install. The Vulkan
# runtime/driver is not present on this CI runner, but Televiz [gpu]
# tests skip cleanly via is_gpu_available() when no device is enumerated.
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.2
with:
version: 1.3.290.0
cache: true

# CUDA Toolkit needed at link time for viz_core (device_image links
# cudart). Jimver action works correctly on Windows (the arm64
# /x86_64/ hardcoding bug is Linux-only); runs NVIDIA's silent
# network installer and sets CUDA_PATH so find_package(CUDAToolkit)
# locates the install.
- name: Install CUDA Toolkit
uses: Jimver/cuda-toolkit@v0.2.35
with:
cuda: '12.4.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'

- name: Configure CMake
# Note:
# sccache does not work with VSBuild, so we use Ninja generator here.
# -G Ninja would pickup mingw64 by default on Windows, so we explicitly set the compiler to cl.exe
# Force embedded debug info (Z7) to avoid PDB contention whenever debug info is generated.
run: >
cmake -B build -G Ninja
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DENABLE_EXPERIMENTAL_WINDOWS_BUILD=ON
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_C_COMPILER="cl.exe"
-DCMAKE_CXX_COMPILER="cl.exe"
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
-DBUILD_PLUGIN_OAK_CAMERA=ON
-DBUILD_VIZ=ON

- name: Build
run: cmake --build build --parallel

- name: Run All Tests
run: ctest --test-dir build --output-on-failure --parallel

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Loading