Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions .github/actions/compute-matrix/compute-matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ extract_matrix() {
local per_cuda_compiler_matrix="$(echo "$nvcc_full_matrix" | jq -cr ' group_by(.cuda + .compiler.name) | map({(.[0].cuda + "-" + .[0].compiler.name): .}) | add')"
write_output "PER_CUDA_COMPILER_MATRIX" "$per_cuda_compiler_matrix"
write_output "PER_CUDA_COMPILER_KEYS" "$(echo "$per_cuda_compiler_matrix" | jq -r 'keys | @json')"

local windows_matrix="$(echo "$matrix" | jq -cr '
(.windows // [])
| map({
cuda: .cuda,
host: (.host // (.compiler.name + (.compiler.version | tostring))),
cpu: (.cpu // "amd64"),
runner: (.runner // ("windows-" + (.cpu // "amd64") + "-cpu16")),
std: ((.std // "17") | tostring),
arch: (.arch // ""),
image: (.image // "")
})
')"
write_output "WINDOWS_MATRIX" "$windows_matrix"
}

main() {
Expand Down
170 changes: 170 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
name: build windows

defaults:
run:
shell: powershell

on:
workflow_call:
inputs:
cuda:
type: string
required: false
default: "13.0"
host:
type: string
required: false
default: "cl14.44"
devcontainer_version:
type: string
required: false
default: "25.12"
image:
type: string
required: false
default: ""
runner:
type: string
required: false
default: "windows-amd64-cpu16"
std:
type: string
required: false
default: "17"
arch:
type: string
required: false
default: ""
workflow_dispatch:
inputs:
cuda:
description: "CUDA Toolkit version"
type: string
required: false
default: "13.0"
host:
description: "Host compiler tag"
type: string
required: false
default: "cl14.44"
devcontainer_version:
description: "RAPIDS devcontainer version"
type: string
required: false
default: "25.12"
image:
description: "Windows devcontainer image override"
type: string
required: false
default: ""
runner:
description: "Windows runner"
type: string
required: false
default: "windows-amd64-cpu16"
std:
description: "C++/CUDA standard"
type: choice
options: ["17", "20"]
required: false
default: "17"
arch:
description: "CMAKE_CUDA_ARCHITECTURES override"
type: string
required: false
default: ""

permissions:
contents: read

jobs:
build-windows:
name: Build Windows CUDA${{ inputs.cuda }} ${{ inputs.host }} C++${{ inputs.std }}
runs-on: ${{ github.repository == 'NVIDIA/nvbench' && inputs.runner || 'windows-latest' }}
permissions:
id-token: write
contents: read
env:
WINDOWS_CI_IMAGE: ${{ inputs.image != '' && inputs.image || format('rapidsai/devcontainers:{0}-cuda{1}-{2}', inputs.devcontainer_version, inputs.cuda, inputs.host) }}
SCCACHE_BUCKET: rapids-sccache-devs
SCCACHE_REGION: us-east-2
SCCACHE_IDLE_TIMEOUT: "0"
SCCACHE_S3_USE_SSL: "true"
SCCACHE_S3_NO_CREDENTIALS: "false"
SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE: "true"
SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX: nvbench-preprocessor-cache
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
persist-credentials: false

- name: Add NVCC problem matcher
run: |
echo "::add-matcher::.github/problem-matchers/problem-matcher.json"

- name: Get AWS credentials for sccache bucket
if: ${{ github.repository == 'NVIDIA/nvbench' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::279114543810:role/gha-oidc-NVIDIA
aws-region: us-east-2
role-duration-seconds: 43200

- name: Fetch Windows devcontainer image
run: |
docker pull "$env:WINDOWS_CI_IMAGE"

- name: Build NVBench
env:
NVBENCH_WINDOWS_STD: ${{ inputs.std }}
NVBENCH_WINDOWS_ARCH: ${{ inputs.arch }}
run: |
$ErrorActionPreference = "Stop"

$hostRepo = "${{ github.workspace }}".Replace('\', '/')
$containerRepo = "C:/nvbench"
$script = Join-Path $env:RUNNER_TEMP "nvbench-windows-ci.ps1"

@"
`$ErrorActionPreference = 'Stop'
git config --global --add safe.directory '$containerRepo'
& '$containerRepo/ci/windows/build_nvbench.ps1' -std '$env:NVBENCH_WINDOWS_STD' -arch '$env:NVBENCH_WINDOWS_ARCH'
exit `$LASTEXITCODE
"@ | Set-Content -Path $script -Encoding UTF8

$containerScript = "$containerRepo/nvbench-windows-ci.ps1"
Copy-Item $script "${{ github.workspace }}\nvbench-windows-ci.ps1"

$dockerArgs = @(
"run", "--rm",
"--mount", "type=bind,source=$hostRepo,target=$containerRepo",
"--workdir", $containerRepo,
"--isolation=process",
"--env", "AWS_ACCESS_KEY_ID=$env:AWS_ACCESS_KEY_ID",
"--env", "AWS_SECRET_ACCESS_KEY=$env:AWS_SECRET_ACCESS_KEY",
"--env", "AWS_SESSION_TOKEN=$env:AWS_SESSION_TOKEN",
"--env", "CI=true",
"--env", "GITHUB_ACTIONS=$env:GITHUB_ACTIONS",
"--env", "GITHUB_REF_NAME=$env:GITHUB_REF_NAME",
"--env", "GITHUB_REPOSITORY=$env:GITHUB_REPOSITORY",
"--env", "GITHUB_RUN_ID=$env:GITHUB_RUN_ID",
"--env", "GITHUB_SHA=$env:GITHUB_SHA",
"--env", "SCCACHE_BUCKET=$env:SCCACHE_BUCKET",
"--env", "SCCACHE_IDLE_TIMEOUT=$env:SCCACHE_IDLE_TIMEOUT",
"--env", "SCCACHE_REGION=$env:SCCACHE_REGION",
"--env", "SCCACHE_S3_NO_CREDENTIALS=$env:SCCACHE_S3_NO_CREDENTIALS",
"--env", "SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX=$env:SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX",
"--env", "SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE=$env:SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE",
"--env", "SCCACHE_S3_USE_SSL=$env:SCCACHE_S3_USE_SSL",
"$env:WINDOWS_CI_IMAGE",
"powershell", "-NoLogo", "-NoProfile", "-ExecutionPolicy", "Bypass",
"-File", $containerScript
)

docker @dockerArgs
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
24 changes: 24 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
DEVCONTAINER_VERSION: ${{steps.set-outputs.outputs.DEVCONTAINER_VERSION}}
PER_CUDA_COMPILER_MATRIX: ${{steps.set-outputs.outputs.PER_CUDA_COMPILER_MATRIX}}
PER_CUDA_COMPILER_KEYS: ${{steps.set-outputs.outputs.PER_CUDA_COMPILER_KEYS}}
WINDOWS_MATRIX: ${{steps.set-outputs.outputs.WINDOWS_MATRIX}}
base_sha: ${{ steps.export-pr-info.outputs.base_sha }}
pr_number: ${{ steps.export-pr-info.outputs.pr_number }}
steps:
Expand Down Expand Up @@ -76,6 +77,28 @@ jobs:
per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }}
devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }}

nvbench-windows:
name: NVBench Windows CUDA${{ matrix.config.cuda }} ${{ matrix.config.host }} C++${{ matrix.config.std }}
# TODO: Re-enable after https://github.com/NVIDIA/nvbench/pull/354 fixes the Windows build.
if: false
permissions:
id-token: write
contents: read
needs: compute-matrix
uses: ./.github/workflows/build-windows.yml
strategy:
fail-fast: false
matrix:
config: ${{ fromJSON(needs.compute-matrix.outputs.WINDOWS_MATRIX) }}
with:
cuda: ${{ matrix.config.cuda }}
host: ${{ matrix.config.host }}
runner: ${{ matrix.config.runner }}
std: ${{ matrix.config.std }}
arch: ${{ matrix.config.arch }}
image: ${{ matrix.config.image }}
devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }}

Comment thread
oleksandr-pavlyk marked this conversation as resolved.
python-wheels:
name: Python Wheels
permissions:
Expand Down Expand Up @@ -103,6 +126,7 @@ jobs:
if: ${{ always() }} # need to use always() instead of !cancelled() because skipped jobs count as success
needs:
- nvbench
- nvbench-windows
- python-wheels
- verify-devcontainers
steps:
Expand Down
5 changes: 5 additions & 0 deletions ci/matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ llvm18: &llvm18 { name: 'llvm', version: '18', exe: 'clang++' }
llvm19: &llvm19 { name: 'llvm', version: '19', exe: 'clang++' }
llvm20: &llvm20 { name: 'llvm', version: '20', exe: 'clang++' }

# MSVC compiler configurations
msvc2022: &msvc2022 { name: 'cl', version: '14.44', exe: 'cl' }

# Each environment below will generate a unique build/test job
# See the "compute-matrix" job in the workflow for how this is parsed and used
# cuda: The CUDA Toolkit version
Expand Down Expand Up @@ -68,6 +71,8 @@ pull_request:
- {cuda: *cuda_curr_max, compiler: *llvm18, cpu: 'amd64'}
- {cuda: *cuda_curr_max, compiler: *llvm19, cpu: 'amd64'}
- {cuda: *cuda_curr_max, compiler: *llvm20, cpu: 'amd64'}
windows:
- {cuda: *cuda_curr_max, compiler: *msvc2022, cpu: 'amd64', std: '17'}

# Python wheel builds
python_wheels:
Expand Down
Loading
Loading