Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/actions/xcode-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ runs:
path: spm_cache
key: ${{ env.IMAGE }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: ${{ env.IMAGE }}-spm-
- uses: mikehardy/buildcache-action@v2
with:
cache_key: ${{ env.IMAGE }}-buildcache-
5 changes: 4 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ let package = Package(
.target(
name: "StreamChat",
exclude: ["Info.plist"],
resources: [.copy("Database/StreamChatModel.xcdatamodeld")]
resources: [.copy("Database/StreamChatModel.xcdatamodeld")],
swiftSettings: [
.unsafeFlags(["-Osize"], .when(configuration: .release))
]
),
.target(
name: "StreamChatUI",
Expand Down
8 changes: 8 additions & 0 deletions StreamChat.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ Pod::Spec.new do |spec|
spec.source = { git: 'https://github.com/GetStream/stream-chat-swift.git', tag: "#{spec.version}" }
spec.source_files = ['Sources/StreamChat/**/*.swift']
spec.resource_bundles = { 'StreamChat' => ['Sources/StreamChat/**/*.xcdatamodeld'] }

spec.pod_target_xcconfig = {
'SWIFT_OPTIMIZATION_LEVEL' => '-Osize'
}

spec.user_target_xcconfig = {
'SWIFT_OPTIMIZATION_LEVEL' => '-Osize'
}
end
1 change: 1 addition & 0 deletions StreamChat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14254,6 +14254,7 @@
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx";
SWIFT_OPTIMIZATION_LEVEL = "-Osize";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down
25 changes: 8 additions & 17 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ derived_data_path = 'derived_data'
source_packages_path = 'spm_cache'
metrics_git = 'git@github.com:GetStream/stream-internal-metrics.git'
xcmetrics_path = "metrics/#{github_repo.split('/').last}-xcmetrics.json"
buildcache_xcargs = 'CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++'
testlab_bucket = 'gs://test-lab-af3rt9m4yh360-mqm1zzm767nhc'
swift_environment_path = File.absolute_path('../Sources/StreamChat/Generated/SystemEnvironment+Version.swift')
is_localhost = !is_ci
Expand Down Expand Up @@ -327,8 +326,7 @@ lane :test do |options|
devices: options[:device],
number_of_retries: 5,
build_for_testing: options[:build_for_testing],
skip_build: options[:skip_build],
xcargs: buildcache_xcargs
skip_build: options[:skip_build]
)

next if options[:build_for_testing]
Expand All @@ -343,7 +341,6 @@ lane :test do |options|
cloned_source_packages_path: source_packages_path,
devices: options[:device],
skip_build: true,
xcargs: buildcache_xcargs,
number_of_retries: options[:cron] ? 3 : 2
}

Expand Down Expand Up @@ -371,8 +368,7 @@ lane :build_test_app_and_frameworks do
derived_data_path: derived_data_path,
cloned_source_packages_path: source_packages_path,
clean: is_localhost,
build_for_testing: true,
xcargs: buildcache_xcargs
build_for_testing: true
)
end

Expand All @@ -391,7 +387,6 @@ lane :xcmetrics do |options|
derived_data_path: derived_data_path,
cloned_source_packages_path: source_packages_path,
clean: is_localhost,
xcargs: buildcache_xcargs,
sdk: 'iphoneos',
skip_detect_devices: true,
build_for_testing: true
Expand Down Expand Up @@ -553,7 +548,6 @@ lane :test_e2e_mock do |options|
cloned_source_packages_path: source_packages_path,
clean: is_localhost,
test_without_building: options[:test_without_building],
xcargs: buildcache_xcargs,
devices: options[:device],
prelaunch_simulator: is_ci,
number_of_retries: 3
Expand Down Expand Up @@ -622,7 +616,6 @@ lane :test_ui do |options|
skip_build: options[:skip_build],
result_bundle: true,
devices: options[:device],
xcargs: buildcache_xcargs,
fail_build: !record_mode
)

Expand Down Expand Up @@ -718,8 +711,7 @@ private_lane :build_example_app do |options|
derived_data_path: derived_data_path,
cloned_source_packages_path: source_packages_path,
build_for_testing: true,
devices: options[:device],
xcargs: buildcache_xcargs
devices: options[:device]
)
end

Expand All @@ -735,8 +727,7 @@ lane :spm_integration do
clean: is_localhost,
derived_data_path: derived_data_path,
cloned_source_packages_path: source_packages_path,
destination: 'generic/platform=iOS Simulator',
xcargs: buildcache_xcargs
destination: 'generic/platform=iOS Simulator'
)
end

Expand All @@ -757,8 +748,7 @@ lane :cocoapods_integration do
clean: is_localhost,
derived_data_path: derived_data_path,
cloned_source_packages_path: source_packages_path,
destination: 'generic/platform=iOS Simulator',
xcargs: buildcache_xcargs
destination: 'generic/platform=iOS Simulator'
)
end

Expand Down Expand Up @@ -882,7 +872,7 @@ lane :validate_public_interface do
end

lane :show_frameworks_sizes do |options|
next unless is_check_required(sources: sources_matrix[:size], force_check: @force_check)
# next unless is_check_required(sources: sources_matrix[:size], force_check: @force_check)

sizes = options[:sizes] || frameworks_sizes
show_sdk_size(branch_sizes: sizes, github_repo: github_repo)
Expand All @@ -908,6 +898,7 @@ private_lane :frameworks_sizes do

gym(
scheme: 'DemoApp',
configuration: 'Release',
archive_path: archive_dir,
export_method: 'ad-hoc',
export_options: 'fastlane/sdk_size_export_options.plist',
Expand Down Expand Up @@ -935,7 +926,7 @@ private_lane :frameworks_sizes do
end

lane :size_analyze do
next unless is_check_required(sources: sources_matrix[:size], force_check: @force_check)
# next unless is_check_required(sources: sources_matrix[:size], force_check: @force_check)

gym(
scheme: 'DemoApp',
Expand Down