Support CLI CMake options for windows ci scripts.

This commit is contained in:
Allison Piper
2024-04-05 17:34:00 +00:00
parent 670895c867
commit 78a265ea55
3 changed files with 22 additions and 4 deletions

View File

@@ -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}}

View File

@@ -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
@@ -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") {

View File

@@ -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
@@ -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"