fix analyzer issue #1346
Workflow file for this run
This file contains 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
name: SDK metrics | |
on: | |
push: | |
paths: | |
- .github/workflows/metrics.yml | |
- dart/** | |
- flutter/** | |
- metrics/** | |
branches-ignore: | |
- deps/** | |
- dependabot/** | |
tags-ignore: ['**'] | |
jobs: | |
cancel-previous-workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # pin@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
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-latest | |
- 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@v3 | |
# 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@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0 | |
with: | |
flutter-version: ${{ steps.conf.outputs.flutter }} | |
- uses: actions/setup-java@v3 | |
if: ${{ matrix.platform == 'android' }} | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- run: ./metrics/prepare.sh | |
- uses: actions/cache@v3 | |
id: app-plain-cache | |
with: | |
path: ${{ matrix.appPlain }} | |
key: ${{ github.workflow }}-${{ github.job }}-appplain-${{ matrix.platform }}-${{ hashFiles('metrics/perf-test-app-plain/pubspec.yaml') }} | |
- 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@v1 | |
with: | |
name: ${{ matrix.name }} | |
config: ./metrics/metrics-${{ matrix.platform }}.yml | |
sauce-user: ${{ secrets.SAUCE_USERNAME }} | |
sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }} |