Skip to content

Commit

Permalink
Support CLI CMake options for windows ci scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed Apr 5, 2024
1 parent 670895c commit 78a265e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dispatch-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ jobs:
include: ${{ fromJSON(inputs.per_cuda_compiler_matrix) }}
with:
test_name: ${{matrix.cpu}}/${{matrix.compiler.name}}${{matrix.compiler.version}}/C++${{matrix.std}}
build_script: "./ci/windows/build_${{ inputs.project_name }}.ps1 -std ${{matrix.std}}"
test_script: "./ci/windows/test_${{ inputs.project_name }}.ps1 -std ${{matrix.std}}"
build_script: './ci/windows/build_${{ inputs.project_name }}.ps1 -std ${{matrix.std}} "${{matrix.extra_build_args}}"'
test_script: './ci/windows/test_${{ inputs.project_name }}.ps1 -std ${{matrix.std}} "${{matrix.extra_build_args}}"'
container_image: rapidsai/devcontainers:${{inputs.devcontainer_version}}-cuda${{matrix.cuda}}-${{matrix.compiler.name}}${{matrix.compiler.version}}-${{matrix.os}}
11 changes: 10 additions & 1 deletion ci/windows/build_nvbench.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Param(
[Alias("std")]
[ValidateNotNullOrEmpty()]
[ValidateSet(17)]
[int]$CXX_STANDARD = 17
[int]$CXX_STANDARD = 17,
[Parameter(Mandatory = $false)]
[Alias("cmake-options")]
[ValidateNotNullOrEmpty()]
[int]$ARG_CMAKE_OPTIONS = ""
)

$CURRENT_PATH = Split-Path $pwd -leaf
Expand All @@ -19,6 +23,11 @@ Import-Module $PSScriptRoot/build_common.psm1 -ArgumentList $CXX_STANDARD
$PRESET = "nvbench-cpp$CXX_STANDARD"
$CMAKE_OPTIONS = ""

# Append any arguments pass in on the command line
If($ARG_CMAKE_OPTIONS -ne "") {
$CMAKE_OPTIONS += "$ARG_CMAKE_OPTIONS"
}

configure_and_build_preset "NVBench" "$PRESET" "$CMAKE_OPTIONS"

If($CURRENT_PATH -ne "ci") {
Expand Down
11 changes: 10 additions & 1 deletion ci/windows/test_nvbench.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Param(
[Alias("std")]
[ValidateNotNullOrEmpty()]
[ValidateSet(17)]
[int]$CXX_STANDARD = 17
[int]$CXX_STANDARD = 17,
[Parameter(Mandatory = $false)]
[Alias("cmake-options")]
[ValidateNotNullOrEmpty()]
[int]$ARG_CMAKE_OPTIONS = ""
)

$CURRENT_PATH = Split-Path $pwd -leaf
Expand All @@ -19,6 +23,11 @@ Import-Module $PSScriptRoot/build_common.psm1 -ArgumentList $CXX_STANDARD
$PRESET = "nvbench-cpp$CXX_STANDARD"
$CMAKE_OPTIONS = ""

# Append any arguments pass in on the command line
If($ARG_CMAKE_OPTIONS -ne "") {
$CMAKE_OPTIONS += "$ARG_CMAKE_OPTIONS"
}

configure_and_build_preset "NVBench" "$PRESET" "$CMAKE_OPTIONS"
test_preset "NVBench" "$PRESET"

Expand Down

0 comments on commit 78a265e

Please sign in to comment.