@@ -32,7 +32,10 @@ variables:
3232 CCACHE_BASEDIR : $(Build.SourcesDirectory)
3333 CCACHE_COMPILERCHECK : content
3434 CCACHE_NOHASHDIR : ' true'
35- CCACHE_NODIRECT : ' 1'
35+ CCACHE_SLOPPINESS : pch_defines,time_macros
36+ # NOTE: CCACHE_NODIRECT intentionally removed — direct mode is the
37+ # fast path (97%+ hit rate on ARM CI). NODIRECT forced preprocessor
38+ # mode on every file, killing cache efficiency.
3639jobs :
3740- job : Linux
3841 timeoutInMinutes : 0
@@ -76,122 +79,36 @@ jobs:
7679
7780 - task : Cache@2
7881 inputs :
79- key : ' "ccache" | "$(Agent.OS)" | "$(Build.SourceVersion)"'
82+ key : ' "ccache-v5 " | "$(Agent.OS)" | "Linux " | "$(Build.SourceVersion)"'
8083 restoreKeys : |
81- "ccache" | "$(Agent.OS)"
84+ "ccache-v5 " | "$(Agent.OS)" | "Linux "
8285 path : $(CCACHE_DIR)
8386 displayName : ' Restore ccache'
8487
85- - bash : ccache --evict-older-than 7d
86- displayName : ' Evict old ccache entries'
87-
88- - bash : |
89- cat > dashboard.cmake << EOF
90- set(CTEST_BUILD_CONFIGURATION "MinSizeRel")
91- set(CTEST_CMAKE_GENERATOR "Ninja")
92- set(dashboard_cache "
93- BUILD_SHARED_LIBS:BOOL=OFF
94- BUILD_EXAMPLES:BOOL=OFF
95- ITK_WRAP_PYTHON:BOOL=OFF
96- ITK_USE_CCACHE:BOOL=ON
97- CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
98- CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
99- ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
100- ")
101- set(CTEST_TEST_ARGS EXCLUDE_LABEL BigIO) # Disabled to conserve disk space
102- include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
103- EOF
104- cat dashboard.cmake
105- workingDirectory: $(Agent.BuildDirectory)/ITK-dashboard
106- displayName: 'Configure CTest script'
107-
10888 - bash : |
10989 set -x
110-
111- c++ --version
112- cmake --version
113-
114- ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -V -j 2
115- displayName: 'Build and test'
116- env:
117- CTEST_OUTPUT_ON_FAILURE: 1
118- CCACHE_MAXSIZE: 2.4G
119-
120- - bash : python3 $(Build.SourcesDirectory)/Testing/ContinuousIntegration/report_build_diagnostics.py $(Build.SourcesDirectory)-build
121- condition : succeededOrFailed()
122- displayName : ' Report build warnings and errors'
123-
124- - script : |
125- ci_addons ctest_junit_formatter $(Build.SourcesDirectory)-build > $(Agent.BuildDirectory)/JUnitTestResults.xml
126- condition: succeededOrFailed()
127- displayName: 'Format CTest output in JUnit format'
128-
129- - task : PublishTestResults@2
130- inputs :
131- testResultsFiles : " $(Agent.BuildDirectory)/JUnitTestResults.xml"
132- testRunTitle : ' CTest $(Agent.OS)'
133- condition : succeededOrFailed()
134- displayName : ' Publish test results'
135-
136- - job : LinuxLegacyRemoved
137- timeoutInMinutes : 0
138- cancelTimeoutInMinutes : 300
139- pool :
140- vmImage : ubuntu-22.04
141- steps :
142- - checkout : self
143- clean : true
144- fetchDepth : 5
145- - bash : |
146- set -x
147- if [ -n "$(System.PullRequest.SourceCommitId)" ]; then
148- git checkout $(System.PullRequest.SourceCommitId)
149- fi
150- displayName: 'Checkout pull request HEAD'
151-
152- - bash : |
153- set -x
154- sudo pip3 install ninja
155- sudo apt-get update
156- sudo apt-get install -y python3-venv ccache locales
157- sudo locale-gen de_DE.UTF-8
158- sudo python3 -m pip install lxml scikit-ci-addons
159- displayName: 'Install dependencies'
160-
161- - bash : |
162- set -x
163- git clone -b dashboard --single-branch https://github.com/InsightSoftwareConsortium/ITK.git ITK-dashboard
164-
165- curl -L https://github.com/InsightSoftwareConsortium/ITK/releases/download/v$(ExternalDataVersion)/InsightData-$(ExternalDataVersion).tar.gz -O
166- cmake -E tar xfz InsightData-$(ExternalDataVersion).tar.gz
167- cmake -E rename InsightToolkit-$(ExternalDataVersion)/.ExternalData/CID $(Build.SourcesDirectory)/.ExternalData/CID
168- workingDirectory: $(Agent.BuildDirectory)
169- displayName: 'Download dashboard script and testing data'
170-
171- - task : Cache@2
172- inputs :
173- key : ' "ccache" | "$(Agent.OS)" | "$(Build.SourceVersion)"'
174- restoreKeys : |
175- "ccache" | "$(Agent.OS)"
176- path : $(CCACHE_DIR)
177- displayName : ' Restore ccache'
178-
179- - bash : ccache --evict-older-than 7d
180- displayName : ' Evict old ccache entries'
90+ ccache --zero-stats
91+ ccache --evict-older-than 7d
92+ ccache --show-config
93+ displayName: 'ccache config and maintenance'
18194
18295 - bash : |
18396 cat > dashboard.cmake << EOF
18497 set(CTEST_BUILD_CONFIGURATION "MinSizeRel")
18598 set(CTEST_CMAKE_GENERATOR "Ninja")
186- set(BUILD_NAME_SUFFIX "LegacyRemoved")
18799 set(dashboard_cache "
188- ITK_LEGACY_REMOVE:BOOL=ON
189100 BUILD_SHARED_LIBS:BOOL=OFF
190101 BUILD_EXAMPLES:BOOL=OFF
191102 ITK_WRAP_PYTHON:BOOL=OFF
192103 CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
193104 CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
194105 ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
106+ ITK_BUILD_DEFAULT_MODULES:BOOL=OFF
107+ Module_ITKCommon:BOOL=ON
108+ Module_ITKIOImageBase:BOOL=ON
109+ Module_ITKIONIFTI:BOOL=ON
110+ Module_ITKIOPNG:BOOL=ON
111+ Module_ITKTestKernel:BOOL=ON
195112 ")
196113 set(CTEST_TEST_ARGS EXCLUDE_LABEL BigIO) # Disabled to conserve disk space
197114 include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
@@ -212,6 +129,10 @@ jobs:
212129 CTEST_OUTPUT_ON_FAILURE: 1
213130 CCACHE_MAXSIZE: 2.4G
214131
132+ - bash : ccache --show-stats --verbose
133+ condition : always()
134+ displayName : ' ccache stats'
135+
215136 - bash : python3 $(Build.SourcesDirectory)/Testing/ContinuousIntegration/report_build_diagnostics.py $(Build.SourcesDirectory)-build
216137 condition : succeededOrFailed()
217138 displayName : ' Report build warnings and errors'
@@ -224,98 +145,6 @@ jobs:
224145 - task : PublishTestResults@2
225146 inputs :
226147 testResultsFiles : " $(Agent.BuildDirectory)/JUnitTestResults.xml"
227- testRunTitle : ' CTest $(Agent.OS) LegacyRemoved '
148+ testRunTitle : ' CTest $(Agent.OS)'
228149 condition : succeededOrFailed()
229150 displayName : ' Publish test results'
230-
231- - job : LinuxCxx20
232- timeoutInMinutes : 0
233- cancelTimeoutInMinutes : 300
234- pool :
235- vmImage : ubuntu-24.04
236- steps :
237- - checkout : self
238- clean : true
239- fetchDepth : 5
240- - bash : |
241- set -x
242- if [ -n "$(System.PullRequest.SourceCommitId)" ]; then
243- git checkout $(System.PullRequest.SourceCommitId)
244- fi
245- displayName: "Checkout pull request HEAD"
246- - task : UsePythonVersion@0
247- inputs :
248- versionSpec : " 3.10"
249- architecture : " x64"
250- - bash : |
251- set -x
252- sudo pip3 install ninja
253- sudo apt-get update
254- sudo apt-get install -y python3-venv ccache locales
255- sudo locale-gen de_DE.UTF-8
256- sudo python3 -m pip install lxml scikit-ci-addons
257- displayName: "Install dependencies"
258- - bash : |
259- set -x
260- git clone -b dashboard --single-branch https://github.com/InsightSoftwareConsortium/ITK.git ITK-dashboard
261- curl -L https://github.com/InsightSoftwareConsortium/ITK/releases/download/v$(ExternalDataVersion)/InsightData-$(ExternalDataVersion).tar.gz -O
262- cmake -E tar xfz InsightData-$(ExternalDataVersion).tar.gz
263- cmake -E rename InsightToolkit-$(ExternalDataVersion)/.ExternalData/CID $(Build.SourcesDirectory)/.ExternalData/CID
264- workingDirectory: $(Agent.BuildDirectory)
265- displayName: "Download dashboard script and testing data"
266- - task : Cache@2
267- inputs :
268- key : ' "ccache" | "$(Agent.OS)" | "$(Build.SourceVersion)"'
269- restoreKeys : |
270- "ccache" | "$(Agent.OS)"
271- path : $(CCACHE_DIR)
272- displayName : ' Restore ccache'
273-
274- - bash : ccache --evict-older-than 7d
275- displayName : ' Evict old ccache entries'
276-
277- - bash : |
278- cat > dashboard.cmake << EOF
279- set(CTEST_BUILD_CONFIGURATION "MinSizeRel")
280- set(CTEST_CMAKE_GENERATOR "Ninja")
281- set(BUILD_NAME_SUFFIX "Cxx20")
282- set(dashboard_cache "
283- CMAKE_CXX_STANDARD:STRING=20
284- CMAKE_CXX_STANDARD_REQUIRED:BOOL=ON
285- BUILD_SHARED_LIBS:BOOL=OFF
286- BUILD_EXAMPLES:BOOL=OFF
287- ITK_WRAP_PYTHON:BOOL=OFF
288- CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
289- CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
290- ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
291- ")
292- set(CTEST_TEST_ARGS EXCLUDE_LABEL BigIO) # Disabled to conserve disk space
293- include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
294- EOF
295- cat dashboard.cmake
296- workingDirectory: $(Agent.BuildDirectory)/ITK-dashboard
297- displayName: "Configure CTest script"
298- - bash : |
299- set -x
300- c++ --version
301- cmake --version
302- ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -V -j 2
303- displayName: "Build and test"
304- env:
305- CTEST_OUTPUT_ON_FAILURE: 1
306- CCACHE_MAXSIZE: 2.4G
307-
308- - bash : python3 $(Build.SourcesDirectory)/Testing/ContinuousIntegration/report_build_diagnostics.py $(Build.SourcesDirectory)-build
309- condition : succeededOrFailed()
310- displayName : ' Report build warnings and errors'
311-
312- - script : |
313- ci_addons ctest_junit_formatter $(Build.SourcesDirectory)-build > $(Agent.BuildDirectory)/JUnitTestResults.xml
314- condition: succeededOrFailed()
315- displayName: "Format CTest output in JUnit format"
316- - task : PublishTestResults@2
317- inputs :
318- testResultsFiles : " $(Agent.BuildDirectory)/JUnitTestResults.xml"
319- testRunTitle : " CTest $(Agent.OS) Cxx20"
320- condition : succeededOrFailed()
321- displayName : " Publish test results"
0 commit comments