skydoves requested a workflow #26
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
# Workflow name | |
name: baseline-profiles | |
# Workflow title | |
run-name: ${{ github.actor }} requested a workflow | |
# This should be a manual trigger so this actions gets executed every time make a new pull request. | |
# Change this event to what suits your project best. | |
# Read more at https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows | |
on: | |
workflow_dispatch: | |
# Environment variables (Optional) | |
# Small projects might have signingConfigs locally. This could lead to failures on GitHub Actions. | |
# If that's the case, upload your properties defined locally to GitHub Secrets. | |
# On your signingConfigs, you can recover GitHub Secrets using: variable = System.getenv("VARIABLE") | |
# Then uncomment this block properly defining your uploaded variables | |
# env: | |
# VARIABLE: ${{ secrets.VARIABLE }} | |
# Read more at https://docs.github.com/en/actions/security-guides/encrypted-secrets | |
# Jobs to executed on GitHub machines | |
jobs: | |
# Job name | |
generate-baseline-profiles: | |
# Operating system where the job gets to be executed | |
runs-on: macos-latest | |
# Job steps | |
steps: | |
# Checks your code out on the machine | |
- uses: actions/checkout@v3 | |
# Sets java up | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
# Sets gradle up | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
# Grants execute permission to gradle (safety step) | |
- 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: Build app and benchmark | |
run: ./gradlew :benchmark-landscapist-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 | |
# Create Pull Request | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: "Generate baseline profiles" | |
title: "Generate baseline profiles" | |
delete-branch: true | |
reviewers: skydoves | |
branch: actions/baseline-profiles |