Last active
June 15, 2023 07:29
-
-
Save bastionkid/88620c5de802a2db82e05c4aa69555e2 to your computer and use it in GitHub Desktop.
compare_apks.py - Setup phase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# read arguments passed to this script | |
apk_1_sha = sys.argv[1] | |
apk_2_sha = sys.argv[2] | |
apk_1_name = f"{apk_1_sha}.apk" | |
apk_2_name = f"{apk_2_sha}.apk" | |
# apk_analyzer_path location will change based on the GHA runner that you're using i.e. mac/windows/ubuntu etc | |
apk_analyzer_path = "/usr/local/lib/android/sdk/cmdline-tools/latest/bin/apkanalyzer" | |
kb_in_bytes = 1024 | |
mb_in_bytes = 1024 * 1024 | |
# generate dictionaries for the apk components size | |
components_1 = get_apk_components(apk_1_name, 'download-size') | |
components_2 = get_apk_components(apk_2_name, 'download-size') | |
generate_size_diff_html() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment