|
1 | 1 | os: osx |
2 | | -language: objective-c |
3 | | -matrix: |
4 | | - include: |
5 | | - - {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=3.2 DST="OS=11.2,name=Apple TV"'} |
6 | | - - {osx_image: xcode9.2, env: 'PLAT=watchOS SWFT=3.2 DST="OS=4.2,name=Apple Watch - 38mm"'} |
| 2 | +language: swift |
| 3 | +osx_image: xcode10.2 |
7 | 4 |
|
8 | | - - {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=3.3 DST="OS=11.4,name=iPhone SE"'} |
9 | | - - {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=3.3 DST="OS=11.4,name=Apple TV"'} |
10 | | - - {osx_image: xcode9.4, env: 'PLAT=watchOS SWFT=3.3 DST="OS=4.3,name=Apple Watch - 38mm"'} |
| 5 | +branches: |
| 6 | + only: |
| 7 | + - master |
| 8 | +stages: |
| 9 | + - lint |
| 10 | + - carthage |
| 11 | + - test |
| 12 | +jobs: |
| 13 | + include: |
| 14 | + - &pod |
| 15 | + stage: lint |
| 16 | + osx_image: xcode9.4 |
| 17 | + env: SWIFT=3.3 |
| 18 | + before_install: |
| 19 | + gem install cocoapods --prerelease --version 1.7.0.beta.3 |
| 20 | + install: |
| 21 | + carthage bootstrap --no-build PromiseKit |
| 22 | + script: | |
| 23 | + cd Carthage/Checkouts/PromiseKit |
| 24 | + mv .github/PromiseKit.podspec . |
| 25 | + rm -rf Extensions/HomeKit/Sources |
| 26 | + cp -R ../../../Sources Extensions/HomeKit |
| 27 | + pod lib lint --subspec=PromiseKit/HomeKit --fail-fast --swift-version=$SWIFT |
| 28 | + - <<: *pod |
| 29 | + osx_image: xcode10.1 |
| 30 | + env: SWIFT=3.4 |
| 31 | + - <<: *pod |
| 32 | + osx_image: xcode9.4 |
| 33 | + env: SWIFT=4.1 |
| 34 | + - <<: *pod |
| 35 | + osx_image: xcode10.1 |
| 36 | + env: SWIFT=4.2 |
| 37 | + - <<: *pod |
| 38 | + osx_image: xcode10.2 |
| 39 | + env: SWIFT=5.0 |
11 | 40 |
|
12 | | - - {osx_image: xcode10, env: 'PLAT=iOS SWFT=3.4 DST="OS=12.0,name=iPhone SE"'} |
13 | | - - {osx_image: xcode10, env: 'PLAT=tvOS SWFT=3.4 DST="OS=12.0,name=Apple TV"'} |
14 | | - - {osx_image: xcode10, env: 'PLAT=watchOS SWFT=3.4 DST="OS=5.0,name=Apple Watch Series 3 - 42mm"'} |
| 41 | + - &carthage |
| 42 | + stage: carthage |
| 43 | + osx_image: xcode9.4 |
| 44 | + script: | |
| 45 | + carthage bootstrap --cache-builds |
| 46 | + sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj |
| 47 | + carthage build --no-skip-current |
| 48 | + cache.directories: |
| 49 | + - Carthage |
| 50 | + - <<: *carthage |
| 51 | + osx_image: xcode10.1 |
| 52 | + - <<: *carthage |
| 53 | + osx_image: xcode10.2 |
15 | 54 |
|
16 | | - - {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=4.0 DST="OS=11.2,name=Apple TV"'} |
17 | | - - {osx_image: xcode9.2, env: 'PLAT=watchOS SWFT=4.0 DST="OS=4.2,name=Apple Watch - 38mm"'} |
18 | | - |
19 | | - - {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=11.4,name=iPhone 5s" TEST=1'} |
20 | | - - {osx_image: xcode9.3, env: 'PLAT=tvOS SWFT=4.1 DST="OS=10.2,name=Apple TV 1080p"'} |
21 | | - - {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=4.1 DST="OS=11.4,name=Apple TV" TEST=1'} |
22 | | - - {osx_image: xcode9.3, env: 'PLAT=watchOS SWFT=4.1 DST="OS=3.2,name=Apple Watch - 38mm"'} |
23 | | - - {osx_image: xcode9.4, env: 'PLAT=watchOS SWFT=4.1 DST="OS=4.3,name=Apple Watch - 38mm"'} |
24 | | - |
25 | | - - {osx_image: xcode10, env: 'PLAT=iOS SWFT=4.2 DST="OS=12.0,name=iPhone SE"'} |
26 | | - - {osx_image: xcode10, env: 'PLAT=tvOS SWFT=4.2 DST="OS=12.0,name=Apple TV"'} |
27 | | - - {osx_image: xcode10, env: 'PLAT=watchOS SWFT=4.2 DST="OS=5.0,name=Apple Watch Series 3 - 42mm"'} |
28 | | -cache: |
29 | | - directories: |
30 | | - - Carthage |
31 | | -before_install: |
32 | | - - carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT --verbose |
33 | | -install: |
34 | | - - xcodebuild -scheme PMKHomeKit -target PMKHomeKit -quiet -destination "$DST" SWIFT_VERSION=$SWFT SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build |
35 | | - - if [[ $TEST == "1" ]]; then |
36 | | - xcodebuild -scheme PMKHomeKit -target PMKHKTests -quiet -destination "$DST" build; |
37 | | - fi |
38 | | -script: |
39 | | - - if [[ "$TEST" == "1" ]]; then |
40 | | - xcodebuild -scheme PMKHomeKit -quiet -destination "$DST" test; |
41 | | - fi |
| 55 | + - &test |
| 56 | + stage: test |
| 57 | + xcode_scheme: PMKHomeKit |
| 58 | + xcode_project: PMKHomeKit.xcodeproj |
| 59 | + xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' |
| 60 | + cache.directories: |
| 61 | + - Carthage |
| 62 | + before_install: |
| 63 | + carthage bootstrap --cache-builds --no-use-binaries |
| 64 | + after_success: |
| 65 | + bash <(curl -s https://codecov.io/bash); |
| 66 | + - <<: *test |
| 67 | + xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' |
0 commit comments