forked from watson-developer-cloud/swift-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Travis-CI): Split build into multiple jobs
- Loading branch information
Anthony Oliveri
committed
Jan 7, 2019
1 parent
00d2342
commit 29cf1e5
Showing
2 changed files
with
61 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,66 @@ | ||
matrix: | ||
include: | ||
- os: linux | ||
dist: trusty | ||
sudo: required | ||
- os: osx | ||
osx_image: xcode10.1 | ||
# matrix: | ||
# include: | ||
# - os: linux | ||
# dist: trusty | ||
# sudo: required | ||
# - os: osx | ||
# osx_image: xcode10.1 | ||
os: osx | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
- jenkins-testing | ||
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" == "osx" ]]; then ./Scripts/pod-lint.sh ; fi | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift build ; fi | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift test ; fi | ||
jobs: | ||
include: | ||
- stage: install | ||
script: | ||
- sudo easy_install pip | ||
- nvm install node | ||
- nvm use node | ||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi | ||
- 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 | ||
- stage: before_script | ||
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 | ||
- stage: script | ||
script: | ||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./Scripts/run-tests.sh ; fi | ||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./Scripts/pod-lint.sh ; fi | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift build ; fi | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift test ; fi | ||
- stage: deploy | ||
script: | ||
- provider: script | ||
script: npx semantic-release | ||
skip_cleanup: true | ||
on: | ||
branch: jenkins-testing | ||
condition: $TRAVIS_OS_NAME = osx | ||
- provider: script | ||
script: Scripts/release-to-cocoapods.sh | ||
skip_cleanup: true | ||
on: | ||
branch: jenkins-testing | ||
condition: $TRAVIS_OS_NAME = osx | ||
- provider: script | ||
script: Scripts/publish-documentation.sh | ||
on: | ||
branch: jenkins-testing | ||
condition: $TRAVIS_OS_NAME = osx |