2014-11-03 04:53:45 +08:00
|
|
|
|
|
|
|
language: objective-c
|
2019-04-26 14:57:48 +08:00
|
|
|
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
|
|
|
|
2019-04-27 13:37:09 +08:00
|
|
|
addons:
|
|
|
|
homebrew:
|
|
|
|
packages:
|
|
|
|
- curl # Fix the codecov upload issue
|
|
|
|
|
2019-04-27 13:49:08 +08:00
|
|
|
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
|
2015-03-17 21:43:11 +08:00
|
|
|
- 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
|
2018-09-07 21:54:18 +08:00
|
|
|
- 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
|
2019-04-26 22:19:47 +08:00
|
|
|
- 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
|
|
|
|
2016-06-13 05:53:08 +08:00
|
|
|
- echo Build the Demo apps
|
2018-08-29 18:54:48 +08:00
|
|
|
- pod install --project-directory=Examples
|
2018-02-20 11:41:21 +08:00
|
|
|
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage OSX Demo' -sdk macosx -configuration Debug | xcpretty -c
|
2018-11-12 11:29:13 +08:00
|
|
|
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage iOS Demo' -configuration Debug -destination 'name=iPhone XS' | xcpretty -c
|
2018-02-20 11:41:21 +08:00
|
|
|
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage TV Demo' -sdk appletvsimulator -configuration Debug | xcpretty -c
|
2018-11-12 11:29:13 +08:00
|
|
|
- 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
|
|
|
|
2019-04-03 19:07:43 +08:00
|
|
|
- echo Clean DerivedData
|
|
|
|
- rm -rf ~/Library/Developer/Xcode/DerivedData/
|
2018-04-17 17:54:31 +08:00
|
|
|
- mkdir DerivedData
|
2018-04-17 16:15:19 +08:00
|
|
|
|
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
|
2018-11-12 11:29:13 +08:00
|
|
|
- xcodebuild test -workspace SDWebImage.xcworkspace -scheme 'Tests' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone XS' -configuration Debug | xcpretty -c
|
2018-04-17 17:54:31 +08:00
|
|
|
- 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:
|
2019-04-27 13:37:09 +08:00
|
|
|
- export PATH="/usr/local/opt/curl/bin:$PATH"
|
|
|
|
- curl --version
|
2019-04-26 22:19:47 +08:00
|
|
|
- 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
|