forked from mattrubin/OneTimePassword
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
56 lines (44 loc) · 2.05 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
# Configuration for Travis (https://travis-ci.org)
language: objective-c
xcode_workspace: OneTimePassword.xcworkspace
xcode_scheme: OneTimePassword (iOS)
osx_image: xcode12.4
env:
- RUNTIME="iOS 11.4" DEVICE="iPhone X"
# Include builds for watchOS
matrix:
include:
# Build and test with Xcode 12.2 because it's the last pre-macOS 11 Travis image, with support for older iOS runtimes.
- &xcode12_2
osx_image: xcode12.2
env: RUNTIME="iOS 10.3" DEVICE="iPhone 5s"
# Build and test with Xcode 10.2 to ensure iOS 9 and Swift 5.0 support.
# - &xcode10_2
# osx_image: xcode10.2
# env: RUNTIME="iOS 9.0" DEVICE="iPhone 4s"
# Include several build-only jobs for watchOS
- &watchos
xcode_scheme: OneTimePassword (watchOS)
# Build with Xcode 12.2 because it's the last pre-macOS 11 Travis image, with support for older watchOS runtimes.
osx_image: xcode12.2
env: BUILD_ONLY="YES" RUNTIME="watchOS 4.2" DEVICE="Apple Watch Series 3 - 42mm"
- <<: *watchos
osx_image: xcode11
# The oldest supported runtime and device:
env: BUILD_ONLY="YES" RUNTIME="watchOS 3.2" DEVICE="Apple Watch - 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)
branches:
only:
- develop
- release
notifications:
email: false