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/ssh-agent@v0.7.0
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 @@ -106,6 +106,7 @@ App Thinning Size Report.txt
app-thinning.plist
*.dmg
yeetd-normal.pkg
*LinkMap.txt

# Stream Video Buddy
video-buddy-server.log
Expand Down
9 changes: 7 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ GEM
bundler
fastlane
pry
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 @@ -388,6 +390,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 @@ -399,8 +403,9 @@ DEPENDENCIES
danger-commit_lint
fastlane
fastlane-plugin-lizard
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 StreamFeeds.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2025 Stream.io Inc. All rights reserved.";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.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 @@ -517,6 +519,8 @@
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2025 Stream.io Inc. All rights reserved.";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.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 @@ -552,6 +556,8 @@
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2025 Stream.io Inc. All rights reserved.";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.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 @@ -280,7 +280,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 @@ -292,7 +292,9 @@ def frameworks_sizes
scheme: 'DemoApp',
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
)

frameworks_path = "../#{archive_dir}/Products/Library/Frameworks/DemoApp.app/Frameworks"
Expand All @@ -303,3 +305,20 @@ def frameworks_sizes
StreamFeeds: stream_feeds_size_kb.round(0)
}
end

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

gym(
scheme: 'DemoApp',
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 @@ -3,4 +3,5 @@
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-versioning'
gem 'fastlane-plugin-stream_actions', '0.3.90'
gem 'fastlane-plugin-stream_actions', '0.3.100'
gem 'fastlane-plugin-xcsize', '1.1.0'