Skip to content

COMP: Minimize redundant Azure CI matrix (issue #6163)#6164

Merged
hjmjohnson merged 4 commits intoInsightSoftwareConsortium:mainfrom
hjmjohnson:ci-minimize-redundancy
May 1, 2026
Merged

COMP: Minimize redundant Azure CI matrix (issue #6163)#6164
hjmjohnson merged 4 commits intoInsightSoftwareConsortium:mainfrom
hjmjohnson:ci-minimize-redundancy

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

Implements the consolidation proposed in #6163: shrinks the per-PR Azure build matrix from 7 jobs to 3 while preserving every coverage axis (OS, arch, Python wrapping, legacy-removed, C++20, shared/static, MSVC v142/v143).

Three small commits, each independently revertible:

  1. COMP: Drop redundant non-Python Windows and macOS Azure CI lanes — deletes AzurePipelinesWindows.yml and AzurePipelinesMacOS.yml (strict subsets of their *Python siblings), moves BUILD_SHARED_LIBS=ON onto AzurePipelinesMacOSPython.yml to preserve the macOS shared-lib axis, and bumps that lane's Python from 3.10 → 3.12.
  2. COMP: Consolidate Linux Azure CI to a single LegacyRemoved+Cxx20 lane — drops the default Linux job from AzurePipelinesLinux.yml (covered by LinuxPython) and merges the orthogonal LinuxLegacyRemoved and LinuxCxx20 jobs into one ubuntu-24.04 lane carrying both ITK_LEGACY_REMOVE=ON and CMAKE_CXX_STANDARD=20.
  3. COMP: Switch Linux/Windows Python Azure CI from MinSizeRel to Release — Release matches what users actually ship. The single surviving MinSizeRel lane is the consolidated LinuxLegacyRemovedCxx20 canary.

Closes #6163 (or addresses it, depending on whether the maintainers want the optional Debug lane added in a follow-up).

Surviving Azure jobs after this PR
File Job OS Build Python Notable flags
AzurePipelinesLinux.yml LinuxLegacyRemovedCxx20 ubuntu-24.04 MinSizeRel ITK_LEGACY_REMOVE=ON, CMAKE_CXX_STANDARD=20
AzurePipelinesLinuxPython.yml Linux ubuntu-22.04 Release 3.10 ITK_WRAP_PYTHON=ON
AzurePipelinesMacOSPython.yml macOS macos-15 (arm64) Release 3.12 BUILD_SHARED_LIBS=ON, ITK_WRAP_PYTHON=ON
AzurePipelinesWindowsPython.yml Windows windows-2022 Release 3.11 BUILD_SHARED_LIBS=ON, ITK_WRAP_PYTHON=ON
AzurePipelinesBatch.yml (unchanged) windows-2022 Release MSVC v142 + v143, integration only

GitHub Actions workflows (arm.yml, pixi.yml, pre-commit.yml) are not touched by this PR.

Coverage axis check (before vs after)
Axis Before After
Linux x86_64 yes (3 jobs) yes (2 jobs: legacy+C++20 canary, Python)
Linux arm64 GH arm.yml GH arm.yml (unchanged)
macOS arm64 yes (2 Az jobs + GH) yes (1 Az job + GH)
macOS x86_64 (Rosetta) GH arm.yml GH arm.yml (unchanged)
Windows x86_64 MSVC v143 yes (2 jobs + batch) yes (1 job + batch)
Windows x86_64 MSVC v142 batch only batch only (unchanged)
Python wrapping 3 OSes × 1 version each 3 OSes × staggered (3.10/3.11/3.12)
ITK_LEGACY_REMOVE=ON 1 lane 1 lane (merged)
CMAKE_CXX_STANDARD=20 1 lane 1 lane (merged)
BUILD_SHARED_LIBS=ON Linux
BUILD_SHARED_LIBS=ON macOS yes (Az MacOS) yes (now on MacOSPython)
BUILD_SHARED_LIBS=ON Windows yes yes (unchanged)
MinSizeRel canary 5 lanes 1 lane (LinuxLegacyRemovedCxx20)

Test plan

  • Azure DevOps PR triggers run all 4 surviving Azure pipelines green.
  • GitHub Actions arm.yml, pixi.yml, pre-commit.yml unchanged and green.
  • No regression in ITK_LEGACY_REMOVE=ON or C++20 coverage on the merged lane.
  • macOS shared-lib build succeeds on MacOSPython with BUILD_SHARED_LIBS=ON.
  • Verify with maintainers that any Azure DevOps pipeline definitions referencing the deleted YAML files (AzurePipelinesWindows.yml, AzurePipelinesMacOS.yml) are also retired on the Azure side.

@github-actions github-actions Bot added type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct labels Apr 28, 2026
Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on a glance.

@hjmjohnson hjmjohnson marked this pull request as ready for review April 28, 2026 20:06
@greptile-apps

This comment was marked as resolved.

@hjmjohnson hjmjohnson force-pushed the ci-minimize-redundancy branch from 3a6ca83 to b1781b1 Compare April 28, 2026 21:59
@hjmjohnson
Copy link
Copy Markdown
Member Author

Per request: enabled BUILD_EXAMPLES:BOOL=ON on the consolidated LinuxLegacyRemovedCxx20 lane (b1781b1). This is the only non-Python Azure build remaining after the consolidation, so adding examples coverage there gives one comprehensive non-Python lane that exercises legacy-removal + C++20 + examples without slowing down the Python wrapping jobs.

Note: dzenanz's approval will need to be re-confirmed after the force-push since GitHub dismisses approvals on stale heads (configurable, but default for this repo).

@dzenanz
Copy link
Copy Markdown
Member

dzenanz commented Apr 28, 2026

I don't think force-pushes dismiss approvals on this repo. I re-approved it anyway 😄

@hjmjohnson
Copy link
Copy Markdown
Member Author

Known flake: ITK.Linux.Python reported failure but CDash for build 14600 shows 0 compile errors, 0 test failures, 175 tests passed. The 4 compiler warnings tripped itk_common.cmake:628's ci_completed_successfully warning-as-fatal check. Retrying.

/azp run ITK.Linux.Python

@hjmjohnson
Copy link
Copy Markdown
Member Author

Update on the ITK.Linux.Python red — those 4 warnings are real upstream Eigen + GCC -O3 IPA-CP false positives that the MinSizeRel → Release switch in this PR newly exposed. Filed #6166 with the upstream-derived two-line fix (pset1<Packet>(0)pzero(Packet{}) in SelfadjointMatrixVector.h).

This PR (#6164) is blocked on #6166. Once #6166 merges, I'll rebase this branch on main and the LinuxPython lane should turn green.

@hjmjohnson hjmjohnson force-pushed the ci-minimize-redundancy branch from b1781b1 to cfe0ccb Compare April 29, 2026 02:22
@hjmjohnson
Copy link
Copy Markdown
Member Author

Rebased onto #6166 (the upstream-derived Eigen pzero(Packet{}) fix). New HEAD cfe0ccb950; the PR diff now shows 4 commits (Eigen fix + 3 CI consolidation commits). When #6166 merges to main and I rebase again, the duplicate Eigen commit drops out cleanly.

GitHub doesn't allow targeting a fork branch as a PR base, so the base stays main rather than re-pointing to the Eigen branch — the rebase achieves the same effect for CI.

/azp run

@github-actions github-actions Bot added the area:ThirdParty Issues affecting the ThirdParty module label Apr 29, 2026
@hjmjohnson
Copy link
Copy Markdown
Member Author

/azp run ITK.Linux.Python

@hjmjohnson hjmjohnson force-pushed the ci-minimize-redundancy branch from cfe0ccb to bf6e691 Compare April 29, 2026 19:47
@github-actions github-actions Bot removed the area:ThirdParty Issues affecting the ThirdParty module label Apr 29, 2026
@hjmjohnson hjmjohnson force-pushed the ci-minimize-redundancy branch from bf6e691 to 058e4b9 Compare April 30, 2026 00:59
@hjmjohnson
Copy link
Copy Markdown
Member Author

Rebased onto #6173 (COMP: Use pzero() init for Packet locals in SelfadjointMatrixVector loop) at 058e4b97dc to pick up the fix for the GCC -O3 IPA-CP -Wmaybe-uninitialized false positives that this PR's ubuntu-24.04 + C++20 toolchain bump exposes in Modules/ThirdParty/Eigen3/.../SelfadjointMatrixVector.h.

Why the rebase was needed

The 4 warnings on the prior ITK.Linux.Python build (CDash buildid 1124-2153) at SelfadjointMatrixVector.h:231 ('result_90'/'_28' may be used uninitialized) are deterministic and triggered by this PR's toolchain bump, not by anything in this PR's diff itself. PR #6166 fixed the inner-loop accumulators (ptmp2/ptmp3); #6173 extends the same pzero(Packet{}) pattern to the four loop-local Packet loads (A0i, A1i, Bi, Xi) that GCC IPA-CP also flags.

Merge order
  1. Land COMP: Use pzero() init for Packet locals in SelfadjointMatrixVector loop #6173 first.
  2. CI on this PR (now rebased onto COMP: Use pzero() init for Packet locals in SelfadjointMatrixVector loop #6173) should come back green on ITK.Linux.Python.
  3. Land this PR.

@github-actions github-actions Bot added the area:ThirdParty Issues affecting the ThirdParty module label Apr 30, 2026
@hjmjohnson hjmjohnson force-pushed the ci-minimize-redundancy branch from 058e4b9 to c96ede1 Compare April 30, 2026 22:56
@github-actions github-actions Bot removed type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:ThirdParty Issues affecting the ThirdParty module labels Apr 30, 2026
@hjmjohnson hjmjohnson force-pushed the ci-minimize-redundancy branch from c96ede1 to 94cbf36 Compare May 1, 2026 10:09
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request May 1, 2026
The pinned v0.8 (2018-2019) ships an action that builds the Go binary
from source on every CI run.  Each build downloads dependencies from
gopkg.in, which intermittently fails the TLS handshake and aborts the
labeling job.  The failure has been observed across multiple recent
PRs (InsightSoftwareConsortium#5775, InsightSoftwareConsortium#6177, InsightSoftwareConsortium#6164 -- 'Docker build failed with exit code 1' from
'go: gopkg.in/check.v1: net/http: TLS handshake timeout').

srvaroa/labeler ships a pre-built Docker image starting at v1.8.1, so
newer versions skip the Go-compile step entirely.  The maintainer
publishes a floating 'v1' major tag that auto-tracks minor/patch
releases; v1.14.0 is current upstream.

The v1 schema replaces the v0.8-era flat dict-of-rules with a
'version: 1' header + 'labels:' list of {label, title, files, ...}
objects, so .github/labeler.yml is migrated alongside the workflow
bump.  Pattern semantics are unchanged: both v0.8 and v1 use Go's
RE2 regex engine, matching unanchored against PR file paths -- so
existing patterns like 'Modules/IO/*' (which is regex 'Modules/IO/'
followed by zero-or-more '/') continue to behave the same in v1.
hjmjohnson added 3 commits May 1, 2026 11:39
A Python-wrapping build is a strict superset of the same OS+arch
non-Python build. AzurePipelinesWindows and AzurePipelinesMacOS were
duplicating coverage already provided by AzurePipelinesWindowsPython
and AzurePipelinesMacOSPython respectively.

Move BUILD_SHARED_LIBS=ON onto the macOS Python lane so the macOS
shared-library build coverage previously carried by AzurePipelinesMacOS
is preserved on the surviving job. Bump that job's Python to 3.12 to
stagger Python-version coverage across surviving Python lanes.

Part of issue InsightSoftwareConsortium#6163 (CI matrix consolidation).
Three jobs in AzurePipelinesLinux.yml previously covered overlapping
ground:
- Linux: default ubuntu-22.04 / C++17 / no-Python (strict subset of
  AzurePipelinesLinuxPython)
- LinuxLegacyRemoved: ubuntu-22.04 / ITK_LEGACY_REMOVE=ON
- LinuxCxx20: ubuntu-24.04 / CMAKE_CXX_STANDARD=20

Drop the Linux job entirely (covered by LinuxPython) and merge the two
remaining lanes into a single LinuxLegacyRemovedCxx20 job on
ubuntu-24.04 carrying both ITK_LEGACY_REMOVE=ON and
CMAKE_CXX_STANDARD=20. The two axes are orthogonal (legacy-API surface
vs language-conformance) and rarely need bisected isolation in CI.

Part of issue InsightSoftwareConsortium#6163 (CI matrix consolidation).
MinSizeRel (-Os) tests an optimization profile ITK users overwhelmingly
do not ship; users build Release (-O3) or RelWithDebInfo. The historical
reason for MinSizeRel on hosted runners (small artifacts on free-tier
images) no longer applies on current Azure agents.

Switch the surviving Python wrapping jobs to Release so PR signal
matches what users compile. The remaining MinSizeRel canary lives on
the consolidated LinuxLegacyRemovedCxx20 job, which retains coverage
that the unusual optimizer config still builds.

Part of issue InsightSoftwareConsortium#6163 (CI matrix consolidation).
@hjmjohnson hjmjohnson force-pushed the ci-minimize-redundancy branch from 94cbf36 to 8b8a0c8 Compare May 1, 2026 16:40
@hjmjohnson
Copy link
Copy Markdown
Member Author

Force-pushed 94cbf361dc → 8b8a0c8215. Two changes from the prior tip:

  1. Dropped the third-party Eigen 5.0.1 update prerequisite stack. This PR is now exactly 4 commits on top of fresh upstream/main, no eigen vendor-tree churn. The PR's actual scope -- consolidating the Azure CI matrix per CI: minimize redundant build matrix to reduce cache pressure and flake exposure #6163 -- was conflated with the eigen update because the C++20 + ubuntu-24.04 toolchain bump exposed pre-existing GCC IPA-CP warnings in SelfadjointMatrixVector.h. Splitting them lets each PR carry its own minimum diff.

  2. Replaced the "patch vendored Eigen" approach with CTestCustom dashboard suppressions. Following the precedent set in be77e85 on the eigen-5.0.1-update branch, the warnings are silenced via CMake/CTestCustom.cmake.in regex patterns rather than touching the third-party tree. Patches to Modules/ThirdParty/Eigen3/... are overwritten by every vendor sync; CTestCustom belongs to ITK and survives.

Patterns added
# MSVC "warning C####:" form (Eigenvalues/Tridiagonalization.h C4750 etc.)
".*Modules.ThirdParty.Eigen3.*warning C[0-9]+:.*"
# GCC continuation "note:" lines from Eigen paths
# (the IPA-CP -Wmaybe-uninitialized warnings in
# Core/products/SelfadjointMatrixVector.h are followed by a "note:
# by argument N of type ... declared here" line that some reporters
# count separately)
".*Modules/ThirdParty/Eigen3/.*note:.*"

The pre-existing ".*Modules/ThirdParty/Eigen3/.*warning:.*" line already covered GCC primary warnings on Linux / ARM / macOS; the two new patterns extend coverage to MSVC (Windows) and to the GCC 'note:' continuation lines.

Final commit list
8b8a0c8215  COMP: Suppress Eigen3 IPA-CP / MSVC warnings via CTestCustom
20cffb22d6  COMP: Switch Linux/Windows Python Azure CI from MinSizeRel to Release
5f5dbdb1b2  COMP: Consolidate Linux Azure CI to a single LegacyRemoved+Cxx20 lane
2e172fa7d2  COMP: Drop redundant non-Python Windows and macOS Azure CI lanes

Four commits on top of fresh upstream/main. pre-commit run --all-files clean. CI re-firing on 8b8a0c8215.

Add two CTestCustom warning-exception patterns alongside the existing
".*Modules/ThirdParty/Eigen3/.*warning:.*" line so the dashboard
ignores the noise from vendored Eigen on all toolchains:

  * MSVC "warning C####:" form (e.g. C4750 from Eigenvalues/
    Tridiagonalization.h, 'function with _alloca() inlined into a
    loop') -- the existing 'warning:' regex requires a literal colon
    directly after 'warning', which MSVC's 'warning C4750:' format
    does not satisfy.
  * GCC continuation 'note:' lines from Eigen paths.  GCC IPA-CP
    cloning at -O3 + C++20 + ubuntu-24.04 / GCC 13/14 (the toolchain
    introduced by this PR's CI consolidation) produces -Wmaybe-
    uninitialized false positives in Core/products/SelfadjointMatrixVector.h;
    each warning is followed by a multi-line 'note: by argument N of
    type ... declared here' continuation that some reporters count
    separately.

Suppressing in CTestCustom rather than patching vendored Eigen
follows the project pattern set by be77e85 (the MSVC C4750 fix on the
eigen-5.0.1-update branch); patches to the third-party tree get
overwritten on every Eigen vendor sync, while CTestCustom belongs to
ITK and survives those syncs cleanly.
@hjmjohnson hjmjohnson force-pushed the ci-minimize-redundancy branch from 8b8a0c8 to 5a29ced Compare May 1, 2026 16:55
@hjmjohnson
Copy link
Copy Markdown
Member Author

Force-pushed 8b8a0c8215 → 5a29cedf9b adding three more pre-emptive CTestCustom patterns for the macOS / Apple clang -Wmaybe-uninitialized burst that historical CI logs (Darwin-Build14746-PR6164-ci-minimize-redundancy-Python, 199 warnings) showed when the eigen-5.0.1-update commits were on the branch.

What's covered now
Pattern Triggered by Platform
(existing) .*Modules/ThirdParty/Eigen3/.*warning:.* GCC primary warnings in vendored Eigen Linux / ARM / GCC
.*Modules.ThirdParty.Eigen3.*warning C[0-9]+:.* MSVC warning C####: form (Tridiagonalization.h C4750) Windows
.*Modules/ThirdParty/Eigen3/.*note:.* GCC note: continuation lines ("by argument 3 of type ... declared here") Linux / ARM / GCC
warning: unknown warning group '-Wmaybe-uninitialized' Apple clang on macOS — primary line of 4-line burst per ITK_GCC_SUPPRESS_Wmaybe_uninitialized site macOS
note: expanded from macro 'ITK_GCC_SUPPRESS_Wmaybe_uninitialized' Apple clang macro-expansion note line macOS
note: expanded from macro 'ITK_PRAGMA' Apple clang inner macro-expansion note line macOS

The three new patterns are deliberately narrow -- a real -Wunknown-warning-option against any other warning group (or a non-ITK ITK_PRAGMA use that emits a real diagnostic) still surfaces normally.

Why pre-emptive

The four warning categories all originate from the eigen-5.0.1-update prerequisite stack that this PR no longer carries. On the rebased tip none of them fire today (the older Eigen tree on upstream/main already has pzero(Packet{}) accumulators in SelfadjointMatrixVector.h, has no C4750 trigger sites in Tridiagonalization.h, and there is no ITK_GCC_SUPPRESS_Wmaybe_uninitialized macro to expand on clang). Each will return as soon as the eigen 5.0.1 update lands separately via PR #6176. Adding the suppressions now means PR #6176 doesn't have to ship its own dashboard fix and #6173's pzero-init follow-up becomes optional rather than required.

Final commit list
5a29cedf9b  COMP: Suppress Eigen3 IPA-CP / MSVC warnings via CTestCustom
20cffb22d6  COMP: Switch Linux/Windows Python Azure CI from MinSizeRel to Release
5f5dbdb1b2  COMP: Consolidate Linux Azure CI to a single LegacyRemoved+Cxx20 lane
2e172fa7d2  COMP: Drop redundant non-Python Windows and macOS Azure CI lanes

hjmjohnson added a commit that referenced this pull request May 1, 2026
Follow-up to #6166. On ubuntu-24.04 + GCC 13/14 + C++20 (the toolchain
that #6164 introduces), GCC -O3 IPA-CP emits additional false-positive
-Wmaybe-uninitialized at the outer selfadjoint_product_impl::run()
call site, attributing the read to "argument 3 of type const float *"
of the cloned selfadjoint_matrix_vector_product::run.constprop.isra.

Add pzero(Packet{}) declare-then-assign init for the four Packet
locals (A0i, A1i, Bi, Xi) loaded from the lhs/rhs/res pointers inside
the inner loop. Mirrors the #6166 ptmp2/ptmp3 pattern: pzero() is
visible to GCC's IPA-CP as a definite zero starting state, while a
bare declaration plus subsequent ploadu/pload is opaque and lets the
optimizer trace an uninit path through cloned variants.
@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct labels May 1, 2026
@hjmjohnson hjmjohnson merged commit 35fc0aa into InsightSoftwareConsortium:main May 1, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: minimize redundant build matrix to reduce cache pressure and flake exposure

2 participants