SDWebImage/.travis.yml

89 lines
5.0 KiB
YAML
Raw Permalink Normal View History

2014-11-03 04:53:45 +08:00
language: objective-c
osx_image: xcode11
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: Podfile
2016-05-09 04:04:40 +08:00
before_install:
2014-11-03 04:53:45 +08:00
- env
- locale
- gem install cocoapods --no-document --quiet
- gem install xcpretty --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 --skip-tests # Will run test below
2014-11-03 04:53:45 +08:00
- echo Build the SwiftPM
- swift build
- rm -rf ~/.build
2016-05-09 04:04:40 +08:00
- echo Build as static library
2019-08-13 19:36:27 +08:00
- xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImage static' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
- xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImage static' -sdk watchsimulator -configuration Debug | xcpretty -c
- echo Clean DerivedData
- rm -rf ~/Library/Developer/Xcode/DerivedData/
- echo Build as dynamic frameworks
2019-08-13 19:36:27 +08:00
- xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImage' -sdk macosx -configuration Debug | xcpretty -c
- xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImage' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
- xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImage' -sdk appletvsimulator -configuration Debug | xcpretty -c
- xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImage' -sdk watchsimulator -configuration Debug | xcpretty -c
# - xcodebuild archive -project SDWebImage.xcodeproj -scheme 'SDWebImage' -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -configuration Debug | xcpretty -c
2019-08-13 19:36:27 +08:00
- xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImageMapKit' -sdk macosx -configuration Debug | xcpretty -c
- xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImageMapKit' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
- xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImageMapKit' -sdk appletvsimulator -configuration Debug | xcpretty -c
# - xcodebuild archive -project SDWebImage.xcodeproj -scheme 'SDWebImageMapKit' -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -configuration Debug | xcpretty -c
2016-05-09 04:04:40 +08:00
- echo Clean DerivedData
- rm -rf ~/Library/Developer/Xcode/DerivedData/
- echo Build the Demo apps
- pod install
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage OSX Demo' -destination 'platform=macOS,arch=x86_64' -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage iOS Demo' -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage TV Demo' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage Watch Demo' -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
# - xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage iOS Demo' -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -configuration Debug CODE_SIGNING_ALLOWED=NO | 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
- xcodebuild clean test -workspace SDWebImage.xcworkspace -scheme 'Tests iOS' -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -configuration Debug -UseModernBuildSystem=NO CODE_SIGNING_ALLOWED=NO | xcpretty -c
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS
- xcodebuild clean test -workspace SDWebImage.xcworkspace -scheme 'Tests Mac' -destination 'platform=macOS,arch=x86_64' -configuration Debug -UseModernBuildSystem=NO CODE_SIGNING_ALLOWED=NO | xcpretty -c
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS
- xcodebuild clean test -workspace SDWebImage.xcworkspace -scheme 'Tests TV' -destination 'platform=tvOS Simulator,name=Apple TV' -configuration Debug -UseModernBuildSystem=NO CODE_SIGNING_ALLOWED=NO | xcpretty -c
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/tvOS
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
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/iOS' -J '^SDWebImage$' -c -X gcov -F ios
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/tvOS' -J '^SDWebImage$' -c -X gcov -F tvos