forked from watson-developer-cloud/swift-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
61 lines (61 loc) · 2.34 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
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
osx_image: xcode10.1
branches:
only:
- master
- develop
- v1.0
env:
global:
- IOS_SDK="iphonesimulator"
- IOS_DESTINATION="name=iPhone XS,OS=12.0"
before_install:
- sudo easy_install pip
- nvm install node
- nvm use node
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
install:
- gem install cocoapods
- gem install jazzy
- sudo pip install bumpversion
- npm install -g [email protected]
- npm install -g @semantic-release/exec
- npm install -g @semantic-release/changelog
- npm install -g @semantic-release/git
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated swiftlint || brew upgrade swiftlint ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated carthage || brew upgrade carthage ; fi
before_script:
- openssl aes-256-cbc -K $encrypted_d84ac0b7eb5c_key -iv $encrypted_d84ac0b7eb5c_iv -in Source/SupportingFiles/WatsonCredentials.swift.enc -out Source/SupportingFiles/WatsonCredentials.swift -d
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pod repo update master --silent ; fi # Gets the latest version of RestKit
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then carthage update --platform iOS ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update -y ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://swift.org/builds/swift-4.1-release/ubuntu1404/swift-4.1-RELEASE/swift-4.1-RELEASE-ubuntu14.04.tar.gz -q; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar xzf swift-4.1-RELEASE-ubuntu14.04.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=swift-4.1-RELEASE-ubuntu14.04/usr/bin:$PATH ; fi
script:
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./Scripts/run-tests.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift build ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift test ; fi
deploy:
- provider: script
script: npx semantic-release
skip_cleanup: true
on:
branch: master
condition: $TRAVIS_OS_NAME = osx
- provider: script
script: Scripts/release-to-cocoapods.sh
skip_cleanup: true
on:
branch: master
condition: $TRAVIS_OS_NAME = osx
- provider: script
script: Scripts/publish-documentation.sh
on:
branch: master
condition: $TRAVIS_OS_NAME = osx