Skip to content

COMP: Restore release-4.14 CI on current hosted agent images#6440

Merged
hjmjohnson merged 7 commits into
InsightSoftwareConsortium:release-4.14from
hjmjohnson:fix-release-4.14-ci
Jun 14, 2026
Merged

COMP: Restore release-4.14 CI on current hosted agent images#6440
hjmjohnson merged 7 commits into
InsightSoftwareConsortium:release-4.14from
hjmjohnson:fix-release-4.14-ci

Conversation

@hjmjohnson

@hjmjohnson hjmjohnson commented Jun 12, 2026

Copy link
Copy Markdown
Member

Restore release-4.14 CI: the six Azure pipelines requested hosted agent images retired years ago (ubuntu-16.04, macOS 10.13, vs2017-win2016) and every job died at agent allocation. Re-based on the current main-branch CI using non-expiring ubuntu-latest / macos-latest / windows-latest pools, plus a minimal Read the Docs stub so the docs/readthedocs.org:itk check can pass. Unblocks #6437 and follow-on toolchain-compatibility PRs (requested by @dzenanz in #6437).

What changed and why
  • vmImages: ubuntu-latest / macos-latest / windows-latest. This historical branch must stay buildable with minimal intervention for as long as possible, so every expiring pin is avoided: no dated image tags (that is exactly how the previous CI died), vcvars64.bat located via vswhere instead of a hardcoded Visual Studio version path, and UsePythonVersion: 3.x rather than a minor version that will leave the tool cache.
  • Warnings suppressed (-w / /w): the shared dashboard script gates on zero build warnings; ITK 4.14 under GCC 13 emits ~10k warnings that will never be fixed on a maintenance branch that receives build-compatibility fixes only.
  • Python pipelines repurposed: ITK 4.x ITK_WRAP_PYTHON does not build with modern Python; the *.Python pipelines now build a BUILD_SHARED_LIBS=ON C++ variant (suffix -SharedLibs on CDash) so they still add configuration coverage.
  • ccache via Cache@2 on Linux/macOS, mirroring main.
  • Testing data: unchanged 4.13.2 release tarball + MD5 object store (the era-correct ExternalData layout).
  • Read the Docs: minimal Sphinx stub (.readthedocs.yml + one-page Documentation/docs/) identifying the maintenance branch and pointing at https://docs.itk.org/.
Local validation

Ran the exact CI entry point locally on Linux (GCC 13.3, CMake 4.2.1, Ninja) with Azure environment variables mimicked and dashboard_no_submit=1:

ctest -S ITK-dashboard/dashboard.cmake -V -j 24
  • Configure: clean
  • Build: 0 compiler errors, 0 compiler warnings
  • Test: 100% tests passed, 0 tests failed out of 2483
  • ctest -S exit code 0 (the full ci_completed_successfully gate)

Sphinx stub verified with sphinx-build -b html Documentation/docs (clean).

macOS (arm64) and Windows (MSVC 2022) configurations cannot be exercised on this Linux workstation; CI is the first executor for those, by necessity.

Lateral porting to other release branches
Branch Status
release-4.13 Same retired images (ubuntu-16.04 era) — needs the same two commits
release / release-5.4 Already on ubuntu-22.04 (currently valid) — no action
release-3.20 No Azure CI — no action

@github-actions github-actions Bot added type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots area:Python wrapping Python bindings for a class type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Documentation Issues affecting the Documentation module labels Jun 12, 2026
@hjmjohnson hjmjohnson force-pushed the fix-release-4.14-ci branch from d120fea to 4caca67 Compare June 12, 2026 14:59
@hjmjohnson hjmjohnson marked this pull request as ready for review June 12, 2026 15:07
@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Restores the release-4.14 CI by replacing six retired Azure Pipelines hosted images (ubuntu-16.04, macOS 10.13, vs2017-win2016) with ubuntu-latest / macos-latest / windows-latest, and adds a minimal Sphinx stub so the Read the Docs check can pass.

  • Pipeline modernisation: all six pipelines updated with non-expiring pool images, ccache via Cache@2 on Linux/macOS, warnings suppressed (-w / /w) to avoid the zero-warnings gate on modern toolchains, and vswhere used instead of a hard-coded VS 2017 path on Windows.
  • Python pipelines repurposed: because ITK 4.x ITK_WRAP_PYTHON does not build with modern Python, the *.Python pipelines are converted to shared-library C++ builds (BUILD_SHARED_LIBS=ON, suffix -SharedLibs on CDash) so they still add configuration coverage.
  • Read the Docs stub added: .readthedocs.yml + a one-page Documentation/docs/ Sphinx site unblocks the docs/readthedocs.org:itk status check.

Confidence Score: 4/5

Safe to merge — the retired-image blocker is correctly addressed across all six pipelines and the Read the Docs stub is self-contained.

