Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BaselineProfile Action Script #731

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 43 additions & 4 deletions .github/workflows/baseline-profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ run-name: ${{ github.actor }} requested a workflow
# Read more at https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
on:
workflow_dispatch:
pull_request:
branches:
- develop

# Environment variables (Optional)
# Small projects might have signingConfigs locally. This could lead to failures on GitHub Actions.
Expand Down Expand Up @@ -51,18 +54,54 @@ jobs:
- name: Grant Permissions to gradlew
run: chmod +x gradlew

# This allows us to build most of what we need without the emulator running
# and using resources
- name: Add Local Properties
env:
API_KEY: ${{ secrets.SENTRY_DSN }}
DATA_STORE_KEY: ${{ secrets.SENTRY_DSN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
DEV_API: ${{ secrets.SENTRY_DSN }}
NEW_API: ${{ secrets.SENTRY_DSN }}
SOPT_DEV_OPERATION_BASE_URL: ${{ secrets.SOPT_DEV_OPERATION_BASE_URL }}
SOPT_OPERATION_BASE_URL: ${{ secrets.SOPT_OPERATION_BASE_URL }}
KEY_ALIAS: ${{ secrets.SENTRY_DSN }}
KEY_PASSWORD: ${{ secrets.SENTRY_DSN }}
STORE_PASSWORD: ${{ secrets.SENTRY_DSN }}
DEV_AMPLITUDE_KEY: ${{ secrets.SENTRY_DSN }}
AMPLITUDE_KEY: ${{ secrets.SENTRY_DSN }}
POKE_DATA_STORE_KEY: ${{ secrets.SENTRY_DSN }}
run: |
echo sentryDsn=\"$SENTRY_DSN\" >> ./local.properties
echo apiKey=\"$API_KEY\" >> ./local.properties
echo dataStoreKey=\"$DATA_STORE_KEY\" >> ./local.properties
echo devOperationApi=\"$SOPT_DEV_OPERATION_BASE_URL\" >> ./local.properties
echo operationApi=\"$SOPT_OPERATION_BASE_URL\" >> ./local.properties
echo devApi=\"$DEV_API\" >> ./local.properties
echo newApi=\"$NEW_API\" >> ./local.properties
echo keyAlias=\"KEY_ALIAS\" >> ./local.properties
echo keyPassword=\"KEY_PASSWORD\" >> ./local.properties
echo storePassword=\"STORE_PASSWORD\" >> ./local.properties
echo devAmplitudeKey=\"$DEV_AMPLITUDE_KEY\" >> ./local.properties
echo amplitudeKey=\"$AMPLITUDE_KEY\" >> ./local.properties
echo pokeDataStoreKey=\"$POKE_DATA_STORE_KEY\" >> ./local.properties

- name: Access Firebase Service
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json

- name: Build app and benchmark
run: ./gradlew :app:assembleBenchmark

# Cleans managed device if previously settle and space currently is not available
- name: Clean Managed Devices
run: ./gradlew cleanManagedDevices --unused-only

# Generates Baseline Profile
- name: Generate Baseline Profile
run: ./gradlew generateBaselineProfile -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile -Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=20 -Dorg.gradle.workers.max=4
run: |
./gradlew generateBaselineProfile \
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" \
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile \
-Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=20 \
-Dorg.gradle.workers.max=4

# Create Pull Request
- name: Create Pull Request
Expand Down
Loading