Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
8016d4d8
Commit
8016d4d8
authored
6 years ago
by
Antoine Regimbeau
Browse files
Options
Downloads
Patches
Plain Diff
Change directory in prepare superbuild
parent
cde3bbdf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CI/prepare_superbuild.cmake
+7
-24
7 additions, 24 deletions
CI/prepare_superbuild.cmake
with
7 additions
and
24 deletions
CI/prepare_superbuild.cmake
+
7
−
24
View file @
8016d4d8
...
@@ -23,13 +23,6 @@ include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
...
@@ -23,13 +23,6 @@ include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
set
(
ENV{LANG}
"C"
)
# Only ascii output
set
(
ENV{LANG}
"C"
)
# Only ascii output
get_filename_component
(
OTB_SOURCE_DIR
${
CMAKE_CURRENT_LIST_DIR
}
DIRECTORY
)
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"
)
set
(
DEBUG
"1"
)
...
@@ -52,7 +45,7 @@ set_dash_build_name()
...
@@ -52,7 +45,7 @@ set_dash_build_name()
# This is platform dependent, and the next step (build) also
# This is platform dependent, and the next step (build) also
# depends on that, as some paths are hardcoded
# depends on that, as some paths are hardcoded
# This can be fixed with a packaging of OTB_DEPENDS
# 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
# HACK
# This is needed because when using return() function ctest is trying
# This is needed because when using return() function ctest is trying
...
@@ -116,8 +109,7 @@ foreach(sb_file ${sb_file_list})
...
@@ -116,8 +109,7 @@ foreach(sb_file ${sb_file_list})
file
(
APPEND
${
SB_TXT
}
"
${
sb_file
}${
CONTENTS
}
"
)
file
(
APPEND
${
SB_TXT
}
"
${
sb_file
}${
CONTENTS
}
"
)
endforeach
(
sb_file
)
endforeach
(
sb_file
)
file
(
READ
"
${
CTEST_BINARY_DIRECTORY
}
/CMakeCache.txt"
CMAKE_ORIG
)
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_ORIG
}
"
)
file
(
APPEND
${
SB_TXT
}
"CMakeCache.txt
${
CMAKE_UNIFIED
}
"
)
file
(
MD5
"
${
SB_TXT
}
"
SB_MD5
)
file
(
MD5
"
${
SB_TXT
}
"
SB_MD5
)
message
(
"SB_MD5 =
${
SB_MD5
}
"
)
message
(
"SB_MD5 =
${
SB_MD5
}
"
)
file
(
REMOVE
${
SB_TXT
}
)
file
(
REMOVE
${
SB_TXT
}
)
...
@@ -180,7 +172,6 @@ ctest_submit()
...
@@ -180,7 +172,6 @@ ctest_submit()
# TODO right now we rely on ctest_build to know whether there has been an error
# 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
# in build, whereas SuperBuild does not necessarily return an error if something
# goes wrong
# goes wrong
set
(
SB_ARTIFACT_GIT
"
${
CI_PROJ_DIR
}
/superbuild-artifact"
)
# REPOSITORY_GIT_URL and REMOTE whould be the same. Right now there are
# 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.
# different because one is https and one is ssh. Both should be ssh.
...
@@ -190,8 +181,9 @@ set( REPOSITORY_GIT_URL "git@gitlab.orfeo-toolbox.org:gbonnefille/superbuild-art
...
@@ -190,8 +181,9 @@ set( REPOSITORY_GIT_URL "git@gitlab.orfeo-toolbox.org:gbonnefille/superbuild-art
execute_process
(
execute_process
(
COMMAND
${
GIT
}
"clone"
"
${
REPOSITORY_GIT_URL
}
"
COMMAND
${
GIT
}
"clone"
"
${
REPOSITORY_GIT_URL
}
"
"--branch"
"master"
"--depth"
"1"
"superbuild-artifact"
"--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
# setting up the repo
# StrictHostKeyChecking so we don't have to add the host as a known key
# StrictHostKeyChecking so we don't have to add the host as a known key
...
@@ -260,24 +252,15 @@ endif()
...
@@ -260,24 +252,15 @@ endif()
set
(
SB_TAR_NAME
"SuperBuild_Install.tar"
)
set
(
SB_TAR_NAME
"SuperBuild_Install.tar"
)
# create the tar
# Creating 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...
# May be for easier maintainability the tar name should be the same as the
# May be for easier maintainability the tar name should be the same as the
# file inside.
# file inside.
execute_process
(
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
}
"
--
"
${
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...
# In a near futur it might be nice to clean up the mess we made...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment