Skip to content

Update actions/checkout to v5 for Node.js 24 compatibility #6

Update actions/checkout to v5 for Node.js 24 compatibility

Update actions/checkout to v5 for Node.js 24 compatibility #6

Workflow file for this run

# GitHub Actions workflow for building and testing DCMTKcs on push and pull request
name: Build and Test
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
workflow_dispatch:
jobs:
build:
name: Build and Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Configure CMake
run: |
cmake -S . -B build
- name: Build
run: |
cmake --build build --config Release
- name: Set short hostname (macOS)
if: runner.os == 'macOS'
run: |
# DCMTK enforces a 62-character limit on DICOM hostnames.
# GitHub Actions macOS runner hostnames are much longer, which
# causes dcmtls_tests to fail. Override with a short name.
sudo scutil --set HostName ci-runner
- name: Run tests
run: |
ctest --test-dir build --build-config Release --output-on-failure