|
| 1 | +name: "FDSoundActivatedRecorder CI" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + paths: |
| 8 | + - 'Sources/**' |
| 9 | + - 'Tests/**' |
| 10 | + - '.github/workflows/**' |
| 11 | + - 'Package.swift' |
| 12 | + pull_request: |
| 13 | + paths: |
| 14 | + - 'Sources/**' |
| 15 | + - 'Tests/**' |
| 16 | + - '.github/workflows/**' |
| 17 | + - 'Package.swift' |
| 18 | + |
| 19 | +concurrency: |
| 20 | + group: ${{ github.ref_name }} |
| 21 | + cancel-in-progress: true |
| 22 | + |
| 23 | +# Keep this up to date with https://github.com/FDSoundActivatedRecorder/FDSoundActivatedRecorder/blob/main/.github/workflows/ci.yml |
| 24 | +# And also https://github.com/Alamofire/Alamofire/blob/master/.github/workflows/ci.yml |
| 25 | +jobs: |
| 26 | + macOS: |
| 27 | + name: ${{ matrix.name }} |
| 28 | + runs-on: ${{ matrix.runsOn }} |
| 29 | + env: |
| 30 | + DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" |
| 31 | + timeout-minutes: 10 |
| 32 | + strategy: |
| 33 | + fail-fast: false |
| 34 | + matrix: |
| 35 | + include: |
| 36 | + - xcode: "Xcode_15.4" |
| 37 | + runsOn: firebreak |
| 38 | + name: "macOS 14, Xcode 15.4, Swift 5.10" |
| 39 | + testPlan: "macOS" |
| 40 | + outputFilter: xcbeautify --renderer github-actions |
| 41 | + - xcode: "Xcode_15.2" |
| 42 | + runsOn: firebreak |
| 43 | + name: "macOS 13, Xcode 15.2, Swift 5.9.2" |
| 44 | + testPlan: "macOS" |
| 45 | + outputFilter: xcbeautify --renderer github-actions |
| 46 | + - xcode: "Xcode_15.1" |
| 47 | + runsOn: macOS-14 |
| 48 | + name: "macOS 14, Xcode 15.1, Swift 5.9.1" |
| 49 | + testPlan: "macOS" |
| 50 | + outputFilter: xcbeautify --renderer github-actions |
| 51 | + - xcode: "Xcode_15.0.1" |
| 52 | + runsOn: macOS-14 |
| 53 | + name: "macOS 14, Xcode 15.0.1, Swift 5.9.0" |
| 54 | + testPlan: "macOS" |
| 55 | + outputFilter: xcbeautify --renderer github-actions |
| 56 | + - xcode: "Xcode_14.3.1" |
| 57 | + runsOn: macOS-13 |
| 58 | + name: "macOS 13, Xcode 14.3.1, Swift 5.8.0" |
| 59 | + testPlan: "macOS" |
| 60 | + outputFilter: xcbeautify --renderer github-actions |
| 61 | + - xcode: "Xcode_14.2" |
| 62 | + runsOn: macOS-12 |
| 63 | + name: "macOS 12, Xcode 14.2, Swift 5.7.2" |
| 64 | + testPlan: "macOS" |
| 65 | + outputFilter: xcpretty |
| 66 | + - xcode: "Xcode_14.1" |
| 67 | + runsOn: macOS-12 |
| 68 | + name: "macOS 12, Xcode 14.1, Swift 5.7.1" |
| 69 | + testPlan: "macOS" |
| 70 | + outputFilter: xcpretty |
| 71 | + steps: |
| 72 | + - uses: actions/checkout@v4 |
| 73 | + - name: ${{ matrix.name }} |
| 74 | + run: |- |
| 75 | + set -o pipefail |
| 76 | + brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk |
| 77 | + firewalk & |
| 78 | + env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire macOS" -destination "platform=macOS" -testPlan "${{ matrix.testPlan }}" clean test | ${{ matrix.outputFilter }} |
| 79 | + Catalyst: |
| 80 | + name: ${{ matrix.name }} |
| 81 | + runs-on: ${{ matrix.runsOn }} |
| 82 | + env: |
| 83 | + DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer |
| 84 | + timeout-minutes: 10 |
| 85 | + strategy: |
| 86 | + fail-fast: false |
| 87 | + matrix: |
| 88 | + include: |
| 89 | + - xcode: "Xcode_15.4" |
| 90 | + name: "Catalyst 15.4" |
| 91 | + runsOn: firebreak |
| 92 | + - xcode: "Xcode_15.2" |
| 93 | + name: "Catalyst 15.2" |
| 94 | + runsOn: firebreak |
| 95 | + - xcode: "Xcode_15.1" |
| 96 | + name: "Catalyst 15.1" |
| 97 | + runsOn: macOS-14 |
| 98 | + - xcode: "Xcode_15.0.1" |
| 99 | + name: "Catalyst 15.0" |
| 100 | + runsOn: macOS-14 |
| 101 | + - xcode: "Xcode_14.3.1" |
| 102 | + name: "Catalyst 14.3.1" |
| 103 | + runsOn: macOS-13 |
| 104 | + steps: |
| 105 | + - uses: actions/checkout@v4 |
| 106 | + - name: Install Firewalk |
| 107 | + run: brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk && firewalk & |
| 108 | + - name: Catalyst |
| 109 | + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire iOS" -destination "platform=macOS" clean test 2>&1 | xcbeautify --renderer github-actions |
| 110 | + iOS: |
| 111 | + name: ${{ matrix.name }} |
| 112 | + runs-on: ${{ matrix.runsOn }} |
| 113 | + env: |
| 114 | + DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" |
| 115 | + timeout-minutes: 10 |
| 116 | + strategy: |
| 117 | + fail-fast: false |
| 118 | + matrix: |
| 119 | + include: |
| 120 | + - destination: "OS=17.5,name=iPhone 15 Pro" |
| 121 | + name: "iOS 17.5" |
| 122 | + testPlan: "iOS" |
| 123 | + xcode: "Xcode_15.4" |
| 124 | + runsOn: firebreak |
| 125 | + - destination: "OS=17.2,name=iPhone 15 Pro" |
| 126 | + name: "iOS 17.2" |
| 127 | + testPlan: "iOS" |
| 128 | + xcode: "Xcode_15.2" |
| 129 | + runsOn: firebreak |
| 130 | + - destination: "OS=17.0,name=iPhone 15 Pro" |
| 131 | + name: "iOS 17.0" |
| 132 | + testPlan: "iOS" |
| 133 | + xcode: "Xcode_15.0.1" |
| 134 | + runsOn: macOS-14 |
| 135 | + - destination: "OS=16.4,name=iPhone 14 Pro" |
| 136 | + name: "iOS 16.4" |
| 137 | + testPlan: "iOS" |
| 138 | + xcode: "Xcode_14.3.1" |
| 139 | + runsOn: macOS-13 |
| 140 | + - destination: "OS=15.5,name=iPhone 13 Pro" |
| 141 | + name: "iOS 15.5" |
| 142 | + testPlan: "iOS-NoTS" |
| 143 | + xcode: "Xcode_14.3.1" |
| 144 | + runsOn: firebreak |
| 145 | + steps: |
| 146 | + - uses: actions/checkout@v4 |
| 147 | + - name: Install Firewalk |
| 148 | + run: brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk && firewalk & |
| 149 | + - name: ${{ matrix.name }} |
| 150 | + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire iOS" -destination "${{ matrix.destination }}" -testPlan "${{ matrix.testPlan }}" clean test 2>&1 | xcbeautify --renderer github-actions |
| 151 | + tvOS: |
| 152 | + name: ${{ matrix.name }} |
| 153 | + runs-on: ${{ matrix.runsOn }} |
| 154 | + env: |
| 155 | + DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer |
| 156 | + timeout-minutes: 10 |
| 157 | + strategy: |
| 158 | + fail-fast: false |
| 159 | + matrix: |
| 160 | + include: |
| 161 | + - destination: "OS=17.5,name=Apple TV" |
| 162 | + name: "tvOS 17.5" |
| 163 | + testPlan: "tvOS" |
| 164 | + xcode: "Xcode_15.4" |
| 165 | + runsOn: firebreak |
| 166 | + - destination: "OS=17.2,name=Apple TV" |
| 167 | + name: "tvOS 17.2" |
| 168 | + testPlan: "tvOS" |
| 169 | + xcode: "Xcode_15.2" |
| 170 | + runsOn: firebreak |
| 171 | + - destination: "OS=17.0,name=Apple TV" |
| 172 | + name: "tvOS 17.0" |
| 173 | + testPlan: "tvOS" |
| 174 | + xcode: "Xcode_15.0.1" |
| 175 | + runsOn: macOS-14 |
| 176 | + - destination: "OS=16.4,name=Apple TV" |
| 177 | + name: "tvOS 16.4" |
| 178 | + testPlan: "tvOS" |
| 179 | + xcode: "Xcode_14.3.1" |
| 180 | + runsOn: macOS-13 |
| 181 | + - destination: "OS=15.4,name=Apple TV" |
| 182 | + name: "tvOS 15.4" |
| 183 | + testPlan: "tvOS-NoTS" |
| 184 | + xcode: "Xcode_14.3.1" |
| 185 | + runsOn: firebreak |
| 186 | + steps: |
| 187 | + - uses: actions/checkout@v4 |
| 188 | + - name: Install Firewalk |
| 189 | + run: brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk && firewalk & |
| 190 | + - name: ${{ matrix.name }} |
| 191 | + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire tvOS" -destination "${{ matrix.destination }}" -testPlan "${{ matrix.testPlan }}" clean test 2>&1 | xcbeautify --renderer github-actions |
| 192 | + visionOS: |
| 193 | + name: ${{ matrix.name }} |
| 194 | + runs-on: ${{ matrix.runsOn }} |
| 195 | + env: |
| 196 | + DEVELOPER_DIR: "/Applications/Xcode_15.2.app/Contents/Developer" |
| 197 | + timeout-minutes: 10 |
| 198 | + strategy: |
| 199 | + fail-fast: false |
| 200 | + matrix: |
| 201 | + include: |
| 202 | + - destination: "OS=1.0,name=Apple Vision Pro" |
| 203 | + name: "visionOS 1.0" |
| 204 | + testPlan: "visionOS" |
| 205 | + scheme: "Alamofire visionOS" |
| 206 | + runsOn: firebreak |
| 207 | + steps: |
| 208 | + - uses: actions/checkout@v4 |
| 209 | + - name: Install Firewalk |
| 210 | + run: brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk && firewalk & |
| 211 | + - name: ${{ matrix.name }} |
| 212 | + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -testPlan "${{ matrix.testPlan }}" clean test 2>&1 | xcbeautify --renderer github-actions |
| 213 | + watchOS: |
| 214 | + name: ${{ matrix.name }} |
| 215 | + runs-on: ${{ matrix.runsOn }} |
| 216 | + env: |
| 217 | + DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer |
| 218 | + timeout-minutes: 10 |
| 219 | + strategy: |
| 220 | + fail-fast: false |
| 221 | + matrix: |
| 222 | + include: |
| 223 | + - destination: "OS=10.5,name=Apple Watch Series 9 (45mm)" |
| 224 | + name: "watchOS 10.5" |
| 225 | + testPlan: "watchOS" |
| 226 | + xcode: "Xcode_15.4" |
| 227 | + runsOn: firebreak |
| 228 | + - destination: "OS=10.2,name=Apple Watch Series 9 (45mm)" |
| 229 | + name: "watchOS 10.2" |
| 230 | + testPlan: "watchOS" |
| 231 | + xcode: "Xcode_15.2" |
| 232 | + runsOn: firebreak |
| 233 | + - destination: "OS=10.0,name=Apple Watch Series 9 (45mm)" |
| 234 | + name: "watchOS 10.0" |
| 235 | + testPlan: "watchOS" |
| 236 | + xcode: "Xcode_15.0.1" |
| 237 | + runsOn: macOS-14 |
| 238 | + - destination: "OS=9.4,name=Apple Watch Series 8 (45mm)" |
| 239 | + name: "watchOS 9.4" |
| 240 | + testPlan: "watchOS" |
| 241 | + xcode: "Xcode_14.3.1" |
| 242 | + runsOn: macOS-13 |
| 243 | + steps: |
| 244 | + - uses: actions/checkout@v4 |
| 245 | + - name: Install Firewalk |
| 246 | + run: brew update && brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk && firewalk & |
| 247 | + - name: ${{ matrix.name }} |
| 248 | + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire watchOS" -destination "${{ matrix.destination }}" -testPlan "${{ matrix.testPlan }}" clean test 2>&1 | xcbeautify --renderer github-actions |
| 249 | + SPM: |
| 250 | + name: ${{ matrix.name }} |
| 251 | + runs-on: ${{ matrix.runsOn }} |
| 252 | + env: |
| 253 | + DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" |
| 254 | + timeout-minutes: 10 |
| 255 | + strategy: |
| 256 | + fail-fast: false |
| 257 | + matrix: |
| 258 | + include: |
| 259 | + - xcode: "Xcode_15.4" |
| 260 | + runsOn: firebreak |
| 261 | + name: "macOS 14, SPM 5.10 Test" |
| 262 | + outputFilter: xcbeautify --renderer github-actions |
| 263 | + - xcode: "Xcode_15.2" |
| 264 | + runsOn: firebreak |
| 265 | + name: "macOS 13, SPM 5.9.2 Test" |
| 266 | + outputFilter: xcbeautify --renderer github-actions |
| 267 | + - xcode: "Xcode_15.1" |
| 268 | + runsOn: macOS-14 |
| 269 | + name: "macOS 14, SPM 5.9.1 Test" |
| 270 | + outputFilter: xcbeautify --renderer github-actions |
| 271 | + - xcode: "Xcode_15.0.1" |
| 272 | + runsOn: macOS-14 |
| 273 | + name: "macOS 14, SPM 5.9.0 Test" |
| 274 | + outputFilter: xcbeautify --renderer github-actions |
| 275 | + - xcode: "Xcode_14.3.1" |
| 276 | + runsOn: macOS-13 |
| 277 | + name: "macOS 13, SPM 5.8.0 Test" |
| 278 | + outputFilter: xcbeautify --renderer github-actions |
| 279 | + - xcode: "Xcode_14.2" |
| 280 | + runsOn: macOS-12 |
| 281 | + name: "macOS 12, SPM 5.7.2 Test" |
| 282 | + outputFilter: xcpretty |
| 283 | + - xcode: "Xcode_14.1" |
| 284 | + runsOn: macOS-12 |
| 285 | + name: "macOS 12, SPM 5.7.1 Test" |
| 286 | + outputFilter: xcpretty |
| 287 | + steps: |
| 288 | + - uses: actions/checkout@v4 |
| 289 | + - name: Install Firewalk |
| 290 | + run: brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk xcbeautify && firewalk & |
| 291 | + - name: Test SPM |
| 292 | + run: swift test -c debug | ${{ matrix.outputFilter }} |
| 293 | + Linux: |
| 294 | + name: Linux |
| 295 | + runs-on: ubuntu-latest |
| 296 | + strategy: |
| 297 | + fail-fast: false |
| 298 | + matrix: |
| 299 | + include: |
| 300 | + - image: swift:5.8-focal |
| 301 | + - image: swift:5.8-jammy |
| 302 | + - image: swift:5.8-centos7 |
| 303 | + - image: swift:5.8-amazonlinux2 |
| 304 | + - image: swift:5.8-rhel-ubi9 |
| 305 | + - image: swift:5.9-focal |
| 306 | + - image: swift:5.9-jammy |
| 307 | + - image: swift:5.9-centos7 |
| 308 | + - image: swift:5.9-amazonlinux2 |
| 309 | + - image: swift:5.9-rhel-ubi9 |
| 310 | + - image: swiftlang/swift:nightly-focal |
| 311 | + - image: swiftlang/swift:nightly-jammy |
| 312 | + - image: swiftlang/swift:nightly-amazonlinux2 |
| 313 | + container: |
| 314 | + image: ${{ matrix.image }} |
| 315 | + timeout-minutes: 10 |
| 316 | + steps: |
| 317 | + - uses: actions/checkout@v4 |
| 318 | + - name: ${{ matrix.image }} |
| 319 | + run: swift build --build-tests -c debug |
| 320 | + Android: |
| 321 | + name: Android |
| 322 | + uses: hggz/swift-android-sdk/.github/workflows/sdks.yml@ci |
| 323 | + strategy: |
| 324 | + fail-fast: false |
| 325 | + with: |
| 326 | + target-repo: ${{ github.repository }} |
| 327 | + checkout-hash: ${{ github.sha }} |
| 328 | + Windows: |
| 329 | + name: ${{ matrix.name }} |
| 330 | + runs-on: windows-latest |
| 331 | + timeout-minutes: 10 |
| 332 | + strategy: |
| 333 | + fail-fast: false |
| 334 | + matrix: |
| 335 | + include: |
| 336 | + - branch: swift-5.8-release |
| 337 | + tag: 5.8-RELEASE |
| 338 | + name: Windows Swift 5.8 |
| 339 | + - branch: swift-5.9-release |
| 340 | + tag: 5.9-RELEASE |
| 341 | + name: Windows Swift 5.9 |
| 342 | + - branch: swift-5.10-release |
| 343 | + tag: 5.10-RELEASE |
| 344 | + name: Windows Swift 5.10 |
| 345 | + steps: |
| 346 | + - name: Setup |
| 347 | + uses: compnerd/gha-setup-swift@main |
| 348 | + with: |
| 349 | + branch: ${{ matrix.branch }} |
| 350 | + tag: ${{ matrix.tag }} |
| 351 | + - name: Clone |
| 352 | + uses: actions/checkout@v4 |
| 353 | + - name: SPM ${{ matrix.name }} |
| 354 | + run: | |
| 355 | + swift build --build-tests -c debug -Xlinker /INCREMENTAL:NO -v |
| 356 | + CodeQL: |
| 357 | + name: Analyze with CodeQL |
| 358 | + runs-on: macOS-13 |
| 359 | + env: |
| 360 | + DEVELOPER_DIR: "/Applications/Xcode_14.3.1.app/Contents/Developer" |
| 361 | + timeout-minutes: 10 |
| 362 | + steps: |
| 363 | + - name: Clone |
| 364 | + uses: actions/checkout@v4 |
| 365 | + - name: Initialize CodeQL |
| 366 | + uses: github/codeql-action/init@v2 |
| 367 | + with: |
| 368 | + languages: swift |
| 369 | + - name: Build macOS |
| 370 | + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire macOS" -destination "platform=macOS" clean build | xcpretty |
| 371 | + - name: Perform CodeQL Analysis |
| 372 | + uses: github/codeql-action/analyze@v2 |
| 373 | + with: |
| 374 | + category: "/language:swift" |
0 commit comments