COMP: Switch ITK.Linux CI to Debug + Examples (replaces MinSizeRel)#6281
Conversation
|
@greptile review |
|
| Filename | Overview |
|---|---|
| Testing/ContinuousIntegration/AzurePipelinesLinux.yml | Switches build config from MinSizeRel to Debug, adds RUNS_LONG to test exclusions, bumps CCACHE_MAXSIZE to 6.25G, and introduces a post-build ccache trim via --evict-older-than BUILD_DURATION; a 6-line inline comment violates the repo prose-budget cap. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Restore ccache artifact, ccache-v5 key] --> B[Pre-build: evict entries older than 7d]
B --> C[Record BUILD_START via date +%s]
C --> D[ctest -S dashboard.cmake -V -j 2\nDebug + Examples, exclude BigIO and RUNS_LONG]
D -- exit 0 --> E[Compute BUILD_DURATION]
D -- non-zero, set-eo pipefail exits --> F[Step fails\nFull restored cache saved]
E --> G[ccache evict-older-than BUILD_DURATION\nRemoves entries not accessed during build]
G --> H[exit 0 - trimmed cache saved to artifact]
H --> I[ccache show-stats]
F --> I
Reviews (2): Last reviewed commit: "COMP: Switch ITK.Linux CI to Debug build..." | Re-trigger Greptile
|
Yes! The print_helper compilation error was not detected due to no CI debug builds. Disk space available on the runner may be another blocker, that should be analyzed. |
I'm keeping an eye on this and the cache size. I think disk space will be OK. The DEBUG build should be smaller than a Release build with Python overheads. |
@blowekamp NOTE: ITK.Linux on the current master does catch the print_helper bug! This PR will need to be rebased after the print_helper bug is merged so that it starts with passing tests. |
1486ac5 to
3b9e1cc
Compare
e40f289 to
4449f1b
Compare
|
@blowekamp Disk analysis done, empirically (full Debug+Examples build on
HeadroomAzure-hosted Net: disk is not a blocker. The first real Debug+Examples ITK.Linux run (on the rebased tip, post-#6280) is the final confirmation; will report its result. |
|
@hjmjohnson With the size of the debug object file exceeding the ccache size, is there any benefit to using it for a debug build? |
The first line was misleading: - Build tree: 15 GB --> This includes downloaded test objects, and all intermediate files, not just build files. The ccache size is actually less than 3GB for the compile artifacts, and fits well within the limits to have benefits. |
43930f7 to
abfbc9a
Compare
Repurpose the ITK.Linux pipeline from MinSizeRel to Debug while keeping
BUILD_EXAMPLES=ON, adding per-PR Debug-mode coverage (assert(),
debug-mode template instantiations) without a new pipeline.
Debug semantics are keyed off CMAKE_BUILD_TYPE=Debug (NDEBUG
undefined), not -g. The hosted agent has ~16 GB free; a Debug+Examples
tree with -g overflows it. CMAKE_{C,CXX}_FLAGS_DEBUG=-O1 drops the
debug symbols (the disk hog) and -O0 while keeping every Debug codepath
compiled and exercised; BUILD_SHARED_LIBS=ON further bounds the tree.
* CTEST_BUILD_CONFIGURATION MinSizeRel -> Debug; job/suffix/test-run
renamed *DebugCxx20 so CDash and ccache keys stay partitioned.
* BUILD_SHARED_LIBS ON; CMAKE_{C,CXX}_FLAGS_DEBUG=-O1 (no -g).
* EXCLUDE_LABEL extended to "BigIO|RUNS_LONG" to bound Debug wall time.
* Last-use ccache eviction after build to cap the saved artifact.
* Free the build tree before the post-job Cache@2 save so its tar
has disk headroom.
* itkVTKPolyDataReaderQuadEdgeMeshTest: remove the unused PointType
alias and point variable (unused under ITK_LEGACY_REMOVE).
* itkNrrdVectorImageUnitLabelReadTest: value-initialize 'value';
GCC -O1 reports -Wmaybe-uninitialized because it cannot prove
ExposeMetaData writes it on every path. -O0/MinSizeRel masked it.
4792edf to
490fe44
Compare
Switch the
ITK.LinuxAzure pipeline fromMinSizeReltoDebugwhile keepingBUILD_EXAMPLES=ON, so the per-PR CI matrix gains Debug-build signal without adding a new pipeline. The companion fix for the missing-print_helperDebug regression this surfaces landed via #6280 (merged into the base of this PR); #6279 is the original report.Why this pipeline and not another
The recommendation considered each existing Azure pipeline against three constraints: no new pipelines, no per-PR wall-time regression beyond what the slowest pipeline already incurs, and meaningful new signal.
ITK.Batchis post-merge only (pr: none), so it cannot provide per-PR Debug signal.ITK.Linuxhas the most per-PR wall-time headroom (~15 min median over the last 10 PRs at upstream/main) and is the only non-Python per-PR Azure pipeline available.Debug + Examples on a single pipeline is the minimum-footprint way to add this coverage.
What changed in the YAML
Renaming the job, ccache key, and test-run-title keeps CDash submissions and ccache lookups partitioned cleanly from the prior MinSizeRel history.
ccache sizing and eviction (empirically measured)
CCACHE_MAXSIZEis6.25Gand the post-build step runs an outcome-basedccache --evict-older-than. A full Debug + Examples build (rebased onto upstream/main including the #6280 Debug fix) produces a cache of ≈2.4 GB decimal, leaving ample headroom under the 6.25G cap. ccache refreshes an entry's access timestamp on each hit, so--evict-older-thanonly prunes entries the build did not touch:1dafter a green build (working set known-good, keep lean),4dafter a red build (a fix-and-retry reuses most objects, so retain a wider window rather than forcing a cold rebuild).What is preserved vs. dropped
Preserved:
BUILD_EXAMPLES=ON,ITK_LEGACY_REMOVE=ON,CMAKE_CXX_STANDARD=20,BUILD_SHARED_LIBS=OFF(static),ITK_WRAP_PYTHON=OFF,-j 2parallelism,EXCLUDE_LABEL BigIO(still excluded).Dropped:
MinSizeRelbinary-size monitoring. This rarely surfaces issues that Release does not already expose, and is judged lower-value than per-PR Debug-mode signal (assert()failures, debug iterators, debug-mode template instantiations).Expected wall time
EXCLUDE_LABEL "BigIO|RUNS_LONG"keeps the test long-tail bounded.If wall time consistently exceeds ~75 min, the fallback is
RelWithDebInfo(Debug-lite: keepsassert()macros and debug iterators while compiling at ~1.3x MinSizeRel speed).