Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions .github/workflows/arm.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
name: ITK.Arm64

# WIP(SWIG-4.4.1 pixi-python): disabled so only ITK.Pixi.Python runs; revert this commit to re-enable
on:
push:
branches:
- main
- 'release*'
paths-ignore:
- '*.md'
- LICENSE
- NOTICE
- 'Documentation/**'
- 'Utilities/Debugger/**'
- 'Utilities/ITKv5Preparation/**'
- 'Utilities/Maintenance/**'
- 'Modules/Remote/*.remote.cmake'
pull_request:
paths-ignore:
- '*.md'
- LICENSE
- NOTICE
- 'Documentation/**'
- 'Utilities/Debugger/**'
- 'Utilities/ITKv5Preparation/**'
- 'Utilities/Maintenance/**'
- 'Modules/Remote/*.remote.cmake'

workflow_dispatch:
concurrency:
group: '${{ github.workflow }}@${{ github.head_ref || github.ref }}'
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,9 @@ name: ITK.Doxygen.Warnings

# pull_request intentionally has no paths-ignore: the check always runs, so it
# can safely be made a required status without stranding filtered PRs.
# WIP(SWIG-4.4.1 pixi-python): disabled so only ITK.Pixi.Python runs; revert this commit to re-enable
on:
push:
branches:
- main
- 'release*'
tags:
- 'v*'
paths-ignore:
- '*.md'
- LICENSE
- NOTICE
- 'Utilities/Debugger/**'
- 'Utilities/ITKv5Preparation/**'
- 'Utilities/Maintenance/**'
pull_request:

workflow_dispatch:
concurrency:
group: '${{ github.workflow }}@${{ github.head_ref || github.ref }}'
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/perf-benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
name: ITK.Performance

# WIP(SWIG-4.4.1 pixi-python): disabled so only ITK.Pixi.Python runs; revert this commit to re-enable
on:
pull_request:
paths-ignore:
- '*.md'
- LICENSE
- NOTICE
- 'Documentation/**'
- 'Utilities/Debugger/**'
- 'Utilities/ITKv5Preparation/**'
- 'Utilities/Maintenance/**'
workflow_dispatch:

concurrency:
group: '${{ github.workflow }}@${{ github.head_ref || github.ref }}'
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Expand Down
139 changes: 139 additions & 0 deletions .github/workflows/pixi-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: ITK.Pixi.Python

on:
workflow_dispatch:
push:
branches:
- main
- 'release*'
paths-ignore:
- '*.md'
- LICENSE
- NOTICE
- 'Documentation/**'
- 'Utilities/Debugger/**'
- 'Utilities/ITKv5Preparation/**'
- 'Utilities/Maintenance/**'
- 'Modules/Remote/*.remote.cmake'
pull_request:
paths-ignore:
- '*.md'
- LICENSE
- NOTICE
- 'Documentation/**'
- 'Utilities/Debugger/**'
- 'Utilities/ITKv5Preparation/**'
- 'Utilities/Maintenance/**'
- 'Modules/Remote/*.remote.cmake'

concurrency:
group: '${{ github.workflow }}@${{ github.head_ref || github.ref }}'
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
Pixi-Python:
runs-on: ${{ matrix.os }}
timeout-minutes: 0
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022, macos-15]
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 5
clean: true

- name: Configure ccache environment
shell: bash
run: |
echo "CCACHE_BASEDIR=${GITHUB_WORKSPACE}" >> "$GITHUB_ENV"
echo "CCACHE_COMPILERCHECK=content" >> "$GITHUB_ENV"
echo "CCACHE_NOHASHDIR=true" >> "$GITHUB_ENV"
echo "CCACHE_SLOPPINESS=pch_defines,time_macros" >> "$GITHUB_ENV"
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
echo "CCACHE_MAXSIZE=5G" >> "$GITHUB_ENV"
# configure-python has no ccache launcher of its own; CMake initializes
# CMAKE_<LANG>_COMPILER_LAUNCHER from these environment variables.
echo "CMAKE_C_COMPILER_LAUNCHER=ccache" >> "$GITHUB_ENV"
echo "CMAKE_CXX_COMPILER_LAUNCHER=ccache" >> "$GITHUB_ENV"
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update -qq && sudo apt-get install -y locales
sudo locale-gen de_DE.UTF-8
fi

- name: Restore compiler cache
uses: actions/cache/restore@v5
with:
path: ${{ runner.temp }}/ccache
key: ccache-v4-${{ runner.os }}-pixi-python-${{ github.sha }}
restore-keys: |
ccache-v4-${{ runner.os }}-pixi-python-

- name: Disk space reporting BEFORE
shell: bash
run: df -h /

