Commit 7fe94d0d authored by Matt Clarkson's avatar Matt Clarkson

Issue #1: Add CDash for Linux at least.

parent 3afc855d
Pipeline #2993 passed with stage
in 36 minutes and 25 seconds
......@@ -16,7 +16,7 @@ build linux:
- cmake -DBUILD_SUPERBUILD:BOOL=ON -DBUILD_TESTING:BOOL=ON -DBUILD_ArrayFire:BOOL=OFF -DBUILD_Python_Boost:BOOL=OFF -DSKSURGERYGPUCPP_USE_CUDA:BOOL=ON -DSKSURGERYGPUCPP_CUDA_ARCH_BIN:STRING=61 ..
- make
- cd SKSURGERYGPUCPP-build
- ctest
- ctest -S CTestContinuous.cmake -V
- cd ../..
#- python setup.py bdist_wheel
#- pip install dist/*
......
......@@ -143,7 +143,6 @@ endif()
set(PARALLEL_LEVEL ${cpu_cores})
ctest_start(Continuous TRACK ${group_name})
ctest_build()
ctest_test(EXCLUDE "${tests_to_exclude}" RETURN_VALUE exitCode)
ctest_submit()
......
# Copyright (c) 2003-2012 German Cancer Research Center,
# Division of Medical and Biological Informatics
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the
# following conditions are met:
#
# * Redistributions of source code must retain the above
# copyright notice, this list of conditions and the
# following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the
# following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# * Neither the name of the German Cancer Research Center,
# nor the names of its contributors may be used to endorse
# or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# FindGit
#
set(git_candidates git eg)
if(WIN32)
list(APPEND git_candidates eg.cmd)
if(NOT MSYS)
# We don't append git.cmd, since it does not correctly return
# exit codes, see http://code.google.com/p/msysgit/issues/detail?id=428
list(APPEND git_candidates git.cmd)
endif()
endif()
find_program(GIT_EXECUTABLE ${git_candidates}
PATHS
"C:/Program Files/Git/bin"
"C:/Program Files (x86)/Git/bin"
DOC "git command line client")
mark_as_advanced(GIT_EXECUTABLE)
if(GIT_EXECUTABLE)
macro(GIT_IS_REPO dir result_var)
# check if ${dir} is a proper Git repository
execute_process(COMMAND ${GIT_EXECUTABLE} rev-list -n 1 HEAD
WORKING_DIRECTORY ${dir}
RESULT_VARIABLE GIT_error
OUTPUT_QUIET
ERROR_QUIET)
if(GIT_error EQUAL 0)
set(${result_var} 1)
else()
set(${result_var} 0)
endif()
endmacro()
macro(GIT_WC_INFO dir prefix)
execute_process(COMMAND ${GIT_EXECUTABLE} rev-list -n 1 HEAD
WORKING_DIRECTORY ${dir}
ERROR_VARIABLE GIT_error
OUTPUT_VARIABLE ${prefix}_WC_REVISION_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT ${GIT_error} EQUAL 0)
message(SEND_ERROR "Command \"${GIT_EXECUTBALE} rev-list -n 1 HEAD\" in directory ${dir} failed with output:\n${GIT_error}")
else()
execute_process(COMMAND ${GIT_EXECUTABLE} name-rev ${${prefix}_WC_REVISION_HASH}
WORKING_DIRECTORY ${dir}
OUTPUT_VARIABLE ${prefix}_WC_REVISION_NAME
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
set(${prefix}_WC_GITSVN 0)
# In case, git-svn is used, attempt to extract svn info
execute_process(COMMAND ${GIT_EXECUTABLE} svn info
WORKING_DIRECTORY ${dir}
ERROR_VARIABLE git_svn_info_error
OUTPUT_VARIABLE ${prefix}_WC_INFO
RESULT_VARIABLE git_svn_info_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${git_svn_info_result} EQUAL 0)
set(${prefix}_WC_GITSVN 1)
string(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
"\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}")
string(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
"\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}")
string(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*"
"\\2" ${prefix}_WC_LAST_CHANGED_AUTHOR "${${prefix}_WC_INFO}")
string(REGEX REPLACE "^(.*\n)?Last Changed Rev: ([^\n]+).*"
"\\2" ${prefix}_WC_LAST_CHANGED_REV "${${prefix}_WC_INFO}")
string(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
"\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}")
endif()
endmacro()
endif()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Git DEFAULT_MSG GIT_EXECUTABLE)
# Copyright (c) 2003-2012 German Cancer Research Center,
# Division of Medical and Biological Informatics
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the
# following conditions are met:
#
# * Redistributions of source code must retain the above
# copyright notice, this list of conditions and the
# following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the
# following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# * Neither the name of the German Cancer Research Center,
# nor the names of its contributors may be used to endorse
# or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#! \brief Extract version information from a local working copy
#!
#! If the source_dir variable points to a git repository, this function
#! extracts the current revision hash and branch/tag name.
#!
#! If the source_dir variable points to a subversion repository, this
#! function extracts the current svn revision.
#
#! The information is provided in
#! <ul>
#! <li> ${prefix}_REVISION_ID The git hash or svn revision value
#! <li> ${prefix}_REVISION_NAME The git branch/tag name or empty
#! <li> ${prefix}_WC_TYPE The working copy type, one of "local", "git", or "svn"
#! </ul>
#!
#! \param source_dir The directory containing a working copy
#! \param prefix A prefix to prepend to the variables containing
#! the extracted information.
#!
function(mitkFunctionGetVersion source_dir prefix)
if(NOT prefix)
message(FATAL_ERROR "prefix argument not specified")
endif()
# initialize variables
set(_wc_type "local")
set(_wc_id "")
set(_wc_name "")
find_package(Git)
if(GIT_FOUND)
GIT_IS_REPO(${source_dir} _is_git_repo)
if(_is_git_repo)
set(_wc_type "git")
GIT_WC_INFO(${source_dir} ${prefix})
set(_wc_id ${${prefix}_WC_REVISION_HASH})
string(REPLACE " " ";" hash_name ${${prefix}_WC_REVISION_NAME})
list(GET hash_name 1 name)
if(name)
set(_wc_name ${name})
endif()
endif()
endif()
# test for svn working copy
if(_wc_type STREQUAL "local")
find_package(Subversion)
if(Subversion_FOUND)
execute_process(COMMAND ${Subversion_SVN_EXECUTABLE} info
WORKING_DIRECTORY ${source_dir}
RESULT_VARIABLE _subversion_result
OUTPUT_QUIET
ERROR_QUIET)
if(NOT _subversion_result)
set(_wc_type svn)
Subversion_WC_INFO(${source_dir} ${prefix})
set(_wc_id ${${prefix}_WC_REVISION})
endif()
endif()
endif()
set(${prefix}_WC_TYPE ${_wc_type} PARENT_SCOPE)
set(${prefix}_REVISION_ID ${_wc_id} PARENT_SCOPE)
set(_shortid ${_wc_id})
if(_wc_type STREQUAL "git")
string(SUBSTRING ${_shortid} 0 7 _shortid)
endif()
set(${prefix}_REVISION_SHORTID ${_shortid} PARENT_SCOPE)
set(${prefix}_REVISION_NAME ${_wc_name} PARENT_SCOPE)
# For backwards compatibility
set(${prefix}_WC_REVISION_HASH ${_wc_id} PARENT_SCOPE)
set(${prefix}_WC_REVISION_NAME ${_wc_name} PARENT_SCOPE)
endfunction()
#/*============================================================================
#
# NifTK: A software platform for medical image computing.
#
# Copyright (c) University College London (UCL). All rights reserved.
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.
#
# See LICENSE.txt in the top level directory for details.
#
#============================================================================*/
macro(niftkMacroGetGitBranch dir prefix)
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${dir}
ERROR_VARIABLE GIT_error
OUTPUT_VARIABLE ${prefix}_BRANCH_NAME
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT ${GIT_error} EQUAL 0)
message(SEND_ERROR "Command \"${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD in directory ${dir} failed with output:\n${GIT_error}")
endif()
endmacro()
#/*============================================================================
#
# NifTK: A software platform for medical image computing.
#
# Copyright (c) University College London (UCL). All rights reserved.
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.
#
# See LICENSE.txt in the top level directory for details.
#
#============================================================================*/
macro(niftkMacroGetGitDateTime dir prefix)
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --format=%ci HEAD
WORKING_DIRECTORY ${dir}
ERROR_VARIABLE GIT_error
OUTPUT_VARIABLE ${prefix}_DATE_TIME
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT ${GIT_error} EQUAL 0)
message(SEND_ERROR "Command \"${GIT_EXECUTBALE} show -s --format=\"%ci\" HEAD\" in directory ${dir} failed with output:\n${GIT_error}")
endif()
endmacro()
......@@ -12,6 +12,70 @@
#
#============================================================================*/
######################################################################
# Setting build name based on local system details
######################################################################
include(mitkFunctionGetVersion)
include(niftkMacroGetGitDateTime)
include(niftkMacroGetGitBranch)
mitkFunctionGetVersion(${CMAKE_SOURCE_DIR} SKSURGERYGPUCPP)
niftkMacroGetGitDateTime(${CMAKE_SOURCE_DIR} SKSURGERYGPUCPP)
niftkMacroGetGitBranch(${CMAKE_SOURCE_DIR} SKSURGERYGPUCPP)
if(CMAKE_GENERATOR MATCHES Make AND NOT (CMAKE_GENERATOR MATCHES NMake) )
find_program(UNAME NAMES uname)
mark_as_advanced(UNAME)
macro(getuname name flag)
exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
endmacro(getuname)
getuname(osname -s)
getuname(cpu -m)
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
set(CompilerName "gcc")
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CompilerName "clang")
else()
set(CompilerName "${CMAKE_CXX_COMPILER_ID}")
endif()
set(CTBN "${osname}-${cpu}-${CompilerName}-${CMAKE_CXX_COMPILER_VERSION}-${SKSURGERYGPUCPP_BRANCH_NAME}-${SKSURGERYGPUCPP_REVISION_SHORTID}")
else()
set(CTBN "${CMAKE_GENERATOR}-${SKSURGERYGPUCPP_BRANCH_NAME}-${SKSURGERYGPUCPP_REVISION_SHORTID}")
endif()
# append a short release/debug tag, so we know which one is which on the dashboard.
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CTBN "${CTBN}-Dbg")
else()
if (CMAKE_BUILD_TYPE STREQUAL "Release")
set(CTBN "${CTBN}-Rel")
else()
# this should not happen. further above we check for Debug and Release and fail if it's neither.
set(CTBN "${CTBN}-${CMAKE_BUILD_TYPE}")
endif()
endif()
string(REPLACE "\n" "" CTBN ${CTBN})
set(BUILDNAME ${CTBN} CACHE STRING "${CTBN}" FORCE)
set(CTEST_BUILD_NAME ${CTBN} CACHE STRING "${CTBN}" FORCE)
mark_as_advanced(BUILDNAME)
mark_as_advanced(CTEST_BUILD_NAME)
message(STATUS "scikit-surgerygpucpp branch=${SKSURGERYGPUCPP_BRANCH_NAME}")
message(STATUS "scikit-surgerygpucpp version=${SKSURGERYGPUCPP_REVISION_SHORTID}")
message(STATUS "scikit-surgerygpucpp date=${SKSURGERYGPUCPP_DATE_TIME}")
message(STATUS "scikit-surgerygpucpp ctest-name=${CTEST_BUILD_NAME}")
message(STATUS "scikit-surgerygpucpp build-name=${BUILDNAME}")
######################################################################
# Configure Dart testing support. This should be done before any
# message(FATAL_ERROR ...) commands are invoked.
......
......@@ -22,7 +22,7 @@ endif(NOT DEFINED CTEST_DROP_METHOD)
if(CTEST_DROP_METHOD STREQUAL "http")
set(CTEST_DROP_SITE "cdash.cmiclab.cs.ucl.ac.uk")
set(CTEST_DROP_LOCATION "/submit.php?project=SKSURGERYGPUCPP")
set(CTEST_DROP_LOCATION "/submit.php?project=scikit-surgerygpucpp")
set(CTEST_DROP_SITE_CDASH TRUE)
endif(CTEST_DROP_METHOD STREQUAL "http")
......
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