SDWebImage/.travis.yml

73 lines
3.6 KiB
YAML
Raw Normal View History

2014-11-03 04:53:45 +08:00
language: objective-c
osx_image: xcode10.1
2015-10-31 00:36:10 +08:00
2016-05-09 04:04:40 +08:00
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
2018-02-20 20:59:16 +08:00
notifications:
email: false
2014-11-03 04:53:45 +08:00
addons:
homebrew:
packages:
- curl # Fix the codecov upload issue
cache: cocoapods
podfile: Examples/Podfile
2016-05-09 04:04:40 +08:00
before_install:
2014-11-03 04:53:45 +08:00
- env
- locale
2016-05-09 04:04:40 +08:00
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
2014-11-03 04:53:45 +08:00
- pod --version
- pod repo update --silent
2016-05-09 04:04:40 +08:00
- xcpretty --version
- xcodebuild -version
- xcodebuild -showsdks
2014-11-03 04:53:45 +08:00
script:
2016-05-09 04:04:40 +08:00
- set -o pipefail
2014-11-03 04:53:45 +08:00
2016-05-09 04:04:40 +08:00
- echo Check if the library described by the podspec can be built
- pod lib lint --allow-warnings
2014-11-03 04:53:45 +08:00
2016-05-09 04:04:40 +08:00
- echo Build as static library
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage static' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage static' -sdk watchsimulator -configuration Debug | xcpretty -c
- echo Build as dynamic frameworks
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk macosx -configuration Debug | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk appletvsimulator -configuration Debug | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk watchsimulator -configuration Debug | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImageMapKit' -sdk macosx -configuration Debug | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImageMapKit' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImageMapKit' -sdk appletvsimulator -configuration Debug | xcpretty -c
2016-05-09 04:04:40 +08:00
- echo Build the Demo apps
- pod install --project-directory=Examples
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage OSX Demo' -sdk macosx -configuration Debug | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage iOS Demo' -configuration Debug -destination 'name=iPhone XS' | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage TV Demo' -sdk appletvsimulator -configuration Debug | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage Watch Demo' -configuration Debug -destination 'name=iPhone XS' | xcpretty -c
2014-11-03 04:53:45 +08:00
- echo Clean DerivedData
- rm -rf ~/Library/Developer/Xcode/DerivedData/
- mkdir DerivedData
2016-05-09 04:04:40 +08:00
- echo Run the tests
2015-03-17 22:14:33 +08:00
- pod install --project-directory=Tests
- xcodebuild test -workspace SDWebImage.xcworkspace -scheme 'Tests' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone XS' -configuration Debug | xcpretty -c
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS
- xcodebuild test -workspace SDWebImage.xcworkspace -scheme 'Tests Mac' -sdk macosx -destination 'platform=OS X,arch=x86_64' -configuration Debug | xcpretty -c
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS
2016-09-26 17:06:11 +08:00
after_success:
- export PATH="/usr/local/opt/curl/bin:$PATH"
- curl --version
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/macOS' -J '^SDWebImage$' -c -X gcov -F macos -v
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/iOS' -J '^SDWebImage$' -c -X gcov -F ios -v