- name: Free Disk Space (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
uses: BRAINSia/free-disk-space@v2
with:
removalmode: "rmz"
swap-storage: "true"
haskell: "true"
dotnet: "true"
docker-images: "false"
tool-cache: "true"
android: "false"
large-packages: "true"
mandb: "true"

- name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.9.5

- name: ccache stats (zero)
shell: bash
run: pixi run -e python ccache --zero-stats

- name: Build Python wrapping (system SWIG 4.4.1 + CastXML)
shell: bash
run: |
df -h /
pixi run build-python
df -h /

- name: Import smoke test
shell: bash
run: |
# The build tree's itk package is on the path via WrapITK.pth; expose its
# directory on PYTHONPATH (pixi run preserves the exported variable).
export PYTHONPATH="${GITHUB_WORKSPACE}/build-python/Wrapping/Generators/Python"
pixi run -e python python -c "
import itk, numpy as np
print('ITK', itk.Version.GetITKVersion())
img = itk.image_from_array(np.zeros((16, 16), dtype=np.float32))
out = itk.median_image_filter(img, radius=2)
assert list(itk.size(out)) == [16, 16]
v = itk.vector[itk.D]([1.0, 2.0, 3.0]) # std::vector / SwigPyIterator path
assert len(v) == 3 and v[0] == 1.0
print('SWIG 4.4.1 Python wrapping import + filter + vector OK')
"

- name: Scoped Python regression tests
shell: bash
run: |
pixi run -e python ctest --test-dir build-python --output-on-failure \
-R "PythonSimplePipeline|PythonTemplatedPipeline|PythonLazyLoading|NonBlockingPythonFilterCoverage|PythonExtrasTest"

- name: ccache stats
if: always()
shell: bash
run: pixi run -e python ccache --show-stats

- name: Save compiler cache
if: ${{ !cancelled() }}
uses: actions/cache/save@v5
with:
path: ${{ runner.temp }}/ccache
key: ccache-v4-${{ runner.os }}-pixi-python-${{ github.sha }}
35 changes: 19 additions & 16 deletions .github/workflows/pixi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: ITK.Pixi

# WIP(SWIG-4.4.1 pixi-python): temporarily co-opted to build/test the Python
# wrapping (configure/build/test-python-ci) instead of the cxx env. Revert this
# commit to restore the normal cxx CI.
on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -24,7 +28,6 @@ on:
- 'Utilities/ITKv5Preparation/**'
- 'Utilities/Maintenance/**'
- 'Modules/Remote/*.remote.cmake'

concurrency:
group: '${{ github.workflow }}@${{ github.head_ref || github.ref }}'
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -64,9 +67,9 @@ jobs:
uses: actions/cache/restore@v5
with:
path: ${{ runner.temp }}/ccache
key: ccache-v4-${{ runner.os }}-pixi-cxx-${{ github.sha }}
key: ccache-v4-${{ runner.os }}-pixi-python-${{ github.sha }}
restore-keys: |
ccache-v4-${{ runner.os }}-pixi-cxx-
ccache-v4-${{ runner.os }}-pixi-python-

- name: Restore ExternalData object store
id: restore-externaldata
Expand Down Expand Up @@ -127,21 +130,21 @@ jobs:
- name: Show ccache configuration, stats and maintenance
shell: bash
run: |
pixi run -e cxx ccache --zero-stats
pixi run -e cxx ccache --evict-older-than 7d
pixi run -e cxx ccache --show-config
pixi run -e python ccache --zero-stats
pixi run -e python ccache --evict-older-than 7d
pixi run -e python ccache --show-config

- name: Configure
run: pixi run configure-ci
run: pixi run configure-python-ci

- name: Fetch ExternalData
run: pixi run --skip-deps build-external-data-ci
run: pixi run -e python cmake --build build-python --target ITKData

- name: Build
run: |
echo "****** df -h / -- pre build"
df -h /
pixi run --skip-deps build-ci
pixi run --skip-deps build-python-ci
echo "****** df -h / -- post build"
df -h /

Expand All @@ -152,16 +155,16 @@ jobs:
# .obj/.lib also name Wavefront-mesh and Makefile test data, so match
# only compiled objects in intermediate dirs (CMakeFiles/ for Ninja,
# *.dir/ for Visual Studio) and archives under lib/.
find build -type f \( -path '*/CMakeFiles/*' -o -path '*.dir/*' \) \( -name "*.o" -o -name "*.obj" \) -delete
find build/lib -type f \( -name "*.a" -o -name "*.lib" \) -delete 2>/dev/null || true
find build-python -type f \( -path '*/CMakeFiles/*' -o -path '*.dir/*' \) \( -name "*.o" -o -name "*.obj" \) -delete
find build-python/lib -type f \( -name "*.a" -o -name "*.lib" \) -delete 2>/dev/null || true
# Trim ccache to stay within CCACHE_MAXSIZE and remove orphaned entries
pixi run -e cxx ccache --evict-older-than 1d 2>/dev/null || true
pixi run -e cxx ccache --cleanup 2>/dev/null || true
pixi run -e python ccache --evict-older-than 1d 2>/dev/null || true
pixi run -e python ccache --cleanup 2>/dev/null || true
echo "****** df -h / -- post cleanup"
df -h /

- name: Test
run: pixi run --skip-deps test-ci
run: pixi run --skip-deps test-python-ci

- name: Disk space reporting AFTER (optimize free-disk-space)
run: |
Expand All @@ -176,7 +179,7 @@ jobs:
uses: actions/cache/save@v5
with:
path: ${{ runner.temp }}/ccache
key: ccache-v4-${{ runner.os }}-pixi-cxx-${{ github.sha }}
key: ccache-v4-${{ runner.os }}-pixi-python-${{ github.sha }}

# ExternalData object store is populated by
# .github/workflows/populate-externaldata-cache.yml — a dedicated
Expand All @@ -188,7 +191,7 @@ jobs:

- name: ccache stats
if: always()
run: pixi run -e cxx ccache --show-stats
run: pixi run -e python ccache --show-stats

prune-superseded-caches:
# Background housekeeping: removes ccache entries whose SHA-suffixed
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: pre-commit

# WIP(SWIG-4.4.1 pixi-python): disabled so only ITK.Pixi.Python runs; revert this commit to re-enable
on:
pull_request:

workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-24.04
Expand Down
12 changes: 10 additions & 2 deletions CMake/ITKSetPython3Vars.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ else()
set(ITK_WRAP_PYTHON_VERSION "${Python3_VERSION}")

# start section to define package components based on LIMITED_API support and choices
set(_ITK_MINIMUM_SUPPORTED_LIMITED_API_VERSION 3.11)
# Cached so the abi3 floor is a single source of truth shared with the module
# wrapping macros (itk_end_wrap_module.cmake USE_SABI).
set(
_ITK_MINIMUM_SUPPORTED_LIMITED_API_VERSION
3.11
CACHE INTERNAL
"Minimum Python minor version for the abi3 / Limited API floor"
)

# Force ITK_WRAP_PYTHON_VERSION if SKBUILD_SABI_COMPONENT requests it
string(
Expand Down Expand Up @@ -173,7 +180,8 @@ else()
endif()
unset(_missing_required_component)
unset(_python_find_components)
unset(_ITK_MINIMUM_SUPPORTED_LIMITED_API_VERSION)
# _ITK_MINIMUM_SUPPORTED_LIMITED_API_VERSION is cached (INTERNAL) and intentionally
# left set so itk_end_wrap_module.cmake can pin USE_SABI to the same floor.
# end section to define package components based on LIMITED_API support and choices
if(DEFINED _specified_Python3_EXECUTABLE)
set(
Expand Down
15 changes: 2 additions & 13 deletions Testing/ContinuousIntegration/AzurePipelinesLinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,8 @@ trigger:
- Utilities/ITKv5Preparation/*
- Utilities/Maintenance/*
- Modules/Remote/*.remote.cmake
pr:
# Validate draft PRs (Azure default) so contributors see all gating results while iterating.
drafts: true
paths:
exclude:
- '*.md'
- LICENSE
- NOTICE
- Documentation/*
- Utilities/Debugger/*
- Utilities/ITKv5Preparation/*
- Utilities/Maintenance/*
- Modules/Remote/*.remote.cmake
# WIP(SWIG-4.4.1 pixi-python): co-opting ITK.Pixi for the Python build; revert this commit to re-enable.
pr: none
variables:
ExternalData_OBJECT_STORES: $(Pipeline.Workspace)/ExternalData
CCACHE_DIR: $(Pipeline.Workspace)/.ccache
Expand Down
15 changes: 2 additions & 13 deletions Testing/ContinuousIntegration/AzurePipelinesLinuxPython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,8 @@ trigger:
- Utilities/ITKv5Preparation/*
- Utilities/Maintenance/*
- Modules/Remote/*.remote.cmake
pr:
# Validate draft PRs (Azure default) so contributors see all gating results while iterating.
drafts: true
paths:
exclude:
- '*.md'
- LICENSE
- NOTICE
- Documentation/*
- Utilities/Debugger/*
- Utilities/ITKv5Preparation/*
- Utilities/Maintenance/*
- Modules/Remote/*.remote.cmake
# WIP(SWIG-4.4.1 pixi-python): co-opting ITK.Pixi for the Python build; revert this commit to re-enable.
pr: none
variables:
ExternalData_OBJECT_STORES: $(Pipeline.Workspace)/ExternalData
CCACHE_DIR: $(Pipeline.Workspace)/.ccache
Expand Down
Loading
Loading