Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 97475ad

Browse files
committed
github, ctest: rename build name parameter to preset
1 parent b0edd69 commit 97475ad

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

.github/workflows/continuous-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
export DOGEN_BUILD_NUMBER="${GITHUB_RUN_NUMBER}"
6363
export DOGEN_BUILD_TIMESTAMP=`date "+%Y/%m/%d %H:%M:%S"`
6464
export preset=${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}}
65-
export cmake_args="build_group=Continuous,build_name=${preset},with_presets=ON"
65+
export cmake_args="build_group=Continuous,preset=${preset}"
6666
if [[ "${{matrix.buildtype}}" == "debug" ]]; then
6767
cmake_args="${cmake_args},code_coverage=1"
6868
fi

.github/workflows/continuous-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
export DOGEN_BUILD_NUMBER="${GITHUB_RUN_NUMBER}"
5252
export DOGEN_BUILD_TIMESTAMP=`date "+%Y/%m/%d %H:%M:%S"`
5353
export preset=${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}}
54-
export cmake_args="build_group=Experimental,build_name=${preset},with_presets=ON"
54+
export cmake_args="build_group=Experimental,preset=${preset}"
5555
ctest -VV --preset ${preset} --script "CTest.cmake,${cmake_args}"
5656
5757
- name: Gitter

.github/workflows/continuous-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
$env:DOGEN_BUILD_NUMBER="$env:GITHUB_RUN_NUMBER"
5353
$env:DOGEN_BUILD_TIMESTAMP=Get-Date -format "yyyy/MM/dd HH:mm:ss"
5454
$preset="${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}}"
55-
$cmake_args="build_group=Experimental,build_name=$preset,with_presets=ON"
55+
$cmake_args="build_group=Experimental,preset=$preset"
5656
ctest -VV --preset $preset --script "CTest.cmake,$cmake_args"
5757
5858
- name: Gitter

CTest.cmake

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,28 @@ endif()
4747
#
4848
# Ensure all mandatory parameters have been set.
4949
#
50-
if(NOT DEFINED build_name)
51-
message(FATAL_ERROR "Parameter build_name not defined.")
50+
if(NOT DEFINED preset)
51+
message(FATAL_ERROR "Parameter preset not defined.")
5252
endif()
53-
set(preset ${build_name})
53+
message(STATUS "CDash preset: ${preset}")
54+
set(build_name ${preset})
5455

5556
if(NOT DEFINED build_group)
5657
message(FATAL_ERROR "Parameter build_group not defined.")
5758
endif()
5859

5960
#
60-
# Parse the build name to extract input parameters, and validate them.
61+
# Parse the preset to extract input parameters, and validate them.
6162
#
62-
string(TOLOWER "${build_name}" build_name_lower)
63-
message(STATUS "CDash build name: ${build_name}")
64-
65-
string(REPLACE "-" ";" build_name_list ${build_name_lower})
66-
list(LENGTH build_name_list bn_length)
67-
if (NOT bn_length EQUAL 3)
68-
message(FATAL_ERROR "Invalid build name: ${build_name}")
63+
string(TOLOWER "${preset}" preset_lower)
64+
string(REPLACE "-" ";" preset_list ${preset_lower})
65+
list(LENGTH preset_list pl_length)
66+
if (NOT pl_length EQUAL 3)
67+
message(FATAL_ERROR "Invalid preset: ${preset}")
6968
endif()
7069

7170
# Setup the operative system.
72-
list(GET build_name_list 0 operative_system)
71+
list(GET preset_list 0 operative_system)
7372
if(NOT DEFINED operative_system)
7473
message(FATAL_ERROR "Operative system not supplied.")
7574
endif()
@@ -85,7 +84,7 @@ endif()
8584
endif()
8685

8786
# Setup the compiler.
88-
list(GET build_name_list 1 compiler)
87+
list(GET preset_list 1 compiler)
8988
if(NOT DEFINED compiler)
9089
message(FATAL_ERROR "Compiler not supplied.")
9190
endif()
@@ -103,7 +102,7 @@ else()
103102
endif()
104103

105104
# Setup the configuration
106-
list(GET build_name_list 2 configuration)
105+
list(GET preset_list 2 configuration)
107106
if(NOT DEFINED configuration)
108107
message(FATAL_ERROR "Configuration not supplied.")
109108
endif()
@@ -139,7 +138,7 @@ else()
139138
set(CTEST_SITE "${APP_SITE}")
140139
endif()
141140

142-
set(CTEST_BUILD_NAME "${preset}")
141+
set(CTEST_BUILD_NAME "${build_name}")
143142

144143
# Set the generator. This will override the presets, but we have no option as
145144
# CTest refuses to configure unless there is a generator.

0 commit comments

Comments
 (0)