Adjust version + add CI #3
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: | |
| workflow_dispatch: | |
| jobs: | |
| apple: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runner: | |
| - macos-14 | |
| - macos-15 | |
| xcode: | |
| - Xcode_15.2 | |
| - Xcode_16.0 | |
| destination: | |
| - 'platform=iOS Simulator,OS=17.2,name=iPhone 15' | |
| - 'platform=iOS Simulator,OS=18.0,name=iPhone 16' | |
| - 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)' | |
| - 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)' | |
| - 'platform=macOS' | |
| exclude: | |
| # Don't run old macOS with new Xcode | |
| - runner: macos-14 | |
| xcode: Xcode_16.0 | |
| # Don't run new macOS with old Xcode | |
| - runner: macos-15 | |
| xcode: Xcode_15.2 | |
| # Don't run old simulators with new Xcode | |
| - destination: 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)' | |
| xcode: Xcode_16.0 | |
| - destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15' | |
| xcode: Xcode_16.0 | |
| # Don't run new simulators with old Xcode | |
| - destination: 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)' | |
| xcode: Xcode_15.2 | |
| - destination: 'platform=iOS Simulator,OS=18.0,name=iPhone 16' | |
| xcode: Xcode_15.2 | |
| steps: | |
| - name: Configure Xcode | |
| run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Cache Swift | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/Library/Caches/org.swift.swiftpm | |
| ~/.cache/org.swift.swiftpm | |
| key: 1-${{ runner.os }}-${{ matrix.xcode }}-${{ hashFiles('Package.swift') }} | |
| restore-keys: | | |
| 1-${{ runner.os }}-${{ matrix.xcode }}-${{ hashFiles('Package.swift') }} | |
| 1-${{ runner.os }}-${{ matrix.xcode }}- | |
| - name: Tools Versions | |
| run: | | |
| xcodebuild -version | |
| swift --version | |
| - name: Build and Run Tests | |
| run: | | |
| set -o pipefail && \ | |
| NSUnbufferedIO=YES xcodebuild \ | |
| -scheme smithy-swift-opentelemetry \ | |
| -destination '${{ matrix.destination }}' \ | |
| test 2>&1 \ | |
| | xcbeautify | |