From 140f19de9b68a172f8ae26dc88659cfe783997dd Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Fri, 26 Apr 2019 14:57:48 +0800 Subject: [PATCH 1/6] Update the codecov script, try to fix the report issue --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e0638091..3349e3a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: objective-c -osx_image: xcode10 +osx_image: xcode10.1 env: global: @@ -60,5 +60,5 @@ script: - mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS after_success: - - bash <(curl -s https://codecov.io/bash) -D './DerivedData/macOS' -J '^SDWebImage$' -c -F 'macos' - - bash <(curl -s https://codecov.io/bash) -D './DerivedData/iOS' -J '^SDWebImage$' -c -F 'ios' + - 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 From a95caa0a7ee1900b47d49923e0741c6a09afa772 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Fri, 26 Apr 2019 22:19:47 +0800 Subject: [PATCH 2/6] Try to reduce the build time during framework target --- .travis.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3349e3a7..174ad095 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,13 +33,13 @@ script: - xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage static' -sdk watchsimulator -configuration Debug | xcpretty -c - echo Build as dynamic frameworks - - xcodebuild build clean -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk macosx -configuration Debug | xcpretty -c - - xcodebuild build clean -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c - - xcodebuild build clean -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk appletvsimulator -configuration Debug | xcpretty -c - - xcodebuild build clean -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk watchsimulator -configuration Debug | xcpretty -c - - xcodebuild build clean -workspace SDWebImage.xcworkspace -scheme 'SDWebImageMapKit' -sdk macosx -configuration Debug | xcpretty -c - - xcodebuild build clean -workspace SDWebImage.xcworkspace -scheme 'SDWebImageMapKit' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c - - xcodebuild build clean -workspace SDWebImage.xcworkspace -scheme 'SDWebImageMapKit' -sdk appletvsimulator -configuration Debug | xcpretty -c + - 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 - echo Build the Demo apps - pod install --project-directory=Examples @@ -60,5 +60,5 @@ script: - mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS after_success: - - 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/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 From 06cac84af3fa9cfde0cc4087a149f2532506246b Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sat, 27 Apr 2019 13:37:09 +0800 Subject: [PATCH 3/6] Try to use the latest curl from homebrew, instead of macOS' built-in one for uploading --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 174ad095..dfe3e6bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,11 @@ env: notifications: email: false +addons: + homebrew: + packages: + - curl # Fix the codecov upload issue + before_install: - env - locale @@ -60,5 +65,7 @@ script: - mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS 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 From 17fd5da08633b8029c8f20ed1666c142e93cafc6 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sat, 27 Apr 2019 13:49:08 +0800 Subject: [PATCH 4/6] Using cocoapods cache to speed up the build time --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index dfe3e6bf..2f175b49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,13 +15,14 @@ addons: packages: - curl # Fix the codecov upload issue +cache: cocoapods +podfile: Examples/Podfile + before_install: - env - locale - - gem install cocoapods --no-rdoc --no-ri --no-document --quiet - gem install xcpretty --no-rdoc --no-ri --no-document --quiet - pod --version - - pod setup --silent > /dev/null - pod repo update --silent - xcpretty --version - xcodebuild -version From 521a5f2b4b7a62852795ec5ea73c4441be04bb90 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sat, 27 Apr 2019 13:57:16 +0800 Subject: [PATCH 5/6] Don't run test during pod lib lint, run the test with next pipeline --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2f175b49..a2b6dd7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ podfile: Examples/Podfile before_install: - env - locale + - gem install cocoapods --no-rdoc --no-ri --no-document --quiet - gem install xcpretty --no-rdoc --no-ri --no-document --quiet - pod --version - pod repo update --silent @@ -32,7 +33,7 @@ script: - set -o pipefail - echo Check if the library described by the podspec can be built - - pod lib lint --allow-warnings + - pod lib lint --allow-warnings --skip-tests # Will run test below - echo Build as static library - xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage static' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c From ccec69715d507cad50b87728224f9fb44e19d445 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sat, 27 Apr 2019 14:18:03 +0800 Subject: [PATCH 6/6] Fix the test project using the wrong min deployment target version --- .travis.yml | 4 ++-- Tests/SDWebImage Tests.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2b6dd7b..3c1112ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,5 +69,5 @@ script: 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 + - 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 diff --git a/Tests/SDWebImage Tests.xcodeproj/project.pbxproj b/Tests/SDWebImage Tests.xcodeproj/project.pbxproj index b93e334a..ac0ead4a 100644 --- a/Tests/SDWebImage Tests.xcodeproj/project.pbxproj +++ b/Tests/SDWebImage Tests.xcodeproj/project.pbxproj @@ -568,6 +568,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 328BAF282240C08E00FC70DD /* Test-Debug.xcconfig */; buildSettings = { + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MACOSX_DEPLOYMENT_TARGET = 10.10; }; name = Debug; }; @@ -575,6 +577,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 328BAF272240C08E00FC70DD /* Test-Release.xcconfig */; buildSettings = { + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MACOSX_DEPLOYMENT_TARGET = 10.10; }; name = Release; };