feat: Track the binary size for all the different platforms (#34744)

* feat: Track the binary size for all the different platforms

Signed-off-by: DK Liao <dklassic@gmail.com>

* Add target to bencher job name

Signed-off-by: DK Liao <dklassic@gmail.com>

* Update .github/workflows/bencher.yml

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: DK Liao <dklassic@gmail.com>

---------

Signed-off-by: DK Liao <dklassic@gmail.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
DK Liao 2025-01-20 17:41:23 +08:00 committed by GitHub
parent c070372d1e
commit 9ceb957dd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 365 additions and 153 deletions

View file

@ -13,6 +13,11 @@ on:
github-release-id:
required: false
type: string
bencher:
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
profile:
@ -20,6 +25,11 @@ on:
default: "release"
type: choice
options: ["release", "debug", "production"]
bencher:
required: false
default: false
type: boolean
env:
RUST_BACKTRACE: 1
@ -104,7 +114,7 @@ jobs:
- name: Archive build timing
uses: actions/upload-artifact@v4
with:
name: cargo-timings-android-${{ matrix.target }}
name: cargo-timings-android-${{ matrix.target }}-${{ inputs.profile }}
# Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*
- name: Upload nightly
@ -137,3 +147,21 @@ jobs:
with:
name: ${{ inputs.profile }}-library-android-${{ matrix.target }}
path: target/android/${{ matrix.target }}/${{ inputs.profile }}/servoview.aar
bencher:
needs: ["build"]
strategy:
matrix:
target: ['aarch64-linux-android', 'armv7-linux-androideabi', 'i686-linux-android', 'x86_64-linux-android']
if: ${{ inputs.bencher && inputs.profile != 'debug' && github.event_name != 'workflow_dispatch' && github.event_name != 'merge_group' }}
name: 'Bencher (${{ matrix.target }})'
uses: ./.github/workflows/bencher.yml
with:
target: android-${{ matrix.target }}
profile: ${{ inputs.profile }}
compressed-file-path: ${{ inputs.profile }}-binary-android-${{ matrix.target }}/servoapp.apk
binary-path: lib/${{ matrix.target == 'aarch64-linux-android' && 'arm64-v8a' || matrix.target == 'armv7-linux-androideabi' && 'armeabi-v7a' || matrix.target == 'i686-linux-android' && 'x86' || matrix.target == 'x86_64-linux-android' && 'x86_64'}}/libservoshell.so
file-size: true
speedometer: false
dromaeo: false
secrets: inherit