forked from mattrubin/OneTimePassword
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
78 lines (67 loc) · 3.06 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Configuration for Travis (https://travis-ci.org)
language: objective-c
xcode_workspace: OneTimePassword.xcworkspace
xcode_scheme: OneTimePassword (iOS)
osx_image: xcode10.3
before_install:
- gem install cocoapods -v 1.7
env:
- RUNTIME="iOS 10.3" DEVICE="iPhone 7 Plus"
- RUNTIME="iOS 11.4" DEVICE="iPhone X"
- RUNTIME="iOS 12.4" DEVICE="iPhone XS Max"
# Include builds for watchOS
matrix:
include:
# Include several build-only jobs for watchOS
- xcode_scheme: OneTimePassword (watchOS)
env: BUILD_ONLY="YES" RUNTIME="watchOS 5.1" DEVICE="Apple Watch Series 4 - 44mm"
- xcode_scheme: OneTimePassword (watchOS)
env: BUILD_ONLY="YES" RUNTIME="watchOS 4.2" DEVICE="Apple Watch Series 3 - 38mm"
- xcode_scheme: OneTimePassword (watchOS)
env: BUILD_ONLY="YES" RUNTIME="watchOS 3.2" DEVICE="Apple Watch Series 2 - 42mm"
- xcode_scheme: OneTimePassword (watchOS)
osx_image: xcode10.2
env: BUILD_ONLY="YES" RUNTIME="watchOS 2.0" DEVICE="Apple Watch - 38mm"
# Build with Carthage
- env:
before_script:
script: carthage build --no-skip-current
# Build with CocoaPods
- &cocoapods
env:
before_script:
script: pod lib lint --allow-warnings --verbose
# Build with Xcode 10.1 and Swift 4.2
- &swift42
osx_image: xcode10.1
env: RUNTIME="iOS 8.4" DEVICE="iPhone 4s"
script: set -o pipefail && xcodebuild -workspace "$TRAVIS_XCODE_WORKSPACE" -scheme "$TRAVIS_XCODE_SCHEME" -destination "id=$DESTINATION_ID" SWIFT_VERSION=4.2 $ACTIONS | xcpretty -c
- <<: *swift42
env: RUNTIME="iOS 9.3" DEVICE="iPhone 6s"
# Build with CocoaPods and Swift 4.2
- <<: *cocoapods
osx_image: xcode10.1
script: pod lib lint --allow-warnings --verbose --swift-version=4.2
- &xcode11
osx_image: xcode11
env: RUNTIME="iOS 13.0" DEVICE="iPhone XR"
- <<: *xcode11
env: RUNTIME="iOS 10.3" DEVICE="iPhone 5s"
- <<: *xcode11
xcode_scheme: OneTimePassword (watchOS)
env: BUILD_ONLY="YES" RUNTIME="watchOS 6.0" DEVICE="Apple Watch Series 4 - 40mm"
- <<: *xcode11
xcode_scheme: OneTimePassword (watchOS)
env: BUILD_ONLY="YES" RUNTIME="watchOS 3.2" DEVICE="Apple Watch Series 2 - 38mm"
before_script:
- DEVICE_ID=com.apple.CoreSimulator.SimDeviceType.$(echo $DEVICE | sed -E -e "s/[ \-]+/ /g" -e "s/[^[:alnum:]]/-/g")
- RUNTIME_ID=com.apple.CoreSimulator.SimRuntime.$(echo $RUNTIME | sed -E -e "s/[ \-]+/ /g" -e "s/[^[:alnum:]]/-/g")
- DESTINATION_ID=$(xcrun simctl create Travis $DEVICE_ID $RUNTIME_ID)
- xcrun simctl boot $DESTINATION_ID
- if [[ $BUILD_ONLY == YES ]]; then ACTIONS="build"; else ACTIONS="build-for-testing test-without-building"; fi
- echo "xcodebuild -workspace \"$TRAVIS_XCODE_WORKSPACE\" -scheme \"$TRAVIS_XCODE_SCHEME\" -destination \"id=$DESTINATION_ID\" $ACTIONS"
script: set -o pipefail && xcodebuild -workspace "$TRAVIS_XCODE_WORKSPACE" -scheme "$TRAVIS_XCODE_SCHEME" -destination "id=$DESTINATION_ID" $ACTIONS | xcpretty -c
after_success:
- bash <(curl -s https://codecov.io/bash)
notifications:
email: false