Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic/testing #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Source/pyEMsoft/docs/_template/
Source/pyEMsoft/docs/_static/
Source/pyEMsoft/docs/_build/

Workspace

/EMSphInx/

Expand Down
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

65 changes: 65 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
cmake_minimum_required(VERSION 3.14.0)

project(EMsoftCI VERSION 2.0.0.0 LANGUAGES NONE)

include(ExternalProject)

set(EMsoft_WORKSPACE ${EMsoftCI_SOURCE_DIR}/Workspace CACHE PATH "Root directory where repos will be cloned")

include(${PROJECT_SOURCE_DIR}/Repos.cmake)

#------------------------------------------------------------------------------
# Function to clone the repository using ExternalProject_Add
#------------------------------------------------------------------------------
function(CloneRepo)
set(options)
set(oneValueArgs NAME ROOT_DIR GIT_REPO GIT_TAG)
set(multiValueArgs)
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

set(CLONE_DIR ${ARGS_ROOT_DIR}/${ARGS_NAME})

message(STATUS "Cloning \"${ARGS_GIT_REPO}\" at tag \"${ARGS_GIT_TAG}\" in \"${CLONE_DIR}\"" )
ExternalProject_Add(${ARGS_NAME}
GIT_REPOSITORY ${ARGS_GIT_REPO}
GIT_TAG ${ARGS_GIT_TAG}
GIT_PROGRESS ON

SOURCE_DIR ${CLONE_DIR}

UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""

TMP_DIR ${PROJECT_BINARY_DIR}/${ARGS_NAME}/temp
STAMP_DIR ${PROJECT_BINARY_DIR}/${ARGS_NAME}/stamp
DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/${ARGS_NAME}/download
BINARY_DIR ${PROJECT_BINARY_DIR}/${ARGS_NAME}/binary
INSTALL_DIR ${PROJECT_BINARY_DIR}/${ARGS_NAME}/install

LOG_DOWNLOAD ON
LOG_UPDATE ON
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_TEST ON
LOG_INSTALL ON
)
endfunction()

if("${EMsoft_WORKSPACE}" STREQUAL "")
message(FATAL_ERROR "EMsoft_WORKSPACE is empty. Cloning DREAM.3D can not continue. \
Please set the -DEMsoft_WORKSPACE=/Path/to/Directory/of/EMsoft to the directory where you want to clone all the EMsoft \
repositories. Anything in that directory may be over written.")
endif()

foreach(plugin ${EMsoft_Base_Repos})
CloneRepo(NAME ${plugin}
GIT_REPO "${${plugin}_BASE_URL}/${${plugin}_GH_ORG}/${${plugin}_REPO_NAME}.git"
GIT_TAG "${${plugin}_GIT_BRANCH}"
ROOT_DIR "${EMsoft_WORKSPACE}"
)
endforeach()

1 change: 0 additions & 1 deletion EMsoft
Submodule EMsoft deleted from cc8e5f
1 change: 0 additions & 1 deletion EMsoftData
Submodule EMsoftData deleted from 754912
20 changes: 20 additions & 0 deletions Repos.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
set(EMsoft_Base_Repos
EMsoft
EMsoftData
)

#--------------------------------------------------------------------------------------------------
# EMsoft Details
#--------------------------------------------------------------------------------------------------
set(EMsoft_REPO_NAME "EMsoft")
set(EMsoft_BASE_URL "https://www.github.com")
set(EMsoft_GH_ORG "emsoft-org")
set(EMsoft_GIT_BRANCH "develop")

