Update actions/checkout to v5 for Node.js 24 compatibility #6
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
| # 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 |