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
+
0 commit comments