Skip to content
Snippets Groups Projects
Commit 0edad396 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

CI: change build name and export short SHA to cdash

parent a59d870f
No related branches found
No related tags found
No related merge requests found
......@@ -30,13 +30,14 @@ set (CTEST_CMAKE_GENERATOR "Ninja")
set(ci_profile wip)
set(ci_mr_source "$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}")
set(ci_mr_target "$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
set(ci_mr_iid "$ENV{CI_MERGE_REQUEST_IID}")
set(ci_ref_name "$ENV{CI_COMMIT_REF_NAME}")
set (CTEST_BUILD_NAME "$ENV{CI_COMMIT_SHORT_SHA}")
if(ci_mr_source AND ci_mr_target)
set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} (${ci_mr_source} to ${ci_mr_target})")
if(ci_mr_source AND ci_mr_target AND ci_mr_iid)
set (CTEST_BUILD_NAME "${ci_mr_source} (MR ${ci_mr_iid})")
set(ci_profile mr)
elseif(ci_ref_name)
set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} (${ci_ref_name})")
set (CTEST_BUILD_NAME "${ci_ref_name}")
if("${ci_ref_name}" STREQUAL "develop")
set(ci_profile develop)
elseif("${ci_ref_name}" MATCHES "^release-[0-9]+\\.[0-9]+\$")
......@@ -64,11 +65,19 @@ message(STATUS "CI profile : ${ci_profile}")
set (CONFIGURE_OPTIONS "")
include ( "${CMAKE_CURRENT_LIST_DIR}/configure_option.cmake" )
# Sources are already checked out : do nothing for update
set(CTEST_GIT_UPDATE_CUSTOM echo No update)
# Look for a GIT command-line client.
find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
# End of configuration
ctest_start (Experimental TRACK Experimental)
ctest_update()
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
SOURCE "${OTB_SOURCE_DIR}"
OPTIONS "${CONFIGURE_OPTIONS}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment