Skip to content

Enable building of NVBench on Windows#362

Merged
alliepiper merged 2 commits into
NVIDIA:mainfrom
oleksandr-pavlyk:add-windows-CI-job
May 13, 2026
Merged

Enable building of NVBench on Windows#362
alliepiper merged 2 commits into
NVIDIA:mainfrom
oleksandr-pavlyk:add-windows-CI-job

Conversation

@oleksandr-pavlyk
Copy link
Copy Markdown
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented May 13, 2026

No testing on Windows is intended.

This PR wants to add CI plumbing to enable testing of #354, but the Windows build in this PR is expected to fail.

The plan is

  • test github action and script
  • verify that failure is due to compilation failure
  • disable the windows build and merge

Then in #354, the main would be merged, windows build job enabled to permit iterations.

CC: @mfranzrebsal

Summary by CodeRabbit

  • Chores
    • Added Windows platform support to the CI/CD pipeline with automated builds and testing capabilities
    • Expanded continuous integration matrix to include Windows build variants using MSVC compiler
    • Integrated Windows build workflow into pull request validation checks to ensure platform compatibility

Review Change Stack

@oleksandr-pavlyk
Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Walkthrough

This PR adds complete Windows build infrastructure to NVBench's CI system. It defines an MSVC2022 compiler configuration in the matrix, creates a reusable build-windows.yml workflow with Docker container execution, introduces a PowerShell build module with CMake orchestration functions, and adds a Windows-specific build script integrated into the PR workflow.

Changes

Windows CI Build Support

Layer / File(s) Summary
Matrix configuration and export
ci/matrix.yaml, .github/actions/compute-matrix/compute-matrix.sh, .github/workflows/pr.yml
CI matrix adds msvc2022 compiler anchor and Windows build variant (cuda_curr_max, MSVC, amd64, C++17); compute-matrix script extracts and transforms Windows configurations; pr.yml exports WINDOWS_MATRIX output.
Reusable Windows build workflow definition
.github/workflows/build-windows.yml
New workflow exposes workflow_call and workflow_dispatch interfaces parameterized by CUDA version, host compiler tag, devcontainer version, image, runner, C++ standard (17/20), and optional CUDA architecture; sets read-only repository permissions.
Windows build job setup
.github/workflows/build-windows.yml
Job configures dynamic runner selection, establishes SCCACHE environment variables, checks out repository, registers NVCC problem matcher, conditionally assumes AWS OIDC role for cache access (NVIDIA/nvbench only), and pulls devcontainer image.
Windows build execution step
.github/workflows/build-windows.yml
Main build step generates temporary PowerShell script, constructs docker run with workspace bind-mount to C:/nvbench, forwards CI/AWS/SCCache/GitHub environment variables, executes container's build_nvbench.ps1 with standard and architecture parameters, and propagates exit codes.
PowerShell build orchestration module
ci/windows/build_common.psm1
Module provides parameter validation, fail-fast error handling, CMake option parsing, compiler/toolchain setup, and exported functions: Print-EnvironmentDetails, Configure-Preset, Build-Preset, Configure-And-Build-Preset; helper functions support sccache integration and native command invocation.
NVBench Windows build script
ci/windows/build_nvbench.ps1
Entry point script validates C++ standard (17/20), accepts optional CUDA architecture and CMake options; manages working directory state via try/finally; imports build_common and invokes Configure-And-Build-Preset for nvbench-ci preset with CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
PR workflow integration
.github/workflows/pr.yml
New nvbench-windows job runs build-windows.yml with matrix from WINDOWS_MATRIX, forwarding build parameters; ci job dependency list includes nvbench-windows for gating final status checks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A Windows build path now appears,
With matrices and workflows clear,
PowerShell scripts orchestrate the dance,
Docker containers join the prance,
NVBench builds on Windows with flair!

🚥 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 pull request title 'Enable building of NVBench on Windows' directly describes the main change in the changeset, which adds Windows build infrastructure across GitHub Actions workflows and CI scripts.
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

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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/pr.yml:
- Around line 80-99: The nvbench-windows job is currently blocking merges while
failures are expected; make it non-blocking by adding continue-on-error: true to
the nvbench-windows job definition (the job named "nvbench-windows") and also
remove nvbench-windows from the dependency/needs list of the final "ci" job (or
otherwise avoid marking it as a required check) so the ci job does not treat
nvbench-windows as a blocking prerequisite. Ensure you edit the nvbench-windows
job block to include continue-on-error: true and update the "ci" job's needs so
it no longer depends on nvbench-windows.
🪄 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: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 6563790c-1254-423e-b4e7-1456b7a5ffb3

📥 Commits

Reviewing files that changed from the base of the PR and between 9ea77bc and 025c300.

📒 Files selected for processing (6)
  • .github/actions/compute-matrix/compute-matrix.sh
  • .github/workflows/build-windows.yml
  • .github/workflows/pr.yml
  • ci/matrix.yaml
  • ci/windows/build_common.psm1
  • ci/windows/build_nvbench.ps1

Comment thread .github/workflows/pr.yml
@oleksandr-pavlyk
Copy link
Copy Markdown
Collaborator Author

Verified that job failed due to CMake failure, not due to issue with CI scripts:

CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "nvbench::cupti" configuration
  "Release".

Ready for review @alliepiper

@alliepiper alliepiper merged commit 6df6dc8 into NVIDIA:main May 13, 2026
81 checks passed
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