Commit Graph

13 Commits

Author SHA1 Message Date
Jordan Rose
407d7e7a27 check_code_size: Update for newer workflow and job names
...and account for `gh run view` not consistently tagging steps by
matching on a different output line of the script.
2026-03-27 16:22:12 -07:00
Jordan Rose
be59696a1b Enforce additional Python style checks
- flake8-comprehensions
- flake8-deprecated
- flake8-import-order
- flake8-quotes

The quoting rules are, roughly:
- Prefer single-quoted strings
- Unless it's a multi-line string / docstring
- Or the string contains an apostrophe
2025-10-16 13:48:03 -07:00
andrew-signal
c91f615468 Make it more obvious what number to use for code_size.json during release process. 2024-10-21 21:38:29 -04:00
Jordan Rose
823cfcf7e8 check_code_size: note if comparison against main was skipped
...specifically in the case where the most recent commit didn't run
the Java checks, and therefore we don't have a previous run of
check_code_size to compare to. (We could go back until we find one,
but that seems like overkill.)
2024-09-05 12:00:18 -07:00
Jordan Rose
c1ad2f3ec6 check_code_size: Update comparison against main
- Fix the format matcher after 0147989

- When merging into a branch other than main, compare against that branch

- When running on GitHub on the main branch itself, compare against HEAD^

- Adjust the plot view to have flexible columns
2024-08-28 17:11:01 -07:00
Jordan Rose
01479894bc check_code_size: Warn on PRs that add 100KB or more
And tweak the message to be more useful.
2024-08-26 13:42:00 -07:00
Jordan Rose
5a1144b8ac java: Update code size checker to measure post-stripping size
Previously the Android libraries were stripped as part of the build,
but what we're really trying to track is the download size and
size-on-disk for Android users, so the stripped library is more
relevant (and lets us continue to compare against previous releases).
2024-07-18 14:31:20 -07:00
Jordan Rose
773530ecd1 Add type annotations to all our Python scripts
The main benefit of this is not our *own* type-checking; it's that
mypy will error out if you try to use a too-new Python API. And in
fact, we were already relying on Python 3.9 and didn't realize.

check_code_size.py works with JSON, so it still uses Any a fair bit.
2024-07-09 17:01:10 -07:00
Alex Konradi
6b253b5ddb Continue the size check if GH response is invalid
Continue the rest of the check_code_size.py script if the GH tool invoked by the
script fails or produces unexpected results.
2024-03-13 12:52:42 -04:00
Jordan Rose
f896129db9 Java: Update to Gradle 8.4, Android Gradle Plugin 8.3, SDK 34, Java 17
Each of these updates is required for the following update, and the
final one allows us to use 'record'.

The target SDK version is set to 33, matching the Android app.
2024-03-08 10:34:18 -08:00
Alex Konradi
e95f00d849 Print size difference of a PR versus main
Use the GitHub CLI utility, if present, to fetch the size from the logs of the 
"Build and Test" workflow run for the merge-base of the current branch and 
upstream main. This represents the true "delta" attributable to the current 
branch, as opposed to the integral of changes since the last release.
2024-02-01 16:30:42 -05:00
Jordan Rose
eab0e57640 Java: don't eagerly strip libsignal_client.so; let gradle do it for us
This is a step towards saving the debug info somewhere for the builds
we actually ship.
2021-08-30 12:33:18 -07:00
Jordan Rose
1142c5f43c CI: Add a check for code size growth in the arm64 Android library
Sample output:

    current build is 0% larger than v0.3.4 (current: 1957208 bytes, v0.3.4: 1949016 bytes)
       0.1.5: *********** (1079472 bytes)
       0.1.6: *********** (1153216 bytes)
       0.1.7: *********** (1153216 bytes)
       0.2.0: ************ (1222832 bytes)
       0.2.2: ************* (1267888 bytes)
       0.2.2: ************** (1382592 bytes)
       0.2.3: *************** (1489088 bytes)
       0.3.4: ******************* (1949016 bytes)
     current: ******************* (1957208 bytes)
2021-03-15 18:40:47 -07:00