This repository has been archived by the owner on Apr 5, 2023. It is now read-only.
forked from optimizely/objective-c-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
100 lines (94 loc) · 4.07 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
language: minimal
os: linux
# Integration tests need to run first to reset the PR build status to pending
stages:
- name: 'Trigger Integration Tests'
- name: 'SourceClear and Lint'
- name: 'Unit Tests'
- name: 'Prepare for release'
if: env(PREP) = true and type = api
- name: 'Release'
if: env(RELEASE) = true and type = api
jobs:
include:
- stage: 'Trigger Integration Tests'
language: minimal
os: linux
env:
- SDK=objective-c
- BUILD_NUMBER=$TRAVIS_BUILD_NUMBER
- TESTAPP_TAG=master
cache: false
before_install: skip
install: skip
before_script:
- mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://[email protected]/optimizely/travisci-tools.git && popd
script:
- "$HOME/travisci-tools/fsc-trigger/trigger_fullstack-sdk-compat.sh"
after_success: travis_terminate 0
- stage: 'SourceClear and Lint'
language: objective-c
os: osx
addons:
srcclr: true
install: gem install cocoapods
script:
- pod spec lint --quick
- &unittests
stage: 'Unit Tests'
language: objective-c
os: osx
osx_image: xcode10
branches:
only:
- master
env: SCHEME=OptimizelySDKiOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=9.1 NAME='iPad Air'
name: PLATFORM='iOS Simulator' OS=9.1 NAME='iPad Air'
before_install:
- gem install slather --no-rdoc --no-ri --no-document --quiet
script:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then xcodebuild test -quiet -workspace OptimizelySDK.xcworkspace -scheme $SCHEME -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -sdk $TEST_SDK -destination "platform=$PLATFORM,OS=$OS,name=$NAME" ONLY_ACTIVE_ARCH=YES | egrep -B 10 -A 10 "(error|failed|crash|exit|FAILED|Failing|failures)"; fi
after_success:
- slather
- sleep 5 # https://github.com/travis-ci/travis-ci/issues/4725
- <<: *unittests
env: SCHEME=OptimizelySDKiOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=10.1 NAME='iPhone 7 Plus'
name: PLATFORM='iOS Simulator' OS=10.1 NAME='iPhone 7 Plus'
- <<: *unittests
env: SCHEME=OptimizelySDKiOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=10.3.1 NAME='iPhone 7'
name: PLATFORM='iOS Simulator' OS=10.3.1 NAME='iPhone 7'
- <<: *unittests
env: SCHEME=OptimizelySDKiOS-Universal TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=11.1 NAME='iPhone 6s'
name: PLATFORM='iOS Simulator' OS=11.1 NAME='iPhone 6s'
- <<: *unittests
env: SCHEME=OptimizelySDKTVOS TEST_SDK=appletvsimulator PLATFORM='tvOS Simulator' OS=10.2 NAME='Apple TV 1080p'
name: PLATFORM='tvOS Simulator' OS=10.2 NAME='Apple TV 1080p'
- <<: *unittests
env: SCHEME=OptimizelySDKTVOS-Universal TEST_SDK=appletvsimulator PLATFORM='tvOS Simulator' OS=9.2 NAME='Apple TV 1080p'
name: PLATFORM='tvOS Simulator' OS=9.2 NAME='Apple TV 1080p'
- stage: 'Prepare for release'
name: Prepare for release
language: objective-c
os: osx
osx_image: xcode10
env:
- VERSION=3.1.2
install:
# install hub
- wget https://github.com/github/hub/releases/download/v2.11.2/hub-darwin-amd64-2.11.2.tgz -O /tmp/hub-darwin-amd64-2.11.2.tgz && tar -xvf /tmp/hub-darwin-amd64-2.11.2.tgz -C /usr/local/opt && ln -s /usr/local/opt/hub-darwin-amd64-2.11.2/bin/hub /usr/local/bin/hub
script:
- Scripts/run_prep.sh
- stage: 'Release'
name: Push to cocoapods.org
language: minimal
os: osx
osx_image: xcode10
env:
- VERSION=3.1.2
install:
# install hub
- wget https://github.com/github/hub/releases/download/v2.11.2/hub-darwin-amd64-2.11.2.tgz -O /tmp/hub-darwin-amd64-2.11.2.tgz && tar -xvf /tmp/hub-darwin-amd64-2.11.2.tgz -C /usr/local/opt && ln -s /usr/local/opt/hub-darwin-amd64-2.11.2/bin/hub /usr/local/bin/hub
# upgrade cocoapods
- gem install cocoapods -v '1.6.1'
script:
- Scripts/run_release.sh