1+ # ==================================================================================================
2+ # Building against a branch *other* than `develop` on simplnx. 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 "simplnx_origin_name"
8+ # variable to match your fork.
9+ # ==================================================================================================
10+
11+ resources :
12+ repositories :
13+ - repository : SimplnxReview
14+ type : github
15+ endpoint : BlueQuartzSoftware
16+ name : BlueQuartzSoftware/SimplnxReview
17+ - repository : simplnx
18+ type : github
19+ endpoint : BlueQuartzSoftware
20+ name : BlueQuartzSoftware/simplnx
21+
22+ trigger :
23+ - develop
24+
25+ jobs :
26+ - job :
27+ strategy :
28+ matrix :
29+ macOS-arm64 :
30+ imageName : Darwin
31+ preset_name : ci-macos-arm64
32+ architecture : ARM64
33+ home_dir : /Users/buildbot
34+ macOS-x64 :
35+ imageName : Darwin
36+ preset_name : ci-macos-x64
37+ architecture : X64
38+ home_dir : /Users/buildbot
39+ Windows :
40+ imageName : Windows_NT
41+ preset_name : ci-windows-v143
42+ architecture : X64
43+ home_dir : C:/Users/buildbot
44+ Linux :
45+ imageName : Linux
46+ preset_name : ci-linux-x64
47+ architecture : X64
48+ home_dir : /home/buildbot
49+
50+ pool :
51+ name : BlueQuartz Self Hosted
52+ demands :
53+ - Agent.OS -equals $(imageName)
54+ - BQ.DREAM3DNX
55+ - BQ.COMMERCIAL
56+ - Agent.OSArchitecture -equals $(architecture)
57+
58+ workspace :
59+ clean : all
60+
61+ timeoutInMinutes : 120
62+
63+ variables :
64+ simplnx_source_dir : $(Build.Repository.LocalPath)/simplnx
65+ dream3d_data_dir : $(Agent.WorkFolder)/DREAM3D_Data
66+ model_type : Experimental
67+ build_type : Release
68+ simplnx_origin_name : bluequartzsoftware
69+ simplnx_branch_name : develop
70+ simplnx_review_source_dir : $(Build.Repository.LocalPath)/SimplnxReview
71+
72+
73+ steps :
74+ - checkout : self
75+ submodules : true
76+ - checkout : simplnx
77+ submodules : true
78+
79+ - powershell : |
80+ try {
81+ echo System.PullRequest.SourceBranch=$(System.PullRequest.SourceBranch)
82+ echo System.PullRequest.PullRequestNumber=$(System.PullRequest.PullRequestNumber)
83+ } catch {
84+ }
85+ echo Build.SourceBranchName=$(Build.SourceBranchName)
86+ echo Build.Repository.Name=$(Build.Repository.Name)
87+ echo Build.Repository.Uri=$(Build.Repository.Uri)
88+ echo Build.Repository.LocalPath=$(Build.Repository.LocalPath)
89+ echo Build.BuildNumber=$(Build.BuildNumber)
90+ echo Agent.WorkFolder=$(Agent.WorkFolder)
91+ echo Agent.OS=$(Agent.OS)
92+ echo Agent.OSArchitecture=$(Agent.OSArchitecture)
93+ echo preset_name=$(preset_name)
94+ displayName: 'Dump Azure Variables'
95+
96+ # ==================================================================================================
97+ # Change from the default https checkout to a git remote with ssh
98+ # The build bots have appropriate ssh keys to make this work
99+ # This also allows CDash to get the real git commit that we are on for SimplnxReview
100+ # ==================================================================================================
101+ - powershell : |
102+ cd $(Build.Repository.LocalPath)/simplnx
103+ git config core.sshCommand "ssh -i $(home_dir)/.ssh/id_rsa"
104+ git remote rename origin azure
105+ git remote add origin ssh://git@github.com/$(simplnx_origin_name)/simplnx
106+ git fetch origin
107+ displayName: Update Simplnx Repo
108+
109+ - powershell : |
110+ cd $(Build.Repository.LocalPath)/SimplnxReview
111+ git config core.sshCommand "ssh -i $(home_dir)/.ssh/id_rsa"
112+ git remote rename origin azure
113+ git remote add origin ssh://git@github.com/bluequartzsoftware/SimplnxReview
114+ git fetch origin
115+ $sourceBranch = "$(Build.SourceBranchName)"
116+ if ($sourceBranch -eq "develop") {
117+ git checkout -b $(Build.SourceBranchName) --track origin/$(Build.SourceBranchName)
118+ } else {
119+ git checkout -b $(System.PullRequest.SourceBranch) --track origin/$(System.PullRequest.SourceBranch)
120+ }
121+ displayName: Update SimplnxReview Repo
122+
123+ # ==================================================================================================
124+ # CDash Section:
125+ # In this section we are going to call `ctest` 3 times in order to separate out the output from
126+ # each CDash stage: Configure,Update :: Build :: Testing
127+ # This makes the output easier to parse through for the testing.
128+ # ==================================================================================================
129+
130+ - powershell : |
131+ cd $(Build.BinariesDirectory)
132+ ctest -VV -DCTEST_SOURCE_DIR=$(simplnx_source_dir) -DSIMPLNX_EXTRA_PLUGINS="SimplnxReview" -DSIMPLNX_PLUGIN_ENABLE_SimplnxReview=ON -DSIMPLNX_SimplnxReview_SOURCE_DIR=$(simplnx_review_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 $(Build.Repository.LocalPath)/SimplnxReview/.azure/azure_ci_configure.cmake
133+ displayName: CDash Update/Configure
134+
135+ - powershell : |
136+ cd $(Build.BinariesDirectory)
137+ ctest -VV -DCTEST_SOURCE_DIR=$(simplnx_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 $(Build.Repository.LocalPath)/SimplnxReview/.azure/azure_ci_build.cmake
138+ displayName: CDash Build
139+
140+ - powershell : |
141+ cd $(Build.BinariesDirectory)
142+ ctest -VV -DCTEST_SOURCE_DIR=$(simplnx_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 $(Build.Repository.LocalPath)/SimplnxReview/.azure/azure_ci_test.cmake
143+ displayName: CDash Test
144+
145+ # ==================================================================================================
146+ # CPack Section
147+ # ==================================================================================================
148+ - powershell : |
149+ cd $(Build.BinariesDirectory)
150+ cpack -C $(build_type) --verbose
151+ displayName: Packing Commercial NX
152+
153+ # ==================================================================================================
154+ # Publish Test Results
155+ # ==================================================================================================
156+ - task : PublishTestResults@2
157+ inputs :
158+ testResultsFormat : CTest
159+ testResultsFiles : $(Build.BinariesDirectory)/Testing/*/Test.xml
160+ testRunTitle : CTest_$(Agent.Name)_$(Agent.OS)
161+ failTaskOnFailedTests : true
162+ displayName : Publish Commercial Test Results
163+
164+ # - script: |
165+ # cmake -S $(simplnx_source_dir) -B $(Build.BinariesDirectory)-Free -G Ninja -DDREAM3D_ENABLE_DOCUMENTATION=OFF -DDREAM3D_ENABLE_VISUALIZATION=OFF -DCMAKE_BUILD_TYPE:STRING=$(build_type) -DDREAM3D_DATA_DIR=$(dream3d_data_dir) -C $(Agent.WorkFolder)/NX.cmake -DSIMPLNX_EXTRA_PLUGINS="Core;ITKImageProcessing;OrientationAnalysis" -DCTEST_BUILD_NAME:STRING="NX-Free-$(Agent.MachineName)-$(Agent.OS)-$(Build.SourceBranchName)_$(Build.BuildNumber)"
166+ # displayName: Configure Free DREAM3D
167+
168+ # - script: |
169+ # cmake --build $(Build.BinariesDirectory)-Free --config $(build_type) --target all
170+ # displayName: Build Free DREAM3D
171+
172+ # - script: |
173+ # cd $(Build.BinariesDirectory)-Free
174+ # cpack -C $(build_type) --verbose
175+ # continueOnError: false
176+ # displayName: Packing Free DREAM3D
177+
178+ # - script: |
179+ # cd $(Build.BinariesDirectory)-Free
180+ # ctest -C $(build_type) -D Experimental --timeout 7200 -DCTEST_SITE:STRING=$(Agent.MachineName).bluequartz.net -Ddashboard_source_name:STRING=DREAM3D
181+ # continueOnError: true
182+ # displayName: Testing Free DREAM3D
183+
184+ # - task: PublishTestResults@2
185+ # inputs:
186+ # testResultsFormat: CTest
187+ # testResultsFiles: $(Build.BinariesDirectory)-Free/Testing/*/Test.xml
188+ # testRunTitle: CTest_$(Agent.Name)_$(Agent.OS)
189+ # failTaskOnFailedTests: true
190+ # displayName: Publish Free Test Results
191+
0 commit comments