Use swift package traits to make Nimble an optional component. #91
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 (SwiftPM) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| pull_request: | |
| jobs: | |
| filter: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
| steps: | |
| - id: skip_check | |
| uses: fkirc/[email protected] | |
| with: | |
| paths: '[".github/workflows/ci-swiftpm.yml", "Sources/**", "Tests/**", "Package.*"]' | |
| do_not_skip: '["push", "workflow_dispatch", "schedule"]' | |
| swiftpm_darwin: | |
| name: SwiftPM, Darwin, Xcode ${{ matrix.xcode }} | |
| needs: filter | |
| runs-on: macos-14 | |
| strategy: | |
| matrix: | |
| xcode: ["16.1"] | |
| fail-fast: false | |
| env: | |
| DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| - run: swift build | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| - run: swift test | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| - run: swift test --traits Include_Nimble | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| swiftpm_darwin_15: | |
| name: SwiftPM, Darwin 15, Xcode ${{ matrix.xcode }} | |
| needs: filter | |
| runs-on: macos-15 | |
| strategy: | |
| matrix: | |
| xcode: ["16.4"] | |
| fail-fast: false | |
| env: | |
| DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| - run: swift build | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| - run: swift test | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| - run: swift test --traits Include_Nimble | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| swiftpm_linux: | |
| name: SwiftPM, Linux | |
| needs: filter | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| container: | |
| - swift:6.0 | |
| - swift:6.1 | |
| - swift:6.2 | |
| fail-fast: false | |
| container: ${{ matrix.container }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| - run: swift build | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| - run: swift test | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| - run: swift test --traits Include_Nimble | |
| if: ${{ needs.filter.outputs.should_skip != 'true' }} | |
| swiftpm_android: | |
| name: SwiftPM, Android | |
| needs: filter | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: skiptools/swift-android-action@v2 | |