#--------------------------------------------------------------------------------------------------
# EMsoftData Details
#--------------------------------------------------------------------------------------------------
set(EMsoftData_REPO_NAME "EMsoftData")
set(EMsoftData_BASE_URL "https://www.github.com")
set(EMsoftData_GH_ORG "emsoft-org")
set(EMsoftData_GIT_BRANCH "develop")
51 changes: 38 additions & 13 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,36 @@ stages:
echo BUILDNAME=$(Agent.OS)-$(Agent.MachineName)-$(Build.SourceBranchName)_$(Build.BuildNumber)
echo Build.BuildNumber=$(Build.BuildNumber)
displayName: 'Dump Azure Variables'
- script: |
cd $(Build.Repository.LocalPath)
$(Agent.WorkFolder)/../cmake-3.16.6-Darwin-x86_64/CMake.app/Contents/bin/cmake -G Ninja -S $(Build.Repository.LocalPath) -B $(Build.Repository.LocalPath)/Build
$(Agent.WorkFolder)/../cmake-3.16.6-Darwin-x86_64/CMake.app/Contents/bin/cmake --build $(Build.Repository.LocalPath)/Build
displayName: 'Clone Repositories'
- script: |
cd $(Build.BinariesDirectory)
if [ -f "CMakeCache.txt" ]; then
rm CMakeCache.txt
fi
if [ -d "Bin" ]; then
rm -rf Bin
fi
displayName: 'Clean Build Directory'
- script: |
cd $(Build.BinariesDirectory)
cmake -G "Unix Makefiles" -DEMsoft_SDK=$(Agent.WorkFolder) -DEMsoftData_DIR=$(Build.Repository.LocalPath)/EMsoftData -DCMAKE_BUILD_TYPE=Release -DBUILDNAME="$(Agent.MachineName)-$(Agent.OS)-$(Build.SourceBranchName)_$(Build.BuildNumber)" $(Build.Repository.LocalPath)/EMsoft
$(Agent.WorkFolder)/../cmake-3.16.6-Darwin-x86_64/CMake.app/Contents/bin/cmake -G "Unix Makefiles" -DEMsoft_SDK=$(Agent.WorkFolder) -DEMsoftData_DIR=$(Build.Repository.LocalPath)/Workspace/EMsoftData -DCMAKE_BUILD_TYPE=Release -DBUILDNAME="$(Agent.MachineName)-$(Agent.OS)-$(Build.SourceBranchName)_$(Build.BuildNumber)" $(Build.Repository.LocalPath)/Workspace/EMsoft
displayName: 'Configure EMsoft'
- script: |
cd $(Build.BinariesDirectory)
cmake --build . --config Release --target all --parallel 12
$(Agent.WorkFolder)/../cmake-3.16.6-Darwin-x86_64/CMake.app/Contents/bin/cmake --build . --config Release --target all
displayName: 'Compile EMsoft'
- script: |
cd $(Build.BinariesDirectory)
ctest -D Experimental --timeout 7200 -DCTEST_SITE=$(Agent.MachineName).bluequartz.net -Ddashboard_source_name=EMsoft
export EMSOFTPATHNAME="$(Build.Repository.LocalPath)/Workspace/EMsoft"
$(Agent.WorkFolder)/../cmake-3.16.6-Darwin-x86_64/CMake.app/Contents/bin/ctest -D Experimental --timeout 7200 -DCTEST_SITE=$(Agent.MachineName).bluequartz.net -Ddashboard_source_name=EMsoft
displayName: 'Testing EMsoft'
- script: |
cd $(Build.BinariesDirectory)
cpack --verbose
$(Agent.WorkFolder)/../cmake-3.16.6-Darwin-x86_64/CMake.app/Contents/bin/cpack --verbose
displayName: 'Packing EMsoft'
- job: Windows_10_19_03
timeoutInMinutes: 120
Expand All @@ -67,9 +82,14 @@ stages:
echo BUILDNAME=$(Agent.OS)-$(Agent.MachineName)-$(Build.SourceBranchName)_$(Build.BuildNumber)
echo Build.BuildNumber=$(Build.BuildNumber)
displayName: 'Dump Azure Variables'
- script: |
cd $(Build.Repository.LocalPath)
$(Agent.WorkFolder)\..\cmake-3.16.2-win64-x64\bin\cmake.exe -G "NMake Makefiles" -S $(Build.Repository.LocalPath) -B $(Build.Repository.LocalPath)/Build
$(Agent.WorkFolder)\..\cmake-3.16.2-win64-x64\bin\cmake.exe --build $(Build.Repository.LocalPath)/Build
displayName: 'Clone Repositories'
- script: |
cd $(Build.BinariesDirectory)
$(Agent.WorkFolder)\..\cmake-3.16.2-win64-x64\bin\cmake.exe -G "NMake Makefiles" -DEMsoft_SDK=$(Agent.WorkFolder) -DEMsoftData_DIR=$(Build.Repository.LocalPath)/EMsoftData -DBUILDNAME="$(Agent.MachineName)-$(Agent.OS)-$(Build.SourceBranchName)_$(Build.BuildNumber)" -DCMAKE_BUILD_TYPE=Release $(Build.Repository.LocalPath)/EMsoft
$(Agent.WorkFolder)\..\cmake-3.16.2-win64-x64\bin\cmake.exe -G "NMake Makefiles" -DEMsoft_SDK=$(Agent.WorkFolder) -DEMsoftData_DIR=$(Build.Repository.LocalPath)/Workspace/EMsoftData -DBUILDNAME="$(Agent.MachineName)-$(Agent.OS)-$(Build.SourceBranchName)_$(Build.BuildNumber)" -DCMAKE_BUILD_TYPE=Release $(Build.Repository.LocalPath)/Workspace/EMsoft
displayName: 'Configure EMsoft'
- script: |
cd $(Build.BinariesDirectory)
Expand Down Expand Up @@ -106,23 +126,28 @@ stages:
echo BUILDNAME=$(Agent.OS)-$(Agent.MachineName)-$(Build.SourceBranchName)_$(Build.BuildNumber)
echo Build.BuildNumber=$(Build.BuildNumber)
displayName: 'Dump Azure Variables'
- script: |
cd $(Build.Repository.LocalPath)
$(Agent.WorkFolder)/../cmake-3.16.6-Linux-x86_64/bin/cmake -S $(Build.Repository.LocalPath) -B $(Build.Repository.LocalPath)/Build
$(Agent.WorkFolder)/../cmake-3.16.6-Linux-x86_64/bin/cmake --build $(Build.Repository.LocalPath)/Build
displayName: 'Clone Repositories'
- script: |
cd $(Build.BinariesDirectory)
export CXX=/usr/bin/g++-7
export CC=/usr/bin/gcc-7
export FC=/usr/bin/gfortran-7
$(Agent.WorkFolder)/../cmake-3.16.2-Linux-x86_64/bin/cmake -G "Unix Makefiles" -DEMsoft_SDK=$(Agent.WorkFolder) -DEMsoftData_DIR=$(Build.Repository.LocalPath)/EMsoftData -DCMAKE_BUILD_TYPE=Release -DBUILDNAME="$(Agent.MachineName)-$(Agent.OS)-$(Build.SourceBranchName)_$(Build.BuildNumber)" $(Build.Repository.LocalPath)/EMsoft
export CXX=/usr/bin/g++-8
export CC=/usr/bin/gcc-8
export FC=/usr/bin/gfortran-8
$(Agent.WorkFolder)/../cmake-3.16.6-Linux-x86_64/bin/cmake -G "Unix Makefiles" -DEMsoft_SDK=$(Agent.WorkFolder) -DEMsoftData_DIR=$(Build.Repository.LocalPath)/Workspace/EMsoftData -DCMAKE_BUILD_TYPE=Release -DBUILDNAME="$(Agent.MachineName)-$(Agent.OS)-$(Build.SourceBranchName)_$(Build.BuildNumber)" $(Build.Repository.LocalPath)/Workspace/EMsoft
displayName: 'Configure EMsoft'
- script: |
cd $(Build.BinariesDirectory)
$(Agent.WorkFolder)/../cmake-3.16.2-Linux-x86_64/bin/cmake --build . --config Release --target all --parallel 10
$(Agent.WorkFolder)/../cmake-3.16.6-Linux-x86_64/bin/cmake --build . --config Release --target all --parallel 10
displayName: 'Compile EMsoft'
- script: |
cd $(Build.BinariesDirectory)
export EMSOFTPATHNAME=$(Build.Repository.LocalPath)/EMsoft
$(Agent.WorkFolder)/../cmake-3.16.2-Linux-x86_64/bin/ctest -D Experimental --timeout 7200 -DCTEST_SITE=$(Agent.MachineName).bluequartz.net -Ddashboard_source_name=EMsoft
export EMSOFTPATHNAME=$(Build.Repository.LocalPath)/Workspace/EMsoft
$(Agent.WorkFolder)/../cmake-3.16.6-Linux-x86_64/bin/ctest -D Experimental --timeout 7200 -DCTEST_SITE=$(Agent.MachineName).bluequartz.net -Ddashboard_source_name=EMsoft
displayName: 'Testing EMsoft'
- script: |
cd $(Build.BinariesDirectory)
$(Agent.WorkFolder)/../cmake-3.16.2-Linux-x86_64/bin/cpack --verbose
$(Agent.WorkFolder)/../cmake-3.16.6-Linux-x86_64/bin/cpack --verbose
displayName: 'Packing EMsoft'