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
8 changes: 6 additions & 2 deletions .github/workflows/sdk-size-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
runs-on: macos-15
env:
GITHUB_TOKEN: '${{ secrets.CI_BOT_GITHUB_TOKEN }}'
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
steps:
- name: Connect Bot
uses: webfactory/[email protected]
Expand All @@ -28,10 +29,13 @@ jobs:

- uses: ./.github/actions/bootstrap

- name: Run SDK Size Metrics
- name: Run General SDK Size Metrics
run: bundle exec fastlane show_frameworks_sizes
timeout-minutes: 30
env:
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}

- name: Run Detailed SDK Size Metrics
run: bundle exec fastlane size_analyze
timeout-minutes: 30
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ App Thinning Size Report.txt
app-thinning.plist
*.dmg
yeetd-normal.pkg
*LinkMap.txt

# VSCode
.vscode
Expand Down
9 changes: 7 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,11 @@ GEM
fastlane
pry
fastlane-plugin-sonarcloud_metric_kit (0.2.1)
fastlane-plugin-stream_actions (0.3.90)
fastlane-plugin-stream_actions (0.3.100)
xctest_list (= 1.2.1)
fastlane-plugin-versioning (0.7.1)
fastlane-plugin-xcsize (1.1.0)
xcsize (= 1.1.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
ffi (1.17.2)
Expand Down Expand Up @@ -413,6 +415,8 @@ GEM
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
xcsize (1.1.0)
commander (>= 4.6, < 6.0)
xctest_list (1.2.1)

PLATFORMS
Expand All @@ -426,8 +430,9 @@ DEPENDENCIES
fastlane-plugin-create_xcframework
fastlane-plugin-lizard
fastlane-plugin-sonarcloud_metric_kit
fastlane-plugin-stream_actions (= 0.3.90)
fastlane-plugin-stream_actions (= 0.3.100)
fastlane-plugin-versioning
fastlane-plugin-xcsize (= 1.1.0)
json
lefthook
plist
Expand Down
6 changes: 6 additions & 0 deletions StreamChatSwiftUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3296,6 +3296,8 @@
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_GENERATE_MAP_FILE = YES;
LD_MAP_FILE_PATH = "linkmaps/$(PRODUCT_NAME)-$(CURRENT_ARCH)-LinkMap.txt";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -3674,6 +3676,8 @@
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_GENERATE_MAP_FILE = YES;
LD_MAP_FILE_PATH = "linkmaps/$(PRODUCT_NAME)-$(CURRENT_ARCH)-LinkMap.txt";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -3709,6 +3713,8 @@
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_GENERATE_MAP_FILE = YES;
LD_MAP_FILE_PATH = "linkmaps/$(PRODUCT_NAME)-$(CURRENT_ARCH)-LinkMap.txt";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
23 changes: 21 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ lane :update_img_shields_sdk_sizes do |options|
)
end

def frameworks_sizes
private_lane :frameworks_sizes do
root_dir = 'Build/SDKSize'
archive_dir = "#{root_dir}/DemoApp.xcarchive"

Expand All @@ -625,7 +625,9 @@ def frameworks_sizes
scheme: 'DemoAppSwiftUI',
archive_path: archive_dir,
export_method: 'ad-hoc',
export_options: 'fastlane/sdk_size_export_options.plist'
export_options: 'fastlane/sdk_size_export_options.plist',
derived_data_path: derived_data_path,
cloned_source_packages_path: source_packages_path
)

# Parse the thinned size of Assets.car from Packaging.log
Expand All @@ -640,3 +642,20 @@ def frameworks_sizes

{ StreamChatSwiftUI: stream_chat_swiftui_size_kb.round(0) }
end

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

gym(
scheme: 'DemoAppSwiftUI',
configuration: 'Release',
skip_archive: true,
skip_package_ipa: true,
skip_package_pkg: true,
skip_codesigning: true,
derived_data_path: derived_data_path,
cloned_source_packages_path: source_packages_path
)

show_detailed_sdk_size(sdk_names: sdk_names, threshold: 42)
end
3 changes: 2 additions & 1 deletion fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
gem 'fastlane-plugin-versioning'
gem 'fastlane-plugin-sonarcloud_metric_kit'
gem 'fastlane-plugin-create_xcframework'
gem 'fastlane-plugin-stream_actions', '0.3.90'
gem 'fastlane-plugin-stream_actions', '0.3.100'
gem 'fastlane-plugin-xcsize', '1.1.0'
Loading