Skip to content

Commit ce9a0fd

Browse files
authored
BUG: Validate all 11 Laue IPF Legends are correct. (#24)
- Convert IPFLegend Drawing to use 'canvas_ity' library. - Fix ambiguous lambda for a std::transform - Add Exemplar Legends and Data files. - Create install rules to copy the IPF Legends if requested. - Add a small test project that can be used to test an external project using EbsdLib - Add Azure Build bots to EbsdLib - Fix filenames that are illegal on windows machines - Add VCPKG Support for building - Fix detection of TBB with MSVC - Fix tiff writing bugs (out of order tiff tags) - Fix bug where the X, Y and Z Coordinates were not read from the H5Ebsd File --------- Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
1 parent d280acd commit ce9a0fd

File tree

216 files changed

+35823
-990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+35823
-990
lines changed

.azure/azure_ci_build.cmake

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
#==================================================================================================
3+
# Define these variables
4+
#==================================================================================================
5+
# get_filename_component(HOST_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
6+
## This is the Fully Qualified host name of your system
7+
set(CTEST_SITE "$ENV{AGENT_NAME}.bluequartz.net")
8+
## The name for this build. Combine the build type, compiler, and OS into a single string
9+
set(CTEST_BUILD_NAME "$ENV{PRESET_NAME}-$ENV{BUILD_BUILDNUMBER}-PR$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}")
10+
## The type of build we are going to do "Release | Debug"
11+
#set(CTEST_CONFIGURATION_TYPE Release)
12+
## The type of generator we are going to use "Make | Ninja | NMake | JOM"
13+
set(CTEST_CMAKE_GENERATOR "Ninja")
14+
15+
#==================================================================================================
16+
# Append to the existing CTEST TAG
17+
#==================================================================================================
18+
ctest_start(Experimental ${CTEST_SOURCE_DIR} ${CTEST_BINARY_DIRECTORY} APPEND)
19+
20+
#==================================================================================================
21+
# Build the project
22+
#==================================================================================================
23+
ctest_build(BUILD ${CTEST_BINARY_DIRECTORY}
24+
CONFIGURATION ${CTEST_CONFIGURATION_TYPE}
25+
NUMBER_ERRORS ctest_build_errors
26+
NUMBER_WARNINGS ctest_build_warnings
27+
RETURN_VALUE ctest_build_result
28+
CAPTURE_CMAKE_ERROR ctest_cmake_result
29+
)
30+
ctest_submit(PARTS Build)
31+
32+
if("${ctest_build_result}" EQUAL -1 OR "${ctest_cmake_result}" EQUAL -1)
33+
message(FATAL_ERROR "CONFIGURE ERRORS: Go to https://my.cdash.org/index.php?project=DREAM3D for more information.
34+
Site: ${CTEST_SITE}
35+
Build Name: ${CTEST_BUILD_NAME}
36+
CMake returned the following error code during build: ${ctest_cmake_result}
37+
ctest_build() returned the following error code during build: ${ctest_build_result}")
38+
endif()
39+

.azure/azure_ci_configure.cmake

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
#==================================================================================================
3+
# Define these variables
4+
#==================================================================================================
5+
# get_filename_component(HOST_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
6+
## This is the Fully Qualified host name of your system
7+
set(CTEST_SITE "$ENV{AGENT_NAME}.bluequartz.net")
8+
## The name for this build. Combine the build type, compiler, and OS into a single string
9+
set(CTEST_BUILD_NAME "$ENV{PRESET_NAME}-$ENV{BUILD_BUILDNUMBER}-PR$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}")
10+
## The type of build we are going to do "Release | Debug"
11+
#set(CTEST_CONFIGURATION_TYPE Release)
12+
## The type of generator we are going to use "Make | Ninja | NMake | JOM"
13+
set(CTEST_CMAKE_GENERATOR "Ninja")
14+
15+
#==================================================================================================
16+
# Look for a GIT command-line client.
17+
#==================================================================================================
18+
if(NOT DEFINED CTEST_GIT_COMMAND)
19+
find_program(CTEST_GIT_COMMAND NAMES git git.exe git.cmd)
20+
endif()
21+
22+
if(NOT EXISTS ${CTEST_GIT_COMMAND})
23+
message(FATAL_ERROR "CONFIGURE ERRORS: Go to https://my.cdash.org/index.php?project=DREAM3D for more information.
24+
Site: ${CTEST_SITE}
25+
Build Name: ${CTEST_BUILD_NAME}
26+
No Git Found.")
27+
endif()
28+
29+
30+
#==================================================================================================
31+
# Configure the project
32+
#==================================================================================================
33+
file(WRITE ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt "
34+
SITE:STRING=${CTEST_SITE}
35+
BUILDNAME:STRING=${CTEST_BUILD_NAME}
36+
CTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
37+
DART_TESTING_TIMEOUT:STRING=${CTEST_TEST_TIMEOUT}
38+
CMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}
39+
DART_TESTING_TIMEOUT:STRING=1500"
40+
)
41+
42+
#==================================================================================================
43+
# Start CTest the project. This will create the TAG that is APPENEDED to for the other 2 steps in
44+
# the process.
45+
#==================================================================================================
46+
ctest_start(Experimental ${CTEST_SOURCE_DIR} ${CTEST_BINARY_DIRECTORY})
47+
48+
#==================================================================================================
49+
# Update Git Hashes for the project
50+
#==================================================================================================
51+
set(REPO_NAMES "s")
52+
foreach(p ${REPO_NAMES})
53+
ctest_update(SOURCE ${CTEST_DASHBOARD_ROOT}/${p}
54+
RETURN_VALUE ctest_update_result
55+
CAPTURE_CMAKE_ERROR ctest_cmake_result)
56+
endforeach(p ${REPO_NAMES})
57+
ctest_submit(PARTS Update)
58+
59+
60+
#==================================================================================================
61+
# Configure the project
62+
#==================================================================================================
63+
ctest_configure( BUILD ${CTEST_BINARY_DIRECTORY}
64+
SOURCE ${CTEST_SOURCE_DIR}
65+
OPTIONS "--preset ${CMAKE_PRESET_NAME}"
66+
RETURN_VALUE ctest_configure_result
67+
CAPTURE_CMAKE_ERROR ctest_cmake_result)
68+
69+
ctest_submit(PARTS Configure Notes)
70+
message(STATUS "ctest_configure_result: ${ctest_configure_result}")
71+
message(STATUS " ctest_cmake_restult: ${ctest_cmake_result}")
72+
73+
if("${ctest_cmake_result}" EQUAL -1 OR "${ctest_configure_result}" EQUAL -1)
74+
message(FATAL_ERROR "CONFIGURE ERRORS: Go to https://my.cdash.org/index.php?project=DREAM3D for more information.
75+
Site: ${CTEST_SITE}
76+
Build Name: ${CTEST_BUILD_NAME}
77+
CMake returned the following error code during build: ${ctest_cmake_result}
78+
ctest_configure() returned the following error code during build: ${ctest_configure_result}")
79+
endif()

.azure/azure_ci_test.cmake

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
#==================================================================================================
3+
# Define these variables
4+
#==================================================================================================
5+
# get_filename_component(HOST_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
6+
## This is the Fully Qualified host name of your system
7+
set(CTEST_SITE "$ENV{AGENT_NAME}.bluequartz.net")
8+
## The name for this build. Combine the build type, compiler, and OS into a single string
9+
set(CTEST_BUILD_NAME "$ENV{PRESET_NAME}-$ENV{BUILD_BUILDNUMBER}-PR$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}")
10+
## The type of build we are going to do "Release | Debug"
11+
#set(CTEST_CONFIGURATION_TYPE Release)
12+
## The type of generator we are going to use "Make | Ninja | NMake | JOM"
13+
set(CTEST_CMAKE_GENERATOR "Ninja")
14+
15+
16+
#==================================================================================================
17+
# Append to the existing CTEST TAG
18+
#==================================================================================================
19+
ctest_start(Experimental ${CTEST_SOURCE_DIR} ${CTEST_BINARY_DIRECTORY} APPEND)
20+
21+
22+
#==================================================================================================
23+
# Run the unit tests
24+
#==================================================================================================
25+
ctest_test(${CTEST_TEST_ARGS} APPEND)
26+
ctest_submit(PARTS Test)

.azure/pipelines/azure-pipelines.yml

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
#==================================================================================================
2+
# Building against a branch *other* than `develop` on EbsdLib. There are a few items that will
3+
# need to be changed.
4+
#
5+
# [1] Under `resources->repository->name` you will need to put your fork.
6+
# You will also need to add another attribute to the `repository` for the branch/ref from github
7+
# [2] Under the `jobs->job->variables` section you will need to adjust the "EbsdLib_origin_name"
8+
# variable to match your fork.
9+
#==================================================================================================
10+
11+
resources:
12+
repositories:
13+
- repository: EbsdLib
14+
type: github
15+
endpoint: BlueQuartzSoftware
16+
name: BlueQuartzSoftware/EbsdLib
17+
18+
trigger:
19+
- develop
20+
21+
jobs:
22+
- job:
23+
strategy:
24+
matrix:
25+
macOS:
26+
imageName: Darwin
27+
preset_name: ci-macos-x64
28+
home_dir: /Users/buildbot
29+
Windows:
30+
imageName: Windows_NT
31+
preset_name: ci-windows-v143
32+
home_dir: C:/Users/buildbot
33+
Linux:
34+
imageName: Linux
35+
preset_name: ci-linux-x64
36+
home_dir: /home/buildbot
37+
python_dir: /opt/local/anaconda3/envs/dream3d/bin
38+
39+
pool:
40+
name: BlueQuartz-CI-Cluster
41+
demands:
42+
- Agent.OS -equals $(imageName)
43+
- BQ.PROXMOX
44+
45+
workspace:
46+
clean: all
47+
48+
timeoutInMinutes: 120
49+
50+
variables:
51+
EbsdLib_source_dir: $(Build.Repository.LocalPath)
52+
model_type: Experimental
53+
build_type: Release
54+
EbsdLib_origin_name: bluequartzsoftware
55+
EbsdLib_branch_name: develop
56+
57+
steps:
58+
- checkout: self
59+
submodules: true
60+
61+
- powershell: |
62+
try {
63+
echo System.PullRequest.SourceBranch=$(System.PullRequest.SourceBranch)
64+
echo System.PullRequest.PullRequestNumber=$(System.PullRequest.PullRequestNumber)
65+
} catch {
66+
}
67+
echo Build.SourceBranchName=$(Build.SourceBranchName)
68+
echo Build.Repository.Name=$(Build.Repository.Name)
69+
echo Build.Repository.Uri=$(Build.Repository.Uri)
70+
echo Build.Repository.LocalPath=$(Build.Repository.LocalPath)
71+
echo Build.BuildNumber=$(Build.BuildNumber)
72+
echo Agent.WorkFolder=$(Agent.WorkFolder)
73+
echo Agent.OS=$(Agent.OS)
74+
echo preset_name=$(preset_name)
75+
displayName: 'Dump Azure Variables'
76+
77+
#==================================================================================================
78+
# Change from the default https checkout to a git remote with ssh
79+
# The build bots have appropriate ssh keys to make this work
80+
# This also allows CDash to get the real git commit that we are on for DREAM3DNX
81+
#==================================================================================================
82+
- powershell: |
83+
cd $(EbsdLib_source_dir)
84+
git config core.sshCommand "ssh -i $(home_dir)/.ssh/id_rsa"
85+
git remote rename origin azure
86+
git remote add origin ssh://git@github.com/$(EbsdLib_origin_name)/EbsdLib
87+
git fetch origin
88+
displayName: Update EbsdLib Repo
89+
90+
91+
#==================================================================================================
92+
# CDash Section:
93+
# In this section we are going to call `ctest` 3 times in order to separate out the output from
94+
# each CDash stage: Configure,Update :: Build :: Testing
95+
# This makes the output easier to parse through for the testing.
96+
#==================================================================================================
97+
98+
- powershell: |
99+
$UpdatedPath = '$(python_dir)' + [IO.Path]::PathSeparator + [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Process)
100+
[System.Environment]::SetEnvironmentVariable('PATH', $UpdatedPath, [System.EnvironmentVariableTarget]::Process)
101+
cd $(Build.BinariesDirectory)
102+
ctest -VV -DCTEST_SOURCE_DIR=$(EbsdLib_source_dir) -DCTEST_BINARY_DIRECTORY=$(Build.BinariesDirectory) -Ddashboard_model=Experimental -DCTEST_DASHBOARD_ROOT=$(Build.Repository.LocalPath) -DCMAKE_PRESET_NAME="$(preset_name)" -DCTEST_CONFIGURATION_TYPE=Release -S $(EbsdLib_source_dir)/.azure/azure_ci_configure.cmake
103+
displayName: CDash Update/Configure
104+
105+
- powershell: |
106+
cd $(Build.BinariesDirectory)
107+
ctest -VV -DCTEST_SOURCE_DIR=$(EbsdLib_source_dir) -DCTEST_BINARY_DIRECTORY=$(Build.BinariesDirectory) -Ddashboard_model=Experimental -DCTEST_DASHBOARD_ROOT=$(Build.Repository.LocalPath) -DCMAKE_PRESET_NAME="$(preset_name)" -DCTEST_CONFIGURATION_TYPE=Release -S $(EbsdLib_source_dir)/.azure/azure_ci_build.cmake
108+
displayName: CDash Build
109+
110+
- powershell: |
111+
cd $(Build.BinariesDirectory)
112+
ctest -VV -DCTEST_SOURCE_DIR=$(EbsdLib_source_dir) -DCTEST_BINARY_DIRECTORY=$(Build.BinariesDirectory) -Ddashboard_model=Experimental -DCTEST_DASHBOARD_ROOT=$(Build.Repository.LocalPath) -DCMAKE_PRESET_NAME="$(preset_name)" -DCTEST_CONFIGURATION_TYPE=Release -S $(EbsdLib_source_dir)/.azure/azure_ci_test.cmake
113+
displayName: CDash Test
114+
115+
#==================================================================================================
116+
# CPack Section
117+
#==================================================================================================
118+
- powershell: |
119+
cd $(Build.BinariesDirectory)
120+
cpack -C $(build_type) --verbose
121+
displayName: Packing EbsdLib
122+
123+
#==================================================================================================
124+
# Publish Test Results
125+
#==================================================================================================
126+
- task: PublishTestResults@2
127+
inputs:
128+
testResultsFormat: CTest
129+
testResultsFiles: $(Build.BinariesDirectory)/Testing/*/Test.xml
130+
testRunTitle: CTest_$(Agent.Name)_$(Agent.OS)
131+
failTaskOnFailedTests: true
132+
displayName: Publish Commercial Test Results
133+
134+
# - script: |
135+
# cmake -S $(EbsdLib_source_dir) -B $(Build.BinariesDirectory)-Free -G Ninja -DDREAM3D_ENABLE_DOCUMENTATION=OFF -DDREAM3D_ENABLE_COMMERCIAL_BUILD=OFF -DCMAKE_BUILD_TYPE:STRING=$(build_type) -DDREAM3D_DATA_DIR=$(dream3d_data_dir) -C $(Agent.WorkFolder)/NX.cmake -DEbsdLib_EXTRA_PLUGINS="Core;ITKImageProcessing;OrientationAnalysis" -DCTEST_BUILD_NAME:STRING="NX-Free-$(Agent.MachineName)-$(Agent.OS)-$(Build.SourceBranchName)_$(Build.BuildNumber)"
136+
# displayName: Configure Free DREAM3D
137+
138+
# - script: |
139+
# cmake --build $(Build.BinariesDirectory)-Free --config $(build_type) --target all
140+
# displayName: Build Free DREAM3D
141+
142+
# - script: |
143+
# cd $(Build.BinariesDirectory)-Free
144+
# cpack -C $(build_type) --verbose
145+
# continueOnError: false
146+
# displayName: Packing Free DREAM3D
147+
148+
# - script: |
149+
# cd $(Build.BinariesDirectory)-Free
150+
# ctest -C $(build_type) -D Experimental --timeout 7200 -DCTEST_SITE:STRING=$(Agent.MachineName).bluequartz.net -Ddashboard_source_name:STRING=DREAM3D
151+
# continueOnError: true
152+
# displayName: Testing Free DREAM3D
153+
154+
# - task: PublishTestResults@2
155+
# inputs:
156+
# testResultsFormat: CTest
157+
# testResultsFiles: $(Build.BinariesDirectory)-Free/Testing/*/Test.xml
158+
# testRunTitle: CTest_$(Agent.Name)_$(Agent.OS)
159+
# failTaskOnFailedTests: true
160+
# displayName: Publish Free Test Results
161+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ __pycache__/
3535
/.mypy_cache/
3636
release
3737
debug
38+
Test/ProjectTest/Build
3839

3940
# Python build-related files
4041
pyebsd/build/

3rdParty/canvas_ity/ReadMe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
commit f32fbb37e2fe7c0fcaee6ebdc02d3e5385603fd5 (HEAD -> main, origin/main, origin/HEAD)
2+
Author: Andrew Kensler <andrew@eastfarthing.com>
3+
Date: Sun Oct 9 23:25:20 2022 -0700
4+
5+
v1.00 release

0 commit comments

Comments
 (0)