|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + pull_request: |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + apple: |
| 11 | + runs-on: ${{ matrix.runner }} |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + runner: |
| 16 | + - macos-14 |
| 17 | + - macos-26 |
| 18 | + xcode: |
| 19 | + - Xcode_15.2 |
| 20 | + - Xcode_26.0 |
| 21 | + destination: |
| 22 | + - 'platform=iOS Simulator,OS=17.2,name=iPhone 15' |
| 23 | + - 'platform=iOS Simulator,OS=26.0.1,name=iPhone 17' |
| 24 | + - 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)' |
| 25 | + - 'platform=tvOS Simulator,OS=26.0,name=Apple TV 4K (3rd generation) (at 1080p)' |
| 26 | + - 'platform=macOS' |
| 27 | + exclude: |
| 28 | + # Don't run old macOS with new Xcode |
| 29 | + - runner: macos-14 |
| 30 | + xcode: Xcode_26.0 |
| 31 | + # Don't run new macOS with old Xcode |
| 32 | + - runner: macos-26 |
| 33 | + xcode: Xcode_15.2 |
| 34 | + # Don't run old simulators with new Xcode |
| 35 | + - destination: 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)' |
| 36 | + xcode: Xcode_26.0 |
| 37 | + - destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15' |
| 38 | + xcode: Xcode_26.0 |
| 39 | + # Don't run new simulators with old Xcode |
| 40 | + - destination: 'platform=tvOS Simulator,OS=26.0,name=Apple TV 4K (3rd generation) (at 1080p)' |
| 41 | + xcode: Xcode_15.2 |
| 42 | + - destination: 'platform=iOS Simulator,OS=26.0.1,name=iPhone 17' |
| 43 | + xcode: Xcode_15.2 |
| 44 | + |
| 45 | + steps: |
| 46 | + - name: Configure Xcode |
| 47 | + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app |
| 48 | + |
| 49 | + - name: Checkout code |
| 50 | + uses: actions/checkout@v4 |
| 51 | + |
| 52 | + - name: Cache Swift |
| 53 | + uses: actions/cache@v4 |
| 54 | + with: |
| 55 | + path: | |
| 56 | + ~/Library/Caches/org.swift.swiftpm |
| 57 | + ~/.cache/org.swift.swiftpm |
| 58 | + key: 1-${{ runner.os }}-${{ matrix.xcode }}-${{ hashFiles('Package.swift') }} |
| 59 | + restore-keys: | |
| 60 | + 1-${{ runner.os }}-${{ matrix.xcode }}-${{ hashFiles('Package.swift') }} |
| 61 | + 1-${{ runner.os }}-${{ matrix.xcode }}- |
| 62 | + |
| 63 | + - name: Tools Versions |
| 64 | + run: | |
| 65 | + xcodebuild -version |
| 66 | + swift --version |
| 67 | + |
| 68 | + - name: Build and Run Tests |
| 69 | + run: | |
| 70 | + set -o pipefail && \ |
| 71 | + NSUnbufferedIO=YES xcodebuild \ |
| 72 | + -scheme smithy-swift-opentelemetry \ |
| 73 | + -destination '${{ matrix.destination }}' \ |
| 74 | + test 2>&1 \ |
| 75 | + | xcbeautify |
| 76 | +
|
| 77 | +
|
0 commit comments