|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | test: |
11 | | - name: Test on ${{ matrix.destination }} |
| 11 | + name: ${{ matrix.xcode }} / ${{ matrix.platform }} / Swift ${{ matrix.swift-version }} |
12 | 12 | runs-on: macos-15 |
13 | 13 |
|
14 | 14 | strategy: |
15 | 15 | fail-fast: false |
16 | 16 | matrix: |
17 | 17 | include: |
18 | | - - destination: 'platform=iOS Simulator,name=iPhone 16' |
19 | | - name: iOS |
20 | | - - destination: 'platform=watchOS Simulator,name=Apple Watch Series 11 (42mm)' |
21 | | - name: watchOS |
| 18 | + # Xcode 16 - Swift 6 language mode |
| 19 | + - xcode: 'Xcode 16' |
| 20 | + xcode-path: '/Applications/Xcode_16.4.app' |
| 21 | + destination: 'platform=iOS Simulator,name=iPhone 16' |
| 22 | + platform: iOS |
| 23 | + swift-version: '6' |
| 24 | + - xcode: 'Xcode 16' |
| 25 | + xcode-path: '/Applications/Xcode_16.4.app' |
| 26 | + destination: 'platform=watchOS Simulator,name=Apple Watch Series 11 (42mm)' |
| 27 | + platform: watchOS |
| 28 | + swift-version: '6' |
| 29 | + |
| 30 | + # Xcode 16 - Swift 5 language mode |
| 31 | + - xcode: 'Xcode 16' |
| 32 | + xcode-path: '/Applications/Xcode_16.4.app' |
| 33 | + destination: 'platform=iOS Simulator,name=iPhone 16' |
| 34 | + platform: iOS |
| 35 | + swift-version: '5' |
| 36 | + |
| 37 | + # Xcode 26 - Swift 6 language mode |
| 38 | + - xcode: 'Xcode 26' |
| 39 | + xcode-path: '/Applications/Xcode_26.0.1.app' |
| 40 | + destination: 'platform=iOS Simulator,name=iPhone 16' |
| 41 | + platform: iOS |
| 42 | + swift-version: '6' |
| 43 | + - xcode: 'Xcode 26' |
| 44 | + xcode-path: '/Applications/Xcode_26.0.1.app' |
| 45 | + destination: 'platform=watchOS Simulator,name=Apple Watch Series 11 (42mm)' |
| 46 | + platform: watchOS |
| 47 | + swift-version: '6' |
| 48 | + |
| 49 | + # Xcode 26 - Swift 5 language mode |
| 50 | + - xcode: 'Xcode 26' |
| 51 | + xcode-path: '/Applications/Xcode_26.0.1.app' |
| 52 | + destination: 'platform=iOS Simulator,name=iPhone 16' |
| 53 | + platform: iOS |
| 54 | + swift-version: '5' |
22 | 55 |
|
23 | 56 | steps: |
24 | 57 | - name: Checkout |
25 | 58 | uses: actions/checkout@v4 |
26 | 59 |
|
| 60 | + - name: Select Xcode ${{ matrix.xcode }} |
| 61 | + run: sudo xcode-select -s ${{ matrix.xcode-path }}/Contents/Developer |
| 62 | + |
27 | 63 | - name: Show Xcode version |
28 | 64 | run: xcodebuild -version |
29 | 65 |
|
| 66 | + - name: Show Swift version |
| 67 | + run: swift --version |
| 68 | + |
30 | 69 | - name: Build and Test |
31 | 70 | run: | |
32 | 71 | xcodebuild test \ |
33 | 72 | -scheme MultiPicker \ |
34 | 73 | -destination '${{ matrix.destination }}' \ |
35 | | - -enableCodeCoverage YES |
| 74 | + -enableCodeCoverage YES \ |
| 75 | + SWIFT_VERSION=${{ matrix.swift-version }} |
36 | 76 |
|
37 | 77 | - name: Upload coverage reports to Codecov |
38 | | - if: matrix.name == 'iOS' |
| 78 | + if: matrix.platform == 'iOS' && matrix.xcode == 'Xcode 16' && matrix.swift-version == '6' |
39 | 79 | uses: codecov/codecov-action@v4 |
40 | 80 | with: |
41 | 81 | fail_ci_if_error: false |
|
0 commit comments