|
| 1 | +name: SundialKitStream |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches-ignore: |
| 5 | + - '*WIP' |
| 6 | +env: |
| 7 | + PACKAGE_NAME: SundialKitStream |
| 8 | +jobs: |
| 9 | + build-ubuntu: |
| 10 | + name: Build on Ubuntu |
| 11 | + runs-on: ubuntu-latest |
| 12 | + container: ${{ matrix.swift.nightly && format('swiftlang/swift:nightly-{0}-{1}', matrix.swift.version, matrix.os) || format('swift:{0}-{1}', matrix.swift.version, matrix.os) }} |
| 13 | + if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + os: [noble, jammy] |
| 18 | + swift: |
| 19 | + - version: "6.1" |
| 20 | + - version: "6.2" |
| 21 | + - version: "6.1" |
| 22 | + nightly: true |
| 23 | + - version: "6.2" |
| 24 | + nightly: true |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + - uses: brightdigit/swift-build@v1.4.0 |
| 28 | + with: |
| 29 | + scheme: ${{ env.PACKAGE_NAME }} |
| 30 | + - uses: sersoft-gmbh/swift-coverage-action@v4 |
| 31 | + id: coverage-files |
| 32 | + with: |
| 33 | + fail-on-empty-output: true |
| 34 | + - name: Upload coverage to Codecov |
| 35 | + uses: codecov/codecov-action@v4 |
| 36 | + with: |
| 37 | + fail_ci_if_error: true |
| 38 | + flags: swift-${{ matrix.swift.version }}-${{ matrix.os }}${{ matrix.swift.nightly && '-nightly' || '' }} |
| 39 | + verbose: true |
| 40 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 41 | + files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }} |
| 42 | + build-macos: |
| 43 | + name: Build on macOS |
| 44 | + runs-on: ${{ matrix.runs-on }} |
| 45 | + if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} |
| 46 | + strategy: |
| 47 | + fail-fast: false |
| 48 | + matrix: |
| 49 | + include: |
| 50 | + # SPM Build Matrix - Xcode 16.x+ (Swift 6.1+) |
| 51 | + - runs-on: macos-26 |
| 52 | + xcode: "/Applications/Xcode_26.1.app" |
| 53 | + - runs-on: macos-26 |
| 54 | + xcode: "/Applications/Xcode_26.0.app" |
| 55 | + - runs-on: macos-15 |
| 56 | + xcode: "/Applications/Xcode_16.4.app" |
| 57 | + - runs-on: macos-15 |
| 58 | + xcode: "/Applications/Xcode_16.3.app" |
| 59 | + |
| 60 | + # iOS Build Matrix - Xcode 16.x+ (Swift 6.1+) |
| 61 | + - type: ios |
| 62 | + runs-on: macos-26 |
| 63 | + xcode: "/Applications/Xcode_26.1.app" |
| 64 | + deviceName: "iPhone 17 Pro" |
| 65 | + osVersion: "26.1" |
| 66 | + download-platform: true |
| 67 | + |
| 68 | + - type: ios |
| 69 | + runs-on: macos-26 |
| 70 | + xcode: "/Applications/Xcode_26.0.app" |
| 71 | + deviceName: "iPhone 17 Pro" |
| 72 | + osVersion: "26.0.1" |
| 73 | + download-platform: true |
| 74 | + |
| 75 | + - type: ios |
| 76 | + runs-on: macos-15 |
| 77 | + xcode: "/Applications/Xcode_16.4.app" |
| 78 | + deviceName: "iPhone 16e" |
| 79 | + osVersion: "18.5" |
| 80 | + |
| 81 | + - type: ios |
| 82 | + runs-on: macos-15 |
| 83 | + xcode: "/Applications/Xcode_16.3.app" |
| 84 | + deviceName: "iPhone 16" |
| 85 | + osVersion: "18.4" |
| 86 | + |
| 87 | + # watchOS Build Matrix - Xcode 16.x+ (Swift 6.1+) |
| 88 | + - type: watchos |
| 89 | + runs-on: macos-26 |
| 90 | + xcode: "/Applications/Xcode_26.1.app" |
| 91 | + deviceName: "Apple Watch Ultra 3 (49mm)" |
| 92 | + osVersion: "26.0" |
| 93 | + download-platform: true |
| 94 | + |
| 95 | + - type: watchos |
| 96 | + runs-on: macos-26 |
| 97 | + xcode: "/Applications/Xcode_26.0.app" |
| 98 | + deviceName: "Apple Watch Ultra 3 (49mm)" |
| 99 | + osVersion: "26.0" |
| 100 | + download-platform: true |
| 101 | + |
| 102 | + - type: watchos |
| 103 | + runs-on: macos-15 |
| 104 | + xcode: "/Applications/Xcode_16.4.app" |
| 105 | + deviceName: "Apple Watch Series 10 (46mm)" |
| 106 | + osVersion: "11.5" |
| 107 | + |
| 108 | + - type: watchos |
| 109 | + runs-on: macos-15 |
| 110 | + xcode: "/Applications/Xcode_16.3.app" |
| 111 | + deviceName: "Apple Watch Series 10 (42mm)" |
| 112 | + osVersion: "11.4" |
| 113 | + |
| 114 | + steps: |
| 115 | + - uses: actions/checkout@v4 |
| 116 | + |
| 117 | + - name: Build and Test |
| 118 | + uses: brightdigit/swift-build@v1.4.0 |
| 119 | + with: |
| 120 | + scheme: ${{ env.PACKAGE_NAME }} |
| 121 | + type: ${{ matrix.type }} |
| 122 | + xcode: ${{ matrix.xcode }} |
| 123 | + deviceName: ${{ matrix.deviceName }} |
| 124 | + osVersion: ${{ matrix.osVersion }} |
| 125 | + download-platform: ${{ matrix.download-platform }} |
| 126 | + |
| 127 | + # Coverage Steps |
| 128 | + - name: Process Coverage |
| 129 | + uses: sersoft-gmbh/swift-coverage-action@v4 |
| 130 | + |
| 131 | + - name: Upload Coverage |
| 132 | + uses: codecov/codecov-action@v4 |
| 133 | + with: |
| 134 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 135 | + flags: ${{ matrix.type && format('{0}{1}', matrix.type, matrix.osVersion) || 'spm' }} |
| 136 | + |
| 137 | + lint: |
| 138 | + name: Linting |
| 139 | + if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} |
| 140 | + runs-on: ubuntu-latest |
| 141 | + needs: [build-ubuntu, build-macos] |
| 142 | + env: |
| 143 | + LINT_MODE: STRICT |
| 144 | + steps: |
| 145 | + - uses: actions/checkout@v4 |
| 146 | + - name: Install mise |
| 147 | + uses: jdx/mise-action@v2 |
| 148 | + with: |
| 149 | + version: 2024.11.0 |
| 150 | + install: true |
| 151 | + cache: true |
| 152 | + - name: Lint |
| 153 | + run: | |
| 154 | + set -e |
| 155 | + ./Scripts/lint.sh |
0 commit comments