Allow injecting custom modes into TKUIRoutingResultsCard
#1042
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
| name: Swift | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "Sources/**" | |
| - "Tests/**" | |
| - "Package.swift" | |
| - "TripKit.xcodeproj/**" | |
| - "Examples/**" | |
| pull_request: | |
| paths: | |
| - "Sources/**" | |
| - "Tests/**" | |
| - "Package.swift" | |
| - "TripKit.xcodeproj/**" | |
| - "Examples/**" | |
| workflow_dispatch: | |
| jobs: | |
| build_spm: | |
| strategy: | |
| matrix: | |
| include: | |
| # - os: macos-26 | |
| # xcode: "26.0" | |
| - os: macos-15 | |
| xcode: "16.4" | |
| - os: macos-14 | |
| xcode: "16.1" # sic, 16.2 not available on GitHub as of Jan 2025 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ matrix.xcode }} | |
| - uses: actions/checkout@v4 | |
| - name: Build | |
| run: swift build --target TripKit | |
| build_spm_linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| swift: ["6.0", "5.10"] | |
| container: | |
| image: swift:${{ matrix.swift }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build | |
| run: swift build --target TripKitAPI | |
| build_xcode: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - uses: actions/checkout@v3 | |
| - name: Build TripKit Mac | |
| run: xcodebuild build -quiet -project TripKit.xcodeproj -scheme "TripKit" -sdk macosx | |
| - name: Build TripKitUI iOS | |
| run: xcodebuild build -quiet -project TripKit.xcodeproj -scheme "TripKitUI" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' | |
| - name: Build TripKitInterApp iOS | |
| run: xcodebuild build -quiet -project TripKit.xcodeproj -scheme "TripKitInterApp" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' | |
| test_xcode: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - uses: actions/checkout@v4 | |
| - name: Run tests | |
| env: | |
| TRIPGO_API_KEY: ${{ secrets.TRIPGO_API_KEY }} | |
| run: | | |
| xcodebuild test -quiet -project TripKit.xcodeproj -scheme "TripKit" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' -resultBundlePath TestResults | |
| # - uses: kishikawakatsumi/xcresulttool@v1 # NOT YET COMPATIBLE WITH XCODE 16 | |
| # with: | |
| # path: TestResults.xcresult | |
| # if: success() || failure() | |
| # # ^ This is important because the action will be run | |
| # # even if the test fails in the previous step. | |
| example_spm: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - uses: actions/checkout@v4 | |
| - name: Build TripKitUIExample | |
| run: xcodebuild build -quiet -project TripKit.xcodeproj -scheme TripKitUIExample -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' | |
| example_cocoapods: | |
| runs-on: macos-15 | |
| strategy: | |
| matrix: | |
| include: | |
| - name: "MiniMap" | |
| directory: "Examples/MiniMap" | |
| workspace: "MiniMap.xcworkspace" | |
| scheme: "MiniMap" | |
| sdk: "macosx" | |
| destination: "" | |
| extra_flags: "" | |
| - name: "CocoaPodsTest" | |
| directory: "Examples/CocoaPodsTest" | |
| workspace: "CocoaPodsTest.xcworkspace" | |
| scheme: "CocoaPodsTest" | |
| sdk: "iphonesimulator" | |
| destination: "-destination 'platform=iOS Simulator,name=iPhone 16'" | |
| extra_flags: 'CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO' | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - uses: actions/checkout@v4 | |
| - name: Build ${{ matrix.name }} | |
| run: | | |
| cd ${{ matrix.directory }} | |
| pod install | |
| xcodebuild build -quiet -workspace ${{ matrix.workspace }} -scheme ${{ matrix.scheme }} -sdk ${{ matrix.sdk }} ${{ matrix.destination }} ${{ matrix.extra_flags }} |