ENH: Run itkSimpleImageRegistrationTest fully in Debug builds #5350
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ITK.Pixi | |
| 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' | |
| concurrency: | |
| group: '${{ github.workflow }}@${{ github.head_ref || github.ref }}' | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| Pixi-Cxx: | |
| 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" | |
| # ccache now comes from the pixi cxx env; only the locale needs OS setup. | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| sudo mkdir -p /etc/apt/apt.conf.d | |
| echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4 >/dev/null | |
| echo 'Acquire::Retries "5";' | sudo tee /etc/apt/apt.conf.d/80-retries >/dev/null | |
| for i in 1 2 3; do | |
| sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends locales && break | |
| echo "apt attempt $i failed; retrying..." | |
| [ "$i" -lt 3 ] && sleep $((i * 10)) | |
| done | |
| command -v locale-gen >/dev/null || { echo "locales install failed"; exit 1; } | |
| sudo locale-gen de_DE.UTF-8 | |
| fi | |
| - name: Restore compiler cache | |
| id: restore-ccache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ runner.temp }}/ccache | |
| key: ccache-v4-${{ runner.os }}-pixi-cxx-${{ github.sha }} | |
| restore-keys: | | |
| ccache-v4-${{ runner.os }}-pixi-cxx- | |
| - name: Restore ExternalData object store | |
| id: restore-externaldata | |
| uses: actions/cache/restore@v5 | |
| with: | |
| # ExternalData blobs are platform-agnostic; share a single cache | |
| # entry across every workflow/job/OS in the repo. The SHA suffix | |
| # produces an immutable save key per run; restore-keys falls | |
| # through to the most recent prior cache under the same version. | |
| path: ${{ runner.temp }}/ExternalData | |
| key: externaldata-v1-${{ hashFiles('**/*.cid') }} | |
| restore-keys: | | |
| externaldata-v1- | |
| - name: Disk space reporting BEFORE (optimize free-disk-space) | |
| run: | | |
| echo "****** df -h ${{ runner.temp }}" | |
| df -h "${{ runner.temp }}" | |
| echo "****** df -h" | |
| df -h | |
| echo "****** df -hi /" | |
| 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" # Takes too long | |
| tool-cache: "true" | |
| android: "false" # Takes too long | |
| large-packages: "true" # Takes too long to remove apt-get packages | |
| mandb: "true" # Speeds up future apt-get installs (disables man page generation), this CI does not use apt-get | |
| # For ITK run with find | |
| # TIME_REPORT: ============================================================= | |
| # TIME_REPORT: swap-storage | 0 seconds | 4.0GiB | | |
| # TIME_REPORT: haskell | 10 seconds | 6.2GiB | | |
| # TIME_REPORT: dotnet | 27 seconds | 3.3GiB | | |
| # TIME_REPORT: docker-images | 81 seconds | 3.4GiB | | |
| # TIME_REPORT: tool-cache | 113 seconds | 5.3GiB | | |
| # TIME_REPORT: android | 295 seconds | 8.8GiB | | |
| # TIME_REPORT: root | 526 seconds | 27GiB | | |
| # TIME_REPORT: overall | 526 seconds | 31GiB | | |
| # TIME_REPORT: == find ==================================================== | |
| - name: Export ExternalData_OBJECT_STORES | |
| shell: bash | |
| run: | | |
| echo "ExternalData_OBJECT_STORES=${{ runner.temp }}/ExternalData" >> "$GITHUB_ENV" | |
| - name: Set up Pixi | |
| uses: prefix-dev/setup-pixi@v0.9.5 | |
| - 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 | |
| - name: Configure | |
| run: pixi run configure-ci | |
| - name: Fetch ExternalData | |
| run: pixi run --skip-deps build-external-data-ci | |
| - name: Build | |
| run: | | |
| echo "****** df -h / -- pre build" | |
| df -h / | |
| pixi run --skip-deps build-ci | |
| echo "****** df -h / -- post build" | |
| df -h / | |
| - name: Free disk space after build | |
| shell: bash | |
| run: | | |
| # Remove compiler intermediates not needed for testing. Scope by path: | |
| # .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 | |
| # 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 | |
| echo "****** df -h / -- post cleanup" | |
| df -h / | |
| - name: Test | |
| run: pixi run --skip-deps test-ci | |
| - name: Disk space reporting AFTER (optimize free-disk-space) | |
| run: | | |
| echo "****** df -h ${{ runner.temp }}" | |
| df -h "${{ runner.temp }}" | |
| echo "****** df -h" | |
| df -h | |
| echo "****** df -h /" | |
| df -h / | |
| - name: Save compiler cache | |
| if: ${{ !cancelled() }} | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: ${{ runner.temp }}/ccache | |
| key: ccache-v4-${{ runner.os }}-pixi-cxx-${{ github.sha }} | |
| # ExternalData object store is populated by | |
| # .github/workflows/populate-externaldata-cache.yml — a dedicated | |
| # workflow whose only job is to prefetch every CID and write the | |
| # shared cache entry. Consumer workflows restore-only. Do not | |
| # reintroduce a prefetch-and-save pair here: races across | |
| # platforms overwrite the single shared key with a fraction of | |
| # the expected blobs and poison every subsequent restore. | |
| - name: ccache stats | |
| if: always() | |
| run: pixi run -e cxx ccache --show-stats | |
| prune-superseded-caches: | |
| # Background housekeeping: removes ccache entries whose SHA-suffixed | |
| # key has been superseded by a newer build of the same (ref, OS). | |
| # ccache restore-keys still falls back to the newest prefix match, | |
| # so older entries are dead weight under the 10 GB repo cache budget. | |
| needs: Pixi-Cxx | |
| if: always() | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| actions: write | |
| contents: read | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout maintenance script | |
| uses: actions/checkout@v5 | |
| with: | |
| sparse-checkout: Utilities/Maintenance/PruneSupersededCiCaches.py | |
| sparse-checkout-cone-mode: false | |
| - name: Prune superseded ccache entries | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| run: python3 Utilities/Maintenance/PruneSupersededCiCaches.py |