Skip to content
Open
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
9 changes: 0 additions & 9 deletions .circleci/config.yml

This file was deleted.

155 changes: 126 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,143 @@ concurrency:
cancel-in-progress: true

jobs:
build-ubuntu-24-04:
name: Build (Ubuntu 24.04)
runs-on: ubuntu-24.04
standalone:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC (shared)
os: ubuntu-24.04
cc: gcc
cxx: g++
shared: ON
system-zlib: OFF
cxx-flags: >-
-Wall -Wextra -Wpedantic -Werror=return-type -Wshadow -Wformat=2
-Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast
-Wuseless-cast -Wcast-qual -Wswitch-enum -Wnull-dereference -Wvla
-Wmissing-field-initializers -Wdouble-promotion -Wnoexcept
- name: Ubuntu Clang (static, system zlib)
os: ubuntu-24.04
cc: clang
cxx: clang++
shared: OFF
system-zlib: ON
cxx-flags: -Wall -Wextra -Wpedantic -Wshadow
- name: macOS AppleClang (shared)
os: macos-15
cc: clang
cxx: clang++
shared: ON
system-zlib: OFF
cxx-flags: -Wall -Wextra -Wpedantic -Wshadow
- name: Windows MSVC (shared)
os: windows-2025
shared: ON
system-zlib: OFF
cxx-flags: -EHsc -W4
- name: Windows MSVC (static)
os: windows-2025
shared: OFF
system-zlib: OFF
cxx-flags: -EHsc -W4

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up dependencies
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build
sudo apt-get install -y --no-install-recommends ninja-build clang zlib1g-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install ninja

- name: Configure (CMake, Release)
- name: Select compiler
if: runner.os != 'Windows'
run: |
cmake -S ${{ github.workspace }} \
-B ${{ github.workspace }}/cmake-build-hidden \
-G Ninja \
-DCMAKE_CXX_FLAGS=" -Wall -Wextra -Wpedantic -Werror=return-type -Wshadow -Wformat=2 -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast -Wuseless-cast -Wcast-qual -Wswitch-enum -Wnull-dereference -Wvla -Wmissing-field-initializers -Wdouble-promotion -Wnoexcept" \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/cmake-build-install \
echo "CC=${{ matrix.cc }}" >> "$GITHUB_ENV"
echo "CXX=${{ matrix.cxx }}" >> "$GITHUB_ENV"
echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"

# A shared runtime output directory lets tests find the DLLs on Windows.
- name: Configure
shell: bash
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DCMAKE_C_VISIBILITY_PRESET=hidden \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=YES \
-DCMAKE_MODULE_LINKER_FLAGS="" \
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS="${{ matrix.cxx-flags }}" \
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY="${{ github.workspace }}/build/bin" \
-DBUILD_SHARED_LIBS=${{ matrix.shared }} \
-DITK_USE_SYSTEM_ZLIB=${{ matrix.system-zlib }} \
-DBUILD_TESTING=ON

- name: Build targets
- name: Build
run: cmake --build build --config Release --parallel

- name: Test
run: ctest --test-dir build --build-config Release --output-on-failure

- name: Install
run: cmake --install build --config Release

itk:
name: ITK MetaIO consumers (Ubuntu)
runs-on: ubuntu-24.04
steps:
- name: Checkout MetaIO
uses: actions/checkout@v5
with:
path: MetaIO

- name: Checkout ITK
uses: actions/checkout@v5
with:
repository: InsightSoftwareConsortium/ITK
ref: main
path: ITK

- name: Install dependencies
run: |
cmake --build ${{ github.workspace }}/cmake-build-hidden --target itkzlib MetaIO -j$(nproc)
sudo apt-get update
sudo apt-get install -y --no-install-recommends ninja-build ccache

- name: Install targets
# Same paths as ITK's Modules/ThirdParty/MetaIO/UpdateFromUpstream.sh
- name: Replace ITK's MetaIO with this checkout
run: |
cmake --build ${{ github.workspace }}/cmake-build-hidden --target install
dest=ITK/Modules/ThirdParty/MetaIO/src/MetaIO
rm -rf "$dest/src"
cp -r MetaIO/src "$dest/src"
cp MetaIO/License.txt "$dest/"

- name: Restore ccache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-itk-${{ github.sha }}
restore-keys: ccache-itk-

- name: Configure ITK
run: |
cmake -S ITK -B ITK-build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=ON \
-DBUILD_EXAMPLES=OFF \
-DITK_BUILD_DEFAULT_MODULES=OFF \
-DModule_ITKIOMeta=ON \
-DModule_ITKIOSpatialObjects=ON

- name: Build ITK
run: cmake --build ITK-build --parallel

# Uncomment if/when tests are available
- name: Run tests
working-directory: ${{ github.workspace }}/cmake-build-hidden
run: ctest --output-on-failure
- name: Test
run: ctest --test-dir ITK-build --output-on-failure --parallel 4 -L "^(ITKIOMeta|ITKIOSpatialObjects)$"
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# MetaIO

[![CI](https://github.com/Kitware/MetaIO/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Kitware/MetaIO/actions/workflows/ci.yml)

MetaImage is a text-based tagged file format for medical images. It also
supports a variety of objects that occur in medicine such a tubes (for
vessels, needles, etc.), blobs (for arbitrary shaped objects), cubes, spheres,
etc. The complete library is known as MetaIO.

For more information, see the
[MetaIO documentation](https://docs.itk.org/en/latest/learn/metaio.html).
19 changes: 0 additions & 19 deletions README.rst

This file was deleted.

32 changes: 0 additions & 32 deletions appveyor.yml

This file was deleted.

17 changes: 0 additions & 17 deletions itkzlib/zlib.def
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ EXPORTS
itk_zlib_deflateParams @9
itk_zlib_deflateReset @10
itk_zlib_deflateSetDictionary @11
itk_zlib_gzclose @12
itk_zlib_gzdopen @13
itk_zlib_gzerror @14
itk_zlib_gzflush @15
itk_zlib_gzopen @16
itk_zlib_gzread @17
itk_zlib_gzwrite @18
itk_zlib_inflate @19
itk_zlib_inflateEnd @20
itk_zlib_inflateInit2_ @21
Expand All @@ -31,17 +24,7 @@ EXPORTS
itk_zlib_inflateSync @25
itk_zlib_uncompress @26
itk_zlib_zlibVersion @27
itk_zlib_gzprintf @28
itk_zlib_gzputc @29
itk_zlib_gzgetc @30
itk_zlib_gzseek @31
itk_zlib_gzrewind @32
itk_zlib_gztell @33
itk_zlib_gzeof @34
itk_zlib_gzsetparams @35
itk_zlib_zError @36
itk_zlib_inflateSyncPoint @37
itk_zlib_get_crc_table @38
itk_zlib_compress2 @39
itk_zlib_gzputs @40
itk_zlib_gzgets @41
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ else ()
${sources}
${headers}
)
set_target_properties(${METAIO_TARGET} PROPERTIES DEFINE_SYMBOL metaio_EXPORTS)
if (METAIO_FOR_ITK)
target_link_libraries(${METAIO_TARGET} PUBLIC
itksys
Expand Down
2 changes: 0 additions & 2 deletions test/ci/.gitattributes

This file was deleted.

52 changes: 0 additions & 52 deletions test/ci/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions test/ci/build.sh

This file was deleted.

9 changes: 0 additions & 9 deletions test/ci/run.sh

This file was deleted.

Loading
Loading