The core goal of un-retiring CI is achieved cleanly. The two findings are minor: the Documentation/* path exclusion misses files one level deeper (e.g. the new Documentation/docs/conf.py), causing unnecessary CI triggers on doc-only commits; and the Windows vswhere loop silently continues if no VS installation is found. Neither blocks restoring a buildable maintenance branch.

The Documentation/* path-exclusion pattern in all six Azure Pipelines YAML files and the vswhere error-handling in both Windows pipelines are the spots worth a second look.

Important Files Changed

Filename Overview
Testing/ContinuousIntegration/AzurePipelinesLinux.yml Updates pool image from retired ubuntu-16.04 to ubuntu-latest, adds ccache via Cache@2, and suppresses warnings with -w; path exclusion uses Documentation/* instead of Documentation/**
Testing/ContinuousIntegration/AzurePipelinesLinuxPython.yml Repurposes Python pipeline to BUILD_SHARED_LIBS C++ variant, updates to ubuntu-latest with ccache, and aligns structure with non-Python Linux pipeline
Testing/ContinuousIntegration/AzurePipelinesMacOS.yml Updates from retired macOS 10.13 to macos-latest, adds Homebrew ccache, switches from Release/shared to MinSizeRel/static build; same Documentation/* exclusion concern
Testing/ContinuousIntegration/AzurePipelinesMacOSPython.yml Repurposes Python pipeline to shared-library C++ variant on macos-latest; fully restructured to match the new standard layout
Testing/ContinuousIntegration/AzurePipelinesWindows.yml Updates from retired vs2017-win2016 to windows-latest; uses vswhere for vcvars64.bat discovery; vswhere silent-failure mode could produce confusing errors
Testing/ContinuousIntegration/AzurePipelinesWindowsPython.yml Repurposes Python pipeline to shared-library C++ build on windows-latest; uses bash step to write dashboard.cmake via Git Bash, then cmd.exe for the build step
.readthedocs.yml New minimal Read the Docs config pinned to ubuntu-22.04 / Python 3.11 with a simple Sphinx build; correctly references the stub conf.py
Documentation/docs/conf.py Minimal Sphinx config (no extensions, alabaster theme) sufficient to satisfy the Read the Docs check
.circleci/config.yml Deleted legacy CircleCI config that used an EOL circleci/python:2.7.16-stretch image; removal is appropriate

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    PR[Push to release branch] --> T{CI Trigger}
    T --> L[Linux static C++ - ubuntu-latest]
    T --> LP[Linux SharedLibs - ubuntu-latest]
    T --> M[macOS static C++ - macos-latest]
    T --> MP[macOS SharedLibs - macos-latest]
    T --> W[Windows static C++ - windows-latest]
    T --> WP[Windows SharedLibs - windows-latest]
    L --> CC1[Cache restore - ccache]
    LP --> CC2[Cache restore - ccache]
    M --> CC3[Cache restore - ccache]
    MP --> CC4[Cache restore - ccache]
    CC1 --> CT1[ctest dashboard.cmake]
    CC2 --> CT2[ctest dashboard.cmake]
    CC3 --> CT3[ctest dashboard.cmake]
    CC4 --> CT4[ctest dashboard.cmake]
    W --> VS[vswhere - vcvars64.bat]
    WP --> VS2[vswhere - vcvars64.bat]
    VS --> CT5[ctest dashboard.cmake]
    VS2 --> CT6[ctest dashboard.cmake]
    CT1 --> CDash[(CDash)]
    CT2 --> CDash
    CT3 --> CDash
    CT4 --> CDash
    CT5 --> CDash
    CT6 --> CDash
    PR --> RTD[Read the Docs - Sphinx stub]
Loading

Reviews (1): Last reviewed commit: "COMP: Remove defunct CircleCI configurat..." | Re-trigger Greptile

Comment thread Testing/ContinuousIntegration/AzurePipelinesLinux.yml
Comment thread Testing/ContinuousIntegration/AzurePipelinesWindows.yml
@github-actions github-actions Bot added area:Core Issues affecting the Core module area:Segmentation Issues affecting the Segmentation module area:ThirdParty Issues affecting the ThirdParty module area:Numerics Issues affecting the Numerics module type:Data Changes to testing data labels Jun 12, 2026
@hjmjohnson hjmjohnson force-pushed the fix-release-4.14-ci branch from 79101f8 to 213a6d4 Compare June 12, 2026 15:51

@thewtex thewtex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💚

@hjmjohnson hjmjohnson force-pushed the fix-release-4.14-ci branch 2 times, most recently from e33a41a to 6884c1a Compare June 12, 2026 17:18
ubuntu-16.04, macOS 10.13, and vs2017-win2016 hosted images have been
removed from Azure Pipelines; every job failed at agent allocation with
'No image label found to route agent pool'.

Re-base the six pipeline definitions on the current main-branch CI,
keeping the 4.13.2 testing-data tarball and the shared dashboard
branch script.

This historical maintenance branch must stay buildable with minimal
intervention for as long as possible, so every expiring pin is
avoided: pools use ubuntu-latest/macos-latest/windows-latest rather
than dated image tags that Azure retires, vcvars64.bat is located
through vswhere instead of a hardcoded Visual Studio version path,
and UsePythonVersion requests '3.x' rather than a minor version that
will leave the tool cache.

Compiler warnings are suppressed with -w//w: the branch receives
build-compatibility fixes only, and the dashboard gate treats any
warning as fatal.

The *Python pipelines build a shared-library C++ configuration instead
of ITK_WRAP_PYTHON, which no longer builds with modern Python.
The readthedocs.org PR check fails on this branch because no RTD
configuration or Sphinx tree exists. Provide a one-page stub that
identifies the maintenance branch and points to current documentation.
The CircleCI job builds in a circleci/python:2.7.16-stretch Docker
image that no longer exists, and the project no longer runs CircleCI;
main removed its configuration long ago.
The MSVC STL removes std::unary_function, std::binary_function,
std::bind2nd, and std::auto_ptr by default as of VS2022 17.8, even in
C++14 mode. Remove the vestigial functor base classes, replace
bind2nd with a lambda, and replace auto_ptr with unique_ptr.

The bundled GDCM CharLS copy relies on auto_ptr ownership-transfer
semantics throughout its codec interfaces; the Windows pipelines
define _HAS_AUTO_PTR_ETC=1 to retain it in vendored code rather than
back-porting the upstream CharLS unique_ptr rewrite.
@hjmjohnson hjmjohnson force-pushed the fix-release-4.14-ci branch from 41b6270 to cb730a5 Compare June 12, 2026 19:41
Modern Apple SDKs define TARGET_OS_MAC via TargetConditionals.h, which
steered pngpriv.h into its classic Mac OS branch and a fatal error:
fp.h was removed with Carbon. The branch is only meant for pre-OS X
compilers (MWERKS, THINK_C, SC); later upstream libpng removed it
entirely.
@hjmjohnson hjmjohnson force-pushed the fix-release-4.14-ci branch 2 times, most recently from 45b50ee to 3bd7c22 Compare June 13, 2026 18:48
@hjmjohnson

Copy link
Copy Markdown
Member Author

Force-pushed one amended commit to fix the failing ITK.Windows dashboard gate. The Linux/macOS jobs and all 2483 tests pass; only the Windows zero-warnings gate was red.

Root cause + fix

VS2022's STL emits STL4037 (C4996) on every std::complex<integer> instantiation. The previous commit silenced _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING in three .cxx TUs, but itkNumericTraits.h declares the integer-complex specializations and is #included by hundreds of TUs — build 16130 still emitted 199 warnings, tripping ci_completed_successfully.

Fix: define the macro project-wide via CMAKE_CXX_FLAGS in AzurePipelinesWindows.yml and AzurePipelinesWindowsPython.yml, alongside the existing /w. The per-TU defines are retained to mirror the upstream fix for non-CI builds.

VS2022's STL emits STL4037 (warning C4996) when std::complex is
instantiated for any type other than float, double, or long double,
which the dashboard gate treats as fatal. The release-4.14
NumericTraits specializations and their tests intentionally exercise
integer complex types.

itkNumericTraits.h declares the std::complex<integer> specializations
and is included by hundreds of translation units, so per-TU
_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING defines cannot cover
every instantiation point (build 16130 still emitted 199 warnings).
Define the macro project-wide via CMAKE_CXX_FLAGS in both Windows CI
pipelines, alongside the existing /w suppression, matching the
maintenance-branch policy of suppressing rather than fixing warnings.
The per-TU defines are retained to mirror upstream (37e4c71 /
0892cd1) for builds outside this CI.
std::remove on the GE5 patient-id string only shifts the kept
characters and returns the new logical end; without erase() the '-'
characters were never stripped. VideoFileWriter::InitializeOutputParameters
called m_Dimensions.empty() (a query whose result was discarded) where
clear() was intended, leaving stale dimensions across invocations.
@hjmjohnson hjmjohnson force-pushed the fix-release-4.14-ci branch from 3bd7c22 to 67001b7 Compare June 13, 2026 21:46
@github-actions github-actions Bot added area:IO Issues affecting the IO module area:Video Issues affecting the Video module labels Jun 13, 2026
@hjmjohnson

Copy link
Copy Markdown
Member Author

Pushed fixes for the 8 residual MSVC warnings that were failing the ITK.Windows dashboard gate (the original 199 C4996 warnings are now clean):

  • C4005 (×3): dropped the redundant per-TU _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING #defines now that the macro is supplied project-wide via CMAKE_CXX_FLAGS (folded into the STL4037 commit).
  • C4858 (×5): fixed two latent discarded-return bugs VS2022 newly diagnoses — itkGE5ImageIO used std::remove without erase() (dashes were never stripped from the patient id) and itkVideoFileWriter called m_Dimensions.empty() where clear() was intended (new BUG: commit).

@thewtex thewtex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💚

@hjmjohnson hjmjohnson merged commit e924b83 into InsightSoftwareConsortium:release-4.14 Jun 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module area:Documentation Issues affecting the Documentation module area:IO Issues affecting the IO module area:Numerics Issues affecting the Numerics module area:Python wrapping Python bindings for a class area:Segmentation Issues affecting the Segmentation module area:ThirdParty Issues affecting the ThirdParty module area:Video Issues affecting the Video module type:Compiler Compiler support or related warnings type:Data Changes to testing data 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.

3 participants