Fix analyze issues on dart #1515
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/** | |
- "!**/*.md" | |
branches-ignore: | |
- deps/** | |
- dependabot/** | |
tags-ignore: ["**"] | |
jobs: | |
cancel-previous-workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # [email protected] | |
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@v4 | |
# 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@2783a3f08e1baf891508463f8c6653c258246225 # [email protected] | |
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 }} |