forked from pusher/pusher-websocket-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (44 loc) · 1.7 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
language: objective-c
osx_image: xcode10.2
sudo: false
env:
- iOS= DST='platform=iOS Simulator,name=iPhone X' ACTION=test DEVICE='iPhone X (11.3)'
- tvOS= DST='platform=tvOS Simulator,name=Apple TV 4K' ACTION=test DEVICE='Apple TV 4K (11.3)'
- macOS= DST='platform=OS X' ACTION=test
before_install:
- brew update
- if brew list | grep -q carthage; then
echo Carthage installed. Proceed without installing;
carthage version;
else
echo Carthage not installed. Installing using homebrew;
brew install carthage;
fi
- gem install xcpretty --no-document
- carthage bootstrap --no-use-binaries
- SIMULATOR_ID=$(xcrun instruments -s | grep -o "$DEVICE \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$/\1/")
- echo "$SIMULATOR_ID"
before_deploy:
- carthage build --no-skip-current
- carthage archive PusherSwift
deploy:
provider: releases
api_key:
secure: cjodA0I5fTEU60M+W1NNCj18EpL7yt3uxLN1aeexN33HfRoo153oi4jV/FWlPtQ4QC5FhFF+Nbc69V2paOSrI4iht+UB2Hb0jYTuHWv8ecYa33GFksl7zD9BCf8D3RZqIagTzJC7Vf0FqKKlspZMwIMAL02Z5uwsp5h4Zjrq8lo=
file: PusherSwift.framework.zip
skip_cleanup: true
on:
repo: pusher/pusher-websocket-swift
tags: true
script:
- set -o pipefail
- xcodebuild -version
- xcodebuild -workspace PusherSwift.xcworkspace -list
- if [ "$DST" != "platform=OS X" ]; then
echo "$SIMULARTOR_ID";
open -a "simulator" --args -CurrentDeviceUDID $SIMULATOR_ID || true; sleep 20;
fi
- xcodebuild -scheme PusherSwift -destination "$DST" -project PusherSwift.xcodeproj clean build | xcpretty -tc;
- xcodebuild -scheme PusherSwift -destination "$DST" -project PusherSwift.xcodeproj -enableCodeCoverage YES $ACTION | xcpretty -tc;
after_success:
- sleep 5