Fix protocol hierarchy to prevent duplicate conformance issue #13
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] | |
| pull_request: | |
| branches: [main] | |
| # Restrict default GITHUB_TOKEN permissions | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_26.1.1.app | |
| - name: Build | |
| run: swift build -c release | |
| - name: Run Tests | |
| run: swift test --parallel | |
| build-platforms: | |
| name: Build (${{ matrix.platform }}) | |
| runs-on: macos-15 | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: iOS | |
| destination: 'generic/platform=iOS Simulator' | |
| - platform: macOS | |
| destination: 'platform=macOS' | |
| - platform: tvOS | |
| destination: 'generic/platform=tvOS Simulator' | |
| - platform: watchOS | |
| destination: 'generic/platform=watchOS Simulator' | |
| - platform: visionOS | |
| destination: 'generic/platform=visionOS Simulator' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_26.1.1.app | |
| - name: Build for ${{ matrix.platform }} | |
| run: | | |
| xcodebuild build \ | |
| -scheme CSVCoder \ | |
| -destination '${{ matrix.destination }}' \ | |
| -skipPackagePluginValidation \ | |
| CODE_SIGNING_ALLOWED=NO | |
| documentation: | |
| name: Documentation | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_26.1.1.app | |
| - name: Build Documentation | |
| run: | | |
| swift package generate-documentation \ | |
| --target CSVCoder \ | |
| --disable-indexing \ | |
| --transform-for-static-hosting \ | |
| --hosting-base-path CSVCoder | |
| mkdir -p docs | |
| cp -r .build/plugins/Swift-DocC/outputs/CSVCoder.doccarchive/* docs/ | |
| # Rename files with colons (macros like @CSVColumn(_:)) for NTFS compatibility | |
| find docs -name '*:*' -print0 | while IFS= read -r -d '' file; do | |
| mv "$file" "$(echo "$file" | tr ':' '_')" | |
| done | |
| - name: Upload Documentation Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation | |
| path: docs | |
| deploy-docs: | |
| name: Deploy Documentation | |
| runs-on: macos-15 | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| needs: [build-and-test, build-platforms, documentation] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_26.1.1.app | |
| - name: Build Documentation | |
| run: | | |
| swift package generate-documentation \ | |
| --target CSVCoder \ | |
| --disable-indexing \ | |
| --transform-for-static-hosting \ | |
| --hosting-base-path CSVCoder | |
| mkdir -p _site | |
| cp -r .build/plugins/Swift-DocC/outputs/CSVCoder.doccarchive/* _site/ | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |