Skip to content

Commit

Permalink
Try a build
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Jul 17, 2024
1 parent bd25892 commit 3cb6241
Show file tree
Hide file tree
Showing 5 changed files with 297 additions and 101 deletions.
87 changes: 0 additions & 87 deletions .azure/azure-pipelines.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .azure/azure_ci_build.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

#==================================================================================================
# Define these variables
#==================================================================================================
# get_filename_component(HOST_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
## This is the Fully Qualified host name of your system
set(CTEST_SITE "$ENV{AGENT_NAME}.bluequartz.net")
## The name for this build. Combine the build type, compiler, and OS into a single string
set(CTEST_BUILD_NAME "$ENV{PRESET_NAME}-$ENV{BUILD_BUILDNUMBER}-PR$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}")
## The type of build we are going to do "Release | Debug"
#set(CTEST_CONFIGURATION_TYPE Release)
## The type of generator we are going to use "Make | Ninja | NMake | JOM"
set(CTEST_CMAKE_GENERATOR "Ninja")

#==================================================================================================
# Append to the existing CTEST TAG
#==================================================================================================
ctest_start(Experimental ${CTEST_SOURCE_DIR} ${CTEST_BINARY_DIRECTORY} APPEND)

#==================================================================================================
# Build the project
#==================================================================================================
ctest_build(BUILD ${CTEST_BINARY_DIRECTORY}
CONFIGURATION ${CTEST_CONFIGURATION_TYPE}
NUMBER_ERRORS ctest_build_errors
NUMBER_WARNINGS ctest_build_warnings
RETURN_VALUE ctest_build_result
CAPTURE_CMAKE_ERROR ctest_cmake_result
)
ctest_submit(PARTS Build)

if("${ctest_build_result}" EQUAL -1 OR "${ctest_cmake_result}" EQUAL -1)
message(FATAL_ERROR "CONFIGURE ERRORS: Go to https://my.cdash.org/index.php?project=DREAM3D for more information.
Site: ${CTEST_SITE}
Build Name: ${CTEST_BUILD_NAME}
CMake returned the following error code during build: ${ctest_cmake_result}
ctest_build() returned the following error code during build: ${ctest_build_result}")
endif()

79 changes: 79 additions & 0 deletions .azure/azure_ci_configure.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

#==================================================================================================
# Define these variables
#==================================================================================================
# get_filename_component(HOST_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
## This is the Fully Qualified host name of your system
set(CTEST_SITE "$ENV{AGENT_NAME}.bluequartz.net")
## The name for this build. Combine the build type, compiler, and OS into a single string
set(CTEST_BUILD_NAME "$ENV{PRESET_NAME}-$ENV{BUILD_BUILDNUMBER}-PR$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}")
## The type of build we are going to do "Release | Debug"
#set(CTEST_CONFIGURATION_TYPE Release)
## The type of generator we are going to use "Make | Ninja | NMake | JOM"
set(CTEST_CMAKE_GENERATOR "Ninja")

#==================================================================================================
# Look for a GIT command-line client.
#==================================================================================================
if(NOT DEFINED CTEST_GIT_COMMAND)
find_program(CTEST_GIT_COMMAND NAMES git git.exe git.cmd)
endif()

if(NOT EXISTS ${CTEST_GIT_COMMAND})
message(FATAL_ERROR "CONFIGURE ERRORS: Go to https://my.cdash.org/index.php?project=DREAM3D for more information.
Site: ${CTEST_SITE}
Build Name: ${CTEST_BUILD_NAME}
No Git Found.")
endif()


#==================================================================================================
# Configure the project
#==================================================================================================
file(WRITE ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt "
SITE:STRING=${CTEST_SITE}
BUILDNAME:STRING=${CTEST_BUILD_NAME}
CTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
DART_TESTING_TIMEOUT:STRING=${CTEST_TEST_TIMEOUT}
CMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}
DART_TESTING_TIMEOUT:STRING=1500"
)

#==================================================================================================
# Start CTest the project. This will create the TAG that is APPENEDED to for the other 2 steps in
# the process.
#==================================================================================================
ctest_start(Experimental ${CTEST_SOURCE_DIR} ${CTEST_BINARY_DIRECTORY})

#==================================================================================================
# Update Git Hashes for the project
#==================================================================================================
set(REPO_NAMES "s")
foreach(p ${REPO_NAMES})
ctest_update(SOURCE ${CTEST_DASHBOARD_ROOT}/${p}
RETURN_VALUE ctest_update_result
CAPTURE_CMAKE_ERROR ctest_cmake_result)
endforeach(p ${REPO_NAMES})
ctest_submit(PARTS Update)


#==================================================================================================
# Configure the project
#==================================================================================================
ctest_configure( BUILD ${CTEST_BINARY_DIRECTORY}
SOURCE ${CTEST_SOURCE_DIR}
OPTIONS "--preset ${CMAKE_PRESET_NAME}"
RETURN_VALUE ctest_configure_result
CAPTURE_CMAKE_ERROR ctest_cmake_result)

ctest_submit(PARTS Configure Notes)
message(STATUS "ctest_configure_result: ${ctest_configure_result}")
message(STATUS " ctest_cmake_restult: ${ctest_cmake_result}")

if("${ctest_cmake_result}" EQUAL -1 OR "${ctest_configure_result}" EQUAL -1)
message(FATAL_ERROR "CONFIGURE ERRORS: Go to https://my.cdash.org/index.php?project=DREAM3D for more information.
Site: ${CTEST_SITE}
Build Name: ${CTEST_BUILD_NAME}
CMake returned the following error code during build: ${ctest_cmake_result}
ctest_configure() returned the following error code during build: ${ctest_configure_result}")
endif()
26 changes: 26 additions & 0 deletions .azure/azure_ci_test.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

#==================================================================================================
# Define these variables
#==================================================================================================
# get_filename_component(HOST_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
## This is the Fully Qualified host name of your system
set(CTEST_SITE "$ENV{AGENT_NAME}.bluequartz.net")
## The name for this build. Combine the build type, compiler, and OS into a single string
set(CTEST_BUILD_NAME "$ENV{PRESET_NAME}-$ENV{BUILD_BUILDNUMBER}-PR$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}")
## The type of build we are going to do "Release | Debug"
#set(CTEST_CONFIGURATION_TYPE Release)
## The type of generator we are going to use "Make | Ninja | NMake | JOM"
set(CTEST_CMAKE_GENERATOR "Ninja")


#==================================================================================================
# Append to the existing CTEST TAG
#==================================================================================================
ctest_start(Experimental ${CTEST_SOURCE_DIR} ${CTEST_BINARY_DIRECTORY} APPEND)


#==================================================================================================
# Run the unit tests
#==================================================================================================
ctest_test(${CTEST_TEST_ARGS} APPEND)
ctest_submit(PARTS Test)
Loading

0 comments on commit 3cb6241

Please sign in to comment.