Skip to content

Merge release 9.16.0 into deps/jni-0.15.x #6677

Merge release 9.16.0 into deps/jni-0.15.x

Merge release 9.16.0 into deps/jni-0.15.x #6677

Workflow file for this run

name: SDK metrics
on:
push:
paths:
- .github/workflows/metrics.yml
- packages/dart/**
- packages/flutter/**
- metrics/**
- '!**/*.md'
branches-ignore:
- deps/**
- dependabot/**
tags-ignore: ['**']
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
metrics:
name: ${{ matrix.name }}
runs-on: ${{ matrix.host }}
timeout-minutes: 30
strategy:
# We want that the matrix keeps running, default is to cancel all jobs if a single fails.
fail-fast: false
matrix:
include:
- platform: ios
name: iOS
appPlain: test-app-plain.ipa
host: macos-15
- platform: android
name: Android
appPlain: metrics/perf-test-app-plain/build/app/outputs/apk/release/app-arm64-v8a-release.apk
host: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
# Let's stick to an explicit version and update manually because a version change may affect results.
# If it would update implicitly it could confuse people to think the change is actually caused by the PR.
# Instead, we use Updater (update-deps.yml) to create PRs for explicit Flutter SDK update.
- name: Read configured Flutter SDK version
id: conf
run: |
version=$(grep "version" metrics/flutter.properties | cut -d'=' -f2 | xargs)
echo "flutter=$version" >> "$GITHUB_OUTPUT"
- name: Install Flutter v${{ steps.conf.outputs.flutter }}
uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # pin@v2.21.0
with:
flutter-version: ${{ steps.conf.outputs.flutter }}
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
if: ${{ matrix.platform == 'android' }}
with:
java-version: '17'
distribution: 'adopt'
- run: ./metrics/prepare.sh
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
id: app-plain-cache
with:
path: ${{ matrix.appPlain }}
key: ${{ github.workflow }}-${{ github.job }}-appplain-${{ matrix.platform }}-${{ hashFiles('metrics/perf-test-app-plain/pubspec.yaml') }}
# QuickFix for failing iOS 18.0 builds https://github.com/actions/runner-images/issues/12758#issuecomment-3187115656
- name: Switch to Xcode 16.4
if: ${{ matrix.host == 'macos-15' }}
run: sudo xcode-select --switch /Applications/Xcode_16.4.app
- name: Build
run: ./metrics/build.sh ${{ matrix.platform }}
env:
# Necessary to build an iOS .ipa (using fastlane)
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
APP_PLAIN: ${{ matrix.appPlain }}
- name: Collect apps metrics
uses: getsentry/action-app-sdk-overhead-metrics@ecce2e2718b6d97ad62220fca05627900b061ed5
with:
name: ${{ matrix.name }}
config: ./metrics/metrics-${{ matrix.platform }}.yml
sauce-user: ${{ secrets.SAUCE_USERNAME }}
sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }}
metrics-dart:
name: Console
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # pin@v2.21.0
- name: create dart sample apps
working-directory: ./metrics
run: ./prepare-dart.sh
- name: build dart sample apps
working-directory: ./metrics
run: ./build-dart.sh
- name: Set file diff max threshold
run: echo "THRESHOLD=13100000" >> $GITHUB_ENV # 1,31 MB
- name: Compare executable size
working-directory: ./metrics
run: ./compare_sizes.sh perf_test_console_plain.bin perf_test_console_sentry.bin $THRESHOLD