refactor: rename .hpp to .h and move include path to kcenon/pacs/ #823
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
| # DCMTK Interoperability Tests Workflow | |
| # Automated testing pipeline for DCMTK compatibility | |
| # | |
| # @see Issue #455 - GitHub Actions CI/CD Integration for DCMTK Interoperability Tests | |
| # @see Issue #449 - DCMTK Interoperability Test Automation Epic | |
| # | |
| # Tests bidirectional compatibility between pacs_system and DCMTK for: | |
| # - C-ECHO (Verification) | |
| # - C-STORE (Storage) | |
| # - C-FIND (Query) | |
| # - C-MOVE (Retrieve) | |
| name: DCMTK Interoperability Tests | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| workflow_dispatch: | |
| # Ensure only one workflow runs per branch/PR to save resources | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| # ============================================================================ | |
| # DCMTK Interoperability Tests (C++ Integration Tests) | |
| # ============================================================================ | |
| dcmtk-cpp-tests: | |
| name: DCMTK C++ Tests (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-14] | |
| steps: | |
| - name: Checkout pacs_system | |
| uses: actions/checkout@v4 | |
| with: | |
| path: pacs_system | |
| - name: Checkout kcenon dependencies (pinned versions) | |
| uses: ./pacs_system/.github/actions/checkout-kcenon-deps | |
| with: | |
| patch-werror: 'true' | |
| - name: Install dependencies (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libsqlite3-dev \ | |
| libssl-dev \ | |
| libfmt-dev \ | |
| libjpeg-turbo8-dev \ | |
| ninja-build \ | |
| cmake \ | |
| dcmtk \ | |
| netcat-openbsd \ | |
| lsof | |
| - name: Install dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install sqlite3 openssl@3 ninja cmake fmt jpeg-turbo dcmtk | |
| - name: Verify DCMTK installation | |
| run: | | |
| echo "=== DCMTK Version ===" | |
| echoscu --version || echo "echoscu not found" | |
| which echoscu || echo "echoscu path not found" | |
| which storescp || echo "storescp path not found" | |
| which findscu || echo "findscu path not found" | |
| which movescu || echo "movescu path not found" | |
| - name: Configure CMake | |
| working-directory: pacs_system | |
| run: | | |
| cmake -B build \ | |
| -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DCMAKE_C_COMPILER=gcc \ | |
| -DCMAKE_CXX_COMPILER=g++ \ | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ | |
| -DPACS_WARNINGS_AS_ERRORS=OFF \ | |
| -DPACS_BUILD_TESTS=ON \ | |
| -DPACS_BUILD_EXAMPLES=ON \ | |
| -DPACS_BUILD_STORAGE=ON | |
| - name: Build | |
| working-directory: pacs_system | |
| run: cmake --build build --parallel | |
| - name: Run DCMTK C-ECHO Tests | |
| working-directory: pacs_system | |
| timeout-minutes: 5 | |
| run: | | |
| cd build | |
| if [ -f "./bin/pacs_integration_e2e" ]; then | |
| echo "=== Running C-ECHO Interoperability Tests ===" | |
| timeout 180 ./bin/pacs_integration_e2e \ | |
| "[dcmtk][echo]" \ | |
| --reporter console \ | |
| --reporter junit::out=dcmtk-echo-results.xml \ | |
| 2>&1 || echo "Some C-ECHO tests may have failed" | |
| else | |
| echo "Integration test binary not found" | |
| exit 1 | |
| fi | |
| - name: Run DCMTK C-STORE Tests | |
| working-directory: pacs_system | |
| timeout-minutes: 5 | |
| run: | | |
| cd build | |
| if [ -f "./bin/pacs_integration_e2e" ]; then | |
| echo "=== Running C-STORE Interoperability Tests ===" | |
| timeout 180 ./bin/pacs_integration_e2e \ | |
| "[dcmtk][store]" \ | |
| --reporter console \ | |
| --reporter junit::out=dcmtk-store-results.xml \ | |
| 2>&1 || echo "Some C-STORE tests may have failed" | |
| fi | |
| - name: Run DCMTK C-FIND Tests | |
| working-directory: pacs_system | |
| timeout-minutes: 5 | |
| run: | | |
| cd build | |
| if [ -f "./bin/pacs_integration_e2e" ]; then | |
| echo "=== Running C-FIND Interoperability Tests ===" | |
| timeout 180 ./bin/pacs_integration_e2e \ | |
| "[dcmtk][find]" \ | |
| --reporter console \ | |
| --reporter junit::out=dcmtk-find-results.xml \ | |
| 2>&1 || echo "Some C-FIND tests may have failed" | |
| fi | |
| - name: Run DCMTK C-MOVE Tests | |
| working-directory: pacs_system | |
| timeout-minutes: 5 | |
| run: | | |
| cd build | |
| if [ -f "./bin/pacs_integration_e2e" ]; then | |
| echo "=== Running C-MOVE Interoperability Tests ===" | |
| timeout 180 ./bin/pacs_integration_e2e \ | |
| "[dcmtk][move]" \ | |
| --reporter console \ | |
| --reporter junit::out=dcmtk-move-results.xml \ | |
| 2>&1 || echo "Some C-MOVE tests may have failed" | |
| fi | |
| - name: Merge Test Results | |
| if: always() | |
| working-directory: pacs_system/build | |
| run: | | |
| echo '<?xml version="1.0" encoding="UTF-8"?><testsuites>' > dcmtk-interop-results.xml | |
| for f in dcmtk-*-results.xml; do | |
| if [ -f "$f" ] && [ "$f" != "dcmtk-interop-results.xml" ]; then | |
| grep -v '<?xml' "$f" | grep -v '</testsuites>' | grep -v '<testsuites>' >> dcmtk-interop-results.xml 2>/dev/null || true | |
| fi | |
| done | |
| echo '</testsuites>' >> dcmtk-interop-results.xml | |
| - name: Upload DCMTK Test Results | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: dcmtk-cpp-results-${{ matrix.os }} | |
| path: | | |
| pacs_system/build/dcmtk-*-results.xml | |
| retention-days: 30 | |
| - name: Publish DCMTK Test Report | |
| uses: mikepenz/action-junit-report@v6 | |
| if: always() | |
| with: | |
| report_paths: pacs_system/build/dcmtk-interop-results.xml | |
| fail_on_failure: false | |
| # Use annotate_only mode since pacs_system does not yet support | |
| # real TCP connections for DICOM protocol. This prevents the | |
| # check run from blocking the PR while the test infrastructure | |
| # is being developed. See accept_worker.cpp for details. | |
| annotate_only: true | |
| check_name: DCMTK C++ Tests (${{ matrix.os }}) | |
| # ============================================================================ | |
| # DCMTK Shell Script Tests | |
| # ============================================================================ | |
| dcmtk-shell-tests: | |
| name: DCMTK Shell Tests (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 40 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-14] | |
| steps: | |
| - name: Checkout pacs_system | |
| uses: actions/checkout@v4 | |
| with: | |
| path: pacs_system | |
| - name: Checkout kcenon dependencies (pinned versions) | |
| uses: ./pacs_system/.github/actions/checkout-kcenon-deps | |
| with: | |
| patch-werror: 'true' | |
| - name: Install dependencies (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libsqlite3-dev \ | |
| libssl-dev \ | |
| libfmt-dev \ | |
| libjpeg-turbo8-dev \ | |
| ninja-build \ | |
| cmake \ | |
| dcmtk \ | |
| netcat-openbsd \ | |
| lsof | |
| - name: Install dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install sqlite3 openssl@3 ninja cmake fmt jpeg-turbo dcmtk coreutils | |
| - name: Configure and Build | |
| working-directory: pacs_system | |
| run: | | |
| cmake -B build \ | |
| -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_C_COMPILER=gcc \ | |
| -DCMAKE_CXX_COMPILER=g++ \ | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ | |
| -DPACS_WARNINGS_AS_ERRORS=OFF \ | |
| -DPACS_BUILD_TESTS=ON \ | |
| -DPACS_BUILD_EXAMPLES=ON \ | |
| -DPACS_BUILD_STORAGE=ON | |
| cmake --build build --parallel | |
| - name: Make Shell Scripts Executable | |
| working-directory: pacs_system | |
| run: | | |
| chmod +x ./examples/integration_tests/scripts/*.sh | |
| - name: Run DCMTK Echo Shell Test | |
| working-directory: pacs_system | |
| timeout-minutes: 8 | |
| continue-on-error: true | |
| run: | | |
| if [ -f "./examples/integration_tests/scripts/test_dcmtk_echo.sh" ]; then | |
| echo "=== Running C-ECHO Shell Test ===" | |
| ./examples/integration_tests/scripts/test_dcmtk_echo.sh 2>&1 | tee build/dcmtk-echo-shell.log || true | |
| fi | |
| - name: Run DCMTK Store Shell Test | |
| working-directory: pacs_system | |
| timeout-minutes: 8 | |
| continue-on-error: true | |
| run: | | |
| if [ -f "./examples/integration_tests/scripts/test_dcmtk_store.sh" ]; then | |
| echo "=== Running C-STORE Shell Test ===" | |
| ./examples/integration_tests/scripts/test_dcmtk_store.sh 2>&1 | tee build/dcmtk-store-shell.log || true | |
| fi | |
| - name: Run DCMTK Find Shell Test | |
| working-directory: pacs_system | |
| timeout-minutes: 8 | |
| continue-on-error: true | |
| run: | | |
| if [ -f "./examples/integration_tests/scripts/test_dcmtk_find.sh" ]; then | |
| echo "=== Running C-FIND Shell Test ===" | |
| ./examples/integration_tests/scripts/test_dcmtk_find.sh 2>&1 | tee build/dcmtk-find-shell.log || true | |
| fi | |
| - name: Run DCMTK Move Shell Test | |
| working-directory: pacs_system | |
| timeout-minutes: 8 | |
| continue-on-error: true | |
| run: | | |
| if [ -f "./examples/integration_tests/scripts/test_dcmtk_move.sh" ]; then | |
| echo "=== Running C-MOVE Shell Test ===" | |
| ./examples/integration_tests/scripts/test_dcmtk_move.sh 2>&1 | tee build/dcmtk-move-shell.log || true | |
| fi | |
| - name: Upload Shell Test Logs | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: dcmtk-shell-logs-${{ matrix.os }} | |
| path: | | |
| pacs_system/build/dcmtk-*-shell.log | |
| retention-days: 30 | |
| # ============================================================================ | |
| # Test Summary | |
| # ============================================================================ | |
| dcmtk-summary: | |
| name: DCMTK Test Summary | |
| needs: [dcmtk-cpp-tests, dcmtk-shell-tests] | |
| runs-on: ubuntu-24.04 | |
| if: always() | |
| steps: | |
| - name: Download All Test Results | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: test-results | |
| pattern: dcmtk-* | |
| merge-multiple: false | |
| - name: Create Test Summary | |
| run: | | |
| echo "## 🔬 DCMTK Interoperability Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### C++ Integration Tests" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Platform | Status |" >> $GITHUB_STEP_SUMMARY | |
| echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY | |
| for os in ubuntu-24.04 macos-14; do | |
| status="⏭️ Skipped" | |
| if [ -d "test-results/dcmtk-cpp-results-$os" ]; then | |
| status="✅ Completed" | |
| fi | |
| echo "| $os | $status |" >> $GITHUB_STEP_SUMMARY | |
| done | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Shell Script Tests" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Platform | Status |" >> $GITHUB_STEP_SUMMARY | |
| echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY | |
| for os in ubuntu-24.04 macos-14; do | |
| status="⏭️ Skipped" | |
| if [ -d "test-results/dcmtk-shell-logs-$os" ]; then | |
| status="✅ Completed" | |
| fi | |
| echo "| $os | $status |" >> $GITHUB_STEP_SUMMARY | |
| done | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Test Coverage" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| DICOM Operation | C++ Tests | Shell Tests |" >> $GITHUB_STEP_SUMMARY | |
| echo "|-----------------|-----------|-------------|" >> $GITHUB_STEP_SUMMARY | |
| echo "| C-ECHO | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY | |
| echo "| C-STORE | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY | |
| echo "| C-FIND | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY | |
| echo "| C-MOVE | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "📊 Detailed results available in the **Artifacts** section" >> $GITHUB_STEP_SUMMARY |