Преглед изворни кода

Merge pull request #2463 from onevcat/fix/fastlane-watchos-build

Fix watchOS CI build and remove xcode-install
Wei Wang пре 1 месец
родитељ
комит
65fbc5c8fb
5 измењених фајлова са 24 додато и 18 уклоњено
  1. 1 1
      Gemfile
  2. 12 9
      Gemfile.lock
  3. 3 3
      Tests/KingfisherTests/ImageViewExtensionTests.swift
  4. 2 2
      docs/deployment.md
  5. 6 3
      fastlane/Fastfile

+ 1 - 1
Gemfile

@@ -2,6 +2,6 @@
 
 source "https://rubygems.org"
 
+gem "base64", "~> 0.2.0"
 gem "fastlane"
 gem "cocoapods"
-gem "xcode-install"

+ 12 - 9
Gemfile.lock

@@ -23,7 +23,7 @@ GEM
     artifactory (3.0.17)
     atomos (0.1.3)
     aws-eventstream (1.4.0)
-    aws-partitions (1.1195.0)
+    aws-partitions (1.1196.0)
     aws-sdk-core (3.240.0)
       aws-eventstream (~> 1, >= 1.3.0)
       aws-partitions (~> 1, >= 1.992.0)
@@ -42,9 +42,9 @@ GEM
     aws-sigv4 (1.12.1)
       aws-eventstream (~> 1, >= 1.0.2)
     babosa (1.0.4)
-    base64 (0.3.0)
+    base64 (0.2.0)
     benchmark (0.5.0)
-    bigdecimal (4.0.0)
+    bigdecimal (4.0.1)
     claide (1.1.0)
     cocoapods (1.16.2)
       addressable (~> 2.8)
@@ -131,13 +131,14 @@ GEM
     faraday_middleware (1.2.1)
       faraday (~> 1.0)
     fastimage (2.4.0)
-    fastlane (2.229.0)
+    fastlane (2.230.0)
       CFPropertyList (>= 2.3, < 4.0.0)
       abbrev (~> 0.1.2)
       addressable (>= 2.8, < 3.0.0)
       artifactory (~> 3.0)
       aws-sdk-s3 (~> 1.0)
       babosa (>= 1.0.3, < 2.0.0)
+      base64 (~> 0.2.0)
       bundler (>= 1.12.0, < 3.0.0)
       colored (~> 1.2)
       commander (~> 4.6)
@@ -159,10 +160,12 @@ GEM
       http-cookie (~> 1.0.5)
       json (< 3.0.0)
       jwt (>= 2.1.0, < 3)
+      logger (>= 1.6, < 2.0)
       mini_magick (>= 4.9.4, < 5.0.0)
       multipart-post (>= 2.0.0, < 3.0.0)
       mutex_m (~> 0.3.0)
       naturally (~> 2.2)
+      nkf (~> 0.2.0)
       optparse (>= 0.1.1, < 1.0.0)
       plist (>= 3.1.0, < 4.0.0)
       rubyzip (>= 2.0.0, < 3.0.0)
@@ -232,7 +235,8 @@ GEM
     logger (1.7.0)
     mini_magick (4.13.2)
     mini_mime (1.1.5)
-    minitest (5.27.0)
+    minitest (6.0.0)
+      prism (~> 1.5)
     molinillo (0.8.0)
     multi_json (1.18.0)
     multipart-post (2.4.1)
@@ -241,9 +245,11 @@ GEM
     nap (1.1.0)
     naturally (2.3.0)
     netrc (0.11.0)
+    nkf (0.2.0)
     optparse (0.8.1)
     os (1.1.4)
     plist (3.7.2)
+    prism (1.6.0)
     public_suffix (4.0.7)
     rake (13.3.1)
     representable (3.2.0)
@@ -282,9 +288,6 @@ GEM
     uber (0.1.0)
     unicode-display_width (2.6.0)
     word_wrap (1.0.0)
-    xcode-install (2.8.1)
-      claide (>= 0.9.1)
-      fastlane (>= 2.1.0, < 3.0.0)
     xcodeproj (1.27.0)
       CFPropertyList (>= 2.3.3, < 4.0)
       atomos (~> 0.1.3)
@@ -301,9 +304,9 @@ PLATFORMS
   ruby
 
 DEPENDENCIES
+  base64 (~> 0.2.0)
   cocoapods
   fastlane
-  xcode-install
 
 BUNDLED WITH
    2.5.22

+ 3 - 3
Tests/KingfisherTests/ImageViewExtensionTests.swift

@@ -689,21 +689,21 @@ class ImageViewExtensionTests: XCTestCase {
         let group = DispatchGroup()
         
         group.enter()
-        imageView.kf.setImage(with: url, options: [.processor(p1)]) { result in
+        imageView.kf.setImage(with: url, options: [.processor(p1), .cacheMemoryOnly]) { result in
             XCTAssertNotNil(result.error)
             XCTAssertTrue(result.error!.isNotCurrentTask)
             group.leave()
         }
         
         group.enter()
-        imageView.kf.setImage(with: url, options: [.processor(p2)]) { result in
+        imageView.kf.setImage(with: url, options: [.processor(p2), .cacheMemoryOnly]) { result in
             XCTAssertNotNil(result.value)
             XCTAssertEqual(result.value!.image.size, size2)
             group.leave()
         }
         
         group.notify(queue: .main) { exp.fulfill() }
-        waitForExpectations(timeout: 3, handler: nil)
+        waitForExpectations(timeout: 5, handler: nil)
     }
     
     @MainActor func testMemoryImageCacheExtendingExpirationTask() {

+ 2 - 2
docs/deployment.md

@@ -277,6 +277,6 @@ add:
 **Ruby Environment**:
 - **Fastlane**: Latest version
 - **CocoaPods**: Latest version  
-- **xcode-install**: For Xcode version management
+- **xcodes**: For Xcode version management
 
-This deployment system ensures reliable, automated distribution across all supported Apple platforms with comprehensive testing and validation at each step.
+This deployment system ensures reliable, automated distribution across all supported Apple platforms with comprehensive testing and validation at each step.

+ 6 - 3
fastlane/Fastfile

@@ -33,12 +33,15 @@ platform :ios do
   end
 
   lane :build do |options|
-    gym(
+    xcodebuild(
       workspace: "Kingfisher.xcworkspace",
       configuration: "Debug",
       scheme: "Kingfisher",
-      xcargs: "SWIFT_VERSION=5.0",
-      destination: options[:destination]
+      destination: options[:destination],
+      build: true,
+      build_settings: {
+        "SWIFT_VERSION" => "5.0"
+      }
     )
   end