This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
forked from pusher/pusher-websocket-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (55 loc) · 2.22 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
language: objective-c
osx_image: xcode11
sudo: false
cache:
directories:
- Carthage
env:
- iOS= DST='platform=iOS Simulator,name=iPhone 11' ACTION=test DEVICE='iPhone 11 (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 --cache-builds
- 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
- carthage archive PusherSwiftWithEncryption
deploy:
provider: releases
api_key:
secure: cjodA0I5fTEU60M+W1NNCj18EpL7yt3uxLN1aeexN33HfRoo153oi4jV/FWlPtQ4QC5FhFF+Nbc69V2paOSrI4iht+UB2Hb0jYTuHWv8ecYa33GFksl7zD9BCf8D3RZqIagTzJC7Vf0FqKKlspZMwIMAL02Z5uwsp5h4Zjrq8lo=
file:
- PusherSwift.framework.zip
- PusherSwiftWithEncryption.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 "$SIMULATOR_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;
- if [[ "$DST" != "platform=tvOS"* ]]; then
xcodebuild -scheme PusherSwiftWithEncryption -destination "$DST" -project PusherSwift.xcodeproj clean build | xcpretty -tc;
xcodebuild -scheme PusherSwiftWithEncryption -destination "$DST" -project PusherSwift.xcodeproj -enableCodeCoverage YES $ACTION | xcpretty -tc;
fi
after_success:
- sleep 5
- bash <(curl -s https://codecov.io/bash)