Commit 46764b39 authored by Antoine Regimbeau's avatar Antoine Regimbeau

Change md5sum: add cmakecache and artifacts

parent 24af5b8e
Pipeline #935 canceled with stages
in 17 minutes and 1 second
......@@ -99,6 +99,7 @@ superbuild-prepare:
paths:
# This recovers logs from superbuild build
- build/*/*/*/*.log
- sb_branch.txt
superbuild-build:
only: [merge_requests]
......@@ -107,3 +108,5 @@ superbuild-build:
image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:18.04
script:
- ctest -VV -S CI/main_superbuild.cmake -DIMAGE_NAME:string=otb-ubuntu-superbuild-base
dependencies:
- superbuild-prepare
......@@ -30,17 +30,12 @@ get_filename_component(CI_ROOT_DIR ${CI_PROJ_DIR} DIRECTORY)
###########################################################################
###########################################################################
# Get md5sum of the sources
# How to get md5sum:
# * concatenate all source files in one
# * add configure result from previous job ${OTB_SOURCE_DIR}/build/CMakeCache.txt
###########################
file( GLOB_RECURSE sb_file_list "${OTB_SOURCE_DIR}/SuperBuild/*")
set( SB_TXT "${OTB_SOURCE_DIR}/full_sb.txt")
foreach(sb_file ${sb_file_list})
file(READ ${sb_file} CONTENTS)
file(APPEND ${SB_TXT} "${sb_file}${CONTENTS}")
endforeach(sb_file)
file ( MD5 "${SB_TXT}" SB_MD5)
message ( "SB_MD5 = ${SB_MD5}" )
file (REMOVE ${SB_TXT})
file(READ "${OTB_SOURCE_DIR}/sb_branch.txt" BRANCH_NAME)
####################################
......@@ -48,7 +43,7 @@ file (REMOVE ${SB_TXT})
# git clone $REPOSITORY_URL --branch $BRANCH_NAME --depth 1 superbuild-artifact
###############################################################################
set ( REMOTE "https://gitlab.orfeo-toolbox.org/gbonnefille/superbuild-artifact.git")
set ( BRANCH_NAME "${IMAGE_NAME}/${SB_MD5}")
# set ( BRANCH_NAME "${IMAGE_NAME}/${SB_MD5}")
set( GIT "git" )
execute_process(
......
......@@ -99,8 +99,9 @@ foreach(sb_file ${sb_file_list})
file(READ ${sb_file} CONTENTS)
file(APPEND ${SB_TXT} "${sb_file}${CONTENTS}")
endforeach(sb_file)
file(READ "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" CONTENTS)
file(APPEND ${SB_TXT} "CMakeCache.txt${CONTENTS}")
file(READ "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" CMAKE_ORIG)
string(REPLACE "${CI_PROJ_DIR}" "" CMAKE_UNIFIED ${CMAKE_ORIG})
file(APPEND ${SB_TXT} "CMakeCache.txt${CMAKE_UNIFIED}")
file ( MD5 "${SB_TXT}" SB_MD5)
message ( "SB_MD5 = ${SB_MD5}" )
file (REMOVE ${SB_TXT})
......@@ -112,6 +113,7 @@ file (REMOVE ${SB_TXT})
# Branch name cannot have a ":"
# git ls-remote $REMOTE $BRANCH_NAME
####################################
file ( WRITE "${OTB_SOURCE_DIR}/sb_branch.txt" "${IMAGE_NAME}/${SB_MD5}")
message( "Checking out git for existence of archive")
set ( REMOTE "https://gitlab.orfeo-toolbox.org/gbonnefille/superbuild-artifact/")
set ( BRANCH_NAME "${IMAGE_NAME}/${SB_MD5}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment