feat(wado-uri): add WADO-URI client and MWL N-CREATE support #516
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| SWIFT_VERSION: '6.2' | |
| jobs: | |
| test-macos: | |
| name: Test on macOS | |
| runs-on: macos-15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Test on different Xcode versions for comprehensive coverage | |
| # Xcode 16.0+ required for swift-tools-version: 6.0 (Swift 6) | |
| xcode: ['16.0', '16.2'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode version | |
| run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
| - name: Show Swift version | |
| run: swift --version | |
| - name: Cache Swift Package Manager | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .build | |
| ~/Library/Developer/Xcode/DerivedData | |
| key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Build package | |
| run: swift build -v | |
| - name: Run tests | |
| run: swift test -v --parallel | |
| - name: Build in release mode | |
| run: swift build -c release | |
| test-linux: | |
| name: Test on Linux (Ubuntu 22.04) | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Swift 6.2 | |
| run: | | |
| # Download and install Swift 6.2 for Ubuntu 22.04 | |
| wget -q https://download.swift.org/swift-6.2-release/ubuntu2204/swift-6.2-RELEASE/swift-6.2-RELEASE-ubuntu22.04.tar.gz | |
| tar xzf swift-6.2-RELEASE-ubuntu22.04.tar.gz | |
| sudo mv swift-6.2-RELEASE-ubuntu22.04 /usr/share/swift | |
| echo "/usr/share/swift/usr/bin" >> $GITHUB_PATH | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| binutils \ | |
| git \ | |
| gnupg2 \ | |
| libc6-dev \ | |
| libcurl4-openssl-dev \ | |
| libedit2 \ | |
| libgcc-11-dev \ | |
| libpython3.10 \ | |
| libsqlite3-0 \ | |
| libstdc++-11-dev \ | |
| libxml2-dev \ | |
| libz3-dev \ | |
| pkg-config \ | |
| tzdata \ | |
| unzip \ | |
| zlib1g-dev | |
| - name: Verify Swift installation | |
| run: | | |
| swift --version | |
| swift --version | grep "Swift version 6.2" | |
| - name: Cache Swift Package Manager | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Build | |
| run: swift build 2>&1 | tee build.log | |
| - name: Check for build warnings | |
| run: | | |
| if grep -i "warning:" build.log; then | |
| echo "::warning::Build warnings detected on Linux" | |
| fi | |
| - name: Run tests | |
| run: swift test --parallel | |
| - name: Build in release mode | |
| run: swift build -c release | |
| - name: Upload build log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-build-log | |
| path: build.log | |
| retention-days: 7 | |
| build-documentation: | |
| name: Build Documentation | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer | |
| - name: Cache Swift Package Manager | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-docs-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-docs- | |
| - name: Build DocC documentation | |
| run: | | |
| # Build documentation for all modules | |
| swift package --allow-writing-to-directory ./docs \ | |
| generate-documentation --target DICOMKit \ | |
| --disable-indexing \ | |
| --transform-for-static-hosting \ | |
| --hosting-base-path DICOMKit \ | |
| --output-path ./docs | |
| continue-on-error: true | |
| code-quality: | |
| name: Code Quality Checks | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer | |
| - name: Cache Swift Package Manager | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-quality-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-quality- | |
| ${{ runner.os }}-spm- | |
| - name: Check for compiler warnings | |
| run: | | |
| swift build 2>&1 | tee build.log | |
| if grep -i "warning:" build.log; then | |
| echo "::warning::Compiler warnings detected" | |
| # Don't fail the build, just warn | |
| fi | |
| - name: Validate Package.swift | |
| run: swift package dump-package > /dev/null | |
| - name: Check formatting (if swift-format is available) | |
| run: | | |
| if command -v swift-format &> /dev/null; then | |
| swift-format lint -r Sources Tests | |
| else | |
| echo "swift-format not found, skipping" | |
| fi | |
| continue-on-error: true | |
| validate-platforms: | |
| name: Validate Platform Support | |
| runs-on: macos-15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| destination: | |
| - 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.0' | |
| - 'platform=macOS' | |
| # visionOS requires Xcode 16+ | |
| - 'platform=visionOS Simulator,name=Apple Vision Pro,OS=2.0' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer | |
| - name: Cache Swift Package Manager | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-platform-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-platform- | |
| ${{ runner.os }}-spm- | |
| - name: List available destinations | |
| run: xcodebuild -showdestinations -scheme DICOMKit-Package || true | |
| continue-on-error: true | |
| - name: Build for ${{ matrix.destination }} | |
| run: | | |
| xcodebuild clean build \ | |
| -scheme DICOMKit-Package \ | |
| -destination '${{ matrix.destination }}' \ | |
| -skipPackagePluginValidation \ | |
| -skipMacroValidation \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| || echo "Build for destination may require additional setup" | |
| continue-on-error: true | |
| security-scan: | |
| name: Security Scan | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run dependency audit | |
| run: | | |
| # Check for known vulnerabilities in dependencies | |
| swift package show-dependencies --format json > dependencies.json | |
| echo "Dependencies scanned, no automated vulnerability check available yet" | |
| continue-on-error: true | |
| summary: | |
| name: CI Summary | |
| runs-on: ubuntu-latest | |
| needs: [test-macos, test-linux, build-documentation, code-quality, validate-platforms, security-scan] | |
| if: always() | |
| steps: | |
| - name: Check overall status | |
| run: | | |
| if [ "${{ needs.test-macos.result }}" != "success" ]; then | |
| echo "::error::macOS tests failed" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.test-linux.result }}" != "success" ]; then | |
| echo "::error::Linux tests failed" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.code-quality.result }}" != "success" ]; then | |
| echo "::warning::Code quality checks had issues" | |
| fi | |
| if [ "${{ needs.validate-platforms.result }}" != "success" ]; then | |
| echo "::warning::Platform validation had issues" | |
| fi | |
| if [ "${{ needs.security-scan.result }}" != "success" ]; then | |
| echo "::warning::Security scan had issues" | |
| fi | |
| echo "✅ CI pipeline completed successfully" |