-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy path.travis.yml
63 lines (48 loc) · 1.67 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
# http://blog.tgrrtt.com/exploring-the-travisci-configuration-file
# https://docs.travis-ci.com/user/build-stages
# https://github.com/mxcl/PromiseKit/blob/master/.travis.yml
os: osx
osx_image: xcode10.1
language: objective-c
cache:
directories:
- Carthage
stages:
- name: compile
- name: test
jobs:
include:
# Compile
- stage: compile
name: SwiftPM
script: travis_retry swift build
- name: Carthage
script: travis_retry carthage build --no-skip-current --configuration Release
- name: CocoaPods (pod lib lint)
cache: cocoapods
install: gem install cocoapods # Since Travis is not always on latest version…
script: travis_retry pod lib lint
- name: Xcode (Demo)
script: travis_retry xcodebuild -workspace "Metron.xcworkspace" -scheme "Demo" build | xcpretty
# Test
- stage: test
name: SwiftPM
before_script: set -exo pipefail
script: travis_retry swift test
- &xcode
stage: test
name: Xcode (iOS)
env: DST='OS=12.1,name=iPhone SE'
before_install: gem install xcpretty && carthage bootstrap
before_script: set -exo pipefail
script: travis_retry xcodebuild -workspace "Metron.xcworkspace" -scheme "Metron - Test" -destination "$DST" build-for-testing test | xcpretty
- <<: *xcode
name: Xcode (macOS)
env: DST='platform=OS X,arch=x86_64'
- <<: *xcode
name: Xcode (tvOS)
env: DST='OS=12.1,name=Apple TV'
# ⚠️ Apparently watchOS targets don't support testing and there's no XCTest available for the platform…
# - <<: *xcode
# name: Xcode (watchOS)
# env: DST='OS=5.1,name=Apple Watch Series 4 - 44mm'