Skip to content

github: add scripts to store size of android release artifact#9705

Merged
poweifeng merged 2 commits intomainfrom
pf/github-compute-release-size
Feb 13, 2026
Merged

github: add scripts to store size of android release artifact#9705
poweifeng merged 2 commits intomainfrom
pf/github-compute-release-size

Conversation

@poweifeng
Copy link
Contributor

  • 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.

 - 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.
@poweifeng poweifeng added the internal Issue/PR does not affect clients label Feb 10, 2026
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

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
@poweifeng poweifeng removed the request for review from pixelflinger February 10, 2026 22:26
@poweifeng poweifeng enabled auto-merge (squash) February 13, 2026 20:13
@poweifeng poweifeng merged commit 1cd4861 into main Feb 13, 2026
17 checks passed
@poweifeng poweifeng deleted the pf/github-compute-release-size branch February 13, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Issue/PR does not affect clients

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants