github: add scripts to store size of android release artifact#9705
Merged
github: add scripts to store size of android release artifact#9705
Conversation
- Add a script to test/sizeguard to compute sizes of artifacts within a compressed file. - Add a step to postsubmit-main.yml that will run the above script on every commit to main. This will enable us to add a presubmit step to guard against dramatic size increases in the Android build.
Comment on lines
+67
to
+99
| name: update-sizeguard | ||
| runs-on: 'ubuntu-24.04-16core' | ||
| steps: | ||
| - uses: actions/checkout@v4.1.6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: ./.github/actions/linux-prereq | ||
| - uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
| - id: get_commit_msg | ||
| uses: ./.github/actions/get-commit-msg | ||
| - name: Build and generate size report | ||
| run: | | ||
| cd build/android && printf "y" | ./build.sh release all | ||
| cd ../.. | ||
| COMMIT_HASH="${{ steps.get_commit_msg.outputs.hash }}" | ||
| python3 test/sizeguard/dump_artifact_size.py out/*.tgz out/*.aar > "${COMMIT_HASH}.json" | ||
| - name: Push to filament-assets | ||
| env: | ||
| GH_TOKEN: ${{ secrets.FILAMENTBOT_TOKEN }} | ||
| run: | | ||
| COMMIT_HASH="${{ steps.get_commit_msg.outputs.hash }}" | ||
| git config --global user.email "filament.bot@gmail.com" | ||
| git config --global user.name "Filament Bot" | ||
| git clone https://x-access-token:${GH_TOKEN}@github.com/google/filament-assets.git filament-assets | ||
| mkdir -p filament-assets/sizeguard | ||
| mv "${COMMIT_HASH}.json" filament-assets/sizeguard/ | ||
| cd filament-assets | ||
| git add sizeguard/"${COMMIT_HASH}.json" | ||
| git commit -m "Update sizeguard for filament@${COMMIT_HASH}" || echo "No changes to commit" | ||
| git push https://x-access-token:${GH_TOKEN}@github.com/google/filament-assets.git main |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
z3moon
approved these changes
Feb 13, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will enable us to add a presubmit step to guard against dramatic size increases in the Android build.