forked from NPAW/avplayer-adapter-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
90 lines (85 loc) · 3.05 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
#Thanks to Max Howell for this AMAZING article https://medium.com/@mxcl/deploying-to-cocoapods-with-travis-1150b1008342
os: osx
osx_image: xcode11.3
language: swift
env:
global:
- APP_NAME=YouboraAVPlayerAdapter
- INFO_PLIST=$PWD/$APP_NAME/Info.plist
- INFO_PLIST_TV_OS=$PWD/$APP_NAME tvOS/Info.plist
- INFO_PLIST_MAC_OS=$PWD/$APP_NAME OSX/Info.plist
- PLATFORMS=ios,tvos,macos
- GENERIC_VERSION=0.0.1
- ADAPTER_VERSION_TAG=YOUBORAAVPLAYERADAPTER_VERSION_SETTING
stages:
- name: podLint
if: NOT branch =~ ^\d+\.\d+\.\d+$ AND NOT branch = HEAD
- name: carthage
if: branch = master OR type = pull_request OR branch =~ /^\d+\.\d+\.\d+$/
- name: deploy
if: branch =~ ^\d+\.\d+\.\d+$
jobs:
include:
- &pod
stage: podLint
osx_image: xcode9.2
env: SWIFT=4.0
install: gem install cocoapods
script: pod lib lint --fail-fast --swift-version=$SWIFT --allow-warnings --subspec=Default | tee pod.log | ruby -e 'ARGF.each{ print "." }'
after_failure:
- cat pod.log
- grep error
- 'curl -X POST -H "Travis-Api-Version: 3" -H "Authorization: token $TRAVIS_API_TOKEN" https://api.travis-ci.com/build/$TRAVIS_BUILD_ID/cancel'
- <<: *pod
osx_image: xcode9.4
env: SWIFT=4.1
- <<: *pod
osx_image: xcode10.1
env: SWIFT=4.2
- <<: *pod
osx_image: xcode10.3
env: SWIFT=4.3
- <<: *pod
osx_image: xcode10.3
env: SWIFT=5.0
- <<: *pod
osx_image: xcode11
env: SWIFT=5.1
- &carthage
stage: carthage
name: Swift 4.0.3 / Xcode 9.2
osx_image: xcode9.2
install:
- rm -f Cartfile.private
- gem update xcodeproj
- gem install cocoapods
- pod deintegrate
- carthage update --platform $PLATFORMS --cache-builds
before_script: |
sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj
sed -i '' "s/GCC_TREAT_WARNINGS_AS_ERRORS = NO;/GCC_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj
script: carthage build --no-skip-current --configuration Release --platform $PLATFORMS | tee pod.log | ruby -e 'ARGF.each{ print "." }'
after_failure:
- 'curl -X POST -H "Travis-Api-Version: 3" -H "Authorization: token $TRAVIS_API_TOKEN" https://api.travis-ci.com/build/$TRAVIS_BUILD_ID/cancel'
- <<: *carthage
osx_image: xcode9.3
name: Swift 4.1.0 / Xcode 9.3.1
- <<: *carthage
osx_image: xcode9.4
name: Swift 4.1.2 / Xcode 9.4.1
- <<: *carthage
osx_image: xcode10.1
name: Swift 4.1.50 / Xcode 10.1
- <<: *carthage
osx_image: xcode10.3
name: Swift 4.1.51 / Xcode 10.3
- <<: *carthage
osx_image: xcode11
name: Swift 4.1.52 / Xcode 11
- name: "`pod trunk push`"
stage: deploy
install: gem install cocoapods
script:
- set -exo pipefail
- pod trunk push --verbose --allow-warnings | tee pod.log | ruby -e 'ARGF.each{ print "." }'
after_failure: cat pod.log | grep error