Commit b948c575 authored by Cédric Traizet's avatar Cédric Traizet

Merge branch 'develop' into regression_refactoring

parents 8e06c83c 0df44b31
......@@ -10,6 +10,7 @@
variables:
BUILD_IMAGE_REGISTRY: $CI_REGISTRY/orfeotoolbox/otb-build-env
GIT_CLONE_PATH: $CI_BUILDS_DIR/otb
DOCKER_DRIVER: overlay2
GIT_DEPTH: "3"
# Disable automatic checkout to let us fetch LFS before
......
......@@ -84,7 +84,7 @@ message(STATUS "CI profile : ${ci_profile}")
#The following file set the CONFIGURE_OPTIONS variable
set (ENABLE_DOXYGEN OFF)
set (CONFIGURE_OPTIONS "")
include ( "${CMAKE_CURRENT_LIST_DIR}/configure_option.cmake" )
include ( "${CMAKE_CURRENT_LIST_DIR}/configure_options.cmake" )
# Sources are already checked out : do nothing for update
set(CTEST_GIT_UPDATE_CUSTOM echo No update)
......
......@@ -17,14 +17,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This script is a prototype for the future CI, it may evolve rapidly in a near future
include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
# This script is a prototype for the future CI, it may evolve rapidly in a near future
set (ENV{LANG} "C") # Only ascii output
get_filename_component(OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)
get_filename_component(CI_PROJ_DIR ${OTB_SOURCE_DIR} DIRECTORY)
get_filename_component(CI_ROOT_DIR ${CI_PROJ_DIR} DIRECTORY)
###########################################################################
###########################################################################
......@@ -56,7 +54,7 @@ set( GIT "${CTEST_GIT_COMMAND}" )
execute_process(
COMMAND ${GIT} "clone" "${REMOTE}" "--branch" "${BRANCH_NAME}"
"--depth" "1" "superbuild-artifact"
WORKING_DIRECTORY ${CI_PROJ_DIR}
WORKING_DIRECTORY ${OTB_SOURCE_DIR}
RESULT_VARIABLE clone_res
OUTPUT_VARIABLE clone_out
ERROR_VARIABLE clone_err
......@@ -77,17 +75,17 @@ endif()
set (CMAKE_COMMAND "cmake")
execute_process(
COMMAND ${CMAKE_COMMAND} "-E" "tar" "xf"
"${CI_PROJ_DIR}/superbuild-artifact/SuperBuild_Install.tar"
WORKING_DIRECTORY ${CI_ROOT_DIR}
"${OTB_SOURCE_DIR}/superbuild-artifact/SuperBuild_Install.tar"
WORKING_DIRECTORY ${OTB_SOURCE_DIR}
)
set( XDK_PATH "${CI_ROOT_DIR}/xdk")
set( XDK_PATH "${OTB_SOURCE_DIR}/xdk")
if ( DEBUG )
if ( EXISTS "${XDK_PATH}")
message("Tar file exists at ${XDK_PATH}")
message("Xdk folder exists at ${XDK_PATH}")
else()
message("Something went wrong no tar file in ${XDK_PATH}")
message("Something went wrong no folder in ${XDK_PATH}")
endif()
endif()
......@@ -112,7 +110,7 @@ set ( CTEST_INSTALL_DIRECTORY "${OTB_SOURCE_DIR}/install/" )
set ( PROJECT_SOURCE_DIR "${OTB_SOURCE_DIR}" )
set (CONFIGURE_OPTIONS "")
include ( "${CMAKE_CURRENT_LIST_DIR}/configure_option.cmake" )
include ( "${CMAKE_CURRENT_LIST_DIR}/configure_options.cmake" )
# SuperBuild case : one more configure option
set ( CONFIGURE_OPTIONS
"${CONFIGURE_OPTIONS}-DCMAKE_PREFIX_PATH=${XDK_PATH};")
......@@ -127,10 +125,11 @@ set( GEOTIFF_CSV "${XDK_PATH}/share/epsg_csv" )
set( PROJ_LIB "${XDK_PATH}/share" )
set( CTEST_ENVIRONMENT
"PATH=${XDK_PATH}/lib:${XDK_PATH}/bin:$ENV{PATH}
GDAL_DATA= GDAL_DATA
GEOTIFF_CSV= GEOTIFF_CSV
PROJ_LIB= PROJ_LIB
")
# It seems that we do not need that
# GDAL_DATA= GDAL_DATA
# GEOTIFF_CSV= GEOTIFF_CSV
# PROJ_LIB= PROJ_LIB
# Sources are already checked out : do nothing for update
set(CTEST_GIT_UPDATE_CUSTOM echo No update)
......
......@@ -23,13 +23,6 @@ include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
set (ENV{LANG} "C") # Only ascii output
get_filename_component(OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)
get_filename_component(CI_PROJ_DIR ${OTB_SOURCE_DIR} DIRECTORY)
get_filename_component(CI_ROOT_DIR ${CI_PROJ_DIR} DIRECTORY)
# In GitLab we have :
# OTB_SOURCE_DIR=/builds/{project_dir}/otb
# CI_PROJ_DIR=/builds/{project_dir}
# CI_ROOT_DIR=/builds
set ( DEBUG "1" )
......@@ -52,7 +45,7 @@ set_dash_build_name()
# This is platform dependent, and the next step (build) also
# depends on that, as some paths are hardcoded
# This can be fixed with a packaging of OTB_DEPENDS
set (CTEST_INSTALL_DIRECTORY "${CI_ROOT_DIR}/xdk/")
set (CTEST_INSTALL_DIRECTORY "${OTB_SOURCE_DIR}/xdk/")
# HACK
# This is needed because when using return() function ctest is trying
......@@ -82,7 +75,7 @@ ctest_update( SOURCE "${OTB_SOURCE_DIR}" )
set(CTEST_BUILD_FLAGS "-j16")
set ( SB_CONFIGURE_OPTIONS "")
include( "${CMAKE_CURRENT_LIST_DIR}/../SuperBuild/CI/configure_options.cmake" )
include( "${CMAKE_CURRENT_LIST_DIR}/sb_configure_options.cmake" )
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
SOURCE "${SUPERBUILD_SOURCE_DIR}"
......@@ -116,8 +109,7 @@ foreach(sb_file ${sb_file_list})
file(APPEND ${SB_TXT} "${sb_file}${CONTENTS}")
endforeach(sb_file)
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(APPEND ${SB_TXT} "CMakeCache.txt${CMAKE_ORIG}")
file ( MD5 "${SB_TXT}" SB_MD5)
message ( "SB_MD5 = ${SB_MD5}" )
file (REMOVE ${SB_TXT})
......@@ -180,7 +172,6 @@ ctest_submit()
# TODO right now we rely on ctest_build to know whether there has been an error
# in build, whereas SuperBuild does not necessarily return an error if something
# goes wrong
set ( SB_ARTIFACT_GIT "${CI_PROJ_DIR}/superbuild-artifact" )
# REPOSITORY_GIT_URL and REMOTE whould be the same. Right now there are
# different because one is https and one is ssh. Both should be ssh.
......@@ -190,15 +181,16 @@ set( REPOSITORY_GIT_URL "git@gitlab.orfeo-toolbox.org:gbonnefille/superbuild-art
execute_process(
COMMAND ${GIT} "clone" "${REPOSITORY_GIT_URL}"
"--branch" "master" "--depth" "1" "superbuild-artifact"
WORKING_DIRECTORY "${CI_PROJ_DIR}"
WORKING_DIRECTORY "${OTB_SOURCE_DIR}"
)
set ( SB_ARTIFACT_GIT "${OTB_SOURCE_DIR}/superbuild-artifact" )
# setting up the repo
# StrictHostKeyChecking so we don't have to add the host as a known key
# -F /dev/null so the agent is not taking a default file ~/.ssh/..
execute_process(
COMMAND ${GIT} "config" "core.sshCommand"
"ssh -o StrictHostKeyChecking=no -F /dev/null"
"ssh -o StrictHostKeyChecking=no"
WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
RESULT_VARIABLE ssh_res
OUTPUT_VARIABLE ssh_out
......@@ -260,24 +252,15 @@ endif()
set ( SB_TAR_NAME "SuperBuild_Install.tar" )
# create the tar
# We need to create tar in its directory to avoid weird name in file
# "tar: Removing leading `../../' from member names"
# WARNING
# We are creating a tar containing xdk/.., so when extracting the archive in
# an other environment the output file will be xdk... Obvious isn't it?
# Well... Not for everyone...
# Creating the tar
# May be for easier maintainability the tar name should be the same as the
# file inside.
execute_process(
COMMAND ${CMAKE_COMMAND} "-E" "tar" "cf" "${SB_TAR_NAME}"
COMMAND ${CMAKE_COMMAND} "-E" "tar" "cf" "${SB_ARTIFACT_GIT}/${SB_TAR_NAME}"
-- "${CTEST_INSTALL_DIRECTORY}"
WORKING_DIRECTORY ${CI_ROOT_DIR}
WORKING_DIRECTORY ${OTB_SOURCE_DIR}
)
# We need to copy the tar file, as it is on a different partition in the gitlab
# context
file ( COPY "${CI_ROOT_DIR}/${SB_TAR_NAME}" DESTINATION "${SB_ARTIFACT_GIT}")
# In a near futur it might be nice to clean up the mess we made...
......
<PAMDataset>
<SRS>PROJCS["WGS 84 / UTM zone 32N",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","32632"]]</SRS>
<GeoTransform> 4.3913640000000002e+05, 5.9999999999999998e-01, 0.0000000000000000e+00, 5.2737065999999996e+06, 0.0000000000000000e+00, -5.9999999999999998e-01</GeoTransform>
<Metadata domain="IMAGE_STRUCTURE">
<MDI key="INTERLEAVE">PIXEL</MDI>
</Metadata>
<Metadata>
<MDI key="AREA_OR_POINT">Area</MDI>
</Metadata>
</PAMDataset>
<PAMDataset>
<SRS>PROJCS["WGS 84 / UTM zone 32N",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","32632"]]</SRS>
<GeoTransform> 4.3913640000000002e+05, 5.9999999999999998e-01, 0.0000000000000000e+00, 5.2737065999999996e+06, 0.0000000000000000e+00, -5.9999999999999998e-01</GeoTransform>
<Metadata>
<MDI key="AREA_OR_POINT">Area</MDI>
</Metadata>
</PAMDataset>
<PAMDataset>
<SRS>PROJCS["WGS 84 / UTM zone 32N",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","32632"]]</SRS>
<GeoTransform> 4.3913640000000002e+05, 5.9999999999999998e-01, 0.0000000000000000e+00, 5.2737065999999996e+06, 0.0000000000000000e+00, -5.9999999999999998e-01</GeoTransform>
<Metadata domain="IMAGE_STRUCTURE">
<MDI key="INTERLEAVE">PIXEL</MDI>
</Metadata>
<Metadata>
<MDI key="AREA_OR_POINT">Area</MDI>
</Metadata>
</PAMDataset>
PROJCS["WGS_1984_UTM_Zone_31N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_31N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_31N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_31N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_31N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_31N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_31N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_31N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
Test results from otbBinaryImageBoundingRegionCalculator test.
[8, 48] [81, 39]
[7, 7] [83, 41]
[7, 9] [45, 36]
[25, 11] [47, 30]
Testing the pad option
[7, 47] [83, 41]
[6, 6] [85, 43]
[6, 8] [47, 38]
[24, 10] [49, 32]
This diff is collapsed.
--------------------------------------------------------------------------
MAX ANGULAR :0.174533(10 deg.)
INPUT list of Path :
Path 1: [1, 1], [5, 1], [7, 1], [11, 1], [21, 1], [31, 1]
Path 2: [1, 1], [5, 1], [7, 1], [11, 1], [21, 11], [31, 11]
Path 3: [1, 1], [5, 1], [7, 1], [11, 1], [21, 11], [31, 11], [41, 11]
Path 4: [1, 1], [5, 1], [7, 1], [11, 1], [21, 11], [31, 11], [41, 11], [58, 11], [70, 11]
Path 5: [1, 11], [5, 11], [7, 11], [11, 11], [21, 1], [31, 1], [41, 1]
Path 6: [1, 1], [5, 1], [7, 1], [11, 1], [21, 11], [31, 21], [41, 31]
Path 7: [1, 1], [5, 1], [5, 11], [5, 21]
Path 8: [1, 1], [31, 1], [41, 1]
OUTPUT list of Path :
Path 1: [1, 1], [5, 1], [7, 1], [11, 1], [21, 1], [31, 1]
Path 2: [1, 1], [5, 1], [7, 1], [11, 1]
Path 3: [11, 1], [21, 11]
Path 4: [21, 11], [31, 11]
Path 5: [1, 1], [5, 1], [7, 1], [11, 1]
Path 6: [11, 1], [21, 11]
Path 7: [21, 11], [31, 11], [41, 11]
Path 8: [1, 1], [5, 1], [7, 1], [11, 1]
Path 9: [11, 1], [21, 11]
Path 10: [21, 11], [31, 11], [41, 11], [58, 11], [70, 11]
Path 11: [1, 11], [5, 11], [7, 11], [11, 11]
Path 12: [11, 11], [21, 1]
Path 13: [21, 1], [31, 1], [41, 1]
Path 14: [1, 1], [5, 1], [7, 1], [11, 1]
Path 15: [11, 1], [21, 11], [31, 21], [41, 31]
Path 16: [1, 1], [5, 1]
Path 17: [5, 1], [5, 11], [5, 21]
Path 18: [1, 1], [31, 1], [41, 1]
--------------------------------------------------------------------------
MAX ANGULAR :0.349066(20 deg.)
INPUT list of Path :
Path 1: [1, 1], [5, 1], [7, 1], [11, 1], [21, 1], [31, 1]
Path 2: [1, 1], [5, 1], [7, 1], [11, 1], [21, 11], [31, 11]
Path 3: [1, 1], [5, 1], [7, 1], [11, 1], [21, 11], [31, 11], [41, 11]
Path 4: [1, 1], [5, 1], [7, 1], [11, 1], [21, 11], [31, 11], [41, 11], [58, 11], [70, 11]
Path 5: [1, 11], [5, 11], [7, 11], [11, 11], [21, 1], [31, 1], [41, 1]
Path 6: [1, 1], [5, 1], [7, 1], [11, 1], [21, 11], [31, 21], [41, 31]
Path 7: [1, 1], [5, 1], [5, 11], [5, 21]
Path 8: [1, 1], [31, 1], [41, 1]
OUTPUT list of Path :
Path 1: [1, 1], [5, 1], [7, 1], [11, 1], [21, 1], [31, 1]
Path 2: [1, 1], [5, 1], [7, 1], [11, 1]
Path 3: [11, 1], [21, 11]
Path 4: [21, 11], [31, 11]
Path 5: [1, 1], [5, 1], [7, 1], [11, 1]
Path 6: [11, 1], [21, 11]
Path 7: [21, 11], [31, 11], [41, 11]
Path 8: [1, 1], [5, 1], [7, 1], [11, 1]
Path 9: [11, 1], [21, 11]
Path 10: [21, 11], [31, 11], [41, 11], [58, 11], [70, 11]
Path 11: [1, 11], [5, 11], [7, 11], [11, 11]