Skip to content
Snippets Groups Projects

CI: need to simplify CI scripts

Merged Guillaume Pasero requested to merge ci_refactor_yml into develop
2 files
+ 10
54
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 9
2
@@ -26,15 +26,22 @@ set (ENV{LANG} "C") # Only ascii output
set (CTEST_BUILD_CONFIGURATION "Release")
set (CTEST_CMAKE_GENERATOR "Ninja")
# Find the build name
# Find the build name and CI profile
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_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})")
set(ci_profile mr)
elseif(ci_ref_name)
set (CTEST_BUILD_NAME "${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]+\$")
set(ci_profile release)
endif()
endif()
set (CTEST_SITE "${IMAGE_NAME}")
@@ -52,7 +59,7 @@ set (CMAKE_COMMAND "cmake")
set (OTB_DATA_ROOT "${OTB_SOURCE_DIR}/otb-data/") # todo
set (OTB_LARGEINPUT_ROOT "") # todo
message(STATUS "CI profile : $ENV{OTB_CI_PROFILE}")
message(STATUS "CI profile : ${ci_profile}")
#The following file set the CONFIGURE_OPTIONS variable
set (CONFIGURE_OPTIONS "")
Loading